On 08.02.2022 11:52, Julien Grall wrote: > From: Julien Grall <[email protected]> > > The function efi_exit_boot() will be called within the UEFI stub. This > means printk() is not available will actually result to a crash when > called (at least on Arm). > > Replace the call to printk() with PrintErrMsg(). > > Fixes: 49450415d6 ("efi: optionally call SetVirtualAddressMap()") > Signed-off-by: Julien Grall <[email protected]>
I think it was intentional to use printk() here, so I'd like to ask for more details about the observed crash. That's also to try to figure whether x86 would also be affected. The problem is that without serial console configured in EFI, the output from PrintErrMesg() is going to be very unlikely to actually be observable (on the console), whereas the printk() output would at least be retrievable by "xl dmesg" after the system is up. What's worse though: 1) PrintErrMesg() invokes blexit() as the last thing. Yet we don't want to prevent Xen from booting; all we want is to disable use of runtime services. 2) I'm not convinced you can use StdErr anymore after ExitBootServices() was already called. Jan
