linux-surface / surface-pro-x

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

UEFI ResetSystem() crashes #41

Open qzed opened 2 years ago

qzed commented 2 years ago

Calling the UEFI ResetSystem() function causes an oops. In contrast to the variable and RTC functions, this function should be supported (as can inferred by it crashing rather than returning EFI_UNSUPPORTED). My current theory is that it expects to be called in some kind of state that we're not fulfilling.

We're currently working around with a hack, preventing ResetSystem() from being called.

qzed commented 1 year ago

Some debug info with the efi=debug command line option (as well as various others to prevent the display from being taken over and thus the crash from being hidden):

Tested on v6.0.6.

qzed commented 1 year ago

After https://github.com/linux-surface/kernel/commit/8a9a1a18731eb123e35f48176380a18b9782845e, the kernel can now recover from an EFI page fault. This means that reboot and poweroff fall back to the architecture functions.

Log for reboot with do_kernel_restart() commented out: log.jpg