summaryrefslogtreecommitdiffstats
path: root/src/image
diff options
context:
space:
mode:
authorMichael Brown2014-07-16 02:25:37 +0200
committerMichael Brown2014-07-16 02:58:19 +0200
commitc3b6ccf65b21e7f3abda5317b16cb3105af3f272 (patch)
treea9fa5606b85fd5106dd5116d054d70069b24d8ae /src/image
parent[efi] Install our own disk I/O protocol and claim exclusive use of it (diff)
downloadipxe-c3b6ccf65b21e7f3abda5317b16cb3105af3f272.tar.gz
ipxe-c3b6ccf65b21e7f3abda5317b16cb3105af3f272.tar.xz
ipxe-c3b6ccf65b21e7f3abda5317b16cb3105af3f272.zip
[efi] Allow for interception of boot services calls by loaded image
When building with DEBUG=efi_wrap, print details of calls made by the loaded image to selected boot services functions. Signed-off-by: Michael Brown <mcb30@ipxe.org>
Diffstat (limited to 'src/image')
-rw-r--r--src/image/efi_image.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/image/efi_image.c b/src/image/efi_image.c
index 5de915b0..9c366bb2 100644
--- a/src/image/efi_image.c
+++ b/src/image/efi_image.c
@@ -28,6 +28,7 @@ FILE_LICENCE ( GPL2_OR_LATER );
#include <ipxe/efi/efi_file.h>
#include <ipxe/efi/efi_driver.h>
#include <ipxe/efi/efi_strings.h>
+#include <ipxe/efi/efi_wrap.h>
#include <ipxe/image.h>
#include <ipxe/init.h>
#include <ipxe/features.h>
@@ -222,6 +223,9 @@ static int efi_image_exec ( struct image *image ) {
/* Release network devices for use via SNP */
efi_snp_release();
+ /* Wrap calls made by the loaded image (for debugging) */
+ efi_wrap ( handle, loaded.image );
+
/* Start the image */
if ( ( efirc = bs->StartImage ( handle, NULL, NULL ) ) != 0 ) {
rc = -EEFI_START ( efirc );