ARM-software / ebbr

Embedded Base Boot Requirements Specification
Creative Commons Attribution Share Alike 4.0 International
113 stars 36 forks source link

ResetSystem() fallback behavior #50

Closed xypron closed 4 years ago

xypron commented 4 years ago

The ResetSystem() runtime service is marked as optional after ExitBootServices().

With UEFI 2.8 Erratum A the OS would be able to detect that it is not implemented by inspecting the configuration table EFI_RT_PROPERTIES_TABLE. Linux before patch 9b42f76ad58b3f6 does not check this table.

So it is unclear what an unimplemented ResetSystem() should do:

ResetShutdown() has this comment in EDK II: "System shutdown should not return, if it returns, it means the system does not support shut down reset."

ResetWarm() has this comment in EDK II: "System reset should not return, if it returns, it means the system does not support warm reset."

If ResetSystem() returns, Linux will try to reset the board by its own means which makes more sense than hanging in an endless loop.

Best regards

Heinrich

cc. @agraf

glikely commented 4 years ago

Discussed at 2020.08.31 meeting. Heinrich to provide a patch and run it past some of the UEFI spec folks before merging.