public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
* [U-Boot] [PATCH 1/2] efi_loader: device_path: add Device Logical Unit sub type
@ 2019-08-22  8:54 AKASHI Takahiro
  2019-08-22  8:54 ` [U-Boot] [PATCH 2/2] efi_loader: device_path: support Sandbox's "host" devices AKASHI Takahiro
  2019-08-22 18:44 ` [U-Boot] [PATCH 1/2] efi_loader: device_path: add Device Logical Unit sub type Heinrich Schuchardt
  0 siblings, 2 replies; 9+ messages in thread
From: AKASHI Takahiro @ 2019-08-22  8:54 UTC (permalink / raw)
  To: u-boot

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.akashi@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

^ permalink raw reply related	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2019-09-11 17:22 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2019-08-22  8:54 [U-Boot] [PATCH 1/2] efi_loader: device_path: add Device Logical Unit sub type AKASHI Takahiro
2019-08-22  8:54 ` [U-Boot] [PATCH 2/2] efi_loader: device_path: support Sandbox's "host" devices AKASHI Takahiro
2019-08-22 18:19   ` Heinrich Schuchardt
2019-08-22 23:34     ` AKASHI Takahiro
2019-08-23 18:09       ` Heinrich Schuchardt
2019-09-11  6:35         ` AKASHI Takahiro
2019-09-11 17:22           ` Heinrich Schuchardt
2019-08-22 18:44 ` [U-Boot] [PATCH 1/2] efi_loader: device_path: add Device Logical Unit sub type Heinrich Schuchardt
2019-08-22 23:25   ` AKASHI Takahiro

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox