From nobody Fri May 3 06:31:29 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; spf=none (zoho.com: 198.145.21.10 is neither permitted nor denied by domain of lists.01.org) smtp.mailfrom=edk2-devel-bounces@lists.01.org Return-Path: Received: from ml01.01.org (ml01.01.org [198.145.21.10]) by mx.zohomail.com with SMTPS id 1524844449806844.6863302794454; Fri, 27 Apr 2018 08:54:09 -0700 (PDT) Received: from [127.0.0.1] (localhost [IPv6:::1]) by ml01.01.org (Postfix) with ESMTP id 93A38203B8CBD; Fri, 27 Apr 2018 08:54:07 -0700 (PDT) Received: from cam-smtp0.cambridge.arm.com (fw-tnat.cambridge.arm.com [217.140.96.140]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (No client certificate requested) by ml01.01.org (Postfix) with ESMTPS id 694CC203B8CB2 for ; Fri, 27 Apr 2018 08:54:05 -0700 (PDT) Received: from E107187.Emea.Arm.com (e107187.emea.arm.com [10.1.211.22]) by cam-smtp0.cambridge.arm.com (8.13.8/8.13.8) with ESMTP id w3RFs2s8017663; Fri, 27 Apr 2018 16:54:02 +0100 X-Original-To: edk2-devel@lists.01.org Received-SPF: none (zoho.com: 198.145.21.10 is neither permitted nor denied by domain of lists.01.org) client-ip=198.145.21.10; envelope-from=edk2-devel-bounces@lists.01.org; helo=ml01.01.org; Received-SPF: Pass (sender SPF authorized) identity=mailfrom; client-ip=217.140.96.140; helo=cam-smtp0.cambridge.arm.com; envelope-from=sami.mujawar@arm.com; receiver=edk2-devel@lists.01.org From: Sami Mujawar To: edk2-devel@lists.01.org Date: Fri, 27 Apr 2018 16:53:54 +0100 Message-Id: <20180427155356.7596-2-sami.mujawar@arm.com> X-Mailer: git-send-email 2.11.0.windows.3 In-Reply-To: <20180427155356.7596-1-sami.mujawar@arm.com> References: <20180427155356.7596-1-sami.mujawar@arm.com> Subject: [edk2] [staging/dynamictables PATCH v1 1/2] MdePkg: IORT Specification Rev D updates X-BeenThere: edk2-devel@lists.01.org X-Mailman-Version: 2.1.26 Precedence: list List-Id: EDK II Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: nd@arm.com, ard.biesheuvel@linaro.org, leif.lindholm@linaro.org, Stephanie.Hughes-Fitt@arm.com MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Errors-To: edk2-devel-bounces@lists.01.org Sender: "edk2-devel" X-ZohoMail: RSF_4 Z_629925259 SPT_0 Content-Type: text/plain; charset="utf-8" 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 Reviewed-by: Evan Lloyd Reviewed-by: Ard Biesheuvel Reviewed-by: Liming Gao Reviewed-by: Leif Lindholm --- The changes can be seen at=20 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] - Reviewed-by Liming Gao [LIMING] MdePkg/Include/IndustryStandard/IoRemappingTable.h | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/MdePkg/Include/IndustryStandard/IoRemappingTable.h b/MdePkg/In= clude/IndustryStandard/IoRemappingTable.h index 2e5cb45d7e2ffd4a0559ef706b71874843e3fdbd..389f352c2fbc725e5e9a881a73a= dc306035dc0de 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 =20 - http://infocenter.arm.com/help/topic/com.arm.doc.den0049c/DEN0049C_IO_Re= mapping_Table.pdf + http://infocenter.arm.com/help/topic/com.arm.doc.den0049d/DEN0049D_IO_Re= mapping_Table.pdf =20 Copyright (c) 2017, Linaro Limited. All rights reserved.
Copyright (c) 2018, ARM Limited. All rights reserved.
@@ -123,6 +123,8 @@ typedef struct { =20 UINT32 AtsAttribute; UINT32 PciSegmentNumber; + UINT8 MemoryAddressSize; + UINT8 Reserved1[3]; } EFI_ACPI_6_0_IO_REMAPPING_RC_NODE; =20 /// @@ -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; =20 @@ -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; =20 --=20 'Guid(CE165669-3EF3-493F-B85D-6190EE5B9759)' _______________________________________________ edk2-devel mailing list edk2-devel@lists.01.org https://lists.01.org/mailman/listinfo/edk2-devel From nobody Fri May 3 06:31:29 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; spf=none (zoho.com: 198.145.21.10 is neither permitted nor denied by domain of lists.01.org) smtp.mailfrom=edk2-devel-bounces@lists.01.org Return-Path: Received: from ml01.01.org (ml01.01.org [198.145.21.10]) by mx.zohomail.com with SMTPS id 1524844452601245.6061690487894; Fri, 27 Apr 2018 08:54:12 -0700 (PDT) Received: from [127.0.0.1] (localhost [IPv6:::1]) by ml01.01.org (Postfix) with ESMTP id C204720352122; Fri, 27 Apr 2018 08:54:07 -0700 (PDT) Received: from cam-smtp0.cambridge.arm.com (fw-tnat.cambridge.arm.com [217.140.96.140]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (No client certificate requested) by ml01.01.org (Postfix) with ESMTPS id 8D5EE203B8CB3 for ; Fri, 27 Apr 2018 08:54:05 -0700 (PDT) Received: from E107187.Emea.Arm.com (e107187.emea.arm.com [10.1.211.22]) by cam-smtp0.cambridge.arm.com (8.13.8/8.13.8) with ESMTP id w3RFs2s9017663; Fri, 27 Apr 2018 16:54:03 +0100 X-Original-To: edk2-devel@lists.01.org Received-SPF: none (zoho.com: 198.145.21.10 is neither permitted nor denied by domain of lists.01.org) client-ip=198.145.21.10; envelope-from=edk2-devel-bounces@lists.01.org; helo=ml01.01.org; Received-SPF: Pass (sender SPF authorized) identity=mailfrom; client-ip=217.140.96.140; helo=cam-smtp0.cambridge.arm.com; envelope-from=sami.mujawar@arm.com; receiver=edk2-devel@lists.01.org From: Sami Mujawar To: edk2-devel@lists.01.org Date: Fri, 27 Apr 2018 16:53:55 +0100 Message-Id: <20180427155356.7596-3-sami.mujawar@arm.com> X-Mailer: git-send-email 2.11.0.windows.3 In-Reply-To: <20180427155356.7596-1-sami.mujawar@arm.com> References: <20180427155356.7596-1-sami.mujawar@arm.com> Subject: [edk2] [staging/dynamictables PATCH v1 2/2] DynamicTablesPkg: Update IORT generator X-BeenThere: edk2-devel@lists.01.org X-Mailman-Version: 2.1.26 Precedence: list List-Id: EDK II Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: nd@arm.com, ard.biesheuvel@linaro.org, leif.lindholm@linaro.org, Stephanie.Hughes-Fitt@arm.com MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Errors-To: edk2-devel-bounces@lists.01.org Sender: "edk2-devel" X-ZohoMail: RSF_4 Z_629925259 SPT_0 Content-Type: text/plain; charset="utf-8" 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 Reviewed-by: Evan Lloyd Reviewed-by: Leif Lindholm --- 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/DynamicTables= Pkg/Include/ArmNameSpaceObjects.h index abbd624eb026d14d2280d766bf68633c60436829..93cb6949f0eb2ac2ad3524494e4= a14c7a6fab4b8 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; =20 /** A structure that describes the @@ -530,7 +532,7 @@ typedef struct CmArmSmmuV3Node { UINT32 SyncInterrupt; =20 /// 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; =20 /// 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..2b43066245d5dc225a994267754= 0f01fddec7ddc 100644 --- a/DynamicTablesPkg/Library/Acpi/Arm/AcpiIortLibArm/IortGenerator.c +++ b/DynamicTablesPkg/Library/Acpi/Arm/AcpiIortLibArm/IortGenerator.c @@ -12,7 +12,7 @@ =20 @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 =20 **/ =20 @@ -843,7 +843,7 @@ AddNamedComponentNodes ( NcNode->Node.Type =3D EFI_ACPI_IORT_TYPE_NAMED_COMP; NcNode->Node.Length =3D GetNamedComponentNodeSize (NodeList); - NcNode->Node.Revision =3D 1; + NcNode->Node.Revision =3D 2; NcNode->Node.Reserved =3D EFI_ACPI_RESERVED_DWORD; NcNode->Node.NumIdMappings =3D NodeList->IdMappingCount; =20 @@ -950,7 +950,7 @@ AddRootComplexNodes ( // Populate the node header RcNode->Node.Type =3D EFI_ACPI_IORT_TYPE_ROOT_COMPLEX; RcNode->Node.Length =3D GetRootComplexNodeSize (NodeList); - RcNode->Node.Revision =3D 0; + RcNode->Node.Revision =3D 1; RcNode->Node.Reserved =3D EFI_ACPI_RESERVED_DWORD; RcNode->Node.NumIdMappings =3D NodeList->IdMappingCount; RcNode->Node.IdReference =3D sizeof (EFI_ACPI_6_0_IO_REMAPPING_RC_NODE= ); @@ -962,6 +962,10 @@ AddRootComplexNodes ( RcNode->MemoryAccessFlags =3D NodeList->MemoryAccessFlags; RcNode->AtsAttribute =3D NodeList->AtsAttribute; RcNode->PciSegmentNumber =3D NodeList->PciSegmentNumber; + RcNode->MemoryAddressSize =3D NodeList->MemoryAddressSize; + RcNode->Reserved1[0] =3D EFI_ACPI_RESERVED_BYTE; + RcNode->Reserved1[1] =3D EFI_ACPI_RESERVED_BYTE; + RcNode->Reserved1[2] =3D EFI_ACPI_RESERVED_BYTE; =20 if ((NodeList->IdMappingCount > 0) && (NodeList->IdMappingToken !=3D CM_NULL_TOKEN)) { @@ -1247,7 +1251,7 @@ AddSmmuV3Nodes ( // Populate the node header SmmuV3Node->Node.Type =3D EFI_ACPI_IORT_TYPE_SMMUv3; SmmuV3Node->Node.Length =3D GetSmmuV3NodeSize (NodeList); - SmmuV3Node->Node.Revision =3D 1; + SmmuV3Node->Node.Revision =3D 2; SmmuV3Node->Node.Reserved =3D EFI_ACPI_RESERVED_DWORD; SmmuV3Node->Node.NumIdMappings =3D NodeList->IdMappingCount; SmmuV3Node->Node.IdReference =3D @@ -1271,10 +1275,6 @@ AddSmmuV3Nodes ( SmmuV3Node->ProximityDomain =3D 0; } =20 - SmmuV3Node->Reserved1[0] =3D EFI_ACPI_RESERVED_BYTE; - SmmuV3Node->Reserved1[1] =3D EFI_ACPI_RESERVED_BYTE; - SmmuV3Node->Reserved1[2] =3D EFI_ACPI_RESERVED_BYTE; - if ((SmmuV3Node->Event !=3D 0) && (SmmuV3Node->Pri !=3D 0) && (SmmuV3Node->Gerr !=3D 0) && (SmmuV3Node->Sync !=3D 0)) { // If all the SMMU control interrupts are GSIV based, @@ -1355,7 +1355,7 @@ AddPmcgNodes ( // Populate the node header PmcgNode->Node.Type =3D EFI_ACPI_IORT_TYPE_PMCG; PmcgNode->Node.Length =3D GetPmcgNodeSize (NodeList); - PmcgNode->Node.Revision =3D 0; + PmcgNode->Node.Revision =3D 1; PmcgNode->Node.Reserved =3D EFI_ACPI_RESERVED_DWORD; PmcgNode->Node.NumIdMappings =3D NodeList->IdMappingCount; PmcgNode->Node.IdReference =3D sizeof (EFI_ACPI_6_0_IO_REMAPPING_PMCG_= NODE); @@ -1363,6 +1363,7 @@ AddPmcgNodes ( // PMCG specific data PmcgNode->Base =3D NodeList->BaseAddress; PmcgNode->OverflowInterruptGsiv =3D NodeList->OverflowInterrupt; + PmcgNode->Page1Base =3D NodeList->Page1BaseAddress; =20 Status =3D GetNodeOffsetReferencedByToken ( Generator->NodeIndexer, --=20 'Guid(CE165669-3EF3-493F-B85D-6190EE5B9759)' _______________________________________________ edk2-devel mailing list edk2-devel@lists.01.org https://lists.01.org/mailman/listinfo/edk2-devel