Update IORT generator to conform to the IO Remapping
Table, Platform Design Document, Revision D, March 2018
The generator has been updated for:
1. SMMUv3 - fix on proximity node.
2. PMCG - added page 1 support.
3. Root complex node - added DMA mask (memory address
size limit).
Contributed-under: TianoCore Contribution Agreement 1.1
Signed-off-by: Sami Mujawar <sami.mujawar@arm.com>
Reviewed-by: Evan Lloyd <evan.lloyd@arm.com>
---
The changes can be seen at
https://github.com/samimujawar/edk2-staging/tree/259_iort_rev_d_update_v1
Notes:
v1:
- IORT Generator update for IORT Rev D specification [SAMI]
DynamicTablesPkg/Include/ArmNameSpaceObjects.h | 6 +++++-
DynamicTablesPkg/Library/Acpi/Arm/AcpiIortLibArm/IortGenerator.c | 19 ++++++++++---------
2 files changed, 15 insertions(+), 10 deletions(-)
diff --git a/DynamicTablesPkg/Include/ArmNameSpaceObjects.h b/DynamicTablesPkg/Include/ArmNameSpaceObjects.h
index abbd624eb026d14d2280d766bf68633c60436829..93cb6949f0eb2ac2ad3524494e4a14c7a6fab4b8 100644
--- a/DynamicTablesPkg/Include/ArmNameSpaceObjects.h
+++ b/DynamicTablesPkg/Include/ArmNameSpaceObjects.h
@@ -459,6 +459,8 @@ typedef struct CmArmRootComplexNode {
UINT32 AtsAttribute;
/// PCI segment number
UINT32 PciSegmentNumber;
+ /// Memory address size limit
+ UINT8 MemoryAddressSize;
} CM_ARM_ROOT_COMPLEX_NODE;
/** A structure that describes the
@@ -530,7 +532,7 @@ typedef struct CmArmSmmuV3Node {
UINT32 SyncInterrupt;
/// Proximity domain flag
- UINT8 ProximityDomain;
+ UINT32 ProximityDomain;
/// Index into the array of ID mapping
UINT32 DeviceIdMappingIndex;
} CM_ARM_SMMUV3_NODE;
@@ -550,6 +552,8 @@ typedef struct CmArmPmcgNode {
UINT64 BaseAddress;
/// GSIV for the Overflow interrupt
UINT32 OverflowInterrupt;
+ /// Page 1 Base address
+ UINT64 Page1BaseAddress;
/// Reference token for the IORT node associated with this node
CM_OBJECT_TOKEN ReferenceToken;
diff --git a/DynamicTablesPkg/Library/Acpi/Arm/AcpiIortLibArm/IortGenerator.c b/DynamicTablesPkg/Library/Acpi/Arm/AcpiIortLibArm/IortGenerator.c
index cee960fba4e4c19a9c52f2c38e887741a074e2a9..2b43066245d5dc225a9942677540f01fddec7ddc 100644
--- a/DynamicTablesPkg/Library/Acpi/Arm/AcpiIortLibArm/IortGenerator.c
+++ b/DynamicTablesPkg/Library/Acpi/Arm/AcpiIortLibArm/IortGenerator.c
@@ -12,7 +12,7 @@
@par Reference(s):
- IO Remapping Table, Platform Design Document,
- Document number: ARM DEN 0049C, Issue C, 15 May 2017
+ Document number: ARM DEN 0049D, Issue D, March 2018
**/
@@ -843,7 +843,7 @@ AddNamedComponentNodes (
NcNode->Node.Type = EFI_ACPI_IORT_TYPE_NAMED_COMP;
NcNode->Node.Length =
GetNamedComponentNodeSize (NodeList);
- NcNode->Node.Revision = 1;
+ NcNode->Node.Revision = 2;
NcNode->Node.Reserved = EFI_ACPI_RESERVED_DWORD;
NcNode->Node.NumIdMappings = NodeList->IdMappingCount;
@@ -950,7 +950,7 @@ AddRootComplexNodes (
// Populate the node header
RcNode->Node.Type = EFI_ACPI_IORT_TYPE_ROOT_COMPLEX;
RcNode->Node.Length = GetRootComplexNodeSize (NodeList);
- RcNode->Node.Revision = 0;
+ RcNode->Node.Revision = 1;
RcNode->Node.Reserved = EFI_ACPI_RESERVED_DWORD;
RcNode->Node.NumIdMappings = NodeList->IdMappingCount;
RcNode->Node.IdReference = sizeof (EFI_ACPI_6_0_IO_REMAPPING_RC_NODE);
@@ -962,6 +962,10 @@ AddRootComplexNodes (
RcNode->MemoryAccessFlags = NodeList->MemoryAccessFlags;
RcNode->AtsAttribute = NodeList->AtsAttribute;
RcNode->PciSegmentNumber = NodeList->PciSegmentNumber;
+ RcNode->MemoryAddressSize = NodeList->MemoryAddressSize;
+ RcNode->Reserved1[0] = EFI_ACPI_RESERVED_BYTE;
+ RcNode->Reserved1[1] = EFI_ACPI_RESERVED_BYTE;
+ RcNode->Reserved1[2] = EFI_ACPI_RESERVED_BYTE;
if ((NodeList->IdMappingCount > 0) &&
(NodeList->IdMappingToken != CM_NULL_TOKEN)) {
@@ -1247,7 +1251,7 @@ AddSmmuV3Nodes (
// Populate the node header
SmmuV3Node->Node.Type = EFI_ACPI_IORT_TYPE_SMMUv3;
SmmuV3Node->Node.Length = GetSmmuV3NodeSize (NodeList);
- SmmuV3Node->Node.Revision = 1;
+ SmmuV3Node->Node.Revision = 2;
SmmuV3Node->Node.Reserved = EFI_ACPI_RESERVED_DWORD;
SmmuV3Node->Node.NumIdMappings = NodeList->IdMappingCount;
SmmuV3Node->Node.IdReference =
@@ -1271,10 +1275,6 @@ AddSmmuV3Nodes (
SmmuV3Node->ProximityDomain = 0;
}
- SmmuV3Node->Reserved1[0] = EFI_ACPI_RESERVED_BYTE;
- SmmuV3Node->Reserved1[1] = EFI_ACPI_RESERVED_BYTE;
- SmmuV3Node->Reserved1[2] = EFI_ACPI_RESERVED_BYTE;
-
if ((SmmuV3Node->Event != 0) && (SmmuV3Node->Pri != 0) &&
(SmmuV3Node->Gerr != 0) && (SmmuV3Node->Sync != 0)) {
// If all the SMMU control interrupts are GSIV based,
@@ -1355,7 +1355,7 @@ AddPmcgNodes (
// Populate the node header
PmcgNode->Node.Type = EFI_ACPI_IORT_TYPE_PMCG;
PmcgNode->Node.Length = GetPmcgNodeSize (NodeList);
- PmcgNode->Node.Revision = 0;
+ PmcgNode->Node.Revision = 1;
PmcgNode->Node.Reserved = EFI_ACPI_RESERVED_DWORD;
PmcgNode->Node.NumIdMappings = NodeList->IdMappingCount;
PmcgNode->Node.IdReference = sizeof (EFI_ACPI_6_0_IO_REMAPPING_PMCG_NODE);
@@ -1363,6 +1363,7 @@ AddPmcgNodes (
// PMCG specific data
PmcgNode->Base = NodeList->BaseAddress;
PmcgNode->OverflowInterruptGsiv = NodeList->OverflowInterrupt;
+ PmcgNode->Page1Base = NodeList->Page1BaseAddress;
Status = GetNodeOffsetReferencedByToken (
Generator->NodeIndexer,
--
'Guid(CE165669-3EF3-493F-B85D-6190EE5B9759)'
_______________________________________________
edk2-devel mailing list
edk2-devel@lists.01.org
https://lists.01.org/mailman/listinfo/edk2-devel
© 2016 - 2026 Red Hat, Inc.