public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
From: AKASHI Takahiro <takahiro.akashi@linaro.org>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH 1/2] efi_loader: device_path: add Device Logical Unit sub type
Date: Fri, 23 Aug 2019 08:25:06 +0900	[thread overview]
Message-ID: <20190822232505.GC14152@linaro.org> (raw)
In-Reply-To: <3a037ad3-c04e-3850-68a0-306a50c24a1d@gmx.de>

On Thu, Aug 22, 2019 at 08:44:49PM +0200, Heinrich Schuchardt wrote:
> On 8/22/19 10:54 AM, AKASHI Takahiro wrote:
> >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);
> 
> The UEFI spec 2 has this output example:
> Unit(LUN)
> 
> In EDK2:
> MdePkg/Library/UefiDevicePathLib/DevicePathToText.c:1019:
> UefiDevicePathLibCatPrint (Str, L"Unit(0x%x)", LogicalUnit->Lun);
> 
> Please, correct the output format to match EDK2 (and the spec).

Good catch, thank you. Will fix.

-Takahiro Akashi


> Best regards
> 
> Heinrich
> 
> >+		break;
> >+	}
> >  	case DEVICE_PATH_SUB_TYPE_MSG_USB: {
> >  		struct efi_device_path_usb *udp =
> >  			(struct efi_device_path_usb *)dp;
> >
> 

      reply	other threads:[~2019-08-22 23:25 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
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 message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20190822232505.GC14152@linaro.org \
    --to=takahiro.akashi@linaro.org \
    --cc=u-boot@lists.denx.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox