From 33d46d7beb452ce022709e1e2c302777cbab7f46 Mon Sep 17 00:00:00 2001 From: Simon Rettberg Date: Tue, 5 Oct 2021 16:07:52 +0200 Subject: Local UEFI disk boot support By Aaron Young: https://lists.ipxe.org/pipermail/ipxe-devel/2019-February/006504.html --- src/interface/efi/efi_block.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'src/interface/efi/efi_block.c') diff --git a/src/interface/efi/efi_block.c b/src/interface/efi/efi_block.c index 74cf7c0c0..18b1504e7 100644 --- a/src/interface/efi/efi_block.c +++ b/src/interface/efi/efi_block.c @@ -57,6 +57,7 @@ FILE_LICENCE ( GPL2_OR_LATER_OR_UBDL ); #include #include #include +#include /** ACPI table protocol protocol */ static EFI_ACPI_TABLE_PROTOCOL *acpi; @@ -632,7 +633,12 @@ static int efi_block_boot ( unsigned int drive, const char *filename ) { sandev = sandev_find ( drive ); if ( ! sandev ) { DBG ( "EFIBLK cannot find drive %#02x\n", drive ); - rc = -ENODEV; + DBG ( "EFIBLK attempting local boot for drive %#02x, " + "filename=%s\n", drive, filename ); + rc = efi_boot_local( drive, filename ); + if (rc) + rc = -ENODEV; + goto err_sandev_find; } -- cgit v1.2.3-55-g7522