public inbox for devel@edk2.groups.io
 help / color / mirror / Atom feed
From: "Sami Mujawar" <sami.mujawar@arm.com>
To: <devel@edk2.groups.io>
Cc: Sami Mujawar <sami.mujawar@arm.com>, <Alexei.Fedorov@arm.com>,
	<pierre.gondois@arm.com>, <Matteo.Carlini@arm.com>,
	<Akanksha.Jain2@arm.com>, <Ben.Adderson@arm.com>,
	<steven.price@arm.com>, <Lorenzo.Pieralisi@arm.com>, <nd@arm.com>
Subject: [PATCH v4 7/8] DynamicTablesPkg: Update ArmNameSpaceObjects for IORT Rev E.d
Date: Wed, 6 Jul 2022 10:56:30 +0100	[thread overview]
Message-ID: <20220706095631.27196-8-sami.mujawar@arm.com> (raw)
In-Reply-To: <20220706095631.27196-1-sami.mujawar@arm.com>

Bugzilla: 3458 - Add support IORT Rev E.d specification updates
          (https://bugzilla.tianocore.org/show_bug.cgi?id=3458)

The IO Remapping Table, Platform Design Document, Revision E.d,
    Feb 2022 (https://developer.arm.com/documentation/den0049/)
    introduces the following updates, collectively including the
    updates and errata fixes to Rev E, Rev E.a, Rev E.b, Rev E.c:
     - increments the IORT table revision to 5.
     - updates the node definition to add an 'Identifier' field.
     - adds definition of node type 6 - Reserved Memory Range node.
     - adds definition for Memory Range Descriptors.
     - adds flag to indicate PRI support for root complexes.
     - adds flag to indicate if the root complex supports forwarding
       of PASID information on translated transactions to the SMMU.
     - adds flag to indicate if the root complex supports PASID.
     - adds flags to define access privilege and attributes for the
       memory ranges.

Therefore, update the Arm namespace objects to:
  - add Identifier field to IORT nodes.
  - introduce enums to represent RMR nodes and Memory Range
    descriptors.
  - add definition of node type 6 - Reserved Memory Range node.
  - add definition for Memory Range Descriptors.
  - add PASID capabilities and flags field to Root Complex node.

Signed-off-by: Sami Mujawar <sami.mujawar@arm.com>
---

Notes:
    v4:
    - Update ArmNameSpaceObjects to support IORT specification        [SAMI]
      revision E.d.
    - Add PASID capabilities and flags field to Root Complex node.    [SAMI]
    - Add flags to define access privilege and attributes for the     [SAMI]
      memory ranges.
    - Update DynamicTablesPkg.ci.yaml to add PASID to the ignore      [SAMI]
      list for the spell checker.
    
    v3:
     - Move Identifier field before Flags field in            [PIERRE]
       CM_ARM_RMR_NODE.
     - Add description for CM_ARM_MEMORY_RANGE_DESCRIPTOR     [PIERRE]
       field.
     - Updated based on review feedback.                      [SAMI]
       Ref: https://edk2.groups.io/g/devel/topic/83600723#76659
    
    v2:
     - No code change since v1. Re-sending with v2 series.    [SAMI]

 DynamicTablesPkg/DynamicTablesPkg.ci.yaml      |  1 +
 DynamicTablesPkg/Include/ArmNameSpaceObjects.h | 66 +++++++++++++++++++-
 2 files changed, 66 insertions(+), 1 deletion(-)

diff --git a/DynamicTablesPkg/DynamicTablesPkg.ci.yaml b/DynamicTablesPkg/DynamicTablesPkg.ci.yaml
index bfa282926e48c79ea748b12dee19a322197eaed1..5addf8626841fe35dd0d499a277cb7308787fee0 100644
--- a/DynamicTablesPkg/DynamicTablesPkg.ci.yaml
+++ b/DynamicTablesPkg/DynamicTablesPkg.ci.yaml
@@ -108,6 +108,7 @@
            "lgreater",
            "lless",
            "MPIDR",
+           "PASID",
            "PERIPHBASE",
            "phandle",
            "pytool",
diff --git a/DynamicTablesPkg/Include/ArmNameSpaceObjects.h b/DynamicTablesPkg/Include/ArmNameSpaceObjects.h
index 91bef9bccd1978b0e396f423cff81e621b05e0ea..102e0f96beb22cc2b93c1525bef62cd4173774eb 100644
--- a/DynamicTablesPkg/Include/ArmNameSpaceObjects.h
+++ b/DynamicTablesPkg/Include/ArmNameSpaceObjects.h
@@ -1,6 +1,6 @@
 /** @file
 
-  Copyright (c) 2017 - 2021, Arm Limited. All rights reserved.<BR>
+  Copyright (c) 2017 - 2022, Arm Limited. All rights reserved.<BR>
 
   SPDX-License-Identifier: BSD-2-Clause-Patent
 
@@ -61,6 +61,8 @@ typedef enum ArmObjectID {
   EArmObjLpiInfo,                      ///< 37 - Lpi Info
   EArmObjPciAddressMapInfo,            ///< 38 - Pci Address Map Info
   EArmObjPciInterruptMapInfo,          ///< 39 - Pci Interrupt Map Info
+  EArmObjRmr,                          ///< 40 - Reserved Memory Range Node
+  EArmObjMemoryRangeDescriptor,        ///< 41 - Memory Range Descriptor
   EArmObjMax
 } EARM_OBJECT_ID;
 
@@ -477,6 +479,9 @@ typedef struct CmArmItsGroupNode {
   UINT32             ItsIdCount;
   /// Reference token for the ITS identifier array
   CM_OBJECT_TOKEN    ItsIdToken;
+
+  /// Unique identifier for this node.
+  UINT32             Identifier;
 } CM_ARM_ITS_GROUP_NODE;
 
 /** A structure that describes the
@@ -509,6 +514,9 @@ typedef struct CmArmNamedComponentNode {
       the entry in the namespace for this object.
   */
   CHAR8              *ObjectName;
+
+  /// Unique identifier for this node.
+  UINT32             Identifier;
 } CM_ARM_NAMED_COMPONENT_NODE;
 
 /** A structure that describes the
@@ -537,6 +545,13 @@ typedef struct CmArmRootComplexNode {
   UINT32             PciSegmentNumber;
   /// Memory address size limit
   UINT8              MemoryAddressSize;
+  /// PASID capabilities
+  UINT16             PasidCapabilities;
+  /// Flags
+  UINT32             Flags;
+
+  /// Unique identifier for this node.
+  UINT32             Identifier;
 } CM_ARM_ROOT_COMPLEX_NODE;
 
 /** A structure that describes the
@@ -579,6 +594,9 @@ typedef struct CmArmSmmuV1SmmuV2Node {
   UINT32             SMMU_NSgCfgIrpt;
   /// SMMU_NSgCfgIrpt interrupt flags
   UINT32             SMMU_NSgCfgIrptFlags;
+
+  /// Unique identifier for this node.
+  UINT32             Identifier;
 } CM_ARM_SMMUV1_SMMUV2_NODE;
 
 /** A structure that describes the
@@ -615,6 +633,9 @@ typedef struct CmArmSmmuV3Node {
   UINT32             ProximityDomain;
   /// Index into the array of ID mapping
   UINT32             DeviceIdMappingIndex;
+
+  /// Unique identifier for this node.
+  UINT32             Identifier;
 } CM_ARM_SMMUV3_NODE;
 
 /** A structure that describes the
@@ -639,6 +660,9 @@ typedef struct CmArmPmcgNode {
 
   /// Reference token for the IORT node associated with this node
   CM_OBJECT_TOKEN    ReferenceToken;
+
+  /// Unique identifier for this node.
+  UINT32             Identifier;
 } CM_ARM_PMCG_NODE;
 
 /** A structure that describes the
@@ -1006,6 +1030,46 @@ typedef struct CmArmPciInterruptMapInfo {
   CM_ARM_GENERIC_INTERRUPT    IntcInterrupt;
 } CM_ARM_PCI_INTERRUPT_MAP_INFO;
 
+/** A structure that describes the
+    RMR node for the Platform.
+
+    ID: EArmObjRmr
+*/
+typedef struct CmArmRmrNode {
+  /// An unique token used to identify this object
+  CM_OBJECT_TOKEN    Token;
+  /// Number of ID mappings
+  UINT32             IdMappingCount;
+  /// Reference token for the ID mapping array
+  CM_OBJECT_TOKEN    IdMappingToken;
+
+  /// Unique identifier for this node.
+  UINT32             Identifier;
+
+  /// Reserved Memory Range flags.
+  UINT32             Flags;
+
+  /// Memory range descriptor count.
+  UINT32             MemRangeDescCount;
+  /// Reference token for the Memory Range descriptor array
+  CM_OBJECT_TOKEN    MemRangeDescToken;
+} CM_ARM_RMR_NODE;
+
+/** A structure that describes the
+    Memory Range descriptor.
+
+    ID: EArmObjMemoryRangeDescriptor
+*/
+typedef struct CmArmRmrDescriptor {
+  /// Base address of Reserved Memory Range,
+  /// aligned to a page size of 64K.
+  UINT64    BaseAddress;
+
+  /// Length of the Reserved Memory range.
+  /// Must be a multiple of the page size of 64K.
+  UINT64    Length;
+} CM_ARM_MEMORY_RANGE_DESCRIPTOR;
+
 #pragma pack()
 
 #endif // ARM_NAMESPACE_OBJECTS_H_
-- 
'Guid(CE165669-3EF3-493F-B85D-6190EE5B9759)'


  parent reply	other threads:[~2022-07-06  9:56 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-07-06  9:56 [PATCH v4 0/8] IORT Rev E.d specification updates Sami Mujawar
2022-07-06  9:56 ` [PATCH v4 1/8] MdePkg: IORT header update for IORT Rev E.d spec Sami Mujawar
2022-07-06 15:44   ` [edk2-devel] " Sami Mujawar
2022-07-07  1:51     ` 回复: " gaoliming
2022-07-07 10:31       ` Sami Mujawar
2022-07-07  6:05   ` Jon Nettleton
2022-07-07 11:02     ` Sami Mujawar
2022-07-06  9:56 ` [PATCH v4 2/8] ShellPkg: Acpiview: Abbreviate field names to preserve alignment Sami Mujawar
2022-07-06  9:56 ` [PATCH 3/8] ShellPkg: Acpiview: IORT parser update for IORT Rev E.d spec Sami Mujawar
2022-07-06  9:56 ` [PATCH v4 4/8] DynamicTablesPkg: Handle error when IdMappingToken is NULL Sami Mujawar
2022-07-06  9:56 ` [PATCH v4 5/8] DynamicTablesPkg: IORT set reference to Id array only if present Sami Mujawar
2022-07-06  9:56 ` [PATCH v4 6/8] DynamicTablesPkg: IORT set reference to interrupt array " Sami Mujawar
2022-07-06  9:56 ` Sami Mujawar [this message]
2022-07-06  9:56 ` [PATCH 8/8] DynamicTablesPkg: IORT generator updates for Rev E.d spec 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=20220706095631.27196-8-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