From: Sami Mujawar <sami.mujawar@arm.com>
To: edk2-devel@lists.01.org
Cc: ard.biesheuvel@linaro.org, leif.lindholm@linaro.org,
Matteo.Carlini@arm.com, Stephanie.Hughes-Fitt@arm.com,
nd@arm.com, evan.lloyd@arm.com
Subject: [staging/dynamictables PATCH v1 2/2] DynamicTablesPkg: Update IORT generator
Date: Fri, 27 Apr 2018 16:53:55 +0100 [thread overview]
Message-ID: <20180427155356.7596-3-sami.mujawar@arm.com> (raw)
In-Reply-To: <20180427155356.7596-1-sami.mujawar@arm.com>
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)'
next prev parent reply other threads:[~2018-04-27 15:54 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-04-27 15:53 [staging/dynamictables PATCH v1 0/2] IORT Generator update Sami Mujawar
2018-04-27 15:53 ` [staging/dynamictables PATCH v1 1/2] MdePkg: IORT Specification Rev D updates Sami Mujawar
2018-04-27 15:53 ` Sami Mujawar [this message]
2018-05-09 14:20 ` [staging/dynamictables PATCH v1 0/2] IORT Generator update Leif Lindholm
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=20180427155356.7596-3-sami.mujawar@arm.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