linux-surface / surface-pro-x

Tracking and meta repository for Surface Pro X support.
76 stars 6 forks source link

Support for UEFI runtime services #40

Closed qzed closed 1 year ago

qzed commented 1 year ago

Calling UEFI runtime service functions (at least GetNextVariableName and GetTime) returns EFI_UNSUPPORTED. According to the Windows hardware requirements (https://docs.microsoft.com/en-us/windows-hardware/drivers/bringup/uefi-requirements-that-apply-to-all-windows-platforms), those need to be supported. The UEFI variables seem to be provided via a TrEE service (uefisec, see #37), which leaves the rest.

qzed commented 1 year ago

As far as I can tell:

qzed commented 1 year ago

I'm working on a prototype for UEFI variable access over at https://github.com/qzed/linux-qcom-uefivars.

qzed commented 1 year ago

Preliminary patches for UEFI variable access: https://github.com/linux-surface/kernel/compare/a396cc5be29098af180a734023635b85c43e7ce1...988b901e95090d869934d6bc7a538c00a20a47ac

qzed commented 1 year ago

I've merged the patches. As far as I can tell, the other runtime service methods (except for the time ones) should work (with the time ones being unsupported). That means ResetSystem() should probably work as well, but apparently crashes. I'll try to debug this and open a new issue once I have some more information.