]> git.proxmox.com Git - mirror_edk2.git/blobdiff - MdePkg/Library/UefiDevicePathLib/DevicePathToText.c
MdePkg: Add PciRoot/PcieRoot text for ACPI Expanded Device Path
[mirror_edk2.git] / MdePkg / Library / UefiDevicePathLib / DevicePathToText.c
index 8e5efba1e8e14bc4a13217dd6bef87b59e0f177f..7ad9eadf6c11e3d161ec2dba3c67ed0e95deccda 100644 (file)
@@ -433,6 +433,27 @@ DevPathToTextAcpiEx (
   UIDStr = HIDStr + AsciiStrLen (HIDStr) + 1;\r
   CIDStr = UIDStr + AsciiStrLen (UIDStr) + 1;\r
 \r
+  if (DisplayOnly) {\r
+    if ((EISA_ID_TO_NUM (AcpiEx->HID) == 0x0A03) ||\r
+        (EISA_ID_TO_NUM (AcpiEx->CID) == 0x0A03 && EISA_ID_TO_NUM (AcpiEx->HID) != 0x0A08)) {\r
+      if (AcpiEx->UID == 0) {\r
+        UefiDevicePathLibCatPrint (Str, L"PciRoot(%a)", UIDStr);\r
+      } else {\r
+        UefiDevicePathLibCatPrint (Str, L"PciRoot(0x%x)", AcpiEx->UID);\r
+      }\r
+      return;\r
+    }\r
+\r
+    if (EISA_ID_TO_NUM (AcpiEx->HID) == 0x0A08 || EISA_ID_TO_NUM (AcpiEx->CID) == 0x0A08) {\r
+      if (AcpiEx->UID == 0) {\r
+        UefiDevicePathLibCatPrint (Str, L"PcieRoot(%a)", UIDStr);\r
+      } else {\r
+        UefiDevicePathLibCatPrint (Str, L"PcieRoot(0x%x)", AcpiEx->UID);\r
+      }\r
+      return;\r
+    }\r
+  }\r
+\r
   //\r
   // Converts EISA identification to string.\r
   //\r