Explorar el Código

[efi] Do not try to fetch loaded image device path protocol

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>
tags/v1.20.1
Michael Brown hace 10 años
padre
commit
6cdd3bb656
Se han modificado 1 ficheros con 0 adiciones y 23 borrados
  1. 0
    23
      src/interface/efi/efi_init.c

+ 0
- 23
src/interface/efi/efi_init.c Ver fichero

@@ -34,9 +34,6 @@ EFI_HANDLE efi_image_handle;
34 34
 /** Loaded image protocol for this image */
35 35
 EFI_LOADED_IMAGE_PROTOCOL *efi_loaded_image;
36 36
 
37
-/** Loaded image protocol device path for this image */
38
-EFI_DEVICE_PATH_PROTOCOL *efi_loaded_image_path;
39
-
40 37
 /** System table passed to entry point */
41 38
 EFI_SYSTEM_TABLE *efi_systab;
42 39
 
@@ -44,10 +41,6 @@ EFI_SYSTEM_TABLE *efi_systab;
44 41
 static EFI_GUID efi_loaded_image_protocol_guid
45 42
 	= EFI_LOADED_IMAGE_PROTOCOL_GUID;
46 43
 
47
-/** EFI loaded image device path protocol GUID */
48
-static EFI_GUID efi_loaded_image_device_path_protocol_guid
49
-	= EFI_LOADED_IMAGE_DEVICE_PATH_PROTOCOL_GUID;
50
-
51 44
 /** Event used to signal shutdown */
52 45
 static EFI_EVENT efi_shutdown_event;
53 46
 
@@ -152,7 +145,6 @@ EFI_STATUS efi_init ( EFI_HANDLE image_handle,
152 145
 	struct efi_protocol *prot;
153 146
 	struct efi_config_table *tab;
154 147
 	void *loaded_image;
155
-	void *loaded_image_path;
156 148
 	EFI_STATUS efirc;
157 149
 	int rc;
158 150
 
@@ -220,21 +212,6 @@ EFI_STATUS efi_init ( EFI_HANDLE image_handle,
220 212
 	DBGC ( systab, "EFI image base address %p\n",
221 213
 	       efi_loaded_image->ImageBase );
222 214
 
223
-	/* Get loaded image device path protocol */
224
-	if ( ( efirc = bs->OpenProtocol ( image_handle,
225
-				&efi_loaded_image_device_path_protocol_guid,
226
-				&loaded_image_path, image_handle, NULL,
227
-				EFI_OPEN_PROTOCOL_GET_PROTOCOL ) ) != 0 ) {
228
-		rc = -EEFI ( efirc );
229
-		DBGC ( systab, "EFI could not get loaded image device path "
230
-		       "protocol: %s", strerror ( rc ) );
231
-		return efirc;
232
-	}
233
-	efi_loaded_image_path = loaded_image_path;
234
-	DBGC ( systab, "EFI image device path " );
235
-	DBGC_EFI_DEVPATH ( systab, efi_loaded_image_path );
236
-	DBGC ( systab, "\n" );
237
-
238 215
 	/* EFI is perfectly capable of gracefully shutting down any
239 216
 	 * loaded devices if it decides to fall back to a legacy boot.
240 217
 	 * For no particularly comprehensible reason, it doesn't

Loading…
Cancelar
Guardar