summaryrefslogtreecommitdiffstats
path: root/MdePkg/Library/UefiDevicePathLib
diff options
context:
space:
mode:
authorDandan Bi <dandan.bi@intel.com>2018-10-05 16:06:00 +0800
committerLiming Gao <liming.gao@intel.com>2018-10-09 22:20:19 +0800
commit78af0984b45a780e45d57c22c85a1f594b969212 (patch)
tree52d650b7e7f9b53bd69243a847cf8e52bea018ff /MdePkg/Library/UefiDevicePathLib
parentfb4bea551e5b7e16e54676bca3d1ccde65f57c77 (diff)
downloadedk2-78af0984b45a780e45d57c22c85a1f594b969212.tar.gz
edk2-78af0984b45a780e45d57c22c85a1f594b969212.tar.bz2
edk2-78af0984b45a780e45d57c22c85a1f594b969212.zip
MdePkg: Add PciRoot/PcieRoot text for ACPI Expanded Device Path
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> Reviewed-by: Ruiyu Ni <ruiyu.ni@intel.com>
Diffstat (limited to 'MdePkg/Library/UefiDevicePathLib')
-rw-r--r--MdePkg/Library/UefiDevicePathLib/DevicePathToText.c21
1 files changed, 21 insertions, 0 deletions
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
@@ -433,6 +433,27 @@ DevPathToTextAcpiEx (
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.
//