surface-pro-x icon indicating copy to clipboard operation
surface-pro-x copied to clipboard

UEFI ResetSystem() crashes

Open qzed opened this issue 3 years ago • 2 comments

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 avatar Jul 22 '22 01:07 qzed

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 avatar Jan 16 '23 21:01 qzed

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

qzed avatar Jan 23 '23 17:01 qzed