[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>
This commit is contained in:
Michael Brown
2014-07-16 01:25:37 +01:00
parent 8a380987c1
commit c3b6ccf65b
3 changed files with 257 additions and 0 deletions

View File

@@ -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 );