From: Dandan Bi <dandan.bi@intel.com>
To: edk2-devel@lists.01.org
Cc: Ruiyu Ni <ruiyu.ni@intel.com>,
Michael D Kinney <michael.d.kinney@intel.com>,
Liming Gao <liming.gao@intel.com>
Subject: [patch 4/5] MdePkg: Add PciRoot/PcieRoot text for ACPI Expanded Device Path
Date: Mon, 8 Oct 2018 11:31:57 +0800 [thread overview]
Message-ID: <20181008033158.10652-4-dandan.bi@intel.com> (raw)
In-Reply-To: <20181008033158.10652-1-dandan.bi@intel.com>
REF: https://bugzilla.tianocore.org/show_bug.cgi?id=1228
According to UEFI spec,for ACPI Expanded Device Path
when HID=PNP0A03 or CID=PNP0A03 and HID != PNP0A08,
the device path node can be displayed as: PciRoot(UID|UIDSTR)
When HID=PNP0A08 or CID=PNP0A08, the device path node can be
displayed as: PcieRoot(UID|UIDSTR). But current code miss the
code logic.
This commit is to do the enhancement.
Cc: Ruiyu Ni <ruiyu.ni@intel.com>
Cc: Michael D Kinney <michael.d.kinney@intel.com>
Cc: Liming Gao <liming.gao@intel.com>
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Dandan Bi <dandan.bi@intel.com>
---
.../UefiDevicePathLib/DevicePathToText.c | 21 +++++++++++++++++++
1 file changed, 21 insertions(+)
diff --git a/MdePkg/Library/UefiDevicePathLib/DevicePathToText.c b/MdePkg/Library/UefiDevicePathLib/DevicePathToText.c
index 8e5efba1e8..7ad9eadf6c 100644
--- a/MdePkg/Library/UefiDevicePathLib/DevicePathToText.c
+++ b/MdePkg/Library/UefiDevicePathLib/DevicePathToText.c
@@ -431,10 +431,31 @@ DevPathToTextAcpiEx (
AcpiEx = DevPath;
HIDStr = (CHAR8 *) (((UINT8 *) AcpiEx) + sizeof (ACPI_EXTENDED_HID_DEVICE_PATH));
UIDStr = HIDStr + AsciiStrLen (HIDStr) + 1;
CIDStr = UIDStr + AsciiStrLen (UIDStr) + 1;
+ if (DisplayOnly) {
+ if ((EISA_ID_TO_NUM (AcpiEx->HID) == 0x0A03) ||
+ (EISA_ID_TO_NUM (AcpiEx->CID) == 0x0A03 && EISA_ID_TO_NUM (AcpiEx->HID) != 0x0A08)) {
+ if (AcpiEx->UID == 0) {
+ UefiDevicePathLibCatPrint (Str, L"PciRoot(%a)", UIDStr);
+ } else {
+ UefiDevicePathLibCatPrint (Str, L"PciRoot(0x%x)", AcpiEx->UID);
+ }
+ return;
+ }
+
+ if (EISA_ID_TO_NUM (AcpiEx->HID) == 0x0A08 || EISA_ID_TO_NUM (AcpiEx->CID) == 0x0A08) {
+ if (AcpiEx->UID == 0) {
+ UefiDevicePathLibCatPrint (Str, L"PcieRoot(%a)", UIDStr);
+ } else {
+ UefiDevicePathLibCatPrint (Str, L"PcieRoot(0x%x)", AcpiEx->UID);
+ }
+ return;
+ }
+ }
+
//
// Converts EISA identification to string.
//
UnicodeSPrint (
HIDText,
--
2.18.0.windows.1
next prev parent reply other threads:[~2018-10-08 3:32 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-10-08 3:31 [patch 1/5] MdePkg: Correct the string expression of UTF8 vendor device path Dandan Bi
2018-10-08 3:31 ` [patch 2/5] MdePkg: Correct the string order of ACPI Expanded Device Path Dandan Bi
2018-10-08 6:45 ` Ni, Ruiyu
2018-10-08 3:31 ` [patch 3/5] MdePkg: Correct condition check for AcpiExp text format Dandan Bi
2018-10-08 6:49 ` Ni, Ruiyu
2018-10-08 3:31 ` Dandan Bi [this message]
2018-10-08 6:50 ` [patch 4/5] MdePkg: Add PciRoot/PcieRoot text for ACPI Expanded Device Path Ni, Ruiyu
2018-10-08 3:31 ` [patch 5/5] MdePkg: Use VENDOR_DEVICE_PATH structure for Debug Port device path Dandan Bi
2018-10-08 6:54 ` Ni, Ruiyu
2018-10-08 6:43 ` [patch 1/5] MdePkg: Correct the string expression of UTF8 vendor " Ni, Ruiyu
2018-10-08 11:54 ` Laszlo Ersek
2018-10-08 14:36 ` Bi, Dandan
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-list 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=20181008033158.10652-4-dandan.bi@intel.com \
--to=devel@edk2.groups.io \
/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