From: "Jeff Brasen" <jbrasen@nvidia.com>
To: <devel@edk2.groups.io>, <pierre.gondois@arm.com>
Cc: <Sami.Mujawar@arm.com>, <Alexei.Fedorov@arm.com>,
Jeff Brasen <jbrasen@nvidia.com>
Subject: [PATCH v3 2/3] DynamicTablesPkg: AcpiSsdtPcieLibArm: Support UID > 0xF
Date: Fri, 8 Jul 2022 14:59:02 -0600 [thread overview]
Message-ID: <7a47623bd7e32de309df4113102858b78aacd9e4.1657313523.git.jbrasen@nvidia.com> (raw)
In-Reply-To: <cover.1657313523.git.jbrasen@nvidia.com>
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>
---
.../Library/Acpi/Arm/AcpiSsdtPcieLibArm/SsdtPcieGenerator.c | 5 ++++-
.../Library/Acpi/Arm/AcpiSsdtPcieLibArm/SsdtPcieGenerator.h | 2 +-
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 d4c5f47b07..68ecae96be 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_"
--
2.25.1
next prev parent reply other threads:[~2022-07-08 20:58 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-07-08 20:59 [PATCH v3 0/3] DynamicTablesPkg: Pcie generation updates Jeff Brasen
2022-07-08 20:59 ` [PATCH v3 1/3] DynamicTablesPkg: AcpiSsdtPcieLibArm: Correct translation value Jeff Brasen
2022-07-19 15:15 ` [edk2-devel] " Sami Mujawar
2022-07-08 20:59 ` Jeff Brasen [this message]
2022-07-19 15:17 ` [edk2-devel] [PATCH v3 2/3] DynamicTablesPkg: AcpiSsdtPcieLibArm: Support UID > 0xF Sami Mujawar
2022-07-08 20:59 ` [PATCH v3 3/3] DynamicTablesPkg: AcpiSsdtPcieLibArm: Create support library Jeff Brasen
2022-07-19 15:22 ` [edk2-devel] " Sami Mujawar
2022-07-12 7:46 ` [PATCH v3 0/3] DynamicTablesPkg: Pcie generation updates PierreGondois
2022-07-20 8:03 ` [edk2-devel] " Sami Mujawar
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-list from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=7a47623bd7e32de309df4113102858b78aacd9e4.1657313523.git.jbrasen@nvidia.com \
--to=devel@edk2.groups.io \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox