public inbox for devel@edk2.groups.io
 help / color / mirror / Atom feed
* [staging/dynamictables PATCH v1 0/2] IORT Generator update
@ 2018-04-27 15:53 Sami Mujawar
  2018-04-27 15:53 ` [staging/dynamictables PATCH v1 1/2] MdePkg: IORT Specification Rev D updates Sami Mujawar
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: Sami Mujawar @ 2018-04-27 15:53 UTC (permalink / raw)
  To: edk2-devel
  Cc: ard.biesheuvel, leif.lindholm, Matteo.Carlini,
	Stephanie.Hughes-Fitt, nd, evan.lloyd

This patchset contains the changes necessary for supporting the IORT
specification Revision D, March 2018 update.

The "MdePkg: IORT Specification Rev D updates" patch has already been
ACKed by Ard Biesheuve and Liming Gao; however has not yet been merged
in the tianorcore\edk2 repository. Since this patch is a precursor for
the IORT Generator update it has been included in this patchset.
For more details see 
https://lists.01.org/pipermail/edk2-devel/2018-April/024267.html


Sami Mujawar (2):
  MdePkg: IORT Specification Rev D updates
  DynamicTablesPkg: Update IORT generator

 DynamicTablesPkg/Include/ArmNameSpaceObjects.h                   |  6 +++++-
 DynamicTablesPkg/Library/Acpi/Arm/AcpiIortLibArm/IortGenerator.c | 19 ++++++++++---------
 MdePkg/Include/IndustryStandard/IoRemappingTable.h               | 10 ++++++----
 3 files changed, 21 insertions(+), 14 deletions(-)

-- 
'Guid(CE165669-3EF3-493F-B85D-6190EE5B9759)'




^ permalink raw reply	[flat|nested] 4+ messages in thread

* [staging/dynamictables PATCH v1 1/2] MdePkg: IORT Specification Rev D updates
  2018-04-27 15:53 [staging/dynamictables PATCH v1 0/2] IORT Generator update Sami Mujawar
@ 2018-04-27 15:53 ` Sami Mujawar
  2018-04-27 15:53 ` [staging/dynamictables PATCH v1 2/2] DynamicTablesPkg: Update IORT generator Sami Mujawar
  2018-05-09 14:20 ` [staging/dynamictables PATCH v1 0/2] IORT Generator update Leif Lindholm
  2 siblings, 0 replies; 4+ messages in thread
From: Sami Mujawar @ 2018-04-27 15:53 UTC (permalink / raw)
  To: edk2-devel
  Cc: ard.biesheuvel, leif.lindholm, Matteo.Carlini,
	Stephanie.Hughes-Fitt, nd, evan.lloyd

Updated IORT structure definitions to conform to the IO Remapping
Table, Platform Design Document, Revision D, March 2018.

The following structures have been updated:
  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>
Reviewed-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
Reviewed-by: Liming Gao <liming.gao@intel.com>
---
The changes can be seen at 
https://github.com/samimujawar/edk2-staging/tree/259_iort_rev_d_update_v1

Notes:
    v1:
    - Updated for IORT Specification Revision D.                    [SAMI]
    - Reviewed-by Ard Biesheuvel <ard.biesheuvel@linaro.org>        [ARD]
    - Reviewed-by Liming Gao <liming.gao@intel.com>                 [LIMING]

 MdePkg/Include/IndustryStandard/IoRemappingTable.h | 10 ++++++----
 1 file changed, 6 insertions(+), 4 deletions(-)

diff --git a/MdePkg/Include/IndustryStandard/IoRemappingTable.h b/MdePkg/Include/IndustryStandard/IoRemappingTable.h
index 2e5cb45d7e2ffd4a0559ef706b71874843e3fdbd..389f352c2fbc725e5e9a881a73adc306035dc0de 100644
--- a/MdePkg/Include/IndustryStandard/IoRemappingTable.h
+++ b/MdePkg/Include/IndustryStandard/IoRemappingTable.h
@@ -1,7 +1,7 @@
 /** @file
-  ACPI IO Remapping Table (IORT) as specified in ARM spec DEN0049C
+  ACPI IO Remapping Table (IORT) as specified in ARM spec DEN0049D
 
-  http://infocenter.arm.com/help/topic/com.arm.doc.den0049c/DEN0049C_IO_Remapping_Table.pdf
+  http://infocenter.arm.com/help/topic/com.arm.doc.den0049d/DEN0049D_IO_Remapping_Table.pdf
 
   Copyright (c) 2017, Linaro Limited. All rights reserved.<BR>
   Copyright (c) 2018, ARM Limited. All rights reserved.<BR>
@@ -123,6 +123,8 @@ typedef struct {
 
   UINT32                                  AtsAttribute;
   UINT32                                  PciSegmentNumber;
+  UINT8                                   MemoryAddressSize;
+  UINT8                                   Reserved1[3];
 } EFI_ACPI_6_0_IO_REMAPPING_RC_NODE;
 
 ///
@@ -185,8 +187,7 @@ typedef struct {
   UINT32                                  Pri;
   UINT32                                  Gerr;
   UINT32                                  Sync;
-  UINT8                                   ProximityDomain;
-  UINT8                                   Reserved1[3];
+  UINT32                                  ProximityDomain;
   UINT32                                  DeviceIdMappingIndex;
 } EFI_ACPI_6_0_IO_REMAPPING_SMMU3_NODE;
 
@@ -199,6 +200,7 @@ typedef struct {
   UINT64                                  Base;
   UINT32                                  OverflowInterruptGsiv;
   UINT32                                  NodeReference;
+  UINT64                                  Page1Base;
 //EFI_ACPI_6_0_IO_REMAPPING_ID_TABLE      OverflowInterruptMsiMapping[1];
 } EFI_ACPI_6_0_IO_REMAPPING_PMCG_NODE;
 
-- 
'Guid(CE165669-3EF3-493F-B85D-6190EE5B9759)'




^ permalink raw reply related	[flat|nested] 4+ messages in thread

* [staging/dynamictables PATCH v1 2/2] DynamicTablesPkg: Update IORT generator
  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
  2018-05-09 14:20 ` [staging/dynamictables PATCH v1 0/2] IORT Generator update Leif Lindholm
  2 siblings, 0 replies; 4+ messages in thread
From: Sami Mujawar @ 2018-04-27 15:53 UTC (permalink / raw)
  To: edk2-devel
  Cc: ard.biesheuvel, leif.lindholm, Matteo.Carlini,
	Stephanie.Hughes-Fitt, nd, evan.lloyd

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)'




^ permalink raw reply related	[flat|nested] 4+ messages in thread

* Re: [staging/dynamictables PATCH v1 0/2] IORT Generator update
  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 ` [staging/dynamictables PATCH v1 2/2] DynamicTablesPkg: Update IORT generator Sami Mujawar
@ 2018-05-09 14:20 ` Leif Lindholm
  2 siblings, 0 replies; 4+ messages in thread
From: Leif Lindholm @ 2018-05-09 14:20 UTC (permalink / raw)
  To: Sami Mujawar
  Cc: edk2-devel, ard.biesheuvel, Matteo.Carlini, Stephanie.Hughes-Fitt,
	nd, evan.lloyd, Liming Gao, Michael D Kinney

On Fri, Apr 27, 2018 at 04:53:53PM +0100, Sami Mujawar wrote:
> This patchset contains the changes necessary for supporting the IORT
> specification Revision D, March 2018 update.
> 
> The "MdePkg: IORT Specification Rev D updates" patch has already been
> ACKed by Ard Biesheuve and Liming Gao; however has not yet been merged
> in the tianorcore\edk2 repository. Since this patch is a precursor for
> the IORT Generator update it has been included in this patchset.
> For more details see 
> https://lists.01.org/pipermail/edk2-devel/2018-April/024267.html

Liming, Mike - any chance of getting that one pushed?

> Sami Mujawar (2):
>   MdePkg: IORT Specification Rev D updates
>   DynamicTablesPkg: Update IORT generator

For the series:
Reviewed-by: Leif Lindholm <leif.lindholm@linaro.org>

Pushed as c47bc46170..67fd6a2c5e.

Side note - you can put the published branch in 0/* only, it doesn't
need to be repeated for each patch.

> 
>  DynamicTablesPkg/Include/ArmNameSpaceObjects.h                   |  6 +++++-
>  DynamicTablesPkg/Library/Acpi/Arm/AcpiIortLibArm/IortGenerator.c | 19 ++++++++++---------
>  MdePkg/Include/IndustryStandard/IoRemappingTable.h               | 10 ++++++----
>  3 files changed, 21 insertions(+), 14 deletions(-)
> 
> -- 
> 'Guid(CE165669-3EF3-493F-B85D-6190EE5B9759)'
> 
> 


^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2018-05-09 14:20 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
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 ` [staging/dynamictables PATCH v1 2/2] DynamicTablesPkg: Update IORT generator Sami Mujawar
2018-05-09 14:20 ` [staging/dynamictables PATCH v1 0/2] IORT Generator update Leif Lindholm

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox