mirror of
https://github.com/ipxe/ipxe
synced 2025-12-26 01:22:37 +03:00
[efi] Open device path protocol only at point of use
Some EFI 1.10 systems (observed on an Apple iMac) do not allow us to open the device path protocol with an attribute of EFI_OPEN_PROTOCOL_BY_DRIVER and so we cannot maintain a safe, long-lived pointer to the device path. Work around this by instead opening the device path protocol with an attribute of EFI_OPEN_PROTOCOL_GET_PROTOCOL whenever we need to use it. Debugged-by: Curtis Larsen <larsen@dixie.edu> Signed-off-by: Michael Brown <mcb30@ipxe.org>
This commit is contained in:
@@ -19,8 +19,6 @@ struct efi_device {
|
||||
struct device dev;
|
||||
/** EFI device handle */
|
||||
EFI_HANDLE device;
|
||||
/** Device path */
|
||||
EFI_DEVICE_PATH_PROTOCOL *path;
|
||||
/** Driver for this device */
|
||||
struct efi_driver *driver;
|
||||
/** Driver-private data */
|
||||
|
||||
@@ -66,12 +66,8 @@ struct efi_snp_device {
|
||||
wchar_t driver_name[16];
|
||||
/** Controller name */
|
||||
wchar_t controller_name[64];
|
||||
/** The device path
|
||||
*
|
||||
* This field is variable in size and must appear at the end
|
||||
* of the structure.
|
||||
*/
|
||||
EFI_DEVICE_PATH_PROTOCOL path;
|
||||
/** The device path */
|
||||
EFI_DEVICE_PATH_PROTOCOL *path;
|
||||
};
|
||||
|
||||
extern int efi_snp_hii_install ( struct efi_snp_device *snpdev );
|
||||
|
||||
Reference in New Issue
Block a user