1
0
mirror of https://xff.cz/git/u-boot/ synced 2025-09-02 09:12:08 +02:00

efi_loader: add device-path utils

Helpers to construct device-paths from devices, partitions, files, and
for parsing and manipulating device-paths.

For non-legacy devices, this will use u-boot's device-model to construct
device-paths which include bus hierarchy to construct device-paths.  For
legacy devices we still fake it, but slightly more convincingly.

Signed-off-by: Rob Clark <robdclark@gmail.com>
Signed-off-by: Alexander Graf <agraf@suse.de>
This commit is contained in:
Rob Clark
2017-09-13 18:05:28 -04:00
committed by Alexander Graf
parent c80214ce1f
commit b66c60dde9
5 changed files with 611 additions and 3 deletions

View File

@@ -314,6 +314,7 @@ struct efi_device_path_acpi_path {
#define DEVICE_PATH_TYPE_MESSAGING_DEVICE 0x03
# define DEVICE_PATH_SUB_TYPE_MSG_USB 0x05
# define DEVICE_PATH_SUB_TYPE_MSG_MAC_ADDR 0x0b
# define DEVICE_PATH_SUB_TYPE_MSG_USB_CLASS 0x0f
# define DEVICE_PATH_SUB_TYPE_MSG_SD 0x1a
# define DEVICE_PATH_SUB_TYPE_MSG_MMC 0x1d
@@ -329,6 +330,15 @@ struct efi_device_path_mac_addr {
u8 if_type;
} __packed;
struct efi_device_path_usb_class {
struct efi_device_path dp;
u16 vendor_id;
u16 product_id;
u8 device_class;
u8 device_subclass;
u8 device_protocol;
} __packed;
struct efi_device_path_sd_mmc_path {
struct efi_device_path dp;
u8 slot_number;