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>
This commit is contained in:
Jeff Brasen 2022-07-08 14:59:02 -06:00 committed by mergify[bot]
parent 6cda306da1
commit 9ac155bf0b
2 changed files with 5 additions and 2 deletions

View File

@ -824,7 +824,10 @@ GeneratePciDevice (
// Write the name of the PCI device. // Write the name of the PCI device.
CopyMem (AslName, "PCIx", AML_NAME_SEG_SIZE + 1); 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) {} // ASL: Device (PCIx) {}
Status = AmlCodeGenDevice (AslName, ScopeNode, &PciNode); Status = AmlCodeGenDevice (AslName, ScopeNode, &PciNode);

View File

@ -31,7 +31,7 @@
Corresponding changes would be needed to support the Name and Corresponding changes would be needed to support the Name and
UID fields describing the Pci root complexes. 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. // _SB scope of the AML namespace.
#define SB_SCOPE "\\_SB_" #define SB_SCOPE "\\_SB_"