diff options
author | Michael Brown <mcb30@ipxe.org> | 2021-11-21 13:27:14 +0000 |
---|---|---|
committer | Michael Brown <mcb30@ipxe.org> | 2021-11-21 13:34:10 +0000 |
commit | b6045a8cbb3843f185e8b1ab6488ee6799d0c2b7 (patch) | |
tree | 956c27047574229be355748c768cb1b1d08b2dcc /src/include/ipxe/efi | |
parent | 51612b6e69e049b6f08e833581815b4d0e9ffd39 (diff) | |
download | ipxe-b6045a8cbb3843f185e8b1ab6488ee6799d0c2b7.zip ipxe-b6045a8cbb3843f185e8b1ab6488ee6799d0c2b7.tar.gz ipxe-b6045a8cbb3843f185e8b1ab6488ee6799d0c2b7.tar.bz2 |
[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>
Diffstat (limited to 'src/include/ipxe/efi')
-rw-r--r-- | src/include/ipxe/efi/efi_wrap.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/include/ipxe/efi/efi_wrap.h b/src/include/ipxe/efi/efi_wrap.h index 6c7ccf2..2747a9e 100644 --- a/src/include/ipxe/efi/efi_wrap.h +++ b/src/include/ipxe/efi/efi_wrap.h @@ -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 */ |