This sub type may not be very useful for normal systems,
but it will be used to support "host" devices on U-Boot sandbox
build.

See UEFI Specification 2.8, section 10.3.4.8.

Signed-off-by: AKASHI Takahiro <takahiro.aka...@linaro.org>
---
 include/efi_api.h                        | 6 ++++++
 lib/efi_loader/efi_device_path_to_text.c | 6 ++++++
 2 files changed, 12 insertions(+)

diff --git a/include/efi_api.h b/include/efi_api.h
index d3fff3c57936..bb028546c864 100644
--- a/include/efi_api.h
+++ b/include/efi_api.h
@@ -427,6 +427,7 @@ struct efi_device_path_acpi_path {
 #  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_LUN         0x11
 #  define DEVICE_PATH_SUB_TYPE_MSG_SD          0x1a
 #  define DEVICE_PATH_SUB_TYPE_MSG_MMC         0x1d
 
@@ -443,6 +444,11 @@ struct efi_device_path_scsi {
        u16 logical_unit_number;
 } __packed;
 
+struct efi_device_path_lun {
+       struct efi_device_path dp;
+       u8 logical_unit_number;
+} __packed;
+
 struct efi_device_path_usb {
        struct efi_device_path dp;
        u8 parent_port_number;
diff --git a/lib/efi_loader/efi_device_path_to_text.c 
b/lib/efi_loader/efi_device_path_to_text.c
index 96fd08971b73..8aae8215e1af 100644
--- a/lib/efi_loader/efi_device_path_to_text.c
+++ b/lib/efi_loader/efi_device_path_to_text.c
@@ -107,6 +107,12 @@ static char *dp_msging(char *s, struct efi_device_path *dp)
                             ide->logical_unit_number);
                break;
        }
+       case DEVICE_PATH_SUB_TYPE_MSG_LUN: {
+               struct efi_device_path_lun *lun =
+                       (struct efi_device_path_lun *)dp;
+               s += sprintf(s, "LUN(%u)", lun->logical_unit_number);
+               break;
+       }
        case DEVICE_PATH_SUB_TYPE_MSG_USB: {
                struct efi_device_path_usb *udp =
                        (struct efi_device_path_usb *)dp;
-- 
2.21.0

_______________________________________________
U-Boot mailing list
U-Boot@lists.denx.de
https://lists.denx.de/listinfo/u-boot

Reply via email to