]> git.ipfire.org Git - thirdparty/ipxe.git/commitdiff
[efi] Do not try to fetch loaded image device path protocol
authorMichael Brown <mcb30@ipxe.org>
Mon, 19 May 2014 22:08:42 +0000 (23:08 +0100)
committerMichael Brown <mcb30@ipxe.org>
Mon, 19 May 2014 23:33:12 +0000 (00:33 +0100)
Some UEFI systems (observed with a Mac Pro) do not provide a loaded
image device path protocol.  We don't currently use the loaded image
device path protocol for anything beyond printing a debug message, so
simply remove the code which attempts to fetch it.

Reported-by: Matt Woodward <pxematt@woodwardcc.com>
Tested-by: Matt Woodward <pxematt@woodwardcc.com>
Signed-off-by: Michael Brown <mcb30@ipxe.org>
src/interface/efi/efi_init.c

index e6ef3d054111dee88e43e9608cc45c79ca758423..5eb10135025752c1c325a04e9c7fa626434ba039 100644 (file)
@@ -34,9 +34,6 @@ EFI_HANDLE efi_image_handle;
 /** Loaded image protocol for this image */
 EFI_LOADED_IMAGE_PROTOCOL *efi_loaded_image;
 
-/** Loaded image protocol device path for this image */
-EFI_DEVICE_PATH_PROTOCOL *efi_loaded_image_path;
-
 /** System table passed to entry point */
 EFI_SYSTEM_TABLE *efi_systab;
 
@@ -44,10 +41,6 @@ EFI_SYSTEM_TABLE *efi_systab;
 static EFI_GUID efi_loaded_image_protocol_guid
        = EFI_LOADED_IMAGE_PROTOCOL_GUID;
 
-/** EFI loaded image device path protocol GUID */
-static EFI_GUID efi_loaded_image_device_path_protocol_guid
-       = EFI_LOADED_IMAGE_DEVICE_PATH_PROTOCOL_GUID;
-
 /** Event used to signal shutdown */
 static EFI_EVENT efi_shutdown_event;
 
@@ -152,7 +145,6 @@ EFI_STATUS efi_init ( EFI_HANDLE image_handle,
        struct efi_protocol *prot;
        struct efi_config_table *tab;
        void *loaded_image;
-       void *loaded_image_path;
        EFI_STATUS efirc;
        int rc;
 
@@ -220,21 +212,6 @@ EFI_STATUS efi_init ( EFI_HANDLE image_handle,
        DBGC ( systab, "EFI image base address %p\n",
               efi_loaded_image->ImageBase );
 
-       /* Get loaded image device path protocol */
-       if ( ( efirc = bs->OpenProtocol ( image_handle,
-                               &efi_loaded_image_device_path_protocol_guid,
-                               &loaded_image_path, image_handle, NULL,
-                               EFI_OPEN_PROTOCOL_GET_PROTOCOL ) ) != 0 ) {
-               rc = -EEFI ( efirc );
-               DBGC ( systab, "EFI could not get loaded image device path "
-                      "protocol: %s", strerror ( rc ) );
-               return efirc;
-       }
-       efi_loaded_image_path = loaded_image_path;
-       DBGC ( systab, "EFI image device path " );
-       DBGC_EFI_DEVPATH ( systab, efi_loaded_image_path );
-       DBGC ( systab, "\n" );
-
        /* EFI is perfectly capable of gracefully shutting down any
         * loaded devices if it decides to fall back to a legacy boot.
         * For no particularly comprehensible reason, it doesn't