mirror of
https://github.com/ipxe/ipxe
synced 2026-04-16 03:00:10 +03:00
[efi] Modify global system table when wrapping a loaded image
The EFI loaded image protocol allows an image to be provided with a custom system table, and we currently use this mechanism to wrap any boot services calls made by the loaded image in order to provide strace-like debugging via DEBUG=efi_wrap. The ExitBootServices() call will modify the global system table, leaving the loaded image using a system table that is no longer current. When DEBUG=efi_wrap is used, this generally results in the machine locking up at the point that the loaded operating system calls ExitBootServices(). Fix by modifying the global EFI system table to point to our wrapper functions, instead of providing a custom system table via the loaded image protocol. Signed-off-by: Michael Brown <mcb30@ipxe.org>
This commit is contained in:
@@ -10,7 +10,7 @@ FILE_LICENCE ( GPL2_OR_LATER_OR_UBDL );
|
||||
|
||||
#include <ipxe/efi/efi.h>
|
||||
|
||||
extern EFI_SYSTEM_TABLE * efi_wrap_systab ( void );
|
||||
extern EFI_BOOT_SERVICES * efi_wrap_bs ( void );
|
||||
extern void efi_wrap ( EFI_HANDLE handle );
|
||||
|
||||
#endif /* _IPXE_EFI_WRAP_H */
|
||||
|
||||
Reference in New Issue
Block a user