]> git.proxmox.com Git - mirror_edk2.git/commitdiff
DynamicTablesPkg: AcpiSsdtPcieLibArm: Support UID > 0xF
authorJeff Brasen <jbrasen@nvidia.com>
Fri, 8 Jul 2022 20:59:02 +0000 (14:59 -0600)
committermergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
Tue, 19 Jul 2022 16:15:35 +0000 (16:15 +0000)
Add support for PCIe devices with UID > 0xF.
This is done by using the next value in the name so
PCI5, PC26, etc

Signed-off-by: Jeff Brasen <jbrasen@nvidia.com>
Reviewed-by: Pierre Gondois <pierre.gondois@arm.com>
Reviewed-by: Sami Mujawar <sami.mujawar@arm.com>
DynamicTablesPkg/Library/Acpi/Arm/AcpiSsdtPcieLibArm/SsdtPcieGenerator.c
DynamicTablesPkg/Library/Acpi/Arm/AcpiSsdtPcieLibArm/SsdtPcieGenerator.h

index 3c20d928ce8cad3ed545bda4e3804410a53cb8ac..3b3d904dbea8ab254842f8e5c96d4ae29bbbb89b 100644 (file)
@@ -824,7 +824,10 @@ GeneratePciDevice (
 \r
   // Write the name of the PCI device.\r
   CopyMem (AslName, "PCIx", AML_NAME_SEG_SIZE + 1);\r
-  AslName[AML_NAME_SEG_SIZE - 1] = AsciiFromHex (Uid);\r
+  AslName[AML_NAME_SEG_SIZE - 1] = AsciiFromHex (Uid & 0xF);\r
+  if (Uid > 0xF) {\r
+    AslName[AML_NAME_SEG_SIZE - 2] = AsciiFromHex ((Uid >> 4) & 0xF);\r
+  }\r
 \r
   // ASL: Device (PCIx) {}\r
   Status = AmlCodeGenDevice (AslName, ScopeNode, &PciNode);\r
index 59a0d601a36d5a3ce90cc1dedf0d2827f51dd8db..515a3e1785e6d4b4221f4765e11d4e2d1f96fa81 100644 (file)
@@ -31,7 +31,7 @@
         Corresponding changes would be needed to support the Name and\r
         UID fields describing the Pci root complexes.\r
 */\r
-#define MAX_PCI_ROOT_COMPLEXES_SUPPORTED  16\r
+#define MAX_PCI_ROOT_COMPLEXES_SUPPORTED  256\r
 \r
 // _SB scope of the AML namespace.\r
 #define SB_SCOPE  "\\_SB_"\r