summaryrefslogtreecommitdiffstats
path: root/DynamicTablesPkg
diff options
context:
space:
mode:
authorJeff Brasen <jbrasen@nvidia.com>2022-07-08 14:59:02 -0600
committermergify[bot] <37929162+mergify[bot]@users.noreply.github.com>2022-07-19 16:15:35 +0000
commit9ac155bf0b875f5df29ff4389107e2ec2ee3807e (patch)
tree874b368272cf0720b3fdf5a1cc9533c8e98ccba4 /DynamicTablesPkg
parent6cda306da1dde935e866054ef8b858de768c4cf6 (diff)
downloadedk2-9ac155bf0b875f5df29ff4389107e2ec2ee3807e.tar.gz
edk2-9ac155bf0b875f5df29ff4389107e2ec2ee3807e.tar.bz2
edk2-9ac155bf0b875f5df29ff4389107e2ec2ee3807e.zip
DynamicTablesPkg: AcpiSsdtPcieLibArm: Support UID > 0xF
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>
Diffstat (limited to 'DynamicTablesPkg')
-rw-r--r--DynamicTablesPkg/Library/Acpi/Arm/AcpiSsdtPcieLibArm/SsdtPcieGenerator.c5
-rw-r--r--DynamicTablesPkg/Library/Acpi/Arm/AcpiSsdtPcieLibArm/SsdtPcieGenerator.h2
2 files changed, 5 insertions, 2 deletions
diff --git a/DynamicTablesPkg/Library/Acpi/Arm/AcpiSsdtPcieLibArm/SsdtPcieGenerator.c b/DynamicTablesPkg/Library/Acpi/Arm/AcpiSsdtPcieLibArm/SsdtPcieGenerator.c
index 3c20d928ce..3b3d904dbe 100644
--- a/DynamicTablesPkg/Library/Acpi/Arm/AcpiSsdtPcieLibArm/SsdtPcieGenerator.c
+++ b/DynamicTablesPkg/Library/Acpi/Arm/AcpiSsdtPcieLibArm/SsdtPcieGenerator.c
@@ -824,7 +824,10 @@ GeneratePciDevice (
// Write the name of the PCI device.
CopyMem (AslName, "PCIx", AML_NAME_SEG_SIZE + 1);
- AslName[AML_NAME_SEG_SIZE - 1] = AsciiFromHex (Uid);
+ AslName[AML_NAME_SEG_SIZE - 1] = AsciiFromHex (Uid & 0xF);
+ if (Uid > 0xF) {
+ AslName[AML_NAME_SEG_SIZE - 2] = AsciiFromHex ((Uid >> 4) & 0xF);
+ }
// ASL: Device (PCIx) {}
Status = AmlCodeGenDevice (AslName, ScopeNode, &PciNode);
diff --git a/DynamicTablesPkg/Library/Acpi/Arm/AcpiSsdtPcieLibArm/SsdtPcieGenerator.h b/DynamicTablesPkg/Library/Acpi/Arm/AcpiSsdtPcieLibArm/SsdtPcieGenerator.h
index 59a0d601a3..515a3e1785 100644
--- a/DynamicTablesPkg/Library/Acpi/Arm/AcpiSsdtPcieLibArm/SsdtPcieGenerator.h
+++ b/DynamicTablesPkg/Library/Acpi/Arm/AcpiSsdtPcieLibArm/SsdtPcieGenerator.h
@@ -31,7 +31,7 @@
Corresponding changes would be needed to support the Name and
UID fields describing the Pci root complexes.
*/
-#define MAX_PCI_ROOT_COMPLEXES_SUPPORTED 16
+#define MAX_PCI_ROOT_COMPLEXES_SUPPORTED 256
// _SB scope of the AML namespace.
#define SB_SCOPE "\\_SB_"