From nobody Thu May 9 10:47:23 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of groups.io designates 66.175.222.108 as permitted sender) client-ip=66.175.222.108; envelope-from=bounce+27952+94882+1787277+3901457@groups.io; helo=mail02.groups.io; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of groups.io designates 66.175.222.108 as permitted sender) smtp.mailfrom=bounce+27952+94882+1787277+3901457@groups.io; dmarc=fail(p=none dis=none) header.from=arm.com ARC-Seal: i=1; a=rsa-sha256; t=1665393680; cv=none; d=zohomail.com; s=zohoarc; b=WIdjiBMBLTV+C3xK9mY60vgCC94XB739PXXiXPP+cIhTrfsKnTvbobafDlEVrblLm+zcUlwNIN0fupk7yN/1d20B7L6vjQfmekDPR0SRq3gomyP4s4vNAzH5jBALo8UoLe3SIeb7uPSRORTkGh5abUwgjVZW6HKIIuh2mAmmtfo= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1665393680; h=Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Id:List-Help:List-Unsubscribe:MIME-Version:Message-ID:Reply-To:References:Sender:Subject:To; bh=DpKq/5EtA80U8KuXaFKckdyWjh6Q8H9oPT9uhMeEBRg=; b=Sqj5x3Ux+HeODrNjG5VOKzWx3O2DVn+b3aYyC13FoaqLwjV5Mb0enpT3Xgt/CfAwgokBPt3Pg3nj3z+Af7Vrrxxe0PB7M7CutpWW9oK5UWNxGc/th5UppRFo8ilAy0iDwpmk1UeyQUUAvlAz0ScGSoYWF9vvhDpg5qCo0+snshM= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of groups.io designates 66.175.222.108 as permitted sender) smtp.mailfrom=bounce+27952+94882+1787277+3901457@groups.io; dmarc=fail header.from= (p=none dis=none) Received: from mail02.groups.io (mail02.groups.io [66.175.222.108]) by mx.zohomail.com with SMTPS id 1665393680969573.6822726822445; Mon, 10 Oct 2022 02:21:20 -0700 (PDT) Return-Path: X-Received: by 127.0.0.2 with SMTP id EYbIYY1788612xJWdaYXiH8Z; Mon, 10 Oct 2022 02:21:19 -0700 X-Received: from foss.arm.com (foss.arm.com [217.140.110.172]) by mx.groups.io with SMTP id smtpd.web09.4230.1665393678933408094 for ; Mon, 10 Oct 2022 02:21:19 -0700 X-Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.121.207.14]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id A4A051570; Mon, 10 Oct 2022 02:21:24 -0700 (PDT) X-Received: from pierre123.arm.com (unknown [10.57.34.234]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPA id B16283F792; Mon, 10 Oct 2022 02:21:17 -0700 (PDT) From: "PierreGondois" To: devel@edk2.groups.io Cc: Sami Mujawar , Alexei Fedorov Subject: [edk2-devel] [PATCH 01/14] DynamicTablesPkg: Use correct print formatter Date: Mon, 10 Oct 2022 11:20:45 +0200 Message-Id: <20221010092058.118714-2-Pierre.Gondois@arm.com> In-Reply-To: <20221010092058.118714-1-Pierre.Gondois@arm.com> References: <20221010092058.118714-1-Pierre.Gondois@arm.com> MIME-Version: 1.0 Precedence: Bulk List-Unsubscribe: List-Subscribe: List-Help: Sender: devel@edk2.groups.io List-Id: Mailing-List: list devel@edk2.groups.io; contact devel+owner@edk2.groups.io Reply-To: devel@edk2.groups.io,pierre.gondois@arm.com X-Gm-Message-State: aveOZWx9n9fw0015qYNtTFm0x1787277AA= Content-Transfer-Encoding: quoted-printable DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=groups.io; q=dns/txt; s=20140610; t=1665393679; bh=kdduw/qWm1Ugr7XtSCRz26qiA0LnYusvcKFJuoqXChQ=; h=Cc:Date:From:Reply-To:Subject:To; b=Ad4gsCykHwk3/BBX4hzSiZ5d5jNQOAsjgC8LmpI5n9zUHsHEta8yFve3yaEgXA6AhtQ u/+IJdeGGyW8uy/DjEoYH8gTZZxqEsymQ0j46/ov7tXkb+KnPkp6UlgG47nfbwEqMHOcJ CnFBu65s9TiV/0jqUL8zy8rMWuTGkAZG2ns= X-ZohoMail-DKIM: pass (identity @groups.io) X-ZM-MESSAGEID: 1665393681487100002 Content-Type: text/plain; charset="utf-8" From: Pierre Gondois In C, the 'long long' types are 64-bits. The 'll' printf length specifier should be used to pring these values. Just '%x' allows to print values that are on 16-bits or more. Use that instead. Signed-off-by: Pierre Gondois Reviewed-by: Sami Mujawar --- .../ConfigurationManagerObjectParser.c | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/DynamicTablesPkg/Library/Common/TableHelperLib/ConfigurationMa= nagerObjectParser.c b/DynamicTablesPkg/Library/Common/TableHelperLib/Config= urationManagerObjectParser.c index 08b4f60dfbae..13e6c0e321c4 100644 --- a/DynamicTablesPkg/Library/Common/TableHelperLib/ConfigurationManagerOb= jectParser.c +++ b/DynamicTablesPkg/Library/Common/TableHelperLib/ConfigurationManagerOb= jectParser.c @@ -1,7 +1,7 @@ /** @file Configuration Manager Object parser. =20 - Copyright (c) 2021, ARM Limited. All rights reserved.
+ Copyright (c) 2021 - 2022, ARM Limited. All rights reserved.
SPDX-License-Identifier: BSD-2-Clause-Patent =20 **/ @@ -384,12 +384,12 @@ STATIC CONST CM_OBJ_PARSER AcpiGenericAddressParser[= ] =3D { /** A parser for EArmObjLpiInfo. */ STATIC CONST CM_OBJ_PARSER CmArmLpiInfoParser[] =3D { - { "MinResidency", 4, = "0x%llx", NULL }, - { "WorstCaseWakeLatency", 4, = "0x%llx", NULL }, - { "Flags", 4, = "0x%llx", NULL }, - { "ArchFlags", 4, = "0x%llx", NULL }, - { "ResCntFreq", 4, = "0x%llx", NULL }, - { "EnableParentState", 4, = "0x%llx", NULL }, + { "MinResidency", 4, = "0x%x", NULL }, + { "WorstCaseWakeLatency", 4, = "0x%x", NULL }, + { "Flags", 4, = "0x%x", NULL }, + { "ArchFlags", 4, = "0x%x", NULL }, + { "ResCntFreq", 4, = "0x%x", NULL }, + { "EnableParentState", 4, = "0x%x", NULL }, { "IsInteger", 1, = "%d", NULL }, { "IntegerEntryMethod", 8, = "0x%llx", NULL }, { "RegisterEntryMethod", sizeof (EFI_ACPI_6_3_GENERIC_ADDRESS_STRUC= TURE), --=20 2.25.1 -=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D- Groups.io Links: You receive all messages sent to this group. View/Reply Online (#94882): https://edk2.groups.io/g/devel/message/94882 Mute This Topic: https://groups.io/mt/94232520/1787277 Group Owner: devel+owner@edk2.groups.io Unsubscribe: https://edk2.groups.io/g/devel/unsub [importer@patchew.org] -=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D- From nobody Thu May 9 10:47:23 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of groups.io designates 66.175.222.108 as permitted sender) client-ip=66.175.222.108; envelope-from=bounce+27952+94883+1787277+3901457@groups.io; helo=mail02.groups.io; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of groups.io designates 66.175.222.108 as permitted sender) smtp.mailfrom=bounce+27952+94883+1787277+3901457@groups.io; dmarc=fail(p=none dis=none) header.from=arm.com ARC-Seal: i=1; a=rsa-sha256; t=1665393681; cv=none; d=zohomail.com; s=zohoarc; b=EB9HYGFwLS/Ma3/eWFi+9YR98ZNnXtyFyfHu9w8GEEB+YIMoO2el5QdXS+6YnKcVxfbNwxJkb8wtXr3f3lzyzVApUxBssluAipf0ehDtSt7M0sz2d+YHv6B8ReKKXvvX790oNnpQw1hYVdIUNSUzlPK4SAx3m6RisqljIEUV770= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1665393681; h=Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Id:List-Help:List-Unsubscribe:MIME-Version:Message-ID:Reply-To:References:Sender:Subject:To; bh=MVw2UfyVJIWGwMEuSZOMOx3XLybXJmgqLEydNpLAXtk=; b=VBpQwgY7wdQ8HvOrdkLmZI3qfBVu/ax2I9FPG+WF19e7gFRrCdqRHRJJVp1tlRIGrppA9CA49eJbKDV0F//+3Siamls3wkO1InlJPRHNnVaKjzZv4QYZK3IWS7FgZ4eEW4a7W/UTCk6dOpcNUWzjXSBMdw8BnY4fGxHRsxEJ0ac= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of groups.io designates 66.175.222.108 as permitted sender) smtp.mailfrom=bounce+27952+94883+1787277+3901457@groups.io; dmarc=fail header.from= (p=none dis=none) Received: from mail02.groups.io (mail02.groups.io [66.175.222.108]) by mx.zohomail.com with SMTPS id 1665393681311637.9108408551847; Mon, 10 Oct 2022 02:21:21 -0700 (PDT) Return-Path: X-Received: by 127.0.0.2 with SMTP id 31akYY1788612xZO3ECne1pm; Mon, 10 Oct 2022 02:21:21 -0700 X-Received: from foss.arm.com (foss.arm.com [217.140.110.172]) by mx.groups.io with SMTP id smtpd.web10.4405.1665393679816561316 for ; Mon, 10 Oct 2022 02:21:19 -0700 X-Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.121.207.14]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id A74CB1480; Mon, 10 Oct 2022 02:21:25 -0700 (PDT) X-Received: from pierre123.arm.com (unknown [10.57.34.234]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPA id B1BAC3F792; Mon, 10 Oct 2022 02:21:18 -0700 (PDT) From: "PierreGondois" To: devel@edk2.groups.io Cc: Sami Mujawar , Alexei Fedorov Subject: [edk2-devel] [PATCH 02/14] DynamicTablesPkg: Add PrintString to CmObjParser Date: Mon, 10 Oct 2022 11:20:46 +0200 Message-Id: <20221010092058.118714-3-Pierre.Gondois@arm.com> In-Reply-To: <20221010092058.118714-1-Pierre.Gondois@arm.com> References: <20221010092058.118714-1-Pierre.Gondois@arm.com> MIME-Version: 1.0 Precedence: Bulk List-Unsubscribe: List-Subscribe: List-Help: Sender: devel@edk2.groups.io List-Id: Mailing-List: list devel@edk2.groups.io; contact devel+owner@edk2.groups.io Reply-To: devel@edk2.groups.io,pierre.gondois@arm.com X-Gm-Message-State: dMI5zfajhbDRR4v5OkBCWQkJx1787277AA= Content-Transfer-Encoding: quoted-printable DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=groups.io; q=dns/txt; s=20140610; t=1665393681; bh=QIs9Xy4gzqualt3Yqd3DYkNCgjEbU96m0UCgRnktKoo=; h=Cc:Date:From:Reply-To:Subject:To; b=rLo7fE1uM/Co0Wur18zUr1AOy5nnHf87bXET1G/m1CsF7/+ZZOS+lrH4PyXAxwJU+lW JAUS2oid8j5HL4PTmfSpJtBMaT7er/oFC11vZ/Sep0gkTAPEpe03JsAUdf6QVs698cRAl JSibC7sqXavdlvuLhyrRphUQ/3ZxW1cMwXU= X-ZohoMail-DKIM: pass (identity @groups.io) X-ZM-MESSAGEID: 1665393683475100009 Content-Type: text/plain; charset="utf-8" From: Pierre Gondois Add a PrintString to print strings in the CmObjParser. String must be NULL terminated and no buffer overrun check is done by this function. Signed-off-by: Pierre Gondois Reviewed-by: Sami Mujawar --- .../ConfigurationManagerObjectParser.c | 26 +++++++++++++++++++ 1 file changed, 26 insertions(+) diff --git a/DynamicTablesPkg/Library/Common/TableHelperLib/ConfigurationMa= nagerObjectParser.c b/DynamicTablesPkg/Library/Common/TableHelperLib/Config= urationManagerObjectParser.c index 13e6c0e321c4..b46f19693bb5 100644 --- a/DynamicTablesPkg/Library/Common/TableHelperLib/ConfigurationManagerOb= jectParser.c +++ b/DynamicTablesPkg/Library/Common/TableHelperLib/ConfigurationManagerOb= jectParser.c @@ -19,6 +19,14 @@ PrintOemId ( UINT8 *Ptr ); =20 +STATIC +VOID +EFIAPI +PrintString ( + CONST CHAR8 *Format, + UINT8 *Ptr + ); + /** A parser for EArmObjBootArchInfo. */ STATIC CONST CM_OBJ_PARSER CmArmBootArchInfoParser[] =3D { @@ -646,6 +654,24 @@ PrintOemId ( )); } =20 +/** Print string. + + The string must be NULL terminated. + + @param [in] Format Format to print the Ptr. + @param [in] Ptr Pointer to the string. +**/ +STATIC +VOID +EFIAPI +PrintString ( + CONST CHAR8 *Format, + UINT8 *Ptr + ) +{ + DEBUG ((DEBUG_ERROR, "%a", Ptr)); +} + /** Print fields of the objects. =20 @param [in] Data Pointer to the object to print. --=20 2.25.1 -=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D- Groups.io Links: You receive all messages sent to this group. View/Reply Online (#94883): https://edk2.groups.io/g/devel/message/94883 Mute This Topic: https://groups.io/mt/94232521/1787277 Group Owner: devel+owner@edk2.groups.io Unsubscribe: https://edk2.groups.io/g/devel/unsub [importer@patchew.org] -=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D- From nobody Thu May 9 10:47:23 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of groups.io designates 66.175.222.108 as permitted sender) client-ip=66.175.222.108; envelope-from=bounce+27952+94884+1787277+3901457@groups.io; helo=mail02.groups.io; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of groups.io designates 66.175.222.108 as permitted sender) smtp.mailfrom=bounce+27952+94884+1787277+3901457@groups.io; dmarc=fail(p=none dis=none) header.from=arm.com ARC-Seal: i=1; a=rsa-sha256; t=1665393681; cv=none; d=zohomail.com; s=zohoarc; b=WLPln3DqoBnLuRBROoMsvBz8zT4WQGUYeGnEFr4KTD+SKLc8Lv58/AOytg53tdQ3QClCHFPZ21VmYnm2ADfXVPWN0dkr/aIruYxkuKTv+bsSAy5sv6sCIbhGWHLdB3EuIAieEH0Hi7Ow6WvImTcjm+U1vVh+AzC7QSW6a4FPxQM= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1665393681; h=Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Id:List-Help:List-Unsubscribe:MIME-Version:Message-ID:Reply-To:References:Sender:Subject:To; bh=7P5tqlYQK1iRe+9Fr5nsW6gNj4qfoN2CesEbWfjHm8Q=; b=VyxHYQdjiuJ+v+pBwfmVctqwvDfS15vKzt1qZhFgDjv93Mz0A/xgGVuxt8D/m0NAt2sIJ+Rf1uF1tm3lrnZFlCz4+BQdjyRPl4RpeKKRejny/4uiEoaRMXv7hSSExzQdZZNsb3hBQqwiccwmEbGlmigzkesd8U5hZRlkQadNvBw= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of groups.io designates 66.175.222.108 as permitted sender) smtp.mailfrom=bounce+27952+94884+1787277+3901457@groups.io; dmarc=fail header.from= (p=none dis=none) Received: from mail02.groups.io (mail02.groups.io [66.175.222.108]) by mx.zohomail.com with SMTPS id 1665393681898989.444088357692; Mon, 10 Oct 2022 02:21:21 -0700 (PDT) Return-Path: X-Received: by 127.0.0.2 with SMTP id Q0vRYY1788612xxGNx5jkGmS; Mon, 10 Oct 2022 02:21:21 -0700 X-Received: from foss.arm.com (foss.arm.com [217.140.110.172]) by mx.groups.io with SMTP id smtpd.web10.4406.1665393680803478570 for ; Mon, 10 Oct 2022 02:21:20 -0700 X-Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.121.207.14]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id A995F1570; Mon, 10 Oct 2022 02:21:26 -0700 (PDT) X-Received: from pierre123.arm.com (unknown [10.57.34.234]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPA id B63263F792; Mon, 10 Oct 2022 02:21:19 -0700 (PDT) From: "PierreGondois" To: devel@edk2.groups.io Cc: Sami Mujawar , Alexei Fedorov Subject: [edk2-devel] [PATCH 03/14] DynamicTablesPkg: Update CmObjParser for IORT Rev E.d Date: Mon, 10 Oct 2022 11:20:47 +0200 Message-Id: <20221010092058.118714-4-Pierre.Gondois@arm.com> In-Reply-To: <20221010092058.118714-1-Pierre.Gondois@arm.com> References: <20221010092058.118714-1-Pierre.Gondois@arm.com> MIME-Version: 1.0 Precedence: Bulk List-Unsubscribe: List-Subscribe: List-Help: Sender: devel@edk2.groups.io List-Id: Mailing-List: list devel@edk2.groups.io; contact devel+owner@edk2.groups.io Reply-To: devel@edk2.groups.io,pierre.gondois@arm.com X-Gm-Message-State: rr7Cmy9uQbwk1NoBj4vm1OEMx1787277AA= Content-Transfer-Encoding: quoted-printable DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=groups.io; q=dns/txt; s=20140610; t=1665393681; bh=EFG8R+A+VEIpBzSEW0+VgXg1PE1+xJQ1P9XN5PpWPWM=; h=Cc:Date:From:Reply-To:Subject:To; b=Pqy0/3tz6tchFROyQsXK+2s0YkR2js91DOhqW4b4c4CQQ+8Jtt5SBv24MVdkeQnLzST /vocb8ZSAUjlqzVPLFP/Vi/uuBlzZKbH4OS6fdE0VGEmx2pAtJffmax9Pu0zpOLxDd6jk +jIJTlx8HD0mdobFnx5VcM4YqO2/rWG7vFo= X-ZohoMail-DKIM: pass (identity @groups.io) X-ZM-MESSAGEID: 1665393683500100013 Content-Type: text/plain; charset="utf-8" From: Pierre Gondois commit de200b7e2c3c ("DynamicTablesPkg: Update ArmNameSpaceObjects for IORT Rev E.d") adds new CmObj structures and fields to the ArmNameSpaceObjects. Update the CmObjectParser accordingly. Signed-off-by: Pierre Gondois --- .../ConfigurationManagerObjectParser.c | 59 ++++++++++++++----- 1 file changed, 45 insertions(+), 14 deletions(-) diff --git a/DynamicTablesPkg/Library/Common/TableHelperLib/ConfigurationMa= nagerObjectParser.c b/DynamicTablesPkg/Library/Common/TableHelperLib/Config= urationManagerObjectParser.c index b46f19693bb5..80ebb0708661 100644 --- a/DynamicTablesPkg/Library/Common/TableHelperLib/ConfigurationManagerOb= jectParser.c +++ b/DynamicTablesPkg/Library/Common/TableHelperLib/ConfigurationManagerOb= jectParser.c @@ -183,21 +183,23 @@ STATIC CONST CM_OBJ_PARSER CmArmFixedFeatureFlagsPar= ser[] =3D { STATIC CONST CM_OBJ_PARSER CmArmItsGroupNodeParser[] =3D { { "Token", sizeof (CM_OBJECT_TOKEN), "0x%p", NULL }, { "ItsIdCount", 4, "0x%x", NULL }, - { "ItsIdToken", sizeof (CM_OBJECT_TOKEN), "0x%p", NULL } + { "ItsIdToken", sizeof (CM_OBJECT_TOKEN), "0x%p", NULL }, + { "Identifier", 4, "0x%x", NULL }, }; =20 /** A parser for EArmObjNamedComponent. */ STATIC CONST CM_OBJ_PARSER CmArmNamedComponentNodeParser[] =3D { - { "Token", sizeof (CM_OBJECT_TOKEN), "0x%p", NULL }, - { "IdMappingCount", 4, "0x%x", NULL }, - { "IdMappingToken", sizeof (CM_OBJECT_TOKEN), "0x%p", NULL }, - { "Flags", 4, "0x%x", NULL }, - { "CacheCoherent", 4, "0x%x", NULL }, - { "AllocationHints", 1, "0x%x", NULL }, - { "MemoryAccessFlags", 1, "0x%x", NULL }, - { "AddressSizeLimit", 1, "0x%x", NULL }, - { "ObjectName", sizeof (CHAR8 *), "%a", NULL } + { "Token", sizeof (CM_OBJECT_TOKEN), "0x%p", NULL }, + { "IdMappingCount", 4, "0x%x", NULL }, + { "IdMappingToken", sizeof (CM_OBJECT_TOKEN), "0x%p", NULL }, + { "Flags", 4, "0x%x", NULL }, + { "CacheCoherent", 4, "0x%x", NULL }, + { "AllocationHints", 1, "0x%x", NULL }, + { "MemoryAccessFlags", 1, "0x%x", NULL }, + { "AddressSizeLimit", 1, "0x%x", NULL }, + { "ObjectName", 1, NULL, PrintString }, + { "Identifier", 4, "0x%x", NULL }, }; =20 /** A parser for EArmObjRootComplex. @@ -211,7 +213,10 @@ STATIC CONST CM_OBJ_PARSER CmArmRootComplexNodeParser= [] =3D { { "MemoryAccessFlags", 1, "0x%x", NULL }, { "AtsAttribute", 4, "0x%x", NULL }, { "PciSegmentNumber", 4, "0x%x", NULL }, - { "MemoryAddressSize", 1, "0x%x", NULL } + { "MemoryAddressSize", 1, "0x%x", NULL }, + { "PasidCapabilities", 2, "0x%x", NULL }, + { "Flags", 4, "0x%x", NULL }, + { "Identifier", 4, "0x%x", NULL }, }; =20 /** A parser for EArmObjSmmuV1SmmuV2. @@ -231,7 +236,8 @@ STATIC CONST CM_OBJ_PARSER CmArmSmmuV1SmmuV2NodeParser= [] =3D { { "SMMU_NSgIrpt", 4, "0x%x", NULL }, { "SMMU_NSgIrptFlags", 4, "0x%x", NULL }, { "SMMU_NSgCfgIrpt", 4, "0x%x", NULL }, - { "SMMU_NSgCfgIrptFlags", 4, "0x%x", NULL } + { "SMMU_NSgCfgIrptFlags", 4, "0x%x", NULL }, + { "Identifier", 4, "0x%x", NULL }, }; =20 /** A parser for EArmObjSmmuV3. @@ -249,7 +255,8 @@ STATIC CONST CM_OBJ_PARSER CmArmSmmuV3NodeParser[] =3D= { { "GerrInterrupt", 4, "0x%x", NULL }, { "SyncInterrupt", 4, "0x%x", NULL }, { "ProximityDomain", 4, "0x%x", NULL }, - { "DeviceIdMappingIndex", 4, "0x%x", NULL } + { "DeviceIdMappingIndex", 4, "0x%x", NULL }, + { "Identifier", 4, "0x%x", NULL }, }; =20 /** A parser for EArmObjPmcg. @@ -261,7 +268,8 @@ STATIC CONST CM_OBJ_PARSER CmArmPmcgNodeParser[] =3D { { "BaseAddress", 8, "0x%llx", NULL }, { "OverflowInterrupt", 4, "0x%x", NULL }, { "Page1BaseAddress", 8, "0x%llx", NULL }, - { "ReferenceToken", sizeof (CM_OBJECT_TOKEN), "0x%p", NULL } + { "ReferenceToken", sizeof (CM_OBJECT_TOKEN), "0x%p", NULL }, + { "Identifier", 4, "0x%x", NULL }, }; =20 /** A parser for EArmObjGicItsIdentifierArray. @@ -432,6 +440,25 @@ STATIC CONST CM_OBJ_PARSER CmPciInterruptMapInfoParse= r[] =3D { ARRAY_SIZE (CmArmGenericInterruptParser) }, }; =20 +/** A parser for EArmObjRmr. +*/ +STATIC CONST CM_OBJ_PARSER CmArmRmrInfoParser[] =3D { + { "Token", sizeof (CM_OBJECT_TOKEN), "0x%p", NULL }, + { "IdMappingCount", 4, "0x%x", NULL }, + { "IdMappingToken", sizeof (CM_OBJECT_TOKEN), "0x%p", NULL }, + { "Identifier", 4, "0x%x", NULL }, + { "Flags", 4, "0x%x", NULL }, + { "MemRangeDescCount", 4, "0x%x", NULL }, + { "MemRangeDescToken", sizeof (CM_OBJECT_TOKEN), "0x%p", NULL }, +}; + +/** A parser for EArmObjMemoryRangeDescriptor. +*/ +STATIC CONST CM_OBJ_PARSER CmArmMemoryRangeDescriptorInfoParser[] =3D { + { "BaseAddress", 8, "0x%llx", NULL }, + { "Length", 8, "0x%llx", NULL }, +}; + /** A parser for EArmObjCpcInfo. */ STATIC CONST CM_OBJ_PARSER CmArmCpcInfoParser[] =3D { @@ -588,6 +615,10 @@ STATIC CONST CM_OBJ_PARSER_ARRAY ArmNamespaceObjectPa= rser[] =3D { ARRAY_SIZE (CmArmPciAddressMapInfoParser) }, { "EArmObjPciInterruptMapInfo", CmPciInterruptMapInfoParser, ARRAY_SIZE (CmPciInterruptMapInfoParser) }, + { "EArmObjRmr", CmArmRmrInfoParser, + ARRAY_SIZE (CmArmRmrInfoParser) }, + { "EArmObjMemoryRangeDescriptor", CmArmMemoryRangeDescriptorInfoP= arser, + ARRAY_SIZE (CmArmMemoryRangeDescriptorInfoParser) }, { "EArmObjCpcInfo", CmArmCpcInfoParser, ARRAY_SIZE (CmArmCpcInfoParser) }, { "EArmObjMax", NULL, = 0 }, --=20 2.25.1 -=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D- Groups.io Links: You receive all messages sent to this group. View/Reply Online (#94884): https://edk2.groups.io/g/devel/message/94884 Mute This Topic: https://groups.io/mt/94232522/1787277 Group Owner: devel+owner@edk2.groups.io Unsubscribe: https://edk2.groups.io/g/devel/unsub [importer@patchew.org] -=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D- From nobody Thu May 9 10:47:23 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of groups.io designates 66.175.222.108 as permitted sender) client-ip=66.175.222.108; envelope-from=bounce+27952+94885+1787277+3901457@groups.io; helo=mail02.groups.io; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of groups.io designates 66.175.222.108 as permitted sender) smtp.mailfrom=bounce+27952+94885+1787277+3901457@groups.io; dmarc=fail(p=none dis=none) header.from=arm.com ARC-Seal: i=1; a=rsa-sha256; t=1665393683; cv=none; d=zohomail.com; s=zohoarc; b=nNUnWEtwhHVEtva5oatJ3jk0NY0yUh3Q9GM081yIVm4J1nFlum//8nOzWkkqZT2DPFCGrPXKHL2j034tUmYLGeVSDB48ED27SxtWe+fas6v4msRGaqw6aU1BMKryitiRNo4tJWUSaJAV5u2KgP2tsrpyWLjCwtfo0sQ8CR6iq6s= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1665393683; h=Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Id:List-Help:List-Unsubscribe:MIME-Version:Message-ID:Reply-To:References:Sender:Subject:To; bh=46GIOVgx6DFk9d5tUBVn3UBTCJ9HhjB6WZ1JD/FCMKw=; b=k9UlFDf0XXnHQbT/x1EYDBXXfRIeF4Z4uKsSLCf91Yvhnmtrkn/iBtC6OS1oAVHo5WTyh336EK8VWeoyH5yNXPoGNbzczHMDiPU8yEkEVEuZ92+GmEOFTooVDFxcUYAKxP38jY7ATVMHkUWY7wXs9RNmU1YvdVthjGm2P4PwjAQ= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of groups.io designates 66.175.222.108 as permitted sender) smtp.mailfrom=bounce+27952+94885+1787277+3901457@groups.io; dmarc=fail header.from= (p=none dis=none) Received: from mail02.groups.io (mail02.groups.io [66.175.222.108]) by mx.zohomail.com with SMTPS id 1665393683147491.3574569921303; Mon, 10 Oct 2022 02:21:23 -0700 (PDT) Return-Path: X-Received: by 127.0.0.2 with SMTP id GSubYY1788612xD94kvt8xin; Mon, 10 Oct 2022 02:21:22 -0700 X-Received: from foss.arm.com (foss.arm.com [217.140.110.172]) by mx.groups.io with SMTP id smtpd.web12.4240.1665393681724327034 for ; Mon, 10 Oct 2022 02:21:22 -0700 X-Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.121.207.14]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id A994F1480; Mon, 10 Oct 2022 02:21:27 -0700 (PDT) X-Received: from pierre123.arm.com (unknown [10.57.34.234]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPA id B6CB33F792; Mon, 10 Oct 2022 02:21:20 -0700 (PDT) From: "PierreGondois" To: devel@edk2.groups.io Cc: Sami Mujawar , Alexei Fedorov Subject: [edk2-devel] [PATCH 04/14] DynamicTablesPkg: Update CmObjParser for MinorRevision Date: Mon, 10 Oct 2022 11:20:48 +0200 Message-Id: <20221010092058.118714-5-Pierre.Gondois@arm.com> In-Reply-To: <20221010092058.118714-1-Pierre.Gondois@arm.com> References: <20221010092058.118714-1-Pierre.Gondois@arm.com> MIME-Version: 1.0 Precedence: Bulk List-Unsubscribe: List-Subscribe: List-Help: Sender: devel@edk2.groups.io List-Id: Mailing-List: list devel@edk2.groups.io; contact devel+owner@edk2.groups.io Reply-To: devel@edk2.groups.io,pierre.gondois@arm.com X-Gm-Message-State: 5dcP2RybbQHAbrAQkgnacDXwx1787277AA= Content-Transfer-Encoding: quoted-printable DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=groups.io; q=dns/txt; s=20140610; t=1665393682; bh=a9OAjWt4+y8HPO1NGqlsjGVn4Ih37EjnonrEszEYN3Q=; h=Cc:Date:From:Reply-To:Subject:To; b=SL1rP4Tqp7nR5E/zW1Ad7A3j4Cwoi5+OSVuCNLA3EpYlGxhtoaWTg4XYP7S5DKgWLc2 8HCpdaW56vM1BpiCKJ5DIDBbyUs8BtiXjcrgT8J91rN6Zr9A5tilssU04VnG67ubPlnO5 4u898bKkvbLVb3ncZe2q7VvffzRnxJHmAHw= X-ZohoMail-DKIM: pass (identity @groups.io) X-ZM-MESSAGEID: 1665393683484100011 Content-Type: text/plain; charset="utf-8" From: Pierre Gondois commit 0d23c447d6f5 ("DynamicTablesPkg: Add support to specify FADT minor revision") adds new 'MinorRevision' field to CM_STD_OBJ_ACPI_TABLE_INFO. Reflect the change in this patch to the CmObjectParser. Signed-off-by: Pierre Gondois Reviewed-by: Sami Mujawar --- .../Common/TableHelperLib/ConfigurationManagerObjectParser.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/DynamicTablesPkg/Library/Common/TableHelperLib/ConfigurationMa= nagerObjectParser.c b/DynamicTablesPkg/Library/Common/TableHelperLib/Config= urationManagerObjectParser.c index 80ebb0708661..f82541240ae0 100644 --- a/DynamicTablesPkg/Library/Common/TableHelperLib/ConfigurationManagerOb= jectParser.c +++ b/DynamicTablesPkg/Library/Common/TableHelperLib/ConfigurationManagerOb= jectParser.c @@ -639,7 +639,8 @@ STATIC CONST CM_OBJ_PARSER StdObjAcpiTableInfoParser[]= =3D { { "TableGeneratorId", sizeof (ACPI_TABLE_GENERATOR_ID), "0x%x", = NULL }, { "AcpiTableData", sizeof (EFI_ACPI_DESCRIPTION_HEADER *), "0x%p", = NULL }, { "OemTableId", 8, "0x%LLX"= , NULL }, - { "OemRevision", 4, "0x%x", = NULL } + { "OemRevision", 4, "0x%x", = NULL }, + { "MinorRevision", 1, "0x%x", = NULL }, }; =20 /** A parser for EStdObjSmbiosTableList. --=20 2.25.1 -=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D- Groups.io Links: You receive all messages sent to this group. View/Reply Online (#94885): https://edk2.groups.io/g/devel/message/94885 Mute This Topic: https://groups.io/mt/94232523/1787277 Group Owner: devel+owner@edk2.groups.io Unsubscribe: https://edk2.groups.io/g/devel/unsub [importer@patchew.org] -=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D- From nobody Thu May 9 10:47:23 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of groups.io designates 66.175.222.108 as permitted sender) client-ip=66.175.222.108; envelope-from=bounce+27952+94886+1787277+3901457@groups.io; helo=mail02.groups.io; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of groups.io designates 66.175.222.108 as permitted sender) smtp.mailfrom=bounce+27952+94886+1787277+3901457@groups.io; dmarc=fail(p=none dis=none) header.from=arm.com ARC-Seal: i=1; a=rsa-sha256; t=1665393684; cv=none; d=zohomail.com; s=zohoarc; b=OL8gPBykN9BhhHXjOi/iYLogKuclMPJvR28FD8jQG1sd69VC6yO6A+fUEsfhGuQjlBe0qlWCw8xjryJTdzy8IIEsx1FJY5A3WBWvkP1MhQlo9xUpC7/m3d0LREs0wae+/filo8/WNVZHqtufpmuMEoKVRuQ8gvZhFVLWC1JolLQ= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1665393684; h=Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Id:List-Help:List-Unsubscribe:MIME-Version:Message-ID:Reply-To:References:Sender:Subject:To; bh=BgRRuy8SXXvqOUI56NiKCTcxbTu4SwjpodrdUoUq0Q8=; b=Ui3LHxgh7tBxsW2eucDKP/SI2yB9aZ+PRggMjpCwnDJq9XZSKmch0AwFDxTmuuUucRxZKhTVU8QKEZv1/DixpDz4P6EYfWcmD0KU0GYGOffPEmkY7uhYG2ou1xDZRcBUe6Kgj7GTp5otJgBa83JEnOiM3dHnwtBYHytXqRVQZOM= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of groups.io designates 66.175.222.108 as permitted sender) smtp.mailfrom=bounce+27952+94886+1787277+3901457@groups.io; dmarc=fail header.from= (p=none dis=none) Received: from mail02.groups.io (mail02.groups.io [66.175.222.108]) by mx.zohomail.com with SMTPS id 1665393684201470.7124082392969; Mon, 10 Oct 2022 02:21:24 -0700 (PDT) Return-Path: X-Received: by 127.0.0.2 with SMTP id UwMyYY1788612x3LkDMVWkvv; Mon, 10 Oct 2022 02:21:23 -0700 X-Received: from foss.arm.com (foss.arm.com [217.140.110.172]) by mx.groups.io with SMTP id smtpd.web11.4225.1665393682763812473 for ; Mon, 10 Oct 2022 02:21:23 -0700 X-Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.121.207.14]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id AADE81570; Mon, 10 Oct 2022 02:21:28 -0700 (PDT) X-Received: from pierre123.arm.com (unknown [10.57.34.234]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPA id B73013F792; Mon, 10 Oct 2022 02:21:21 -0700 (PDT) From: "PierreGondois" To: devel@edk2.groups.io Cc: Sami Mujawar , Alexei Fedorov Subject: [edk2-devel] [PATCH 05/14] DynamicTablesPkg: Fix GTBlock and GTBlockTimerFrame CmObjParsers Date: Mon, 10 Oct 2022 11:20:49 +0200 Message-Id: <20221010092058.118714-6-Pierre.Gondois@arm.com> In-Reply-To: <20221010092058.118714-1-Pierre.Gondois@arm.com> References: <20221010092058.118714-1-Pierre.Gondois@arm.com> MIME-Version: 1.0 Precedence: Bulk List-Unsubscribe: List-Subscribe: List-Help: Sender: devel@edk2.groups.io List-Id: Mailing-List: list devel@edk2.groups.io; contact devel+owner@edk2.groups.io Reply-To: devel@edk2.groups.io,pierre.gondois@arm.com X-Gm-Message-State: keCC8H1IOIpfVxbG9xgjzVK8x1787277AA= Content-Transfer-Encoding: quoted-printable DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=groups.io; q=dns/txt; s=20140610; t=1665393683; bh=wAi8kYOkPH7BREYI6yAI3jsdT/du9YRpgW53+ZbeTyc=; h=Cc:Date:From:Reply-To:Subject:To; b=jqS6HQeuEeMtWMG6/JCQyeOcks4ZFGkvnqxEaoCihRrpcV7dNw4bHMw2NDAHrSd+BMG K1DsbfP8MQJn8kIcZAqkdtQ5vBDoSIr2KXnGFVJEAPMk5GRR1YmZUIHrLMcyEy4qj1xsq ytJOzBaPfUkiouaFwEAHZM/gTPBejC54/qg= X-ZohoMail-DKIM: pass (identity @groups.io) X-ZM-MESSAGEID: 1665393685521100023 Content-Type: text/plain; charset="utf-8" From: Pierre Gondois The CmObjParsers of the following objects was inverted, probably due to a wrong ordering placement in the file defining the structures: -EArmObjGTBlockTimerFrameInfo -EArmObjPlatformGTBlockInfo Assign the correct parser for each object, and re-order the structures in the file defining them. Signed-off-by: Pierre Gondois Reviewed-by: Sami Mujawar --- .../Include/ArmNameSpaceObjects.h | 32 +++++++++---------- .../ConfigurationManagerObjectParser.c | 22 ++++++------- 2 files changed, 27 insertions(+), 27 deletions(-) diff --git a/DynamicTablesPkg/Include/ArmNameSpaceObjects.h b/DynamicTables= Pkg/Include/ArmNameSpaceObjects.h index c66b441d532d..cd39e609d6c4 100644 --- a/DynamicTablesPkg/Include/ArmNameSpaceObjects.h +++ b/DynamicTablesPkg/Include/ArmNameSpaceObjects.h @@ -353,6 +353,22 @@ typedef struct CmArmGenericTimerInfo { UINT32 VirtualPL2TimerFlags; } CM_ARM_GENERIC_TIMER_INFO; =20 +/** A structure that describes the + Platform Generic Block Timer information for the Platform. + + ID: EArmObjPlatformGTBlockInfo +*/ +typedef struct CmArmGTBlockInfo { + /// The physical base address for the GT Block Timer structure + UINT64 GTBlockPhysicalAddress; + + /// The number of timer frames implemented in the GT Block + UINT32 GTBlockTimerFrameCount; + + /// Reference token for the GT Block timer frame list + CM_OBJECT_TOKEN GTBlockTimerFrameToken; +} CM_ARM_GTBLOCK_INFO; + /** A structure that describes the Platform Generic Block Timer Frame information for the Platform. =20 @@ -390,22 +406,6 @@ typedef struct CmArmGTBlockTimerFrameInfo { UINT32 CommonFlags; } CM_ARM_GTBLOCK_TIMER_FRAME_INFO; =20 -/** A structure that describes the - Platform Generic Block Timer information for the Platform. - - ID: EArmObjPlatformGTBlockInfo -*/ -typedef struct CmArmGTBlockInfo { - /// The physical base address for the GT Block Timer structure - UINT64 GTBlockPhysicalAddress; - - /// The number of timer frames implemented in the GT Block - UINT32 GTBlockTimerFrameCount; - - /// Reference token for the GT Block timer frame list - CM_OBJECT_TOKEN GTBlockTimerFrameToken; -} CM_ARM_GTBLOCK_INFO; - /** A structure that describes the Arm Generic Watchdog information for the Platform. =20 diff --git a/DynamicTablesPkg/Library/Common/TableHelperLib/ConfigurationMa= nagerObjectParser.c b/DynamicTablesPkg/Library/Common/TableHelperLib/Config= urationManagerObjectParser.c index f82541240ae0..040aaa4cbb17 100644 --- a/DynamicTablesPkg/Library/Common/TableHelperLib/ConfigurationManagerOb= jectParser.c +++ b/DynamicTablesPkg/Library/Common/TableHelperLib/ConfigurationManagerOb= jectParser.c @@ -127,6 +127,14 @@ STATIC CONST CM_OBJ_PARSER CmArmGenericTimerInfoParse= r[] =3D { =20 /** A parser for EArmObjPlatformGTBlockInfo. */ +STATIC CONST CM_OBJ_PARSER CmArmGTBlockInfoParser[] =3D { + { "GTBlockPhysicalAddress", 8, "0x%llx", NULL }, + { "GTBlockTimerFrameCount", 4, "0x%x", NULL }, + { "GTBlockTimerFrameToken", sizeof (CM_OBJECT_TOKEN), "0x%p", NULL } +}; + +/** A parser for EArmObjGTBlockTimerFrameInfo. +*/ STATIC CONST CM_OBJ_PARSER CmArmGTBlockTimerFrameInfoParser[] =3D { { "FrameNumber", 1, "0x%x", NULL }, { "PhysicalAddressCntBase", 8, "0x%llx", NULL }, @@ -138,14 +146,6 @@ STATIC CONST CM_OBJ_PARSER CmArmGTBlockTimerFrameInfo= Parser[] =3D { { "CommonFlags", 4, "0x%x", NULL } }; =20 -/** A parser for EArmObjGTBlockTimerFrameInfo. -*/ -STATIC CONST CM_OBJ_PARSER CmArmGTBlockInfoParser[] =3D { - { "GTBlockPhysicalAddress", 8, "0x%llx", NULL }, - { "GTBlockTimerFrameCount", 4, "0x%x", NULL }, - { "GTBlockTimerFrameToken", sizeof (CM_OBJECT_TOKEN), "0x%p", NULL } -}; - /** A parser for EArmObjPlatformGenericWatchdogInfo. */ STATIC CONST CM_OBJ_PARSER CmArmGenericWatchdogInfoParser[] =3D { @@ -560,10 +560,10 @@ STATIC CONST CM_OBJ_PARSER_ARRAY ArmNamespaceObjectP= arser[] =3D { ARRAY_SIZE (CmArmSerialPortInfoParser) }, { "EArmObjGenericTimerInfo", CmArmGenericTimerInfoParser, ARRAY_SIZE (CmArmGenericTimerInfoParser) }, - { "EArmObjPlatformGTBlockInfo", CmArmGTBlockTimerFrameInfoParse= r, - ARRAY_SIZE (CmArmGTBlockTimerFrameInfoParser) }, - { "EArmObjGTBlockTimerFrameInfo", CmArmGTBlockInfoParser, + { "EArmObjPlatformGTBlockInfo", CmArmGTBlockInfoParser, ARRAY_SIZE (CmArmGTBlockInfoParser) }, + { "EArmObjGTBlockTimerFrameInfo", CmArmGTBlockTimerFrameInfoParse= r, + ARRAY_SIZE (CmArmGTBlockTimerFrameInfoParser) }, { "EArmObjPlatformGenericWatchdogInfo", CmArmGenericWatchdogInfoParser, ARRAY_SIZE (CmArmGenericWatchdogInfoParser) }, { "EArmObjPciConfigSpaceInfo", CmArmPciConfigSpaceInfoParser, --=20 2.25.1 -=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D- Groups.io Links: You receive all messages sent to this group. View/Reply Online (#94886): https://edk2.groups.io/g/devel/message/94886 Mute This Topic: https://groups.io/mt/94232524/1787277 Group Owner: devel+owner@edk2.groups.io Unsubscribe: https://edk2.groups.io/g/devel/unsub [importer@patchew.org] -=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D- From nobody Thu May 9 10:47:23 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of groups.io designates 66.175.222.108 as permitted sender) client-ip=66.175.222.108; envelope-from=bounce+27952+94887+1787277+3901457@groups.io; helo=mail02.groups.io; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of groups.io designates 66.175.222.108 as permitted sender) smtp.mailfrom=bounce+27952+94887+1787277+3901457@groups.io; dmarc=fail(p=none dis=none) header.from=arm.com ARC-Seal: i=1; a=rsa-sha256; t=1665393685; cv=none; d=zohomail.com; s=zohoarc; b=BE47WFBhzXHi8CndZclgkM5d9PJuWJnYRAjyUFFclHm+VfSusep7Nvy99nY6AYD/rRFnXmfIct4S+fa0NZI7QDkOkC2N3DpuPltV2pgYv8xl70PRTEl6g/DTfhwopaXpmam2PLll/btiaH6sYOiPlqs9NlX16ZVxuD0Xi+x0Hbs= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1665393685; h=Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Id:List-Help:List-Unsubscribe:MIME-Version:Message-ID:Reply-To:References:Sender:Subject:To; bh=1MjGf3q0G2mBahzAOZx3LBXnXvKBjHAocnLwB1LA3Qs=; b=ErmrnNLkyx+w7z7ut2NS9t8pGmcIqYVKdRi93t1vPXWLJR0UoKAQWwWtZP9YtAIYai78lEB/G81/H5CaI0KAIL8JkxMLxtstk5OmJ/alhFMvEHBFV8qGnHZzf2TZqRBMRo3WUct9tt1uEXIzkSBzF+DvnqX4DG4mBva1Xx8t1rg= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of groups.io designates 66.175.222.108 as permitted sender) smtp.mailfrom=bounce+27952+94887+1787277+3901457@groups.io; dmarc=fail header.from= (p=none dis=none) Received: from mail02.groups.io (mail02.groups.io [66.175.222.108]) by mx.zohomail.com with SMTPS id 1665393685147295.49426892997576; Mon, 10 Oct 2022 02:21:25 -0700 (PDT) Return-Path: X-Received: by 127.0.0.2 with SMTP id HUH9YY1788612x9YGBOD5D3K; Mon, 10 Oct 2022 02:21:24 -0700 X-Received: from foss.arm.com (foss.arm.com [217.140.110.172]) by mx.groups.io with SMTP id smtpd.web10.4408.1665393683844965786 for ; Mon, 10 Oct 2022 02:21:24 -0700 X-Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.121.207.14]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id ABF151480; Mon, 10 Oct 2022 02:21:29 -0700 (PDT) X-Received: from pierre123.arm.com (unknown [10.57.34.234]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPA id B89B13F792; Mon, 10 Oct 2022 02:21:22 -0700 (PDT) From: "PierreGondois" To: devel@edk2.groups.io Cc: Sami Mujawar , Alexei Fedorov Subject: [edk2-devel] [PATCH 06/14] DynamicTablesPkg: Fix wrong/missing fields in CmObjParser Date: Mon, 10 Oct 2022 11:20:50 +0200 Message-Id: <20221010092058.118714-7-Pierre.Gondois@arm.com> In-Reply-To: <20221010092058.118714-1-Pierre.Gondois@arm.com> References: <20221010092058.118714-1-Pierre.Gondois@arm.com> MIME-Version: 1.0 Precedence: Bulk List-Unsubscribe: List-Subscribe: List-Help: Sender: devel@edk2.groups.io List-Id: Mailing-List: list devel@edk2.groups.io; contact devel+owner@edk2.groups.io Reply-To: devel@edk2.groups.io,pierre.gondois@arm.com X-Gm-Message-State: avxEGRDOa3EZNvk83aywg7vnx1787277AA= Content-Transfer-Encoding: quoted-printable DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=groups.io; q=dns/txt; s=20140610; t=1665393684; bh=kPns+QCzauw9JKIq7SG3j9ER1D0mnr5RKTfqcemVMzI=; h=Cc:Date:From:Reply-To:Subject:To; b=qlorJWmOtPONHLNObknNopzPGIklELn0X7MR5sFYZjphHxceKSnyghri7tT6wpFeqS9 waM4mPHXFLtS60vHnvQ7QQInjsaj2uPWtyhp/Y/5QqagTktiYh9IILE1/EFu/GN+2aVVM VEhAn6k3rKXaFBDBBI+YLjY7qvYjjFGt3zU= X-ZohoMail-DKIM: pass (identity @groups.io) X-ZM-MESSAGEID: 1665393685513100021 Content-Type: text/plain; charset="utf-8" From: Pierre Gondois Add missing fields to the following CmObjParser objects: - EArmObjGicDInfo - EArmObjCacheInfo and fix wrong formatting of: - EArmObjLpiInfo Signed-off-by: Pierre Gondois --- .../ConfigurationManagerObjectParser.c | 24 ++++++++++--------- 1 file changed, 13 insertions(+), 11 deletions(-) diff --git a/DynamicTablesPkg/Library/Common/TableHelperLib/ConfigurationMa= nagerObjectParser.c b/DynamicTablesPkg/Library/Common/TableHelperLib/Config= urationManagerObjectParser.c index 040aaa4cbb17..2126beba8b9f 100644 --- a/DynamicTablesPkg/Library/Common/TableHelperLib/ConfigurationManagerOb= jectParser.c +++ b/DynamicTablesPkg/Library/Common/TableHelperLib/ConfigurationManagerOb= jectParser.c @@ -303,7 +303,8 @@ STATIC CONST CM_OBJ_PARSER CmArmProcHierarchyInfoParse= r[] =3D { { "ParentToken", sizeof (CM_OBJECT_TOKEN), "0x%p", NULL }, { "GicCToken", sizeof (CM_OBJECT_TOKEN), "0x%p", NULL }, { "NoOfPrivateResources", 4, "0x%x", NULL }, - { "PrivateResourcesArrayToken", sizeof (CM_OBJECT_TOKEN), "0x%p", NULL } + { "PrivateResourcesArrayToken", sizeof (CM_OBJECT_TOKEN), "0x%p", NULL }, + { "LpiToken", sizeof (CM_OBJECT_TOKEN), "0x%p", NULL }, }; =20 /** A parser for EArmObjCacheInfo. @@ -315,7 +316,8 @@ STATIC CONST CM_OBJ_PARSER CmArmCacheInfoParser[] =3D { { "NumberOfSets", 4, "0x%x", NULL }, { "Associativity", 4, "0x%x", NULL }, { "Attributes", 1, "0x%x", NULL }, - { "LineSize", 2, "0x%x", NULL } + { "LineSize", 2, "0x%x", NULL }, + { "CacheId", 4, "0x%x", NULL }, }; =20 /** A parser for EArmObjProcNodeIdInfo. @@ -400,14 +402,14 @@ STATIC CONST CM_OBJ_PARSER AcpiGenericAddressParser[= ] =3D { /** A parser for EArmObjLpiInfo. */ STATIC CONST CM_OBJ_PARSER CmArmLpiInfoParser[] =3D { - { "MinResidency", 4, = "0x%x", NULL }, - { "WorstCaseWakeLatency", 4, = "0x%x", NULL }, - { "Flags", 4, = "0x%x", NULL }, - { "ArchFlags", 4, = "0x%x", NULL }, - { "ResCntFreq", 4, = "0x%x", NULL }, - { "EnableParentState", 4, = "0x%x", NULL }, - { "IsInteger", 1, = "%d", NULL }, - { "IntegerEntryMethod", 8, = "0x%llx", NULL }, + { "MinResidency", 4, = "0x%x", NULL }, + { "WorstCaseWakeLatency", 4, = "0x%x", NULL }, + { "Flags", 4, = "0x%x", NULL }, + { "ArchFlags", 4, = "0x%x", NULL }, + { "ResCntFreq", 4, = "0x%x", NULL }, + { "EnableParentState", 4, = "0x%x", NULL }, + { "IsInteger", 1, = "%d", NULL }, + { "IntegerEntryMethod", 8, = "0x%llx", NULL }, { "RegisterEntryMethod", sizeof (EFI_ACPI_6_3_GENERIC_ADDRESS_STRUC= TURE), NULL, NULL, AcpiGenericAddressParser, ARRAY_SIZE (AcpiGenericAddressParser) }, @@ -417,7 +419,7 @@ STATIC CONST CM_OBJ_PARSER CmArmLpiInfoParser[] =3D { { "UsageCounterRegister", sizeof (EFI_ACPI_6_3_GENERIC_ADDRESS_STRUC= TURE), NULL, NULL, AcpiGenericAddressParser, ARRAY_SIZE (AcpiGenericAddressParser) }, - { "StateName", 16, = "0x%a", NULL }, + { "StateName", 16, = "NULL", PrintString }, }; =20 /** A parser for EArmObjPciAddressMapInfo. --=20 2.25.1 -=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D- Groups.io Links: You receive all messages sent to this group. View/Reply Online (#94887): https://edk2.groups.io/g/devel/message/94887 Mute This Topic: https://groups.io/mt/94232525/1787277 Group Owner: devel+owner@edk2.groups.io Unsubscribe: https://edk2.groups.io/g/devel/unsub [importer@patchew.org] -=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D- From nobody Thu May 9 10:47:23 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of groups.io designates 66.175.222.108 as permitted sender) client-ip=66.175.222.108; envelope-from=bounce+27952+94888+1787277+3901457@groups.io; helo=mail02.groups.io; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of groups.io designates 66.175.222.108 as permitted sender) smtp.mailfrom=bounce+27952+94888+1787277+3901457@groups.io; dmarc=fail(p=none dis=none) header.from=arm.com ARC-Seal: i=1; a=rsa-sha256; t=1665393685; cv=none; d=zohomail.com; s=zohoarc; b=PVUXjZodpN1AMarc2dj0110dJoynJgjqCJ+5T4kPcXhPn44R4Y3l2r8UKuupxTxD85FQZ4UGoJAJ3Gpo5Q1iSf3GSqNSALCa+SilS7rd1JVqCDAFz+xc81db0+PmSusbjgyBZ4xAZ7WOWpESClvSJ0uxyak8VbgKhVQRjFRYPb0= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1665393685; h=Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Id:List-Help:List-Unsubscribe:MIME-Version:Message-ID:Reply-To:References:Sender:Subject:To; bh=39Cc6S9ZrYvzJJyTvFB3oYghjTQHqWjXXmlpT0wHIiI=; b=Pgtybu3wmazUqAvBeXfsKwRUHiFkfPZhYj7rcE58LMdELxyd5QeDBHZu3i4KSH5n3V8Pg8ThIOPafcA831xGF3wGwUABKT9xvYDH1gvjmEqpQWEnF3z41FyHfRRPy5i29NJDvoN8UtjlxguZIgQm+p5Ob7oL4006lhfbm6/1vSw= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of groups.io designates 66.175.222.108 as permitted sender) smtp.mailfrom=bounce+27952+94888+1787277+3901457@groups.io; dmarc=fail header.from= (p=none dis=none) Received: from mail02.groups.io (mail02.groups.io [66.175.222.108]) by mx.zohomail.com with SMTPS id 1665393685842316.5100397545732; Mon, 10 Oct 2022 02:21:25 -0700 (PDT) Return-Path: X-Received: by 127.0.0.2 with SMTP id ycA7YY1788612xavzWnAmAIG; Mon, 10 Oct 2022 02:21:25 -0700 X-Received: from foss.arm.com (foss.arm.com [217.140.110.172]) by mx.groups.io with SMTP id smtpd.web12.4241.1665393684847785823 for ; Mon, 10 Oct 2022 02:21:25 -0700 X-Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.121.207.14]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id AE74C1570; Mon, 10 Oct 2022 02:21:30 -0700 (PDT) X-Received: from pierre123.arm.com (unknown [10.57.34.234]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPA id BA6D23F792; Mon, 10 Oct 2022 02:21:23 -0700 (PDT) From: "PierreGondois" To: devel@edk2.groups.io Cc: Sami Mujawar , Alexei Fedorov Subject: [edk2-devel] [PATCH 07/14] DynamicTablesPkg: Remove deprecated APIs Date: Mon, 10 Oct 2022 11:20:51 +0200 Message-Id: <20221010092058.118714-8-Pierre.Gondois@arm.com> In-Reply-To: <20221010092058.118714-1-Pierre.Gondois@arm.com> References: <20221010092058.118714-1-Pierre.Gondois@arm.com> MIME-Version: 1.0 Precedence: Bulk List-Unsubscribe: List-Subscribe: List-Help: Sender: devel@edk2.groups.io List-Id: Mailing-List: list devel@edk2.groups.io; contact devel+owner@edk2.groups.io Reply-To: devel@edk2.groups.io,pierre.gondois@arm.com X-Gm-Message-State: E10edGdol5h3h5Da0eLDeZuFx1787277AA= Content-Transfer-Encoding: quoted-printable DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=groups.io; q=dns/txt; s=20140610; t=1665393685; bh=X3nTc5Q2gT6WYlfKqLWyN8H2irxfiZBPoeqs4b56gLE=; h=Cc:Date:From:Reply-To:Subject:To; b=WfVo9HmwRTO77hR0KdQ0aBp4i/KfanfLMqjSaEL/r+4I4Fsb8Y168SytRyaX5eBrFcQ 90K3M0CRJSf5jX1wdbjr1yJsQbDs2Iytkfb3Nokun+iTeqApAS770uZMgAOENT6X5YvXJ TuJFwhr0oCl1eN9abiqkjrmFXHbWgfbaNb0= X-ZohoMail-DKIM: pass (identity @groups.io) X-ZM-MESSAGEID: 1665393687512100029 Content-Type: text/plain; charset="utf-8" From: Pierre Gondois commit 691c5f776274 ("DynamicTablesPkg: Deprecate Crs specific methods in AmlLib") deprecates some APIs. Finally remove them. Signed-off-by: Pierre Gondois Reviewed-by: Sami Mujawar --- .../Include/Library/AmlLib/AmlLib.h | 138 ------------------ .../Library/Common/AmlLib/Api/AmlApi.c | 85 ----------- .../AmlLib/CodeGen/AmlResourceDataCodeGen.c | 76 ---------- 3 files changed, 299 deletions(-) diff --git a/DynamicTablesPkg/Include/Library/AmlLib/AmlLib.h b/DynamicTabl= esPkg/Include/Library/AmlLib/AmlLib.h index 0d8446d78256..9210c5091548 100644 --- a/DynamicTablesPkg/Include/Library/AmlLib/AmlLib.h +++ b/DynamicTablesPkg/Include/Library/AmlLib/AmlLib.h @@ -1390,142 +1390,4 @@ AmlCreateCpcNode ( OUT AML_OBJECT_NODE_HANDLE *NewCpcNode OPTIONAL ); =20 -// DEPRECATED APIS -#ifndef DISABLE_NEW_DEPRECATED_INTERFACES - -/** DEPRECATED API - - Get the first Resource Data element contained in a "_CRS" object. - - In the following ASL code, the function will return the Resource Data - node corresponding to the "QWordMemory ()" ASL macro. - Name (_CRS, ResourceTemplate() { - QWordMemory (...) {...}, - Interrupt (...) {...} - } - ) - - Note: - - The "_CRS" object must be declared using ASL "Name (Declare Named Obj= ect)". - - "_CRS" declared using ASL "Method (Declare Control Method)" is not - supported. - - @ingroup UserApis - - @param [in] NameOpCrsNode NameOp object node defining a "_CRS" object. - Must have an OpCode=3DAML_NAME_OP, SubOpCode= =3D0. - NameOp object nodes are defined in ASL - using the "Name ()" function. - @param [out] OutRdNode Pointer to the first Resource Data element of - the "_CRS" object. A Resource Data element - is stored in a data node. - - @retval EFI_SUCCESS The function completed successfully. - @retval EFI_INVALID_PARAMETER Invalid parameter. -**/ -EFI_STATUS -EFIAPI -AmlNameOpCrsGetFirstRdNode ( - IN AML_OBJECT_NODE_HANDLE NameOpCrsNode, - OUT AML_DATA_NODE_HANDLE *OutRdNode - ); - -/** DEPRECATED API - - Get the Resource Data element following the CurrRdNode Resource Data. - - In the following ASL code, if CurrRdNode corresponds to the first - "QWordMemory ()" ASL macro, the function will return the Resource Data - node corresponding to the "Interrupt ()" ASL macro. - Name (_CRS, ResourceTemplate() { - QwordMemory (...) {...}, - Interrupt (...) {...} - } - ) - - The CurrRdNode Resource Data node must be defined in an object named "_C= RS" - and defined by a "Name ()" ASL function. - - @ingroup UserApis - - @param [in] CurrRdNode Pointer to the current Resource Data element = of - the "_CRS" variable. - @param [out] OutRdNode Pointer to the Resource Data element following - the CurrRdNode. - Contain a NULL pointer if CurrRdNode is the - last Resource Data element in the list. - The "End Tag" is not considered as a resource - data element and is not returned. - - @retval EFI_SUCCESS The function completed successfully. - @retval EFI_INVALID_PARAMETER Invalid parameter. -**/ -EFI_STATUS -EFIAPI -AmlNameOpCrsGetNextRdNode ( - IN AML_DATA_NODE_HANDLE CurrRdNode, - OUT AML_DATA_NODE_HANDLE *OutRdNode - ); - -/** DEPRECATED API - - Add an Interrupt Resource Data node. - - This function creates a Resource Data element corresponding to the - "Interrupt ()" ASL function, stores it in an AML Data Node. - - It then adds it after the input CurrRdNode in the list of resource data - element. - - The Resource Data effectively created is an Extended Interrupt Resource - Data. See ACPI 6.3 specification, s6.4.3.6 "Extended Interrupt Descripto= r" - for more information about Extended Interrupt Resource Data. - - The Extended Interrupt contains one single interrupt. - - This function allocates memory to create a data node. It is the caller's - responsibility to either: - - attach this node to an AML tree; - - delete this node. - - Note: The _CRS node must be defined using the ASL Name () function. - e.g. Name (_CRS, ResourceTemplate () { - ... - } - - @ingroup CodeGenApis - - @param [in] NameOpCrsNode NameOp object node defining a "_CRS" obje= ct. - Must have an OpCode=3DAML_NAME_OP, SubOpC= ode=3D0. - NameOp object nodes are defined in ASL - using the "Name ()" function. - @param [in] ResourceConsumer The device consumes the specified interru= pt - or produces it for use by a child device. - @param [in] EdgeTriggered The interrupt is edge triggered or - level triggered. - @param [in] ActiveLow The interrupt is active-high or active-lo= w. - @param [in] Shared The interrupt can be shared with other - devices or not (Exclusive). - @param [in] IrqList Interrupt list. Must be non-NULL. - @param [in] IrqCount Interrupt count. Must be non-zero. - - - @retval EFI_SUCCESS The function completed successfully. - @retval EFI_INVALID_PARAMETER Invalid parameter. - @retval EFI_OUT_OF_RESOURCES Could not allocate memory. -**/ -EFI_STATUS -EFIAPI -AmlCodeGenCrsAddRdInterrupt ( - IN AML_OBJECT_NODE_HANDLE NameOpCrsNode, - IN BOOLEAN ResourceConsumer, - IN BOOLEAN EdgeTriggered, - IN BOOLEAN ActiveLow, - IN BOOLEAN Shared, - IN UINT32 *IrqList, - IN UINT8 IrqCount - ); - -#endif // DISABLE_NEW_DEPRECATED_INTERFACES - #endif // AML_LIB_H_ diff --git a/DynamicTablesPkg/Library/Common/AmlLib/Api/AmlApi.c b/DynamicT= ablesPkg/Library/Common/AmlLib/Api/AmlApi.c index 519afdc1eafa..9f162abe2d09 100644 --- a/DynamicTablesPkg/Library/Common/AmlLib/Api/AmlApi.c +++ b/DynamicTablesPkg/Library/Common/AmlLib/Api/AmlApi.c @@ -429,88 +429,3 @@ AmlAttachNode ( { return AmlVarListAddTail (ParentNode, NewNode); } - -// DEPRECATED APIS -#ifndef DISABLE_NEW_DEPRECATED_INTERFACES - -/** DEPRECATED API - - Get the first Resource Data element contained in a "_CRS" object. - - In the following ASL code, the function will return the Resource Data - node corresponding to the "QWordMemory ()" ASL macro. - Name (_CRS, ResourceTemplate() { - QWordMemory (...) {...}, - Interrupt (...) {...} - } - ) - - Note: - - The "_CRS" object must be declared using ASL "Name (Declare Named Obj= ect)". - - "_CRS" declared using ASL "Method (Declare Control Method)" is not - supported. - - @ingroup UserApis - - @param [in] NameOpCrsNode NameOp object node defining a "_CRS" object. - Must have an OpCode=3DAML_NAME_OP, SubOpCode= =3D0. - NameOp object nodes are defined in ASL - using the "Name ()" function. - @param [out] OutRdNode Pointer to the first Resource Data element of - the "_CRS" object. A Resource Data element - is stored in a data node. - - @retval EFI_SUCCESS The function completed successfully. - @retval EFI_INVALID_PARAMETER Invalid parameter. -**/ -EFI_STATUS -EFIAPI -AmlNameOpCrsGetFirstRdNode ( - IN AML_OBJECT_NODE_HANDLE NameOpCrsNode, - OUT AML_DATA_NODE_HANDLE *OutRdNode - ) -{ - return AmlNameOpGetFirstRdNode (NameOpCrsNode, OutRdNode); -} - -/** DEPRECATED API - - Get the Resource Data element following the CurrRdNode Resource Data. - - In the following ASL code, if CurrRdNode corresponds to the first - "QWordMemory ()" ASL macro, the function will return the Resource Data - node corresponding to the "Interrupt ()" ASL macro. - Name (_CRS, ResourceTemplate() { - QwordMemory (...) {...}, - Interrupt (...) {...} - } - ) - - The CurrRdNode Resource Data node must be defined in an object named "_C= RS" - and defined by a "Name ()" ASL function. - - @ingroup UserApis - - @param [in] CurrRdNode Pointer to the current Resource Data element = of - the "_CRS" variable. - @param [out] OutRdNode Pointer to the Resource Data element following - the CurrRdNode. - Contain a NULL pointer if CurrRdNode is the - last Resource Data element in the list. - The "End Tag" is not considered as a resource - data element and is not returned. - - @retval EFI_SUCCESS The function completed successfully. - @retval EFI_INVALID_PARAMETER Invalid parameter. -**/ -EFI_STATUS -EFIAPI -AmlNameOpCrsGetNextRdNode ( - IN AML_DATA_NODE_HANDLE CurrRdNode, - OUT AML_DATA_NODE_HANDLE *OutRdNode - ) -{ - return AmlNameOpGetNextRdNode (CurrRdNode, OutRdNode); -} - -#endif // DISABLE_NEW_DEPRECATED_INTERFACES diff --git a/DynamicTablesPkg/Library/Common/AmlLib/CodeGen/AmlResourceData= CodeGen.c b/DynamicTablesPkg/Library/Common/AmlLib/CodeGen/AmlResourceDataC= odeGen.c index 32c3ab534d0b..332962bed441 100644 --- a/DynamicTablesPkg/Library/Common/AmlLib/CodeGen/AmlResourceDataCodeGen= .c +++ b/DynamicTablesPkg/Library/Common/AmlLib/CodeGen/AmlResourceDataCodeGen= .c @@ -1406,79 +1406,3 @@ error_handler: =20 return Status; } - -// DEPRECATED APIS -#ifndef DISABLE_NEW_DEPRECATED_INTERFACES - -/** DEPRECATED API - - Add an Interrupt Resource Data node. - - This function creates a Resource Data element corresponding to the - "Interrupt ()" ASL function, stores it in an AML Data Node. - - It then adds it after the input CurrRdNode in the list of resource data - element. - - The Resource Data effectively created is an Extended Interrupt Resource - Data. See ACPI 6.3 specification, s6.4.3.6 "Extended Interrupt Descripto= r" - for more information about Extended Interrupt Resource Data. - - The Extended Interrupt contains one single interrupt. - - This function allocates memory to create a data node. It is the caller's - responsibility to either: - - attach this node to an AML tree; - - delete this node. - - Note: The _CRS node must be defined using the ASL Name () function. - e.g. Name (_CRS, ResourceTemplate () { - ... - } - - @ingroup UserApis - - @param [in] NameOpCrsNode NameOp object node defining a "_CRS" obje= ct. - Must have an OpCode=3DAML_NAME_OP, SubOpC= ode=3D0. - NameOp object nodes are defined in ASL - using the "Name ()" function. - @param [in] ResourceConsumer The device consumes the specified interru= pt - or produces it for use by a child device. - @param [in] EdgeTriggered The interrupt is edge triggered or - level triggered. - @param [in] ActiveLow The interrupt is active-high or active-lo= w. - @param [in] Shared The interrupt can be shared with other - devices or not (Exclusive). - @param [in] IrqList Interrupt list. Must be non-NULL. - @param [in] IrqCount Interrupt count. Must be non-zero. - - - @retval EFI_SUCCESS The function completed successfully. - @retval EFI_INVALID_PARAMETER Invalid parameter. - @retval EFI_OUT_OF_RESOURCES Could not allocate memory. -**/ -EFI_STATUS -EFIAPI -AmlCodeGenCrsAddRdInterrupt ( - IN AML_OBJECT_NODE_HANDLE NameOpCrsNode, - IN BOOLEAN ResourceConsumer, - IN BOOLEAN EdgeTriggered, - IN BOOLEAN ActiveLow, - IN BOOLEAN Shared, - IN UINT32 *IrqList, - IN UINT8 IrqCount - ) -{ - return AmlCodeGenRdInterrupt ( - ResourceConsumer, - EdgeTriggered, - ActiveLow, - Shared, - IrqList, - IrqCount, - NameOpCrsNode, - NULL - ); -} - -#endif // DISABLE_NEW_DEPRECATED_INTERFACES --=20 2.25.1 -=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D- Groups.io Links: You receive all messages sent to this group. View/Reply Online (#94888): https://edk2.groups.io/g/devel/message/94888 Mute This Topic: https://groups.io/mt/94232526/1787277 Group Owner: devel+owner@edk2.groups.io Unsubscribe: https://edk2.groups.io/g/devel/unsub [importer@patchew.org] -=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D- From nobody Thu May 9 10:47:23 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of groups.io designates 66.175.222.108 as permitted sender) client-ip=66.175.222.108; envelope-from=bounce+27952+94889+1787277+3901457@groups.io; helo=mail02.groups.io; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of groups.io designates 66.175.222.108 as permitted sender) smtp.mailfrom=bounce+27952+94889+1787277+3901457@groups.io; dmarc=fail(p=none dis=none) header.from=arm.com ARC-Seal: i=1; a=rsa-sha256; t=1665393687; cv=none; d=zohomail.com; s=zohoarc; b=jxZdNAzIxpHMFZvsmO6QUo5JGhaZjnsj5duUQiRXJRAMh4nIJr72v1/VSBoYY43mzeyWjBHFSm9BAagmBqSk5XoiNsL77BuQzhtTuyaFKwQojMOIYJ7Bn41ayWpeTRFLnzI1Gxc1kVGXBcXItmClzgDEOq4LfMcHbU65s16o/f8= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1665393687; h=Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Id:List-Help:List-Unsubscribe:MIME-Version:Message-ID:Reply-To:References:Sender:Subject:To; bh=1SnzRCRKvdLhwuc2XcHRc/8LF5yzRsayUxCFfllG9nY=; b=cfglG8s/C5W3+7EpawN5NiuhAOUxJxrPqfszfFXi6HZ6ST77WDYNnMdu2RMywfkpr4qGrHiBghPV+E0KqMXhepdi/WW/YBGHFtHQIqbB/LgTUjZtiiSDfhdkDXThBdWHt+Zg1twBRPVpQ+4FyRP6/LsxS2ZMVSjz0NlmyjciAKI= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of groups.io designates 66.175.222.108 as permitted sender) smtp.mailfrom=bounce+27952+94889+1787277+3901457@groups.io; dmarc=fail header.from= (p=none dis=none) Received: from mail02.groups.io (mail02.groups.io [66.175.222.108]) by mx.zohomail.com with SMTPS id 1665393687042121.596399710367; Mon, 10 Oct 2022 02:21:27 -0700 (PDT) Return-Path: X-Received: by 127.0.0.2 with SMTP id fKJCYY1788612xDjlVeSXcFj; Mon, 10 Oct 2022 02:21:26 -0700 X-Received: from foss.arm.com (foss.arm.com [217.140.110.172]) by mx.groups.io with SMTP id smtpd.web08.4257.1665393685788543471 for ; Mon, 10 Oct 2022 02:21:26 -0700 X-Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.121.207.14]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id B088A1480; Mon, 10 Oct 2022 02:21:31 -0700 (PDT) X-Received: from pierre123.arm.com (unknown [10.57.34.234]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPA id BD4FD3F792; Mon, 10 Oct 2022 02:21:24 -0700 (PDT) From: "PierreGondois" To: devel@edk2.groups.io Cc: Sami Mujawar , Alexei Fedorov Subject: [edk2-devel] [PATCH 08/14] DynamicTablesPkg: FdtHwInfoParserLib: Remove wrong comment Date: Mon, 10 Oct 2022 11:20:52 +0200 Message-Id: <20221010092058.118714-9-Pierre.Gondois@arm.com> In-Reply-To: <20221010092058.118714-1-Pierre.Gondois@arm.com> References: <20221010092058.118714-1-Pierre.Gondois@arm.com> MIME-Version: 1.0 Precedence: Bulk List-Unsubscribe: List-Subscribe: List-Help: Sender: devel@edk2.groups.io List-Id: Mailing-List: list devel@edk2.groups.io; contact devel+owner@edk2.groups.io Reply-To: devel@edk2.groups.io,pierre.gondois@arm.com X-Gm-Message-State: 9dZqSr5Ur2vD64JlkF6QBRBAx1787277AA= Content-Transfer-Encoding: quoted-printable DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=groups.io; q=dns/txt; s=20140610; t=1665393686; bh=sUyMF/MNdOIMziV2K0GD82yB+22Bfex1r7eeKXYhaaE=; h=Cc:Date:From:Reply-To:Subject:To; b=gLIUhpEInSLWcW8h3nvebAhFcJkyIQOXftN1R6dM42E9S2WHaXXFlfeI3leeGorIVMb ZiGNNfbrIf25fzldNQ5PSysaoHOxOwlf2JpKjafaLHKo0JoGyJhTNPxpdzU6kiHQlXo5Z RhoFKkr0rrd2m677uhQQfnQk8Mnk3uJSY8o= X-ZohoMail-DKIM: pass (identity @groups.io) X-ZM-MESSAGEID: 1665393687490100028 Content-Type: text/plain; charset="utf-8" From: Pierre Gondois commit 13136cc3111f ("DynamicTablesPkg: FdtHwInfoParserLib: Parse Pmu info") adds support for pmu parsing. Thus, remove the wrong comment. Signed-off-by: Pierre Gondois Reviewed-by: Sami Mujawar --- .../Library/FdtHwInfoParserLib/Gic/ArmGicCParser.c | 3 --- .../Library/FdtHwInfoParserLib/Gic/ArmGicCParser.h | 3 --- 2 files changed, 6 deletions(-) diff --git a/DynamicTablesPkg/Library/FdtHwInfoParserLib/Gic/ArmGicCParser.= c b/DynamicTablesPkg/Library/FdtHwInfoParserLib/Gic/ArmGicCParser.c index fb01aa0d19e2..2c72bd0c582e 100644 --- a/DynamicTablesPkg/Library/FdtHwInfoParserLib/Gic/ArmGicCParser.c +++ b/DynamicTablesPkg/Library/FdtHwInfoParserLib/Gic/ArmGicCParser.c @@ -785,9 +785,6 @@ GicCPmuNodeParser ( UINT32 AffinityFlags; // {default =3D 0} } CM_ARM_GICC_INFO; =20 - The pmu information can be found in the pmu node. There is no support - for now. - A parser parses a Device Tree to populate a specific CmObj type. None, one or many CmObj can be created by the parser. The created CmObj are then handed to the parser's caller through the diff --git a/DynamicTablesPkg/Library/FdtHwInfoParserLib/Gic/ArmGicCParser.= h b/DynamicTablesPkg/Library/FdtHwInfoParserLib/Gic/ArmGicCParser.h index fd980484a28d..539f39cecb22 100644 --- a/DynamicTablesPkg/Library/FdtHwInfoParserLib/Gic/ArmGicCParser.h +++ b/DynamicTablesPkg/Library/FdtHwInfoParserLib/Gic/ArmGicCParser.h @@ -41,9 +41,6 @@ UINT32 AffinityFlags; // {default =3D 0} } CM_ARM_GICC_INFO; =20 - The pmu information can be found in the pmu node. There is no support - for now. - A parser parses a Device Tree to populate a specific CmObj type. None, one or many CmObj can be created by the parser. The created CmObj are then handed to the parser's caller through the --=20 2.25.1 -=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D- Groups.io Links: You receive all messages sent to this group. View/Reply Online (#94889): https://edk2.groups.io/g/devel/message/94889 Mute This Topic: https://groups.io/mt/94232527/1787277 Group Owner: devel+owner@edk2.groups.io Unsubscribe: https://edk2.groups.io/g/devel/unsub [importer@patchew.org] -=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D- From nobody Thu May 9 10:47:23 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of groups.io designates 66.175.222.108 as permitted sender) client-ip=66.175.222.108; envelope-from=bounce+27952+94890+1787277+3901457@groups.io; helo=mail02.groups.io; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of groups.io designates 66.175.222.108 as permitted sender) smtp.mailfrom=bounce+27952+94890+1787277+3901457@groups.io; dmarc=fail(p=none dis=none) header.from=arm.com ARC-Seal: i=1; a=rsa-sha256; t=1665393687; cv=none; d=zohomail.com; s=zohoarc; b=hXfDcIg1+IqsK9Wcw98Hycjg4GktPrGEgh8sz6zw1/IWiQEWAIGaQSUYN3fe+7kcCrggGgABCh7k/qWa4w4uN7tcjStciKXbM43F+RNHJ/+F4oJeUDLtOji/A/3IRnU8XX8RadpQtUGz2dr4QF0PK89854PneEuci87VSdWkYsE= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1665393687; h=Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Id:List-Help:List-Unsubscribe:MIME-Version:Message-ID:Reply-To:References:Sender:Subject:To; bh=vazmsIN0FT5sO1e1C5PbAEjLjU7LLWWmr8eHTKDVXdk=; b=eIo/WvoNXZR0P55st3Bmkyark32yc96sBNqt1E7HRsVWsJj6J3iDUz3s/fo+3nlUG5MF3I+ZJhhDnGpTDfzGVnUimRV7riAeR7XYLV3d4jHMmsS5iEVdwnQGvkR+Au2aeOSGXuKwsPrihDb6+QjvWEYV/UqtiQV/mFEqDWkN4ls= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of groups.io designates 66.175.222.108 as permitted sender) smtp.mailfrom=bounce+27952+94890+1787277+3901457@groups.io; dmarc=fail header.from= (p=none dis=none) Received: from mail02.groups.io (mail02.groups.io [66.175.222.108]) by mx.zohomail.com with SMTPS id 1665393687848748.3258472545169; Mon, 10 Oct 2022 02:21:27 -0700 (PDT) Return-Path: X-Received: by 127.0.0.2 with SMTP id OysHYY1788612xM6rN6ifN6n; Mon, 10 Oct 2022 02:21:27 -0700 X-Received: from foss.arm.com (foss.arm.com [217.140.110.172]) by mx.groups.io with SMTP id smtpd.web09.4231.1665393686833861912 for ; Mon, 10 Oct 2022 02:21:26 -0700 X-Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.121.207.14]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id B283C1AED; Mon, 10 Oct 2022 02:21:32 -0700 (PDT) X-Received: from pierre123.arm.com (unknown [10.57.34.234]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPA id BE4B53F792; Mon, 10 Oct 2022 02:21:25 -0700 (PDT) From: "PierreGondois" To: devel@edk2.groups.io Cc: Sami Mujawar , Alexei Fedorov Subject: [edk2-devel] [PATCH 09/14] DynamicTablesPkg: Fix Ssdt PCI generation comments Date: Mon, 10 Oct 2022 11:20:53 +0200 Message-Id: <20221010092058.118714-10-Pierre.Gondois@arm.com> In-Reply-To: <20221010092058.118714-1-Pierre.Gondois@arm.com> References: <20221010092058.118714-1-Pierre.Gondois@arm.com> MIME-Version: 1.0 Precedence: Bulk List-Unsubscribe: List-Subscribe: List-Help: Sender: devel@edk2.groups.io List-Id: Mailing-List: list devel@edk2.groups.io; contact devel+owner@edk2.groups.io Reply-To: devel@edk2.groups.io,pierre.gondois@arm.com X-Gm-Message-State: vaY0w4aLeevCxT5ZRJV4lkdGx1787277AA= Content-Transfer-Encoding: quoted-printable DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=groups.io; q=dns/txt; s=20140610; t=1665393687; bh=cbjFB7qOI4BwoRV/5P/3DEjcJJQBGqVYhG0T9ugkZpY=; h=Cc:Date:From:Reply-To:Subject:To; b=dkp6PgqgOWIgniyHVcVLZ2Rfp0d8AticXQQEVKgQ6XyhDrTRF9dSC75KJEC6Lkr4IsH +m4UAC/FUcIw5edZyJdIqKpRd7hIzyfJyzqMa3sOnkuHyehD4oJOLrbeeAEIlzE/HTmX7 WFJ1ANzBnK5x4lI2qEoWTEWiKHyUBS39dXg= X-ZohoMail-DKIM: pass (identity @groups.io) X-ZM-MESSAGEID: 1665393689484100037 Content-Type: text/plain; charset="utf-8" From: Pierre Gondois The second model of the _PRT object is used. Indeed: - the interrupts described are not re-configurable - OSes are aware of the polarity of PCI legacy interrupts, so there is no need to accurately describe the polarity. Also, fix a comment for the CM_ARM_PCI_INTERRUPT_MAP_INFO obj. Signed-off-by: Pierre Gondois Reviewed-by: Sami Mujawar --- DynamicTablesPkg/Include/ArmNameSpaceObjects.h | 2 +- .../Acpi/Arm/AcpiSsdtPcieLibArm/SsdtPcieGenerator.c | 8 ++------ 2 files changed, 3 insertions(+), 7 deletions(-) diff --git a/DynamicTablesPkg/Include/ArmNameSpaceObjects.h b/DynamicTables= Pkg/Include/ArmNameSpaceObjects.h index cd39e609d6c4..d711f3ec5938 100644 --- a/DynamicTablesPkg/Include/ArmNameSpaceObjects.h +++ b/DynamicTablesPkg/Include/ArmNameSpaceObjects.h @@ -1014,7 +1014,7 @@ typedef struct CmArmPciInterruptMapInfo { /// Value on 8 bits (max 255). UINT8 PciBus; =20 - /// Pci Bus. + /// Pci Device. /// Value on 5 bits (max 31). UINT8 PciDevice; =20 diff --git a/DynamicTablesPkg/Library/Acpi/Arm/AcpiSsdtPcieLibArm/SsdtPcieG= enerator.c b/DynamicTablesPkg/Library/Acpi/Arm/AcpiSsdtPcieLibArm/SsdtPcieG= enerator.c index 85098752c614..c54ae6f551f6 100644 --- a/DynamicTablesPkg/Library/Acpi/Arm/AcpiSsdtPcieLibArm/SsdtPcieGenerato= r.c +++ b/DynamicTablesPkg/Library/Acpi/Arm/AcpiSsdtPcieLibArm/SsdtPcieGenerato= r.c @@ -288,12 +288,6 @@ GeneratePciDeviceInfo ( =20 Cf. ACPI 6.4 specification, s6.2.13 "_PRT (PCI Routing Table)" =20 - The first model (defining a _CRS object) is used. This is necessary beca= use - PCI legacy interrupts are active low and GICv2 SPI interrupts are active - high. - Even though PCI interrupts cannot be re-routed, only the first model all= ows - to specify the activation state (low/high). - @param [in] Generator The SSDT Pci generator. @param [in] CfgMgrProtocol Pointer to the Configuration Manager Protocol interface. @@ -397,6 +391,8 @@ GeneratePrt ( High word-Device #, Low word-Function #. (for example, device 3, function 2 is 0x00030002). To refer to all the functions on a devic= e #, use a function number of FFFF). + + Use the second model for _PRT object and describe a hardwired interr= upt. */ Status =3D AmlAddPrtEntry ( (IrqMapInfo->PciDevice << 16) | 0xFFFF, --=20 2.25.1 -=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D- Groups.io Links: You receive all messages sent to this group. View/Reply Online (#94890): https://edk2.groups.io/g/devel/message/94890 Mute This Topic: https://groups.io/mt/94232528/1787277 Group Owner: devel+owner@edk2.groups.io Unsubscribe: https://edk2.groups.io/g/devel/unsub [importer@patchew.org] -=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D- From nobody Thu May 9 10:47:23 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of groups.io designates 66.175.222.108 as permitted sender) client-ip=66.175.222.108; envelope-from=bounce+27952+94891+1787277+3901457@groups.io; helo=mail02.groups.io; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of groups.io designates 66.175.222.108 as permitted sender) smtp.mailfrom=bounce+27952+94891+1787277+3901457@groups.io; dmarc=fail(p=none dis=none) header.from=arm.com ARC-Seal: i=1; a=rsa-sha256; t=1665393689; cv=none; d=zohomail.com; s=zohoarc; b=MWGxQFdHKEdR4BtFSMSxJ3xZuMNehR6zSBmECS2aC6oo2eN5fZzuRXRHLFvnh6vKTWFjPYNJKggmONQBhiXGvHzxEvSuKCvH5QkYvTFR33W87OFwg/b/wAEcxYKRcAlc+RZl+bhMR8Xj8hIeBsXhzQX8qb15XBKTKLvH15rmKvo= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1665393689; h=Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Id:List-Help:List-Unsubscribe:MIME-Version:Message-ID:Reply-To:References:Sender:Subject:To; bh=G9faUEGQfID4m4NM/A1j5vctOM6JCrftGu/p7Kw2i/w=; b=FO5xfXnjWUhXlCluwxVa4X2PitQqRHKDM0GpWXmPnCzueh7m9lS3yv+iHEWC7HYHDfcqzRCbqk/bh5f5dD1H5bvbW5ai0ENimELmsdsVkwBqVNhEkEAcvFdzuMHrLL5QYTEl02FwU7WoZk5tUg88JQRh1+s7ZOXywveeL6uB/RQ= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of groups.io designates 66.175.222.108 as permitted sender) smtp.mailfrom=bounce+27952+94891+1787277+3901457@groups.io; dmarc=fail header.from= (p=none dis=none) Received: from mail02.groups.io (mail02.groups.io [66.175.222.108]) by mx.zohomail.com with SMTPS id 1665393689166464.50183362346274; Mon, 10 Oct 2022 02:21:29 -0700 (PDT) Return-Path: X-Received: by 127.0.0.2 with SMTP id LkBVYY1788612xHx8K7fP8kl; Mon, 10 Oct 2022 02:21:28 -0700 X-Received: from foss.arm.com (foss.arm.com [217.140.110.172]) by mx.groups.io with SMTP id smtpd.web08.4258.1665393687950718076 for ; Mon, 10 Oct 2022 02:21:28 -0700 X-Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.121.207.14]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id D6C0C1480; Mon, 10 Oct 2022 02:21:33 -0700 (PDT) X-Received: from pierre123.arm.com (unknown [10.57.34.234]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPA id C174F3F792; Mon, 10 Oct 2022 02:21:26 -0700 (PDT) From: "PierreGondois" To: devel@edk2.groups.io Cc: Sami Mujawar , Alexei Fedorov Subject: [edk2-devel] [PATCH 10/14] DynamicTablesPkg: Add PCCT related objects Date: Mon, 10 Oct 2022 11:20:54 +0200 Message-Id: <20221010092058.118714-11-Pierre.Gondois@arm.com> In-Reply-To: <20221010092058.118714-1-Pierre.Gondois@arm.com> References: <20221010092058.118714-1-Pierre.Gondois@arm.com> MIME-Version: 1.0 Precedence: Bulk List-Unsubscribe: List-Subscribe: List-Help: Sender: devel@edk2.groups.io List-Id: Mailing-List: list devel@edk2.groups.io; contact devel+owner@edk2.groups.io Reply-To: devel@edk2.groups.io,pierre.gondois@arm.com X-Gm-Message-State: pAmnkesPGeuqOBsf8MkvioD0x1787277AA= Content-Transfer-Encoding: quoted-printable DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=groups.io; q=dns/txt; s=20140610; t=1665393688; bh=WTxi+LB/F0tMO8Mc0tygxgMM5GOVRhIdYGR4bnN1ocs=; h=Cc:Date:From:Reply-To:Subject:To; b=WYodXCzFlyMbDDpfWXJGUbs1RMpo/EaBmpNr1j2ZyhWnUw1hJ0D5QS5hpKOazkHwzyk 0z+GMCi/so8ts8CJ4YO6MybrrZplccDL9BdjwMKBpI0+etR7m0TNCpNZ8J/aATx5eswgv R7PBtkmiR3wALPemF7uyfNiwfVti8EBimTM= X-ZohoMail-DKIM: pass (identity @groups.io) X-ZM-MESSAGEID: 1665393689537100039 Content-Type: text/plain; charset="utf-8" From: Pierre Gondois Introduce the following CmObj in the ArmNameSpaceObjects: - CM_ARM_MAILBOX_REGISTER_INFO - CM_ARM_PCC_SUBSPACE_CHANNEL_TIMING_INFO - CM_ARM_PCC_SUBSPACE_GENERIC_INFO - CM_ARM_PCC_SUBPSACE_TYPE0_INFO - CM_ARM_PCC_SUBPSACE_TYPE1_INFO - CM_ARM_PCC_SUBPSACE_TYPE2_INFO - CM_ARM_PCC_SUBPSACE_TYPE3_INFO - CM_ARM_PCC_SUBPSACE_TYPE4_INFO - CM_ARM_PCC_SUBPSACE_TYPE5_INFO These objects allow to describe mailbox registers, pcc timings and PCCT subspaces. They prepare the enablement of a PCCT generator. Also add the CmObjParsers associated to each object. Signed-off-by: Pierre Gondois --- .../Include/ArmNameSpaceObjects.h | 277 +++++++++++++++--- .../ConfigurationManagerObjectParser.c | 107 +++++++ 2 files changed, 341 insertions(+), 43 deletions(-) diff --git a/DynamicTablesPkg/Include/ArmNameSpaceObjects.h b/DynamicTables= Pkg/Include/ArmNameSpaceObjects.h index d711f3ec5938..5d5a8ce92a09 100644 --- a/DynamicTablesPkg/Include/ArmNameSpaceObjects.h +++ b/DynamicTablesPkg/Include/ArmNameSpaceObjects.h @@ -22,49 +22,55 @@ in the ARM Namespace */ typedef enum ArmObjectID { - EArmObjReserved, ///< 0 - Reserved - EArmObjBootArchInfo, ///< 1 - Boot Architecture Info - EArmObjCpuInfo, ///< 2 - CPU Info - EArmObjPowerManagementProfileInfo, ///< 3 - Power Management Profile = Info - EArmObjGicCInfo, ///< 4 - GIC CPU Interface Info - EArmObjGicDInfo, ///< 5 - GIC Distributor Info - EArmObjGicMsiFrameInfo, ///< 6 - GIC MSI Frame Info - EArmObjGicRedistributorInfo, ///< 7 - GIC Redistributor Info - EArmObjGicItsInfo, ///< 8 - GIC ITS Info - EArmObjSerialConsolePortInfo, ///< 9 - Serial Console Port Info - EArmObjSerialDebugPortInfo, ///< 10 - Serial Debug Port Info - EArmObjGenericTimerInfo, ///< 11 - Generic Timer Info - EArmObjPlatformGTBlockInfo, ///< 12 - Platform GT Block Info - EArmObjGTBlockTimerFrameInfo, ///< 13 - Generic Timer Block Frame= Info - EArmObjPlatformGenericWatchdogInfo, ///< 14 - Platform Generic Watchdog - EArmObjPciConfigSpaceInfo, ///< 15 - PCI Configuration Space I= nfo - EArmObjHypervisorVendorIdentity, ///< 16 - Hypervisor Vendor Id - EArmObjFixedFeatureFlags, ///< 17 - Fixed feature flags for F= ADT - EArmObjItsGroup, ///< 18 - ITS Group - EArmObjNamedComponent, ///< 19 - Named Component - EArmObjRootComplex, ///< 20 - Root Complex - EArmObjSmmuV1SmmuV2, ///< 21 - SMMUv1 or SMMUv2 - EArmObjSmmuV3, ///< 22 - SMMUv3 - EArmObjPmcg, ///< 23 - PMCG - EArmObjGicItsIdentifierArray, ///< 24 - GIC ITS Identifier Array - EArmObjIdMappingArray, ///< 25 - ID Mapping Array - EArmObjSmmuInterruptArray, ///< 26 - SMMU Interrupt Array - EArmObjProcHierarchyInfo, ///< 27 - Processor Hierarchy Info - EArmObjCacheInfo, ///< 28 - Cache Info - EArmObjReserved29, ///< 29 - Reserved - EArmObjCmRef, ///< 30 - CM Object Reference - EArmObjMemoryAffinityInfo, ///< 31 - Memory Affinity Info - EArmObjDeviceHandleAcpi, ///< 32 - Device Handle Acpi - EArmObjDeviceHandlePci, ///< 33 - Device Handle Pci - EArmObjGenericInitiatorAffinityInfo, ///< 34 - Generic Initiator Affinity - EArmObjSerialPortInfo, ///< 35 - Generic Serial Port Info - EArmObjCmn600Info, ///< 36 - CMN-600 Info - 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 - EArmObjCpcInfo, ///< 42 - Continuous Performance Co= ntrol Info + EArmObjReserved, ///< 0 - R= eserved + EArmObjBootArchInfo, ///< 1 - B= oot Architecture Info + EArmObjCpuInfo, ///< 2 - C= PU Info + EArmObjPowerManagementProfileInfo, ///< 3 - P= ower Management Profile Info + EArmObjGicCInfo, ///< 4 - G= IC CPU Interface Info + EArmObjGicDInfo, ///< 5 - G= IC Distributor Info + EArmObjGicMsiFrameInfo, ///< 6 - G= IC MSI Frame Info + EArmObjGicRedistributorInfo, ///< 7 - G= IC Redistributor Info + EArmObjGicItsInfo, ///< 8 - G= IC ITS Info + EArmObjSerialConsolePortInfo, ///< 9 - S= erial Console Port Info + EArmObjSerialDebugPortInfo, ///< 10 - S= erial Debug Port Info + EArmObjGenericTimerInfo, ///< 11 - G= eneric Timer Info + EArmObjPlatformGTBlockInfo, ///< 12 - P= latform GT Block Info + EArmObjGTBlockTimerFrameInfo, ///< 13 - G= eneric Timer Block Frame Info + EArmObjPlatformGenericWatchdogInfo, ///< 14 - P= latform Generic Watchdog + EArmObjPciConfigSpaceInfo, ///< 15 - P= CI Configuration Space Info + EArmObjHypervisorVendorIdentity, ///< 16 - H= ypervisor Vendor Id + EArmObjFixedFeatureFlags, ///< 17 - F= ixed feature flags for FADT + EArmObjItsGroup, ///< 18 - I= TS Group + EArmObjNamedComponent, ///< 19 - N= amed Component + EArmObjRootComplex, ///< 20 - R= oot Complex + EArmObjSmmuV1SmmuV2, ///< 21 - S= MMUv1 or SMMUv2 + EArmObjSmmuV3, ///< 22 - S= MMUv3 + EArmObjPmcg, ///< 23 - P= MCG + EArmObjGicItsIdentifierArray, ///< 24 - G= IC ITS Identifier Array + EArmObjIdMappingArray, ///< 25 - I= D Mapping Array + EArmObjSmmuInterruptArray, ///< 26 - S= MMU Interrupt Array + EArmObjProcHierarchyInfo, ///< 27 - P= rocessor Hierarchy Info + EArmObjCacheInfo, ///< 28 - C= ache Info + EArmObjReserved29, ///< 29 - R= eserved + EArmObjCmRef, ///< 30 - C= M Object Reference + EArmObjMemoryAffinityInfo, ///< 31 - M= emory Affinity Info + EArmObjDeviceHandleAcpi, ///< 32 - D= evice Handle Acpi + EArmObjDeviceHandlePci, ///< 33 - D= evice Handle Pci + EArmObjGenericInitiatorAffinityInfo, ///< 34 - G= eneric Initiator Affinity + EArmObjSerialPortInfo, ///< 35 - G= eneric Serial Port Info + EArmObjCmn600Info, ///< 36 - C= MN-600 Info + EArmObjLpiInfo, ///< 37 - L= pi Info + EArmObjPciAddressMapInfo, ///< 38 - P= ci Address Map Info + EArmObjPciInterruptMapInfo, ///< 39 - P= ci Interrupt Map Info + EArmObjRmr, ///< 40 - R= eserved Memory Range Node + EArmObjMemoryRangeDescriptor, ///< 41 - M= emory Range Descriptor + EArmObjCpcInfo, ///< 42 - C= ontinuous Performance Control Info + EArmObjPccSubspaceType0Info, ///< 43 - P= cc Subspace Type 0 Info + EArmObjPccSubspaceType1Info, ///< 44 - P= cc Subspace Type 2 Info + EArmObjPccSubspaceType2Info, ///< 45 - P= cc Subspace Type 2 Info + EArmObjPccSubspaceType3Info, ///< 46 - P= cc Subspace Type 3 Info + EArmObjPccSubspaceType4Info, ///< 47 - P= cc Subspace Type 4 Info + EArmObjPccSubspaceType5Info, ///< 48 - P= cc Subspace Type 5 Info EArmObjMax } EARM_OBJECT_ID; =20 @@ -1095,6 +1101,191 @@ typedef struct CmArmRmrDescriptor { */ typedef AML_CPC_INFO CM_ARM_CPC_INFO; =20 +/** A structure that describes a + PCC Mailbox Register. +*/ +typedef struct PccMailboxRegisterInfo { + /// GAS describing the Register. + EFI_ACPI_6_4_GENERIC_ADDRESS_STRUCTURE Register; + + /** Mask of bits to preserve when writing. + + This mask is also used for registers the Register is only read + and there is no write mask required. E.g.: + - Error Status mask (Cf. PCC Subspace types 3/4/5). + - Command Complete Check mask (Cf. PCC Subspace types 3/4/5). + */ + UINT64 PreserveMask; + + /// Mask of bits to set when writing. + UINT64 WriteMask; +} PCC_MAILBOX_REGISTER_INFO; + +/** A structure that describes the + PCC Subspace CHannel Timings. +*/ +typedef struct PccSubspaceChannelTimingInfo { + /// Expected latency to process a command, in microseconds. + UINT32 NominalLatency; + + /** Maximum number of periodic requests that the subspace channel can + support, reported in commands per minute. 0 indicates no limitation. + + This field is ignored for the PCC Subspace type 5 (HW Registers based). + */ + UINT32 MaxPeriodicAccessRate; + + /** Minimum amount of time that OSPM must wait after the completion + of a command before issuing the next command, in microseconds. + */ + UINT16 MinRequestTurnaroundTime; +} PCC_SUBSPACE_CHANNEL_TIMING_INFO; + +/** A structure that describes a + Generic PCC Subspace (Type 0). +*/ +typedef struct CmArmPccSubspaceGenericInfo { + /** Subspace Id. + + Cf. ACPI 6.4, s14.7 Referencing the PCC address space + Cf. s14.1.2 Platform Communications Channel Subspace Structures + The subspace ID of a PCC subspace is its index in the array of + subspace structures, starting with subspace 0. + + At most 256 subspaces are supported. + */ + UINT8 SubspaceId; + + /// Table type (or subspace). + UINT8 Type; + + /// Base address of the shared memory range. + /// This field is ignored for the PCC Subspace type 5 (HW Registers base= d). + UINT64 BaseAddress; + + /// Address length. + UINT64 AddressLength; + + /// Doorbell Register. + PCC_MAILBOX_REGISTER_INFO DoorbellReg; + + /// Mailbox Timings. + PCC_SUBSPACE_CHANNEL_TIMING_INFO ChannelTiming; +} PCC_SUBSPACE_GENERIC_INFO; + +/** A structure that describes a + PCC Subspace of type 0 (Generic). + + ID: EArmObjPccSubspaceType0Info +*/ +typedef PCC_SUBSPACE_GENERIC_INFO CM_ARM_PCC_SUBSPACE_TYPE0_INFO; + +/** A structure that describes a + PCC Subspace of type 1 (HW-Reduced). + + ID: EArmObjPccSubspaceType1Info +*/ +typedef struct CmArmPccSubspaceType1Info { + /** Generic Pcc information. + + The Subspace of Type0 contains information that can be re-used + in other Subspace types. + */ + PCC_SUBSPACE_GENERIC_INFO GenericPccInfo; + + /// Platform Interrupt. + CM_ARM_GENERIC_INTERRUPT PlatIrq; +} CM_ARM_PCC_SUBSPACE_TYPE1_INFO; + +/** A structure that describes a + PCC Subspace of type 2 (HW-Reduced). + + ID: EArmObjPccSubspaceType2Info +*/ +typedef struct CmArmPccSubspaceType2Info { + /** Generic Pcc information. + + The Subspace of Type0 contains information that can be re-used + in other Subspace types. + */ + PCC_SUBSPACE_GENERIC_INFO GenericPccInfo; + + /// Platform Interrupt. + CM_ARM_GENERIC_INTERRUPT PlatIrq; + + /// Platform Interrupt Register. + PCC_MAILBOX_REGISTER_INFO PlatIrqAckReg; +} CM_ARM_PCC_SUBSPACE_TYPE2_INFO; + +/** A structure that describes a + PCC Subspace of type 3 (Extended) + + ID: EArmObjPccSubspaceType3Info +*/ +typedef struct CmArmPccSubspaceType3Info { + /** Generic Pcc information. + + The Subspace of Type0 contains information that can be re-used + in other Subspace types. + */ + PCC_SUBSPACE_GENERIC_INFO GenericPccInfo; + + /// Platform Interrupt. + CM_ARM_GENERIC_INTERRUPT PlatIrq; + + /// Platform Interrupt Register. + PCC_MAILBOX_REGISTER_INFO PlatIrqAckReg; + + /// Command Complete Check Register. + /// The WriteMask field is not used. + PCC_MAILBOX_REGISTER_INFO CmdCompleteCheckReg; + + /// Command Complete Update Register. + PCC_MAILBOX_REGISTER_INFO CmdCompleteUpdateReg; + + /// Error Status Register. + /// The WriteMask field is not used. + PCC_MAILBOX_REGISTER_INFO ErrorStatusReg; +} CM_ARM_PCC_SUBSPACE_TYPE3_INFO; + +/** A structure that describes a + PCC Subspace of type 4 (Extended) + + ID: EArmObjPccSubspaceType4Info +*/ +typedef CM_ARM_PCC_SUBSPACE_TYPE3_INFO CM_ARM_PCC_SUBSPACE_TYPE4_INFO; + +/** A structure that describes a + PCC Subspace of type 5 (HW-Registers). + + ID: EArmObjPccSubspaceType5Info +*/ +typedef struct CmArmPccSubspaceType5Info { + /** Generic Pcc information. + + The Subspace of Type0 contains information that can be re-used + in other Subspace types. + + MaximumPeriodicAccessRate doesn't need to be populated for + this structure. + */ + PCC_SUBSPACE_GENERIC_INFO GenericPccInfo; + + /// Version. + UINT16 Version; + + /// Platform Interrupt. + CM_ARM_GENERIC_INTERRUPT PlatIrq; + + /// Command Complete Check Register. + /// The WriteMask field is not used. + PCC_MAILBOX_REGISTER_INFO CmdCompleteCheckReg; + + /// Error Status Register. + /// The WriteMask field is not used. + PCC_MAILBOX_REGISTER_INFO ErrorStatusReg; +} CM_ARM_PCC_SUBSPACE_TYPE5_INFO; + #pragma pack() =20 #endif // ARM_NAMESPACE_OBJECTS_H_ diff --git a/DynamicTablesPkg/Library/Common/TableHelperLib/ConfigurationMa= nagerObjectParser.c b/DynamicTablesPkg/Library/Common/TableHelperLib/Config= urationManagerObjectParser.c index 2126beba8b9f..21d1f3f08b16 100644 --- a/DynamicTablesPkg/Library/Common/TableHelperLib/ConfigurationManagerOb= jectParser.c +++ b/DynamicTablesPkg/Library/Common/TableHelperLib/ConfigurationManagerOb= jectParser.c @@ -539,6 +539,101 @@ STATIC CONST CM_OBJ_PARSER CmArmCpcInfoParser[] =3D { { "NominalFrequencyInteger", 4, = "0x%lx", NULL }, }; =20 +/** A parser for the CM_ARM_MAILBOX_REGISTER_INFO struct. +*/ +STATIC CONST CM_OBJ_PARSER CmArmMailboxRegisterInfoParser[] =3D { + { "Register", sizeof (EFI_ACPI_6_4_GENERIC_ADDRESS_STRUCTURE), NULL,= NULL, + AcpiGenericAddressParser, ARRAY_SIZE (AcpiGenericAddressParser) }, + { "PreserveMask", 8, "0x%l= lx", NULL }, + { "WriteMask", 8, "0x%l= lx", NULL }, +}; + +/** A parser for the CM_ARM_PCC_SUBSPACE_CHANNEL_TIMING_INFO struct. +*/ +STATIC CONST CM_OBJ_PARSER CmArmPccSubspaceChannelTimingInfoParser[] =3D { + { "NominalLatency", 4, "0x%x", NULL }, + { "MaxPeriodicAccessRate", 4, "0x%x", NULL }, + { "MinRequestTurnaroundTime", 2, "0x%x", NULL }, +}; + +/** A parser for EArmObjPccSubspaceType0Info. +*/ +STATIC CONST CM_OBJ_PARSER CmArmPccSubspaceType0InfoParser[] =3D { + { "SubspaceId", 1, "0x= %x", NULL }, + { "Type", 1, "0x= %x", NULL }, + { "BaseAddress", 8, "0x= %llx", NULL }, + { "AddressLength", 8, "0x= %llx", NULL }, + { "DoorbellReg", sizeof (CM_ARM_MAILBOX_REGISTER_INFO), + NULL, NULL, CmArmMailboxRegisterInfoParser, + ARRAY_SIZE (CmArmMailboxRegisterInfoParser) }, + { "DoorbellReg", sizeof (CM_ARM_PCC_SUBSPACE_CHANNEL_TIMING_INFO), + NULL, NULL, CmArmPccSubspaceChannelTimingInfoParser, + ARRAY_SIZE (CmArmPccSubspaceChannelTimingInfoParser) }, +}; + +/** A parser for EArmObjPccSubspaceType1Info. +*/ +STATIC CONST CM_OBJ_PARSER CmArmPccSubspaceType1InfoParser[] =3D { + { "GenericPccInfo", sizeof (CM_ARM_PCC_SUBSPACE_GENERIC_INFO), + NULL, NULL, CmArmPccSubspaceType0InfoParser, + ARRAY_SIZE (CmArmPccSubspaceType0InfoParser) }, + { "PlatIrq", sizeof (CM_ARM_GENERIC_INTERRUPT), + NULL, NULL, CmArmGenericInterruptParser, + ARRAY_SIZE (CmArmGenericInterruptParser) }, +}; + +/** A parser for EArmObjPccSubspaceType2Info. +*/ +STATIC CONST CM_OBJ_PARSER CmArmPccSubspaceType2InfoParser[] =3D { + { "GenericPccInfo", sizeof (CM_ARM_PCC_SUBSPACE_GENERIC_INFO), + NULL, NULL, CmArmPccSubspaceType0InfoParser, + ARRAY_SIZE (CmArmPccSubspaceType0InfoParser) }, + { "PlatIrq", sizeof (CM_ARM_GENERIC_INTERRUPT), NULL,NULL, + CmArmGenericInterruptParser, ARRAY_SIZE (CmArmGenericInterruptParser) = }, + { "PlatIrqAckReg", sizeof (CM_ARM_MAILBOX_REGISTER_INFO), + NULL, NULL, CmArmMailboxRegisterInfoParser, + ARRAY_SIZE (CmArmMailboxRegisterInfoParser) }, +}; + +/** A parser for EArmObjPccSubspaceType3Info or EArmObjPccSubspaceType4Inf= o. +*/ +STATIC CONST CM_OBJ_PARSER CmArmPccSubspaceType34InfoParser[] =3D { + { "GenericPccInfo", sizeof (CM_ARM_PCC_SUBSPACE_GENERIC_INFO), + NULL, NULL, CmArmPccSubspaceType0InfoParser, + ARRAY_SIZE (CmArmPccSubspaceType0InfoParser) }, + { "PlatIrq", sizeof (CM_ARM_GENERIC_INTERRUPT), NULL= ,NULL, + CmArmGenericInterruptParser, ARRAY_SIZE (CmArmGenericInterruptParser) = }, + { "PlatIrqAckReg", sizeof (CM_ARM_MAILBOX_REGISTER_INFO), + NULL, NULL, CmArmMailboxRegisterInfoParser, + ARRAY_SIZE (CmArmMailboxRegisterInfoParser) }, + { "CmdCompleteCheckReg", sizeof (CM_ARM_MAILBOX_REGISTER_INFO), + NULL, NULL, CmArmMailboxRegisterInfoParser, + ARRAY_SIZE (CmArmMailboxRegisterInfoParser) }, + { "CmdCompleteUpdateReg", sizeof (CM_ARM_MAILBOX_REGISTER_INFO), + NULL, NULL, CmArmMailboxRegisterInfoParser, + ARRAY_SIZE (CmArmMailboxRegisterInfoParser) }, + { "ErrorStatusReg", sizeof (CM_ARM_MAILBOX_REGISTER_INFO), + NULL, NULL, CmArmMailboxRegisterInfoParser, + ARRAY_SIZE (CmArmMailboxRegisterInfoParser) }, +}; + +/** A parser for EArmObjPccSubspaceType5Info. +*/ +STATIC CONST CM_OBJ_PARSER CmArmPccSubspaceType5InfoParser[] =3D { + { "GenericPccInfo", sizeof (CM_ARM_PCC_SUBSPACE_GENERIC_INFO), + NULL, NULL, CmArmPccSubspaceType0InfoParser, + ARRAY_SIZE (CmArmPccSubspaceType0InfoParser) }, + { "Version", 2, "0x%x= ",NULL }, + { "PlatIrq", sizeof (CM_ARM_GENERIC_INTERRUPT), NULL,= NULL, + CmArmGenericInterruptParser, ARRAY_SIZE (CmArmGenericInterruptParser) = }, + { "CmdCompleteCheckReg", sizeof (CM_ARM_MAILBOX_REGISTER_INFO), + NULL, NULL, CmArmMailboxRegisterInfoParser, + ARRAY_SIZE (CmArmMailboxRegisterInfoParser) }, + { "ErrorStatusReg", sizeof (CM_ARM_MAILBOX_REGISTER_INFO), + NULL, NULL, CmArmMailboxRegisterInfoParser, + ARRAY_SIZE (CmArmMailboxRegisterInfoParser) }, +}; + /** A parser for Arm namespace objects. */ STATIC CONST CM_OBJ_PARSER_ARRAY ArmNamespaceObjectParser[] =3D { @@ -623,6 +718,18 @@ STATIC CONST CM_OBJ_PARSER_ARRAY ArmNamespaceObjectPa= rser[] =3D { ARRAY_SIZE (CmArmMemoryRangeDescriptorInfoParser) }, { "EArmObjCpcInfo", CmArmCpcInfoParser, ARRAY_SIZE (CmArmCpcInfoParser) }, + { "EArmObjPccSubspaceType0Info", CmArmPccSubspaceType0InfoParser, + ARRAY_SIZE (CmArmPccSubspaceType0InfoParser) }, + { "EArmObjPccSubspaceType1Info", CmArmPccSubspaceType1InfoParser, + ARRAY_SIZE (CmArmPccSubspaceType1InfoParser) }, + { "EArmObjPccSubspaceType2Info", CmArmPccSubspaceType2InfoParser, + ARRAY_SIZE (CmArmPccSubspaceType2InfoParser) }, + { "EArmObjPccSubspaceType3Info", CmArmPccSubspaceType34InfoParse= r, + ARRAY_SIZE (CmArmPccSubspaceType34InfoParser) }, + { "EArmObjPccSubspaceType4Info", CmArmPccSubspaceType34InfoParse= r, + ARRAY_SIZE (CmArmPccSubspaceType34InfoParser) }, + { "EArmObjPccSubspaceType5Info", CmArmPccSubspaceType5InfoParser, + ARRAY_SIZE (CmArmPccSubspaceType5InfoParser) }, { "EArmObjMax", NULL, = 0 }, }; =20 --=20 2.25.1 -=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D- Groups.io Links: You receive all messages sent to this group. View/Reply Online (#94891): https://edk2.groups.io/g/devel/message/94891 Mute This Topic: https://groups.io/mt/94232529/1787277 Group Owner: devel+owner@edk2.groups.io Unsubscribe: https://edk2.groups.io/g/devel/unsub [importer@patchew.org] -=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D- From nobody Thu May 9 10:47:23 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of groups.io designates 66.175.222.108 as permitted sender) client-ip=66.175.222.108; envelope-from=bounce+27952+94892+1787277+3901457@groups.io; helo=mail02.groups.io; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of groups.io designates 66.175.222.108 as permitted sender) smtp.mailfrom=bounce+27952+94892+1787277+3901457@groups.io; dmarc=fail(p=none dis=none) header.from=arm.com ARC-Seal: i=1; a=rsa-sha256; t=1665393690; cv=none; d=zohomail.com; s=zohoarc; b=RBIaO/pHPXfFOM6dKmVNzaaEk1D58Qb+O0hnYP49SjfQ3S+vcXLMbH9+9PwJxqCnLeVxqJTX8oqOoUIf97KQig0RJDNU+eFmFQ8s3i8sL9c1z5EYvyBB8uHtwEAUhsgypDplYNnnx0T9CZZpgNSaDCHcRYQx8J6zsIb8g5ShLJk= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1665393690; h=Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Id:List-Help:List-Unsubscribe:MIME-Version:Message-ID:Reply-To:References:Sender:Subject:To; bh=bel4QmqF57aDcCLyvpaoVw6SKtlJi0ILj55WEIBfIug=; b=aubqHp0C/75zf8Y8saasl4ZNe1PBYClYZSF7TicIsUakCl1uqxlnqdnpy2VF2brGao0ED/HvGHr6qD2GNSmlCx/IijjnykDT0TVub52400KzVcWv3kwMb8gJKRGAnoCE3VB99J9Q4ojRb2SPc46OGbm3eq8um9vowHyMg2/pPBM= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of groups.io designates 66.175.222.108 as permitted sender) smtp.mailfrom=bounce+27952+94892+1787277+3901457@groups.io; dmarc=fail header.from= (p=none dis=none) Received: from mail02.groups.io (mail02.groups.io [66.175.222.108]) by mx.zohomail.com with SMTPS id 1665393690370756.781281163939; Mon, 10 Oct 2022 02:21:30 -0700 (PDT) Return-Path: X-Received: by 127.0.0.2 with SMTP id Tkg2YY1788612xl8C97QKOyg; Mon, 10 Oct 2022 02:21:29 -0700 X-Received: from foss.arm.com (foss.arm.com [217.140.110.172]) by mx.groups.io with SMTP id smtpd.web09.4232.1665393689120161032 for ; Mon, 10 Oct 2022 02:21:29 -0700 X-Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.121.207.14]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id 08B3A1480; Mon, 10 Oct 2022 02:21:35 -0700 (PDT) X-Received: from pierre123.arm.com (unknown [10.57.34.234]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPA id E5EC23F792; Mon, 10 Oct 2022 02:21:27 -0700 (PDT) From: "PierreGondois" To: devel@edk2.groups.io Cc: Sami Mujawar , Alexei Fedorov Subject: [edk2-devel] [PATCH 11/14] DynamicTablesPkg: Add PCCT Generator Date: Mon, 10 Oct 2022 11:20:55 +0200 Message-Id: <20221010092058.118714-12-Pierre.Gondois@arm.com> In-Reply-To: <20221010092058.118714-1-Pierre.Gondois@arm.com> References: <20221010092058.118714-1-Pierre.Gondois@arm.com> MIME-Version: 1.0 Precedence: Bulk List-Unsubscribe: List-Subscribe: List-Help: Sender: devel@edk2.groups.io List-Id: Mailing-List: list devel@edk2.groups.io; contact devel+owner@edk2.groups.io Reply-To: devel@edk2.groups.io,pierre.gondois@arm.com X-Gm-Message-State: 3sYtR8ybLprhywib35sFoYJwx1787277AA= Content-Transfer-Encoding: quoted-printable DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=groups.io; q=dns/txt; s=20140610; t=1665393689; bh=IttyMq2N1FIRI9ZvDAM1j48bsOSXfe32nCTIXexmFyk=; h=Cc:Date:From:Reply-To:Subject:To; b=sa0nmQQQPIz2zXQKTr7uW2xU05MRSUOGJyTI4D4G3ax5lHrviwmoZGZ19xA39boEAuc CvvyCjdIXhUHgST1o4kwk1V6uWqTFiTiyfOKG7ymhhlm5cfCAJkdZcdDu0PYNuFwo1fd/ 7LJ0KYr56N+hTpadjkpmY+6xDo0f/OY/hhw= X-ZohoMail-DKIM: pass (identity @groups.io) X-ZM-MESSAGEID: 1665393691804100002 Content-Type: text/plain; charset="utf-8" From: Pierre Gondois The Platform Communication Channel Table (PCCT) generator collates the relevant information required for generating a PCCT table from configuration manager using the configuration manager protocol. The DynamicTablesManager then install the PCCT table. From ACPI 6.4, s14 PLATFORM COMMUNICATIONS CHANNEL (PCC): The platform communication channel (PCC) is a generic mechanism for OSPM to communicate with an entity in the platform. Signed-off-by: Pierre Gondois --- DynamicTablesPkg/DynamicTables.dsc.inc | 4 +- DynamicTablesPkg/Include/AcpiTableGenerator.h | 3 +- .../Arm/AcpiPcctLibArm/AcpiPcctLibArm.inf | 30 + .../Acpi/Arm/AcpiPcctLibArm/PcctGenerator.c | 1186 +++++++++++++++++ .../Acpi/Arm/AcpiPcctLibArm/PcctGenerator.h | 43 + .../ConfigurationManagerObjectParser.c | 46 +- 6 files changed, 1287 insertions(+), 25 deletions(-) create mode 100644 DynamicTablesPkg/Library/Acpi/Arm/AcpiPcctLibArm/AcpiPc= ctLibArm.inf create mode 100644 DynamicTablesPkg/Library/Acpi/Arm/AcpiPcctLibArm/PcctGe= nerator.c create mode 100644 DynamicTablesPkg/Library/Acpi/Arm/AcpiPcctLibArm/PcctGe= nerator.h diff --git a/DynamicTablesPkg/DynamicTables.dsc.inc b/DynamicTablesPkg/Dyna= micTables.dsc.inc index 3d4fa0c4c4b6..3e38fa0d0d99 100644 --- a/DynamicTablesPkg/DynamicTables.dsc.inc +++ b/DynamicTablesPkg/DynamicTables.dsc.inc @@ -1,7 +1,7 @@ ## @file # Dsc include file for Dynamic Tables Framework. # -# Copyright (c) 2017 - 2021, Arm Limited. All rights reserved.
+# Copyright (c) 2017 - 2022, Arm Limited. All rights reserved.
# # SPDX-License-Identifier: BSD-2-Clause-Patent # @@ -33,6 +33,7 @@ [Components.common] DynamicTablesPkg/Library/Acpi/Arm/AcpiRawLibArm/AcpiRawLibArm.inf DynamicTablesPkg/Library/Acpi/Arm/AcpiSpcrLibArm/AcpiSpcrLibArm.inf DynamicTablesPkg/Library/Acpi/Arm/AcpiSratLibArm/AcpiSratLibArm.inf + DynamicTablesPkg/Library/Acpi/Arm/AcpiPcctLibArm/AcpiPcctLibArm.inf =20 # AML Fixup DynamicTablesPkg/Library/Acpi/Arm/AcpiSsdtSerialPortLibArm/SsdtSerialPor= tLibArm.inf @@ -57,6 +58,7 @@ [Components.common] NULL|DynamicTablesPkg/Library/Acpi/Arm/AcpiRawLibArm/AcpiRawLibArm.i= nf NULL|DynamicTablesPkg/Library/Acpi/Arm/AcpiSpcrLibArm/AcpiSpcrLibArm= .inf NULL|DynamicTablesPkg/Library/Acpi/Arm/AcpiSratLibArm/AcpiSratLibArm= .inf + NULL|DynamicTablesPkg/Library/Acpi/Arm/AcpiPcctLibArm/AcpiPcctLibArm= .inf =20 # AML Fixup NULL|DynamicTablesPkg/Library/Acpi/Arm/AcpiSsdtSerialPortLibArm/Ssdt= SerialPortLibArm.inf diff --git a/DynamicTablesPkg/Include/AcpiTableGenerator.h b/DynamicTablesP= kg/Include/AcpiTableGenerator.h index f962dbff57df..d0eda011c301 100644 --- a/DynamicTablesPkg/Include/AcpiTableGenerator.h +++ b/DynamicTablesPkg/Include/AcpiTableGenerator.h @@ -1,6 +1,6 @@ /** @file =20 - Copyright (c) 2017 - 2021, Arm Limited. All rights reserved.
+ Copyright (c) 2017 - 2022, Arm Limited. All rights reserved.
=20 SPDX-License-Identifier: BSD-2-Clause-Patent =20 @@ -98,6 +98,7 @@ typedef enum StdAcpiTableId { EStdAcpiTableIdSsdtCmn600, ///< SSDT Cmn-600 Generator EStdAcpiTableIdSsdtCpuTopology, ///< SSDT Cpu Topology EStdAcpiTableIdSsdtPciExpress, ///< SSDT Pci Express Gene= rator + EStdAcpiTableIdPcct, ///< PCCT Generator EStdAcpiTableIdMax } ESTD_ACPI_TABLE_ID; =20 diff --git a/DynamicTablesPkg/Library/Acpi/Arm/AcpiPcctLibArm/AcpiPcctLibAr= m.inf b/DynamicTablesPkg/Library/Acpi/Arm/AcpiPcctLibArm/AcpiPcctLibArm.inf new file mode 100644 index 000000000000..da54585c2dd9 --- /dev/null +++ b/DynamicTablesPkg/Library/Acpi/Arm/AcpiPcctLibArm/AcpiPcctLibArm.inf @@ -0,0 +1,30 @@ +## @file +# Pcct Table Generator +# +# Copyright (c) 2022, Arm Limited. All rights reserved.
+# +# SPDX-License-Identifier: BSD-2-Clause-Patent +## + +[Defines] + INF_VERSION =3D 0x0001001B + BASE_NAME =3D AcpiPcctLibArm + FILE_GUID =3D 38FE945C-D6ED-4CD6-8D20-FCEF3260D15A + VERSION_STRING =3D 1.0 + MODULE_TYPE =3D DXE_DRIVER + LIBRARY_CLASS =3D NULL|DXE_DRIVER + CONSTRUCTOR =3D AcpiPcctLibConstructor + DESTRUCTOR =3D AcpiPcctLibDestructor + +[Sources] + PcctGenerator.c + PcctGenerator.h + +[Packages] + DynamicTablesPkg/DynamicTablesPkg.dec + EmbeddedPkg/EmbeddedPkg.dec + MdePkg/MdePkg.dec + MdeModulePkg/MdeModulePkg.dec + +[LibraryClasses] + BaseLib diff --git a/DynamicTablesPkg/Library/Acpi/Arm/AcpiPcctLibArm/PcctGenerator= .c b/DynamicTablesPkg/Library/Acpi/Arm/AcpiPcctLibArm/PcctGenerator.c new file mode 100644 index 000000000000..36caf4aaeab7 --- /dev/null +++ b/DynamicTablesPkg/Library/Acpi/Arm/AcpiPcctLibArm/PcctGenerator.c @@ -0,0 +1,1186 @@ +/** @file + PCCT Table Generator + + Copyright (c) 2022, Arm Limited. All rights reserved.
+ SPDX-License-Identifier: BSD-2-Clause-Patent + + @par Reference(s): + - ACPI 6.4 Specification - January 2021 + s14 PLATFORM COMMUNICATIONS CHANNEL (PCC) + +**/ + +#include +#include +#include +#include +#include + +// Module specific include files. +#include +#include +#include +#include +#include +#include "PcctGenerator.h" + +/** ARM standard PCCT Generator + +Requirements: + The following Configuration Manager Object(s) are required by + this Generator: + - EArmObjPccSubspaceType0Info + - EArmObjPccSubspaceType1Info + - EArmObjPccSubspaceType2Info + - EArmObjPccSubspaceType3Info + - EArmObjPccSubspaceType4Info + - EArmObjPccSubspaceType5Info +*/ + +/** This macro expands to a function that retrieves the PCC + Subspace of Type 0 Information from the Configuration Manager. +*/ +GET_OBJECT_LIST ( + EObjNameSpaceArm, + EArmObjPccSubspaceType0Info, + CM_ARM_PCC_SUBSPACE_TYPE0_INFO + ); + +/** This macro expands to a function that retrieves the PCC + Subspace of Type 1 Information from the Configuration Manager. +*/ +GET_OBJECT_LIST ( + EObjNameSpaceArm, + EArmObjPccSubspaceType1Info, + CM_ARM_PCC_SUBSPACE_TYPE1_INFO + ); + +/** This macro expands to a function that retrieves the PCC + Subspace of Type 2 Information from the Configuration Manager. +*/ +GET_OBJECT_LIST ( + EObjNameSpaceArm, + EArmObjPccSubspaceType2Info, + CM_ARM_PCC_SUBSPACE_TYPE2_INFO + ); + +/** This macro expands to a function that retrieves the PCC + Subspace of Type 3 Information from the Configuration Manager. +*/ +GET_OBJECT_LIST ( + EObjNameSpaceArm, + EArmObjPccSubspaceType3Info, + CM_ARM_PCC_SUBSPACE_TYPE3_INFO + ); + +/** This macro expands to a function that retrieves the PCC + Subspace of Type 4 Information from the Configuration Manager. +*/ +GET_OBJECT_LIST ( + EObjNameSpaceArm, + EArmObjPccSubspaceType4Info, + CM_ARM_PCC_SUBSPACE_TYPE4_INFO + ); + +/** This macro expands to a function that retrieves the PCC + Subspace of Type 5 Information from the Configuration Manager. +*/ +GET_OBJECT_LIST ( + EObjNameSpaceArm, + EArmObjPccSubspaceType5Info, + CM_ARM_PCC_SUBSPACE_TYPE5_INFO + ); + +/** The Platform is capable of generating an interrupt + to indicate completion of a command. + + Cf: s14.1.1 Platform Communications Channel Global Flags + Platform Interrupt flag + and s14.1.6 Extended PCC subspaces (types 3 and 4) + If a responder subspace is included in the PCCT, + then the global Platform Interrupt flag must be set to 1 + + Set this variable and populate the PCCT flag accordingly if either: + - One of the PCCT Subspace uses interrupts. + - A PCC Subspace of type 4 is used. +*/ +STATIC BOOLEAN mHasPlatformInterrupt; + +/** Initialize the MappingTable. + + @param [in] MappingTable The mapping table structure. + @param [in] Count Number of entries to allocate in the + MappingTable. + + @retval EFI_SUCCESS Success. + @retval EFI_INVALID_PARAMETER Invalid parameter. + @retval EFI_OUT_OF_RESOURCES Failed to allocate memory. +**/ +STATIC +EFI_STATUS +EFIAPI +MappingTableInitialize ( + IN MAPPING_TABLE *MappingTable, + IN UINT32 Count + ) +{ + VOID **Table; + + if ((MappingTable =3D=3D NULL) || + (Count =3D=3D 0)) + { + ASSERT (0); + return EFI_INVALID_PARAMETER; + } + + Table =3D AllocateZeroPool (sizeof (*Table) * Count); + if (Table =3D=3D NULL) { + ASSERT (0); + return EFI_OUT_OF_RESOURCES; + } + + MappingTable->Table =3D Table; + MappingTable->MaxIndex =3D Count; + + return EFI_SUCCESS; +} + +/** Free the MappingTable. + + @param [in, out] MappingTable The mapping table structure. +**/ +STATIC +VOID +EFIAPI +MappingTableFree ( + IN OUT MAPPING_TABLE *MappingTable + ) +{ + ASSERT (MappingTable !=3D NULL); + ASSERT (MappingTable->Table !=3D NULL); + + if (MappingTable->Table !=3D NULL) { + FreePool (MappingTable->Table); + } +} + +/** Add a new entry for CmArmPccSubspace at Index. + + @param [in] MappingTable The mapping table structure. + @param [in] CmArmPccSubspace Pointer to a CM_ARM_PCC_SUBSPACE_TYPE[X]_I= NFO. + @param [in] Index Index at which CmArmPccSubspace must be ad= ded. + This is the Subspace Id. + + @retval EFI_SUCCESS Success. + @retval EFI_BUFFER_TOO_SMALL Buffer too small. + @retval EFI_INVALID_PARAMETER Invalid parameter. +**/ +STATIC +EFI_STATUS +EFIAPI +MappingTableAdd ( + IN MAPPING_TABLE *MappingTable, + IN VOID *CmArmPccSubspace, + IN UINT32 Index + ) +{ + if ((MappingTable =3D=3D NULL) || + (MappingTable->Table =3D=3D NULL) || + (CmArmPccSubspace =3D=3D NULL)) + { + ASSERT_EFI_ERROR (EFI_INVALID_PARAMETER); + return EFI_INVALID_PARAMETER; + } + + if ((Index >=3D MappingTable->MaxIndex) || + (MappingTable->Table[Index] !=3D 0)) + { + ASSERT_EFI_ERROR (EFI_BUFFER_TOO_SMALL); + return EFI_BUFFER_TOO_SMALL; + } + + // Just map the Pcc Subspace in the Table. + MappingTable->Table[Index] =3D CmArmPccSubspace; + return EFI_SUCCESS; +} + +/** Parse the CmPccArray objects and add them to the MappingTable. + + @param [in] MappingTable The mapping table structure. + @param [in] CmPccArray Pointer to an array of CM_ARM_PCC_SUBSPACE_= TYPE[X]_INFO. + @param [in] CmPccCount Count of objects in CmPccArray. + + @retval EFI_SUCCESS Success. + @retval EFI_BUFFER_TOO_SMALL Buffer too small. + @retval EFI_INVALID_PARAMETER Invalid parameter. +**/ +STATIC +EFI_STATUS +EFIAPI +MapPccSubspaceId ( + IN MAPPING_TABLE *MappingTable, + IN VOID *CmPccArray, + IN UINT32 CmPccCount + ) +{ + EFI_STATUS Status; + UINT8 *PccBuffer; + UINT32 Index; + UINT32 CmObjSize; + PCC_SUBSPACE_GENERIC_INFO *GenericPcc; + + if (CmPccCount =3D=3D 0) { + return EFI_SUCCESS; + } + + if ((CmPccArray =3D=3D NULL) || (MappingTable =3D=3D NULL)) { + ASSERT_EFI_ERROR (EFI_INVALID_PARAMETER); + return EFI_INVALID_PARAMETER; + } + + GenericPcc =3D (PCC_SUBSPACE_GENERIC_INFO *)CmPccArray; + + switch (GenericPcc->Type) { + case EFI_ACPI_6_4_PCCT_SUBSPACE_TYPE_GENERIC: + CmObjSize =3D sizeof (CM_ARM_PCC_SUBSPACE_TYPE0_INFO); + break; + + case EFI_ACPI_6_4_PCCT_SUBSPACE_TYPE_1_HW_REDUCED_COMMUNICATIONS: + CmObjSize =3D sizeof (CM_ARM_PCC_SUBSPACE_TYPE1_INFO); + break; + + case EFI_ACPI_6_4_PCCT_SUBSPACE_TYPE_2_HW_REDUCED_COMMUNICATIONS: + CmObjSize =3D sizeof (CM_ARM_PCC_SUBSPACE_TYPE2_INFO); + break; + + case EFI_ACPI_6_4_PCCT_SUBSPACE_TYPE_3_EXTENDED_PCC: + CmObjSize =3D sizeof (CM_ARM_PCC_SUBSPACE_TYPE3_INFO); + break; + + case EFI_ACPI_6_4_PCCT_SUBSPACE_TYPE_4_EXTENDED_PCC: + CmObjSize =3D sizeof (CM_ARM_PCC_SUBSPACE_TYPE4_INFO); + break; + + case EFI_ACPI_6_4_PCCT_SUBSPACE_TYPE_5_HW_REGISTERS_COMMUNICATIONS: + CmObjSize =3D sizeof (CM_ARM_PCC_SUBSPACE_TYPE5_INFO); + break; + + default: + ASSERT_EFI_ERROR (EFI_INVALID_PARAMETER); + return EFI_INVALID_PARAMETER; + } + + PccBuffer =3D (UINT8 *)CmPccArray; + + // Map the Pcc channel to their Subspace Id. + for (Index =3D 0; Index < CmPccCount; Index++) { + GenericPcc =3D (PCC_SUBSPACE_GENERIC_INFO *)PccBuffer; + + Status =3D MappingTableAdd ( + MappingTable, + PccBuffer, + GenericPcc->SubspaceId + ); + if (EFI_ERROR (Status)) { + ASSERT_EFI_ERROR (Status); + return Status; + } + + PccBuffer +=3D CmObjSize; + } + + return EFI_SUCCESS; +} + +/** Add one PCCT Subspace structure of Type 0 (Generic). + + @param [in] PccCmObj Pointer to a CmObj PCCT Subspace info structure. + @param [in] PccAcpi Pointer to the ACPI PCCT Subspace structure to p= opulate. + + @retval EFI_SUCCESS Table generated successfully. + @retval EFI_INVALID_PARAMETER A parameter is invalid. +**/ +STATIC +EFI_STATUS +EFIAPI +AddSubspaceStructType0 ( + IN CM_ARM_PCC_SUBSPACE_TYPE0_INFO *PccCmObj, + IN EFI_ACPI_6_4_PCCT_SUBSPACE_GENERIC *PccAcpi + ) +{ + PCC_MAILBOX_REGISTER_INFO *Doorbell; + PCC_SUBSPACE_CHANNEL_TIMING_INFO *ChannelTiming; + + if ((PccCmObj =3D=3D NULL) || + (PccCmObj->Type !=3D EFI_ACPI_6_4_PCCT_SUBSPACE_TYPE_GENERIC) || + (PccAcpi =3D=3D NULL)) + { + ASSERT_EFI_ERROR (EFI_INVALID_PARAMETER); + return EFI_INVALID_PARAMETER; + } + + Doorbell =3D &PccCmObj->DoorbellReg; + ChannelTiming =3D &PccCmObj->ChannelTiming; + + PccAcpi->Type =3D PccCmObj->Type; + PccAcpi->Length =3D sizeof (EFI_ACPI_6_4_PCCT_SUBSPACE_= GENERIC); + *(UINT32 *)&PccAcpi->Reserved[0] =3D EFI_ACPI_RESERVED_DWORD; + *(UINT16 *)&PccAcpi->Reserved[4] =3D EFI_ACPI_RESERVED_WORD; + PccAcpi->BaseAddress =3D PccCmObj->BaseAddress; + PccAcpi->AddressLength =3D PccCmObj->AddressLength; + + CopyMem ( + &PccAcpi->DoorbellRegister, + &Doorbell->Register, + sizeof (EFI_ACPI_6_4_GENERIC_ADDRESS_STRUCTURE) + ); + PccAcpi->DoorbellPreserve =3D Doorbell->PreserveMask; + PccAcpi->DoorbellWrite =3D Doorbell->WriteMask; + + PccAcpi->NominalLatency =3D ChannelTiming->NominalLatency; + PccAcpi->MaximumPeriodicAccessRate =3D ChannelTiming->MaxPeriodicAcce= ssRate; + PccAcpi->MinimumRequestTurnaroundTime =3D ChannelTiming->MinRequestTurna= roundTime; + + return EFI_SUCCESS; +} + +/** Add one PCCT subspace structure of Type 1 (HW-Reduced). + + @param [in] PccCmObj Pointer to a CmObj PCCT Subspace info structure. + @param [in] PccAcpi Pointer to the ACPI PCCT Subspace structure to p= opulate. + + @retval EFI_SUCCESS Table generated successfully. + @retval EFI_INVALID_PARAMETER A parameter is invalid. +**/ +STATIC +EFI_STATUS +EFIAPI +AddSubspaceStructType1 ( + IN CM_ARM_PCC_SUBSPACE_TYPE1_INFO *PccCmObj, + IN EFI_ACPI_6_4_PCCT_SUBSPACE_1_HW_REDUCED_COMMUNICATIONS *PccAcpi + ) +{ + CM_ARM_PCC_SUBSPACE_TYPE0_INFO *GenericPccCmObj; + PCC_MAILBOX_REGISTER_INFO *Doorbell; + PCC_SUBSPACE_CHANNEL_TIMING_INFO *ChannelTiming; + + GenericPccCmObj =3D (CM_ARM_PCC_SUBSPACE_TYPE0_INFO *)PccCmObj; + + if ((PccCmObj =3D=3D NULL) || + (GenericPccCmObj->Type !=3D EFI_ACPI_6_4_PCCT_SUBSPACE_TYPE_1_HW_RED= UCED_COMMUNICATIONS) || + (PccAcpi =3D=3D NULL)) + { + ASSERT_EFI_ERROR (EFI_INVALID_PARAMETER); + return EFI_INVALID_PARAMETER; + } + + Doorbell =3D &GenericPccCmObj->DoorbellReg; + ChannelTiming =3D &GenericPccCmObj->ChannelTiming; + + PccAcpi->Type =3D GenericPccCmObj->Type; + PccAcpi->Length =3D sizeof (EFI_ACPI_6_4_PCCT_SUBSPACE_1= _HW_REDUCED_COMMUNICATIONS); + PccAcpi->PlatformInterrupt =3D PccCmObj->PlatIrq.Interrupt; + PccAcpi->PlatformInterruptFlags =3D PccCmObj->PlatIrq.Flags; + PccAcpi->Reserved =3D EFI_ACPI_RESERVED_BYTE; + PccAcpi->BaseAddress =3D GenericPccCmObj->BaseAddress; + PccAcpi->AddressLength =3D GenericPccCmObj->AddressLength; + + CopyMem ( + &PccAcpi->DoorbellRegister, + &Doorbell->Register, + sizeof (EFI_ACPI_6_4_GENERIC_ADDRESS_STRUCTURE) + ); + PccAcpi->DoorbellPreserve =3D Doorbell->PreserveMask; + PccAcpi->DoorbellWrite =3D Doorbell->WriteMask; + + PccAcpi->NominalLatency =3D ChannelTiming->NominalLatency; + PccAcpi->MaximumPeriodicAccessRate =3D ChannelTiming->MaxPeriodicAcce= ssRate; + PccAcpi->MinimumRequestTurnaroundTime =3D ChannelTiming->MinRequestTurna= roundTime; + + if ((PccCmObj->PlatIrq.Interrupt !=3D 0)) { + mHasPlatformInterrupt =3D TRUE; + } + + return EFI_SUCCESS; +} + +/** Add one PCCT subspace structure of Type 2 (HW-Reduced). + + @param [in] PccCmObj Pointer to a CmObj PCCT Subspace info structure. + @param [in] PccAcpi Pointer to the ACPI PCCT Subspace structure to p= opulate. + + @retval EFI_SUCCESS Table generated successfully. + @retval EFI_INVALID_PARAMETER A parameter is invalid. +**/ +STATIC +EFI_STATUS +EFIAPI +AddSubspaceStructType2 ( + IN CM_ARM_PCC_SUBSPACE_TYPE2_INFO *PccCmObj, + IN EFI_ACPI_6_4_PCCT_SUBSPACE_2_HW_REDUCED_COMMUNICATIONS *PccAcpi + ) +{ + CM_ARM_PCC_SUBSPACE_TYPE0_INFO *GenericPccCmObj; + PCC_MAILBOX_REGISTER_INFO *Doorbell; + PCC_MAILBOX_REGISTER_INFO *PlatIrqAck; + PCC_SUBSPACE_CHANNEL_TIMING_INFO *ChannelTiming; + + GenericPccCmObj =3D (CM_ARM_PCC_SUBSPACE_TYPE0_INFO *)PccCmObj; + + if ((PccCmObj =3D=3D NULL) || + (GenericPccCmObj->Type !=3D EFI_ACPI_6_4_PCCT_SUBSPACE_TYPE_2_HW_RED= UCED_COMMUNICATIONS) || + (PccAcpi =3D=3D NULL)) + { + ASSERT_EFI_ERROR (EFI_INVALID_PARAMETER); + return EFI_INVALID_PARAMETER; + } + + Doorbell =3D &GenericPccCmObj->DoorbellReg; + PlatIrqAck =3D &PccCmObj->PlatIrqAckReg; + ChannelTiming =3D &GenericPccCmObj->ChannelTiming; + + PccAcpi->Type =3D GenericPccCmObj->Type; + PccAcpi->Length =3D sizeof (EFI_ACPI_6_4_PCCT_SUBSPACE_2= _HW_REDUCED_COMMUNICATIONS); + PccAcpi->PlatformInterrupt =3D PccCmObj->PlatIrq.Interrupt; + PccAcpi->PlatformInterruptFlags =3D PccCmObj->PlatIrq.Flags; + PccAcpi->BaseAddress =3D GenericPccCmObj->BaseAddress; + PccAcpi->Reserved =3D EFI_ACPI_RESERVED_BYTE; + PccAcpi->BaseAddress =3D GenericPccCmObj->BaseAddress; + PccAcpi->AddressLength =3D GenericPccCmObj->AddressLength; + + CopyMem ( + &PccAcpi->DoorbellRegister, + &Doorbell->Register, + sizeof (EFI_ACPI_6_4_GENERIC_ADDRESS_STRUCTURE) + ); + PccAcpi->DoorbellPreserve =3D Doorbell->PreserveMask; + PccAcpi->DoorbellWrite =3D Doorbell->WriteMask; + + PccAcpi->NominalLatency =3D ChannelTiming->NominalLatency; + PccAcpi->MaximumPeriodicAccessRate =3D ChannelTiming->MaxPeriodicAcce= ssRate; + PccAcpi->MinimumRequestTurnaroundTime =3D ChannelTiming->MinRequestTurna= roundTime; + + CopyMem ( + &PccAcpi->PlatformInterruptAckRegister, + &PlatIrqAck->Register, + sizeof (EFI_ACPI_6_4_GENERIC_ADDRESS_STRUCTURE) + ); + PccAcpi->PlatformInterruptAckPreserve =3D PlatIrqAck->PreserveMask; + PccAcpi->PlatformInterruptAckWrite =3D PlatIrqAck->WriteMask; + + if ((PccCmObj->PlatIrq.Interrupt !=3D 0)) { + mHasPlatformInterrupt =3D TRUE; + } + + return EFI_SUCCESS; +} + +/** Add one PCCT subspace structure of Type 3 or 4 (Extended). + + @param [in] PccCmObj Pointer to a CmObj PCCT Subspace info structure. + @param [in] PccAcpi Pointer to the ACPI PCCT Subspace structure to p= opulate. + + @retval EFI_SUCCESS Table generated successfully. + @retval EFI_INVALID_PARAMETER A parameter is invalid. +**/ +STATIC +EFI_STATUS +EFIAPI +AddSubspaceStructType34 ( + IN CM_ARM_PCC_SUBSPACE_TYPE3_INFO *PccCmObj, + IN EFI_ACPI_6_4_PCCT_SUBSPACE_3_EXTENDED_PCC *PccAcpi + ) +{ + CM_ARM_PCC_SUBSPACE_TYPE0_INFO *GenericPccCmObj; + PCC_MAILBOX_REGISTER_INFO *Doorbell; + PCC_MAILBOX_REGISTER_INFO *PlatIrqAck; + PCC_MAILBOX_REGISTER_INFO *CmdCompleteCheck; + PCC_MAILBOX_REGISTER_INFO *CmdCompleteUpdate; + PCC_MAILBOX_REGISTER_INFO *ErrorStatus; + PCC_SUBSPACE_CHANNEL_TIMING_INFO *ChannelTiming; + + GenericPccCmObj =3D (CM_ARM_PCC_SUBSPACE_TYPE0_INFO *)PccCmObj; + + if ((PccCmObj =3D=3D NULL) || + ((GenericPccCmObj->Type !=3D EFI_ACPI_6_4_PCCT_SUBSPACE_TYPE_3_EXTEN= DED_PCC) && + (GenericPccCmObj->Type !=3D EFI_ACPI_6_4_PCCT_SUBSPACE_TYPE_4_EXTEN= DED_PCC)) || + (PccAcpi =3D=3D NULL)) + { + ASSERT_EFI_ERROR (EFI_INVALID_PARAMETER); + return EFI_INVALID_PARAMETER; + } + + Doorbell =3D &GenericPccCmObj->DoorbellReg; + PlatIrqAck =3D &PccCmObj->PlatIrqAckReg; + CmdCompleteCheck =3D &PccCmObj->CmdCompleteCheckReg; + CmdCompleteUpdate =3D &PccCmObj->CmdCompleteUpdateReg; + ErrorStatus =3D &PccCmObj->ErrorStatusReg; + ChannelTiming =3D &GenericPccCmObj->ChannelTiming; + + PccAcpi->Type =3D GenericPccCmObj->Type; + PccAcpi->Length =3D sizeof (EFI_ACPI_6_4_PCCT_SUBSPACE_3= _EXTENDED_PCC); + PccAcpi->PlatformInterrupt =3D PccCmObj->PlatIrq.Interrupt; + PccAcpi->PlatformInterruptFlags =3D PccCmObj->PlatIrq.Flags; + PccAcpi->Reserved =3D EFI_ACPI_RESERVED_BYTE; + PccAcpi->BaseAddress =3D GenericPccCmObj->BaseAddress; + PccAcpi->AddressLength =3D GenericPccCmObj->AddressLength; + + CopyMem ( + &PccAcpi->DoorbellRegister, + &Doorbell->Register, + sizeof (EFI_ACPI_6_4_GENERIC_ADDRESS_STRUCTURE) + ); + PccAcpi->DoorbellPreserve =3D Doorbell->PreserveMask; + PccAcpi->DoorbellWrite =3D Doorbell->WriteMask; + + PccAcpi->NominalLatency =3D ChannelTiming->NominalLatency; + PccAcpi->MaximumPeriodicAccessRate =3D ChannelTiming->MaxPeriodicAcce= ssRate; + PccAcpi->MinimumRequestTurnaroundTime =3D ChannelTiming->MinRequestTurna= roundTime; + + CopyMem ( + &PccAcpi->PlatformInterruptAckRegister, + &PlatIrqAck->Register, + sizeof (EFI_ACPI_6_4_GENERIC_ADDRESS_STRUCTURE) + ); + PccAcpi->PlatformInterruptAckPreserve =3D PlatIrqAck->PreserveMask; + PccAcpi->PlatformInterruptAckSet =3D PlatIrqAck->WriteMask; + + PccAcpi->Reserved1[0] =3D EFI_ACPI_RESERVED_BYTE; + PccAcpi->Reserved1[1] =3D EFI_ACPI_RESERVED_BYTE; + PccAcpi->Reserved1[1] =3D EFI_ACPI_RESERVED_BYTE; + PccAcpi->Reserved1[3] =3D EFI_ACPI_RESERVED_BYTE; + PccAcpi->Reserved1[4] =3D EFI_ACPI_RESERVED_BYTE; + PccAcpi->Reserved1[5] =3D EFI_ACPI_RESERVED_BYTE; + PccAcpi->Reserved1[6] =3D EFI_ACPI_RESERVED_BYTE; + PccAcpi->Reserved1[7] =3D EFI_ACPI_RESERVED_BYTE; + + CopyMem ( + &PccAcpi->CommandCompleteCheckRegister, + &CmdCompleteCheck->Register, + sizeof (EFI_ACPI_6_4_GENERIC_ADDRESS_STRUCTURE) + ); + PccAcpi->CommandCompleteCheckMask =3D CmdCompleteCheck->PreserveMask; + // No Write mask. + + CopyMem ( + &PccAcpi->CommandCompleteUpdateRegister, + &CmdCompleteUpdate->Register, + sizeof (EFI_ACPI_6_4_GENERIC_ADDRESS_STRUCTURE) + ); + PccAcpi->CommandCompleteUpdatePreserve =3D CmdCompleteUpdate->PreserveMa= sk; + PccAcpi->CommandCompleteUpdateSet =3D CmdCompleteUpdate->WriteMask; + + CopyMem ( + &PccAcpi->ErrorStatusRegister, + &ErrorStatus->Register, + sizeof (EFI_ACPI_6_4_GENERIC_ADDRESS_STRUCTURE) + ); + PccAcpi->ErrorStatusMask =3D ErrorStatus->PreserveMask; + // No Write mask. + + if (GenericPccCmObj->Type =3D=3D EFI_ACPI_6_4_PCCT_SUBSPACE_TYPE_4_EXTEN= DED_PCC) { + mHasPlatformInterrupt =3D TRUE; + } else if ((PccCmObj->PlatIrq.Interrupt !=3D 0)) { + mHasPlatformInterrupt =3D TRUE; + } + + return EFI_SUCCESS; +} + +/** Add one PCCT subspace structure of Type 5 (HW-Registers). + + @param [in] PccCmObj Pointer to a CmObj PCCT Subspace info structure. + @param [in] PccAcpi Pointer to the ACPI PCCT Subspace structure to p= opulate. + + @retval EFI_SUCCESS Table generated successfully. + @retval EFI_INVALID_PARAMETER A parameter is invalid. +**/ +STATIC +EFI_STATUS +EFIAPI +AddSubspaceStructType5 ( + IN CM_ARM_PCC_SUBSPACE_TYPE5_INFO *PccCmObj, + IN EFI_ACPI_6_4_PCCT_SUBSPACE_5_HW_REGISTERS_COMMUNICATIONS *PccAcpi + ) +{ + CM_ARM_PCC_SUBSPACE_TYPE0_INFO *GenericPccCmObj; + PCC_MAILBOX_REGISTER_INFO *Doorbell; + PCC_MAILBOX_REGISTER_INFO *CmdCompleteCheck; + PCC_MAILBOX_REGISTER_INFO *ErrorStatus; + PCC_SUBSPACE_CHANNEL_TIMING_INFO *ChannelTiming; + + GenericPccCmObj =3D (CM_ARM_PCC_SUBSPACE_TYPE0_INFO *)PccCmObj; + + if ((PccCmObj =3D=3D NULL) || + (GenericPccCmObj->Type !=3D EFI_ACPI_6_4_PCCT_SUBSPACE_TYPE_5_HW_REG= ISTERS_COMMUNICATIONS) || + (PccAcpi =3D=3D NULL)) + { + ASSERT_EFI_ERROR (EFI_INVALID_PARAMETER); + return EFI_INVALID_PARAMETER; + } + + Doorbell =3D &GenericPccCmObj->DoorbellReg; + CmdCompleteCheck =3D &PccCmObj->CmdCompleteCheckReg; + ErrorStatus =3D &PccCmObj->ErrorStatusReg; + ChannelTiming =3D &GenericPccCmObj->ChannelTiming; + + PccAcpi->Type =3D GenericPccCmObj->Type; + PccAcpi->Length =3D sizeof (EFI_ACPI_6_4_PCCT_SUBSPACE_= 5_HW_REGISTERS_COMMUNICATIONS); + PccAcpi->Version =3D PccCmObj->Version; + PccAcpi->BaseAddress =3D GenericPccCmObj->BaseAddress; + PccAcpi->SharedMemoryRangeLength =3D GenericPccCmObj->AddressLength; + + CopyMem ( + &PccAcpi->DoorbellRegister, + &Doorbell->Register, + sizeof (EFI_ACPI_6_4_GENERIC_ADDRESS_STRUCTURE) + ); + PccAcpi->DoorbellPreserve =3D Doorbell->PreserveMask; + PccAcpi->DoorbellWrite =3D Doorbell->WriteMask; + + CopyMem ( + &PccAcpi->CommandCompleteCheckRegister, + &CmdCompleteCheck->Register, + sizeof (EFI_ACPI_6_4_GENERIC_ADDRESS_STRUCTURE) + ); + PccAcpi->CommandCompleteCheckMask =3D CmdCompleteCheck->PreserveMask; + // No Write mask. + + CopyMem ( + &PccAcpi->ErrorStatusRegister, + &ErrorStatus->Register, + sizeof (EFI_ACPI_6_4_GENERIC_ADDRESS_STRUCTURE) + ); + PccAcpi->ErrorStatusMask =3D ErrorStatus->PreserveMask; + // No Write mask. + + PccAcpi->NominalLatency =3D ChannelTiming->NominalLatency; + // No MaximumPeriodicAccessRate. + PccAcpi->MinimumRequestTurnaroundTime =3D ChannelTiming->MinRequestTurna= roundTime; + + return EFI_SUCCESS; +} + +/** Populate the PCCT table using the MappingTable. + + @param [in] MappingTable The mapping table structure. + @param [in] Pcc Pointer to an array of Pcc Subpace structures. + @param [in] Size Size of the Pcc array. + + @retval EFI_SUCCESS Table generated successfully. + @retval EFI_BUFFER_TOO_SMALL Buffer too small. + @retval EFI_INVALID_PARAMETER A parameter is invalid. +**/ +STATIC +EFI_STATUS +EFIAPI +PopulatePcctTable ( + IN MAPPING_TABLE *MappingTable, + IN VOID *Pcc, + IN UINT32 Size + ) +{ + EFI_STATUS Status; + UINT8 *PccBuffer; + UINT32 CmObjSize; + UINT32 Index; + UINT32 MaxIndex; + VOID **Table; + VOID *CurrentPccSubspace; + + ASSERT (MappingTable !=3D NULL); + ASSERT (MappingTable->Table !=3D NULL); + + PccBuffer =3D Pcc; + MaxIndex =3D MappingTable->MaxIndex; + Table =3D MappingTable->Table; + + for (Index =3D 0; Index < MaxIndex; Index++) { + CurrentPccSubspace =3D Table[Index]; + if (CurrentPccSubspace =3D=3D NULL) { + ASSERT_EFI_ERROR (EFI_INVALID_PARAMETER); + return EFI_INVALID_PARAMETER; + } + + switch (((PCC_SUBSPACE_GENERIC_INFO *)CurrentPccSubspace)->Type) { + case EFI_ACPI_6_4_PCCT_SUBSPACE_TYPE_GENERIC: + Status =3D AddSubspaceStructType0 ( + (CM_ARM_PCC_SUBSPACE_TYPE0_INFO *)CurrentPccSubspace, + (EFI_ACPI_6_4_PCCT_SUBSPACE_GENERIC *)PccBuffer + ); + + CmObjSize =3D sizeof (EFI_ACPI_6_4_PCCT_SUBSPACE_GENERIC); + break; + + case EFI_ACPI_6_4_PCCT_SUBSPACE_TYPE_1_HW_REDUCED_COMMUNICATIONS: + Status =3D AddSubspaceStructType1 ( + (CM_ARM_PCC_SUBSPACE_TYPE1_INFO *)CurrentPccSubspace, + (EFI_ACPI_6_4_PCCT_SUBSPACE_1_HW_REDUCED_COMMUNICATIONS= *)PccBuffer + ); + + CmObjSize =3D sizeof (EFI_ACPI_6_4_PCCT_SUBSPACE_1_HW_REDUCED_COMM= UNICATIONS); + break; + + case EFI_ACPI_6_4_PCCT_SUBSPACE_TYPE_2_HW_REDUCED_COMMUNICATIONS: + Status =3D AddSubspaceStructType2 ( + (CM_ARM_PCC_SUBSPACE_TYPE2_INFO *)CurrentPccSubspace, + (EFI_ACPI_6_4_PCCT_SUBSPACE_2_HW_REDUCED_COMMUNICATIONS= *)PccBuffer + ); + + CmObjSize =3D sizeof (EFI_ACPI_6_4_PCCT_SUBSPACE_2_HW_REDUCED_COMM= UNICATIONS); + break; + + case EFI_ACPI_6_4_PCCT_SUBSPACE_TYPE_3_EXTENDED_PCC: + Status =3D AddSubspaceStructType34 ( + (CM_ARM_PCC_SUBSPACE_TYPE3_INFO *)CurrentPccSubspace, + (EFI_ACPI_6_4_PCCT_SUBSPACE_3_EXTENDED_PCC *)PccBuffer + ); + + CmObjSize =3D sizeof (EFI_ACPI_6_4_PCCT_SUBSPACE_3_EXTENDED_PCC); + break; + + case EFI_ACPI_6_4_PCCT_SUBSPACE_TYPE_4_EXTENDED_PCC: + Status =3D AddSubspaceStructType34 ( + (CM_ARM_PCC_SUBSPACE_TYPE4_INFO *)CurrentPccSubspace, + (EFI_ACPI_6_4_PCCT_SUBSPACE_4_EXTENDED_PCC *)PccBuffer + ); + + CmObjSize =3D sizeof (EFI_ACPI_6_4_PCCT_SUBSPACE_4_EXTENDED_PCC); + break; + + case EFI_ACPI_6_4_PCCT_SUBSPACE_TYPE_5_HW_REGISTERS_COMMUNICATIONS: + Status =3D AddSubspaceStructType5 ( + (CM_ARM_PCC_SUBSPACE_TYPE5_INFO *)CurrentPccSubspace, + (EFI_ACPI_6_4_PCCT_SUBSPACE_5_HW_REGISTERS_COMMUNICATIO= NS *)PccBuffer + ); + + CmObjSize =3D sizeof (EFI_ACPI_6_4_PCCT_SUBSPACE_5_HW_REGISTERS_CO= MMUNICATIONS); + break; + + default: + ASSERT_EFI_ERROR (EFI_INVALID_PARAMETER); + return EFI_INVALID_PARAMETER; + } // switch + + if (EFI_ERROR (Status)) { + ASSERT_EFI_ERROR (Status); + return Status; + } + + if (Size < CmObjSize) { + ASSERT_EFI_ERROR (EFI_BUFFER_TOO_SMALL); + return EFI_BUFFER_TOO_SMALL; + } + + PccBuffer +=3D CmObjSize; + Size -=3D CmObjSize; + } // for + + return EFI_SUCCESS; +} + +/** Construct the PCCT ACPI table. + + Called by the Dynamic Table Manager, this function invokes the + Configuration Manager protocol interface to get the required hardware + information for generating the ACPI table. + + If this function allocates any resources then they must be freed + in the FreeXXXXTableResources function. + + @param [in] This Pointer to the table generator. + @param [in] AcpiTableInfo Pointer to the ACPI Table Info. + @param [in] CfgMgrProtocol Pointer to the Configuration Manager + Protocol Interface. + @param [out] Table Pointer to the constructed ACPI Table. + + @retval EFI_SUCCESS Table generated successfully. + @retval EFI_INVALID_PARAMETER A parameter is invalid. + @retval EFI_NOT_FOUND The required object was not found. + @retval EFI_BAD_BUFFER_SIZE The size returned by the Configuration + Manager is less than the Object size for t= he + requested object. + @retval EFI_BUFFER_TOO_SMALL Buffer too small. + @retval EFI_OUT_OF_RESOURCES Memory allocation failed. +**/ +STATIC +EFI_STATUS +EFIAPI +BuildPcctTable ( + IN CONST ACPI_TABLE_GENERATOR *CONST This, + IN CONST CM_STD_OBJ_ACPI_TABLE_INFO *CONST AcpiTableInfo, + IN CONST EDKII_CONFIGURATION_MANAGER_PROTOCOL *CONST CfgMgrProtocol, + OUT EFI_ACPI_DESCRIPTION_HEADER **CONST Table + ) +{ + EFI_STATUS Status; + ACPI_PCCT_GENERATOR *Generator; + UINT32 TableSize; + EFI_ACPI_6_4_PLATFORM_COMMUNICATION_CHANNEL_TABLE_HEADER *Pcct; + UINT8 *Buffer; + + MAPPING_TABLE *MappingTable; + UINT32 MappingTableCount; + + CM_ARM_PCC_SUBSPACE_TYPE0_INFO *PccType0; + UINT32 PccType0Count; + CM_ARM_PCC_SUBSPACE_TYPE1_INFO *PccType1; + UINT32 PccType1Count; + CM_ARM_PCC_SUBSPACE_TYPE2_INFO *PccType2; + UINT32 PccType2Count; + CM_ARM_PCC_SUBSPACE_TYPE3_INFO *PccType3; + UINT32 PccType3Count; + CM_ARM_PCC_SUBSPACE_TYPE4_INFO *PccType4; + UINT32 PccType4Count; + CM_ARM_PCC_SUBSPACE_TYPE5_INFO *PccType5; + UINT32 PccType5Count; + + ASSERT (This !=3D NULL); + ASSERT (AcpiTableInfo !=3D NULL); + ASSERT (CfgMgrProtocol !=3D NULL); + ASSERT (Table !=3D NULL); + ASSERT (AcpiTableInfo->TableGeneratorId =3D=3D This->GeneratorID); + ASSERT (AcpiTableInfo->AcpiTableSignature =3D=3D This->AcpiTableSignatur= e); + + if ((AcpiTableInfo->AcpiTableRevision < This->MinAcpiTableRevision) || + (AcpiTableInfo->AcpiTableRevision > This->AcpiTableRevision)) + { + DEBUG (( + DEBUG_ERROR, + "ERROR: PCCT: Requested table revision =3D %d, is not supported." + "Supported table revision: Minimum =3D %d, Maximum =3D %d\n", + AcpiTableInfo->AcpiTableRevision, + This->MinAcpiTableRevision, + This->AcpiTableRevision + )); + ASSERT_EFI_ERROR (EFI_INVALID_PARAMETER); + return EFI_INVALID_PARAMETER; + } + + Generator =3D (ACPI_PCCT_GENERATOR *)This; + MappingTable =3D &Generator->MappingTable; + *Table =3D NULL; + + // First get all the Pcc Subpace CmObj of type X. + + Status =3D GetEArmObjPccSubspaceType0Info ( + CfgMgrProtocol, + CM_NULL_TOKEN, + &PccType0, + &PccType0Count + ); + if (EFI_ERROR (Status) && (Status !=3D EFI_NOT_FOUND)) { + ASSERT_EFI_ERROR (Status); + goto error_handler; + } + + Status =3D GetEArmObjPccSubspaceType1Info ( + CfgMgrProtocol, + CM_NULL_TOKEN, + &PccType1, + &PccType1Count + ); + if (EFI_ERROR (Status) && (Status !=3D EFI_NOT_FOUND)) { + ASSERT_EFI_ERROR (Status); + goto error_handler; + } + + Status =3D GetEArmObjPccSubspaceType2Info ( + CfgMgrProtocol, + CM_NULL_TOKEN, + &PccType2, + &PccType2Count + ); + if (EFI_ERROR (Status) && (Status !=3D EFI_NOT_FOUND)) { + ASSERT_EFI_ERROR (Status); + goto error_handler; + } + + Status =3D GetEArmObjPccSubspaceType3Info ( + CfgMgrProtocol, + CM_NULL_TOKEN, + &PccType3, + &PccType3Count + ); + if (EFI_ERROR (Status) && (Status !=3D EFI_NOT_FOUND)) { + ASSERT_EFI_ERROR (Status); + goto error_handler; + } + + Status =3D GetEArmObjPccSubspaceType4Info ( + CfgMgrProtocol, + CM_NULL_TOKEN, + &PccType4, + &PccType4Count + ); + if (EFI_ERROR (Status) && (Status !=3D EFI_NOT_FOUND)) { + ASSERT_EFI_ERROR (Status); + goto error_handler; + } + + Status =3D GetEArmObjPccSubspaceType5Info ( + CfgMgrProtocol, + CM_NULL_TOKEN, + &PccType5, + &PccType5Count + ); + if (EFI_ERROR (Status) && (Status !=3D EFI_NOT_FOUND)) { + ASSERT_EFI_ERROR (Status); + goto error_handler; + } + + // Count the number of Pcc Subspaces. + MappingTableCount =3D PccType0Count; + MappingTableCount +=3D PccType1Count; + MappingTableCount +=3D PccType2Count; + MappingTableCount +=3D PccType3Count; + MappingTableCount +=3D PccType4Count; + MappingTableCount +=3D PccType5Count; + + Status =3D MappingTableInitialize (MappingTable, MappingTableCount); + if (EFI_ERROR (Status)) { + ASSERT_EFI_ERROR (Status); + goto error_handler; + } + + // Map the Subspace Ids for all types. + + Status =3D MapPccSubspaceId (MappingTable, PccType0, PccType0Count); + if (EFI_ERROR (Status)) { + ASSERT_EFI_ERROR (Status); + goto error_handler; + } + + Status =3D MapPccSubspaceId (MappingTable, PccType1, PccType1Count); + if (EFI_ERROR (Status)) { + ASSERT_EFI_ERROR (Status); + goto error_handler; + } + + Status =3D MapPccSubspaceId (MappingTable, PccType2, PccType2Count); + if (EFI_ERROR (Status)) { + ASSERT_EFI_ERROR (Status); + goto error_handler; + } + + Status =3D MapPccSubspaceId (MappingTable, PccType3, PccType3Count); + if (EFI_ERROR (Status)) { + ASSERT_EFI_ERROR (Status); + goto error_handler; + } + + Status =3D MapPccSubspaceId (MappingTable, PccType4, PccType4Count); + if (EFI_ERROR (Status)) { + ASSERT_EFI_ERROR (Status); + goto error_handler; + } + + Status =3D MapPccSubspaceId (MappingTable, PccType5, PccType5Count); + if (EFI_ERROR (Status)) { + ASSERT_EFI_ERROR (Status); + goto error_handler; + } + + // Compute the size of the PCCT table. + TableSize =3D sizeof (EFI_ACPI_6_4_PLATFORM_COMMUNICATION_CHANNEL_TABLE= _HEADER); + TableSize +=3D PccType0Count * sizeof (EFI_ACPI_6_4_PCCT_SUBSPACE_GENERI= C); + TableSize +=3D PccType1Count * sizeof (EFI_ACPI_6_4_PCCT_SUBSPACE_1_HW_R= EDUCED_COMMUNICATIONS); + TableSize +=3D PccType2Count * sizeof (EFI_ACPI_6_4_PCCT_SUBSPACE_2_HW_R= EDUCED_COMMUNICATIONS); + TableSize +=3D PccType3Count * sizeof (EFI_ACPI_6_4_PCCT_SUBSPACE_3_EXTE= NDED_PCC); + TableSize +=3D PccType4Count * sizeof (EFI_ACPI_6_4_PCCT_SUBSPACE_4_EXTE= NDED_PCC); + TableSize +=3D PccType5Count * sizeof (EFI_ACPI_6_4_PCCT_SUBSPACE_5_HW_R= EGISTERS_COMMUNICATIONS); + + // Allocate a Buffer for the PCCT table. + *Table =3D (EFI_ACPI_DESCRIPTION_HEADER *)AllocateZeroPool (TableSize); + if (*Table =3D=3D NULL) { + Status =3D EFI_OUT_OF_RESOURCES; + ASSERT_EFI_ERROR (Status); + goto error_handler; + } + + Pcct =3D (EFI_ACPI_6_4_PLATFORM_COMMUNICATION_CHANNEL_TABLE_HEADER *)*Ta= ble; + + Status =3D AddAcpiHeader ( + CfgMgrProtocol, + This, + &Pcct->Header, + AcpiTableInfo, + TableSize + ); + if (EFI_ERROR (Status)) { + DEBUG (( + DEBUG_ERROR, + "ERROR: PCCT: Failed to add ACPI header. Status =3D %r\n", + Status + )); + ASSERT_EFI_ERROR (Status); + goto error_handler; + } + + Buffer =3D (UINT8 *)Pcct; + Buffer +=3D sizeof (EFI_ACPI_6_4_PLATFORM_COMMUNICATION_CHANNEL_TABLE= _HEADER); + TableSize -=3D sizeof (EFI_ACPI_6_4_PLATFORM_COMMUNICATION_CHANNEL_TABLE= _HEADER); + + // Populate the PCCT table by following the Subspace Id mapping. + Status =3D PopulatePcctTable (MappingTable, Buffer, TableSize); + if (EFI_ERROR (Status)) { + ASSERT_EFI_ERROR (Status); + goto error_handler; + } + + // Setup the Reserved fields once mHasPlatformInterrupt hase been popula= ted. + Pcct->Flags =3D mHasPlatformInterrupt; + Pcct->Reserved =3D EFI_ACPI_RESERVED_QWORD; + + MappingTableFree (MappingTable); + + return Status; + +error_handler: + DEBUG (( + DEBUG_ERROR, + "ERROR: PCCT: Failed to install table. Status =3D %r\n", + Status + )); + + if (*Table !=3D NULL) { + FreePool (*Table); + *Table =3D NULL; + } + + MappingTableFree (MappingTable); + + return Status; +} + +/** Free any resources allocated for constructing the PCCT. + + @param [in] This Pointer to the table generator. + @param [in] AcpiTableInfo Pointer to the ACPI Table Info. + @param [in] CfgMgrProtocol Pointer to the Configuration Manager + Protocol Interface. + @param [in, out] Table Pointer to the ACPI Table. + + @retval EFI_SUCCESS The resources were freed successfully. + @retval EFI_INVALID_PARAMETER The table pointer is NULL or invalid. +**/ +STATIC +EFI_STATUS +FreePcctTableResources ( + IN CONST ACPI_TABLE_GENERATOR *CONST This, + IN CONST CM_STD_OBJ_ACPI_TABLE_INFO *CONST AcpiTableInf= o, + IN CONST EDKII_CONFIGURATION_MANAGER_PROTOCOL *CONST CfgMgrProtoc= ol, + IN OUT EFI_ACPI_DESCRIPTION_HEADER **CONST Table + ) +{ + ASSERT (This !=3D NULL); + ASSERT (AcpiTableInfo !=3D NULL); + ASSERT (CfgMgrProtocol !=3D NULL); + ASSERT (AcpiTableInfo->TableGeneratorId =3D=3D This->GeneratorID); + ASSERT (AcpiTableInfo->AcpiTableSignature =3D=3D This->AcpiTableSignatur= e); + + if ((Table =3D=3D NULL) || (*Table =3D=3D NULL)) { + DEBUG ((DEBUG_ERROR, "ERROR: PCCT: Invalid Table Pointer\n")); + ASSERT ((Table !=3D NULL) && (*Table !=3D NULL)); + return EFI_INVALID_PARAMETER; + } + + FreePool (*Table); + *Table =3D NULL; + return EFI_SUCCESS; +} + +/** This macro defines the PCCT Table Generator revision. +*/ +#define PCCT_GENERATOR_REVISION CREATE_REVISION (1, 0) + +/** The interface for the PCCT Table Generator. +*/ +STATIC +ACPI_PCCT_GENERATOR PcctGenerator =3D { + // ACPI table generator header + { + // Generator ID + CREATE_STD_ACPI_TABLE_GEN_ID (EStdAcpiTableIdPcct), + // Generator Description + L"ACPI.STD.PCCT.GENERATOR", + // ACPI Table Signature + EFI_ACPI_6_4_PLATFORM_COMMUNICATIONS_CHANNEL_TABLE_SIGNATURE, + // ACPI Table Revision supported by this Generator + EFI_ACPI_6_4_PLATFORM_COMMUNICATION_CHANNEL_TABLE_REVISION, + // Minimum ACPI Table Revision supported by this Generator + EFI_ACPI_6_4_PLATFORM_COMMUNICATION_CHANNEL_TABLE_REVISION, + // Creator ID + TABLE_GENERATOR_CREATOR_ID_ARM, + // Creator Revision + PCCT_GENERATOR_REVISION, + // Build Table function + BuildPcctTable, + // Free Resource function + FreePcctTableResources, + // Extended build function not needed + NULL, + // Extended build function not implemented by the generator. + // Hence extended free resource function is not required. + NULL + }, + + // Private fields are defined from here. + + // Mapping Table + { + // Table + NULL, + // MaxIndex + 0, + }, +}; + +/** Register the Generator with the ACPI Table Factory. + + @param [in] ImageHandle The handle to the image. + @param [in] SystemTable Pointer to the System Table. + + @retval EFI_SUCCESS The Generator is registered. + @retval EFI_INVALID_PARAMETER A parameter is invalid. + @retval EFI_ALREADY_STARTED The Generator for the Table ID + is already registered. +**/ +EFI_STATUS +EFIAPI +AcpiPcctLibConstructor ( + IN EFI_HANDLE ImageHandle, + IN EFI_SYSTEM_TABLE *SystemTable + ) +{ + EFI_STATUS Status; + + Status =3D RegisterAcpiTableGenerator (&PcctGenerator.Header); + DEBUG ((DEBUG_INFO, "PCCT: Register Generator. Status =3D %r\n", Status)= ); + ASSERT_EFI_ERROR (Status); + return Status; +} + +/** Deregister the Generator from the ACPI Table Factory. + + @param [in] ImageHandle The handle to the image. + @param [in] SystemTable Pointer to the System Table. + + @retval EFI_SUCCESS The Generator is deregistered. + @retval EFI_INVALID_PARAMETER A parameter is invalid. + @retval EFI_NOT_FOUND The Generator is not registered. +**/ +EFI_STATUS +EFIAPI +AcpiPcctLibDestructor ( + IN EFI_HANDLE ImageHandle, + IN EFI_SYSTEM_TABLE *SystemTable + ) +{ + EFI_STATUS Status; + + Status =3D DeregisterAcpiTableGenerator (&PcctGenerator.Header); + DEBUG ((DEBUG_INFO, "PCCT: Deregister Generator. Status =3D %r\n", Statu= s)); + ASSERT_EFI_ERROR (Status); + return Status; +} diff --git a/DynamicTablesPkg/Library/Acpi/Arm/AcpiPcctLibArm/PcctGenerator= .h b/DynamicTablesPkg/Library/Acpi/Arm/AcpiPcctLibArm/PcctGenerator.h new file mode 100644 index 000000000000..0631a1f5b74b --- /dev/null +++ b/DynamicTablesPkg/Library/Acpi/Arm/AcpiPcctLibArm/PcctGenerator.h @@ -0,0 +1,43 @@ +/** @file + PCCT Table Generator + + Copyright (c) 2022, Arm Limited. All rights reserved.
+ SPDX-License-Identifier: BSD-2-Clause-Patent + + @par Reference(s): + - ACPI 6.4 Specification - January 2021 + s14 PLATFORM COMMUNICATIONS CHANNEL (PCC) + +**/ + +#ifndef PCCT_GENERATOR_H_ +#define PCCT_GENERATOR_H_ + +#pragma pack(1) + +/** Structure used to map a Pcc Subspace to an index. +*/ +typedef struct MappingTable { + /// Mapping table for Subspace Ids. + /// Subspace ID/Index <-> CM_ARM_PCC_SUBSPACE_TYPE[X]_INFO pointer + VOID **Table; + + /// Number of entries in the Table. + UINT32 MaxIndex; +} MAPPING_TABLE; + +/** A structure holding the Pcct generator and additional private data. +*/ +typedef struct AcpiPcctGenerator { + /// ACPI Table generator header + ACPI_TABLE_GENERATOR Header; + + // Private fields are defined from here. + + /// Table to map: Subspace ID/Index <-> CM_ARM_PCC_SUBSPACE_TYPE[X]_INFO= pointer + MAPPING_TABLE MappingTable; +} ACPI_PCCT_GENERATOR; + +#pragma pack() + +#endif // PCCT_GENERATOR_H_ diff --git a/DynamicTablesPkg/Library/Common/TableHelperLib/ConfigurationMa= nagerObjectParser.c b/DynamicTablesPkg/Library/Common/TableHelperLib/Config= urationManagerObjectParser.c index 21d1f3f08b16..4d7aa7963fae 100644 --- a/DynamicTablesPkg/Library/Common/TableHelperLib/ConfigurationManagerOb= jectParser.c +++ b/DynamicTablesPkg/Library/Common/TableHelperLib/ConfigurationManagerOb= jectParser.c @@ -539,7 +539,7 @@ STATIC CONST CM_OBJ_PARSER CmArmCpcInfoParser[] =3D { { "NominalFrequencyInteger", 4, = "0x%lx", NULL }, }; =20 -/** A parser for the CM_ARM_MAILBOX_REGISTER_INFO struct. +/** A parser for the PCC_MAILBOX_REGISTER_INFO struct. */ STATIC CONST CM_OBJ_PARSER CmArmMailboxRegisterInfoParser[] =3D { { "Register", sizeof (EFI_ACPI_6_4_GENERIC_ADDRESS_STRUCTURE), NULL,= NULL, @@ -548,7 +548,7 @@ STATIC CONST CM_OBJ_PARSER CmArmMailboxRegisterInfoPar= ser[] =3D { { "WriteMask", 8, "0x%l= lx", NULL }, }; =20 -/** A parser for the CM_ARM_PCC_SUBSPACE_CHANNEL_TIMING_INFO struct. +/** A parser for the PCC_SUBSPACE_CHANNEL_TIMING_INFO struct. */ STATIC CONST CM_OBJ_PARSER CmArmPccSubspaceChannelTimingInfoParser[] =3D { { "NominalLatency", 4, "0x%x", NULL }, @@ -559,14 +559,14 @@ STATIC CONST CM_OBJ_PARSER CmArmPccSubspaceChannelTi= mingInfoParser[] =3D { /** A parser for EArmObjPccSubspaceType0Info. */ STATIC CONST CM_OBJ_PARSER CmArmPccSubspaceType0InfoParser[] =3D { - { "SubspaceId", 1, "0x= %x", NULL }, - { "Type", 1, "0x= %x", NULL }, - { "BaseAddress", 8, "0x= %llx", NULL }, - { "AddressLength", 8, "0x= %llx", NULL }, - { "DoorbellReg", sizeof (CM_ARM_MAILBOX_REGISTER_INFO), + { "SubspaceId", 1, "0x%x", = NULL }, + { "Type", 1, "0x%x", = NULL }, + { "BaseAddress", 8, "0x%llx", = NULL }, + { "AddressLength", 8, "0x%llx", = NULL }, + { "DoorbellReg", sizeof (PCC_MAILBOX_REGISTER_INFO), NULL, NULL, CmArmMailboxRegisterInfoParser, ARRAY_SIZE (CmArmMailboxRegisterInfoParser) }, - { "DoorbellReg", sizeof (CM_ARM_PCC_SUBSPACE_CHANNEL_TIMING_INFO), + { "DoorbellReg", sizeof (PCC_SUBSPACE_CHANNEL_TIMING_INFO), NULL, NULL, CmArmPccSubspaceChannelTimingInfoParser, ARRAY_SIZE (CmArmPccSubspaceChannelTimingInfoParser) }, }; @@ -574,7 +574,7 @@ STATIC CONST CM_OBJ_PARSER CmArmPccSubspaceType0InfoPa= rser[] =3D { /** A parser for EArmObjPccSubspaceType1Info. */ STATIC CONST CM_OBJ_PARSER CmArmPccSubspaceType1InfoParser[] =3D { - { "GenericPccInfo", sizeof (CM_ARM_PCC_SUBSPACE_GENERIC_INFO), + { "GenericPccInfo", sizeof (PCC_SUBSPACE_GENERIC_INFO), NULL, NULL, CmArmPccSubspaceType0InfoParser, ARRAY_SIZE (CmArmPccSubspaceType0InfoParser) }, { "PlatIrq", sizeof (CM_ARM_GENERIC_INTERRUPT), @@ -585,12 +585,12 @@ STATIC CONST CM_OBJ_PARSER CmArmPccSubspaceType1Info= Parser[] =3D { /** A parser for EArmObjPccSubspaceType2Info. */ STATIC CONST CM_OBJ_PARSER CmArmPccSubspaceType2InfoParser[] =3D { - { "GenericPccInfo", sizeof (CM_ARM_PCC_SUBSPACE_GENERIC_INFO), + { "GenericPccInfo", sizeof (PCC_SUBSPACE_GENERIC_INFO), NULL, NULL, CmArmPccSubspaceType0InfoParser, ARRAY_SIZE (CmArmPccSubspaceType0InfoParser) }, - { "PlatIrq", sizeof (CM_ARM_GENERIC_INTERRUPT), NULL,NULL, + { "PlatIrq", sizeof (CM_ARM_GENERIC_INTERRUPT), NULL,NULL, CmArmGenericInterruptParser, ARRAY_SIZE (CmArmGenericInterruptParser) = }, - { "PlatIrqAckReg", sizeof (CM_ARM_MAILBOX_REGISTER_INFO), + { "PlatIrqAckReg", sizeof (PCC_MAILBOX_REGISTER_INFO), NULL, NULL, CmArmMailboxRegisterInfoParser, ARRAY_SIZE (CmArmMailboxRegisterInfoParser) }, }; @@ -598,21 +598,21 @@ STATIC CONST CM_OBJ_PARSER CmArmPccSubspaceType2Info= Parser[] =3D { /** A parser for EArmObjPccSubspaceType3Info or EArmObjPccSubspaceType4Inf= o. */ STATIC CONST CM_OBJ_PARSER CmArmPccSubspaceType34InfoParser[] =3D { - { "GenericPccInfo", sizeof (CM_ARM_PCC_SUBSPACE_GENERIC_INFO), + { "GenericPccInfo", sizeof (PCC_SUBSPACE_GENERIC_INFO), NULL, NULL, CmArmPccSubspaceType0InfoParser, ARRAY_SIZE (CmArmPccSubspaceType0InfoParser) }, - { "PlatIrq", sizeof (CM_ARM_GENERIC_INTERRUPT), NULL= ,NULL, + { "PlatIrq", sizeof (CM_ARM_GENERIC_INTERRUPT), NULL,NULL, CmArmGenericInterruptParser, ARRAY_SIZE (CmArmGenericInterruptParser) = }, - { "PlatIrqAckReg", sizeof (CM_ARM_MAILBOX_REGISTER_INFO), + { "PlatIrqAckReg", sizeof (PCC_MAILBOX_REGISTER_INFO), NULL, NULL, CmArmMailboxRegisterInfoParser, ARRAY_SIZE (CmArmMailboxRegisterInfoParser) }, - { "CmdCompleteCheckReg", sizeof (CM_ARM_MAILBOX_REGISTER_INFO), + { "CmdCompleteCheckReg", sizeof (PCC_MAILBOX_REGISTER_INFO), NULL, NULL, CmArmMailboxRegisterInfoParser, ARRAY_SIZE (CmArmMailboxRegisterInfoParser) }, - { "CmdCompleteUpdateReg", sizeof (CM_ARM_MAILBOX_REGISTER_INFO), + { "CmdCompleteUpdateReg", sizeof (PCC_MAILBOX_REGISTER_INFO), NULL, NULL, CmArmMailboxRegisterInfoParser, ARRAY_SIZE (CmArmMailboxRegisterInfoParser) }, - { "ErrorStatusReg", sizeof (CM_ARM_MAILBOX_REGISTER_INFO), + { "ErrorStatusReg", sizeof (PCC_MAILBOX_REGISTER_INFO), NULL, NULL, CmArmMailboxRegisterInfoParser, ARRAY_SIZE (CmArmMailboxRegisterInfoParser) }, }; @@ -620,16 +620,16 @@ STATIC CONST CM_OBJ_PARSER CmArmPccSubspaceType34Inf= oParser[] =3D { /** A parser for EArmObjPccSubspaceType5Info. */ STATIC CONST CM_OBJ_PARSER CmArmPccSubspaceType5InfoParser[] =3D { - { "GenericPccInfo", sizeof (CM_ARM_PCC_SUBSPACE_GENERIC_INFO), + { "GenericPccInfo", sizeof (PCC_SUBSPACE_GENERIC_INFO), NULL, NULL, CmArmPccSubspaceType0InfoParser, ARRAY_SIZE (CmArmPccSubspaceType0InfoParser) }, - { "Version", 2, "0x%x= ",NULL }, - { "PlatIrq", sizeof (CM_ARM_GENERIC_INTERRUPT), NULL,= NULL, + { "Version", 2, "0x%x",NULL = }, + { "PlatIrq", sizeof (CM_ARM_GENERIC_INTERRUPT), NULL, NULL, CmArmGenericInterruptParser, ARRAY_SIZE (CmArmGenericInterruptParser) = }, - { "CmdCompleteCheckReg", sizeof (CM_ARM_MAILBOX_REGISTER_INFO), + { "CmdCompleteCheckReg", sizeof (PCC_MAILBOX_REGISTER_INFO), NULL, NULL, CmArmMailboxRegisterInfoParser, ARRAY_SIZE (CmArmMailboxRegisterInfoParser) }, - { "ErrorStatusReg", sizeof (CM_ARM_MAILBOX_REGISTER_INFO), + { "ErrorStatusReg", sizeof (PCC_MAILBOX_REGISTER_INFO), NULL, NULL, CmArmMailboxRegisterInfoParser, ARRAY_SIZE (CmArmMailboxRegisterInfoParser) }, }; --=20 2.25.1 -=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D- Groups.io Links: You receive all messages sent to this group. View/Reply Online (#94892): https://edk2.groups.io/g/devel/message/94892 Mute This Topic: https://groups.io/mt/94232530/1787277 Group Owner: devel+owner@edk2.groups.io Unsubscribe: https://edk2.groups.io/g/devel/unsub [importer@patchew.org] -=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D- From nobody Thu May 9 10:47:23 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of groups.io designates 66.175.222.108 as permitted sender) client-ip=66.175.222.108; envelope-from=bounce+27952+94893+1787277+3901457@groups.io; helo=mail02.groups.io; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of groups.io designates 66.175.222.108 as permitted sender) smtp.mailfrom=bounce+27952+94893+1787277+3901457@groups.io; dmarc=fail(p=none dis=none) header.from=arm.com ARC-Seal: i=1; a=rsa-sha256; t=1665393691; cv=none; d=zohomail.com; s=zohoarc; b=BgdixF10CdpUa7UalvA4rG8Z90/p7ueBUaabtIjqq9IgWoUUkUrVt8qbG8XEOP3CFecgugvQfExCsfOiKCZZD05e8az45C62cfoD9MGMW7Cx9nnBQVcf6NcoSnn/h3Cuaon4LLFr8ucCjGe4Pndue5oQBEkyV1tKSRniXtn3q6Y= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1665393691; h=Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Id:List-Help:List-Unsubscribe:MIME-Version:Message-ID:Reply-To:References:Sender:Subject:To; bh=smh8mF444FgMMblsix05DkCyCvnzcfd75RJgyIXtKeo=; b=d9OpHdPIakZuWpYl3cW1RkOncYC8IO1uRU+hVCs4TNEjnAMUM0T4RfNEZj4EVolVN1UvBevHgieVpo0pEK+ALwKB+Ez79BBsXJb7EOioPvg1if24XPP/JB4FklPTfg5HRQYbF2FJO3Pn65WW88+XSy9MLKNzGQdEBWad8ONZ2iA= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of groups.io designates 66.175.222.108 as permitted sender) smtp.mailfrom=bounce+27952+94893+1787277+3901457@groups.io; dmarc=fail header.from= (p=none dis=none) Received: from mail02.groups.io (mail02.groups.io [66.175.222.108]) by mx.zohomail.com with SMTPS id 1665393691360108.78238435841035; Mon, 10 Oct 2022 02:21:31 -0700 (PDT) Return-Path: X-Received: by 127.0.0.2 with SMTP id hO3tYY1788612xHOdbtlVLSE; Mon, 10 Oct 2022 02:21:31 -0700 X-Received: from foss.arm.com (foss.arm.com [217.140.110.172]) by mx.groups.io with SMTP id smtpd.web10.4409.1665393690064650152 for ; Mon, 10 Oct 2022 02:21:30 -0700 X-Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.121.207.14]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id 090881AED; Mon, 10 Oct 2022 02:21:36 -0700 (PDT) X-Received: from pierre123.arm.com (unknown [10.57.34.234]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPA id 166DA3F792; Mon, 10 Oct 2022 02:21:28 -0700 (PDT) From: "PierreGondois" To: devel@edk2.groups.io Cc: Sami Mujawar , Alexei Fedorov Subject: [edk2-devel] [PATCH 12/14] DynamicTablesPkg/AmlLib: Allow larger AccessSize for Pcc address space Date: Mon, 10 Oct 2022 11:20:56 +0200 Message-Id: <20221010092058.118714-13-Pierre.Gondois@arm.com> In-Reply-To: <20221010092058.118714-1-Pierre.Gondois@arm.com> References: <20221010092058.118714-1-Pierre.Gondois@arm.com> MIME-Version: 1.0 Precedence: Bulk List-Unsubscribe: List-Subscribe: List-Help: Sender: devel@edk2.groups.io List-Id: Mailing-List: list devel@edk2.groups.io; contact devel+owner@edk2.groups.io Reply-To: devel@edk2.groups.io,pierre.gondois@arm.com X-Gm-Message-State: zj9ptSjVzVMDB91leNr4Lc0tx1787277AA= Content-Transfer-Encoding: quoted-printable DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=groups.io; q=dns/txt; s=20140610; t=1665393691; bh=SFEi4RWUr7xERfRIzXHk+sJvYrmMA5y8qT+/6BQ2sMI=; h=Cc:Date:From:Reply-To:Subject:To; b=wsj7+uUtwpY+PKSD0q0CHt7KxQB4lqiaG1YKqVcgX+vieB26c+tSUjYvFBQ+TpD8WaD ulcWBn+0WYjNJ1CM8EdIYy/kK5CsO6ZS9DC3LIxQ1YhEeqKkNRfz3ouA1v5DTkUKoxu0A zHggsQZOtEATVzraGik8kiW9UQdKyxNa9gA= X-ZohoMail-DKIM: pass (identity @groups.io) X-ZM-MESSAGEID: 1665393693545100005 Content-Type: text/plain; charset="utf-8" From: Pierre Gondois For Pcc address space, the AccessSize field of a Register is used to delcare the Pcc Subspace Id. This Id can be up to 256. Cf. ACPI 6.4, s14.7 Referencing the PCC address space Signed-off-by: Pierre Gondois --- .../Library/Common/AmlLib/CodeGen/AmlResourceDataCodeGen.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/DynamicTablesPkg/Library/Common/AmlLib/CodeGen/AmlResourceData= CodeGen.c b/DynamicTablesPkg/Library/Common/AmlLib/CodeGen/AmlResourceDataC= odeGen.c index 332962bed441..3901b6e47333 100644 --- a/DynamicTablesPkg/Library/Common/AmlLib/CodeGen/AmlResourceDataCodeGen= .c +++ b/DynamicTablesPkg/Library/Common/AmlLib/CodeGen/AmlResourceDataCodeGen= .c @@ -1257,7 +1257,12 @@ AmlCodeGenRdRegister ( AML_DATA_NODE *RdNode; EFI_ACPI_GENERIC_REGISTER_DESCRIPTOR RdRegister; =20 - if ((AccessSize > EFI_ACPI_6_4_QWORD) || + // Cf Cf. ACPI 6.4, s14.7 Referencing the PCC address space + // The AccessSize represents the Subspace Id for the PCC address space. + if (((AddressSpace =3D=3D EFI_ACPI_6_3_PLATFORM_COMMUNICATION_CHANNEL) && + (AccessSize > 256)) || + ((AddressSpace !=3D EFI_ACPI_6_3_PLATFORM_COMMUNICATION_CHANNEL) && + (AccessSize > EFI_ACPI_6_4_QWORD)) || ((NameOpNode =3D=3D NULL) && (NewRdNode =3D=3D NULL))) { ASSERT (0); --=20 2.25.1 -=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D- Groups.io Links: You receive all messages sent to this group. View/Reply Online (#94893): https://edk2.groups.io/g/devel/message/94893 Mute This Topic: https://groups.io/mt/94232531/1787277 Group Owner: devel+owner@edk2.groups.io Unsubscribe: https://edk2.groups.io/g/devel/unsub [importer@patchew.org] -=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D- From nobody Thu May 9 10:47:23 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of groups.io designates 66.175.222.108 as permitted sender) client-ip=66.175.222.108; envelope-from=bounce+27952+94894+1787277+3901457@groups.io; helo=mail02.groups.io; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of groups.io designates 66.175.222.108 as permitted sender) smtp.mailfrom=bounce+27952+94894+1787277+3901457@groups.io; dmarc=fail(p=none dis=none) header.from=arm.com ARC-Seal: i=1; a=rsa-sha256; t=1665393692; cv=none; d=zohomail.com; s=zohoarc; b=YJd8lVK9upZqibXBTfAKz62OTqAtD4V+lgVic5vA0XWGFol7GRdjxg+TWWgHqyXW4fPSXZXC9ocsHMXJN+JP50riIj05aqjf+brtsopSu371KC+7BGdfVyd4ojCjCuAvYWEXOaOirNIWS8DJ5uM5mxc9zEbxwZNWkUllLPXz/rw= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1665393692; h=Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Id:List-Help:List-Unsubscribe:MIME-Version:Message-ID:Reply-To:References:Sender:Subject:To; bh=LYC6nr9WUWONmcA0xgLyfW7oqaCE3B7D3Y7+D2wHPvI=; b=fm9tOgboXRMGrU8q7m+es/qGES2yCP4w777OM8v0J5bUuhPH/IgCL7CagoDCFPAbh28gy/ZoA4STEVgyGFTDs4b+YmsBj/OGJaI6YQnAzm3SLwD2GEC+dUaFFbiG1k4WrLucTWhOOqu/HqW3YmFDRDQra8fXN7lrkYFlt4o3wk0= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of groups.io designates 66.175.222.108 as permitted sender) smtp.mailfrom=bounce+27952+94894+1787277+3901457@groups.io; dmarc=fail header.from= (p=none dis=none) Received: from mail02.groups.io (mail02.groups.io [66.175.222.108]) by mx.zohomail.com with SMTPS id 1665393692243744.2170595839837; Mon, 10 Oct 2022 02:21:32 -0700 (PDT) Return-Path: X-Received: by 127.0.0.2 with SMTP id 4WXRYY1788612xPcUmI33ZBs; Mon, 10 Oct 2022 02:21:31 -0700 X-Received: from foss.arm.com (foss.arm.com [217.140.110.172]) by mx.groups.io with SMTP id smtpd.web09.4233.1665393691151575587 for ; Mon, 10 Oct 2022 02:21:31 -0700 X-Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.121.207.14]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id 1588C1480; Mon, 10 Oct 2022 02:21:37 -0700 (PDT) X-Received: from pierre123.arm.com (unknown [10.57.34.234]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPA id 173BC3F792; Mon, 10 Oct 2022 02:21:29 -0700 (PDT) From: "PierreGondois" To: devel@edk2.groups.io Cc: Sami Mujawar , Alexei Fedorov Subject: [edk2-devel] [PATCH 13/14] DynamicTablesPkg: Readme.md: Update available tables for generation Date: Mon, 10 Oct 2022 11:20:57 +0200 Message-Id: <20221010092058.118714-14-Pierre.Gondois@arm.com> In-Reply-To: <20221010092058.118714-1-Pierre.Gondois@arm.com> References: <20221010092058.118714-1-Pierre.Gondois@arm.com> MIME-Version: 1.0 Precedence: Bulk List-Unsubscribe: List-Subscribe: List-Help: Sender: devel@edk2.groups.io List-Id: Mailing-List: list devel@edk2.groups.io; contact devel+owner@edk2.groups.io Reply-To: devel@edk2.groups.io,pierre.gondois@arm.com X-Gm-Message-State: vfW7RVoOcAcd6qczaAaj1mtZx1787277AA= Content-Transfer-Encoding: quoted-printable DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=groups.io; q=dns/txt; s=20140610; t=1665393691; bh=m7Y6nUdV1xe8SVb9ok/xLH2PC05uML//iNnXZ3sRNjA=; h=Cc:Date:From:Reply-To:Subject:To; b=DJbbaa+SMGD6km6jyneZcnfpi5ZhOGAXX0k+7ZWo4YHcHA1GCoWwdNXsPU2S5/4LnyS l0YnRFrHtn8Jl97aYxoChuL+MOOtAO1ZjJkzeGVDR1r5fp78Rad1o/bJH3o++jFXJFP/A 7055hEMa3Cp27hHUfJubkoCUiiUTQrU8ldo= X-ZohoMail-DKIM: pass (identity @groups.io) X-ZM-MESSAGEID: 1665393693564100008 Content-Type: text/plain; charset="utf-8" From: Pierre Gondois The following tables can now be generated by the DynamicTablesPkg: - PCCT - PPTT - SRAT Update the documentation accordingly. Signed-off-by: Pierre Gondois Reviewed-by: Sami Mujawar --- DynamicTablesPkg/Readme.md | 3 +++ 1 file changed, 3 insertions(+) diff --git a/DynamicTablesPkg/Readme.md b/DynamicTablesPkg/Readme.md index 5f92d4c6cb2e..6b0a6c7a4001 100644 --- a/DynamicTablesPkg/Readme.md +++ b/DynamicTablesPkg/Readme.md @@ -53,7 +53,10 @@ The framework currently supports the following table gen= erators for ARM: * MADT - Multiple APIC Description Table * MCFG - PCI Express memory mapped configuration space base address Description Table +* PCCT - Platform Communications Channel Table +* PPTT - Processor Properties Topology Table * SPCR - Serial Port Console Redirection Table +* SRAT - System Resource Affinity Table * SSDT - Secondary System Description Table. This is essentially a RAW table generator. =20 --=20 2.25.1 -=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D- Groups.io Links: You receive all messages sent to this group. View/Reply Online (#94894): https://edk2.groups.io/g/devel/message/94894 Mute This Topic: https://groups.io/mt/94232532/1787277 Group Owner: devel+owner@edk2.groups.io Unsubscribe: https://edk2.groups.io/g/devel/unsub [importer@patchew.org] -=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D- From nobody Thu May 9 10:47:23 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of groups.io designates 66.175.222.108 as permitted sender) client-ip=66.175.222.108; envelope-from=bounce+27952+94895+1787277+3901457@groups.io; helo=mail02.groups.io; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of groups.io designates 66.175.222.108 as permitted sender) smtp.mailfrom=bounce+27952+94895+1787277+3901457@groups.io; dmarc=fail(p=none dis=none) header.from=arm.com ARC-Seal: i=1; a=rsa-sha256; t=1665393693; cv=none; d=zohomail.com; s=zohoarc; b=fV7TQw76K7qLuB3010emfg1I6y/dc6FRPzxilw0oFZ/jLoB/lEQzPjQJjEnn4Xw+B+b+ETEbM0ZTXBPTlY4RDUZ1HGKrJ+fIbxy6MWAvbiEmnQWcjDk7JH1H5Y8PgF6VbV3PBCZ2ve/oXc6+vuYxJtJbJQVEWy7KzQobB7cIqEw= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1665393693; h=Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Id:List-Help:List-Unsubscribe:MIME-Version:Message-ID:Reply-To:References:Sender:Subject:To; bh=7bSoYLgRu0LCBkGRqjbd2ZWzj+CYmNk3J4T8TWBLQbI=; b=MpyO56NWbk0FkB+TzMhv8/Mex7tG0cmpMP7FdERdPn+Qj54tA4eTJ92ecGICGot4RRiQwT+ihjw0KrKwLnJleP+juliZh6xYULWsXsLkUPnj5UhlA3Yw1nPdcVwMDVypsu0nyphlyiC2qB25hUlXoPRwx41xY5o35bjj+B3ouIs= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of groups.io designates 66.175.222.108 as permitted sender) smtp.mailfrom=bounce+27952+94895+1787277+3901457@groups.io; dmarc=fail header.from= (p=none dis=none) Received: from mail02.groups.io (mail02.groups.io [66.175.222.108]) by mx.zohomail.com with SMTPS id 16653936931511012.6541807614678; Mon, 10 Oct 2022 02:21:33 -0700 (PDT) Return-Path: X-Received: by 127.0.0.2 with SMTP id 1HXYYY1788612xDkR2622zdm; Mon, 10 Oct 2022 02:21:32 -0700 X-Received: from foss.arm.com (foss.arm.com [217.140.110.172]) by mx.groups.io with SMTP id smtpd.web11.4226.1665393692122498598 for ; Mon, 10 Oct 2022 02:21:32 -0700 X-Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.121.207.14]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id 173F31AED; Mon, 10 Oct 2022 02:21:38 -0700 (PDT) X-Received: from pierre123.arm.com (unknown [10.57.34.234]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPA id 238DE3F792; Mon, 10 Oct 2022 02:21:31 -0700 (PDT) From: "PierreGondois" To: devel@edk2.groups.io Cc: Sami Mujawar , Alexei Fedorov Subject: [edk2-devel] [PATCH 14/14] ShellPkg/AcpiView: Update PCCT fields for ACPI 6.5 Date: Mon, 10 Oct 2022 11:20:58 +0200 Message-Id: <20221010092058.118714-15-Pierre.Gondois@arm.com> In-Reply-To: <20221010092058.118714-1-Pierre.Gondois@arm.com> References: <20221010092058.118714-1-Pierre.Gondois@arm.com> MIME-Version: 1.0 Precedence: Bulk List-Unsubscribe: List-Subscribe: List-Help: Sender: devel@edk2.groups.io List-Id: Mailing-List: list devel@edk2.groups.io; contact devel+owner@edk2.groups.io Reply-To: devel@edk2.groups.io,pierre.gondois@arm.com X-Gm-Message-State: lK6knEYPIKcDWV4U6uGV0RYnx1787277AA= Content-Transfer-Encoding: quoted-printable DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=groups.io; q=dns/txt; s=20140610; t=1665393692; bh=nnYkZbaAfy6CCZFNqmMbo+7OwvIe6Q6KvcaU3WV7NsA=; h=Cc:Date:From:Reply-To:Subject:To; b=XEpLoBA0t/dYhu7dtDyb+aw5r1sarE5r0SJWTeHt2mgoyL9ZZ8BZ8u74ic44F94kqEN 7SOgHQATsOCLR5KL4QSSu1dqhcDeA3pNNMEoE1Idkq18BwdYA/OmR/OPqaKDcuNC+YR6H FqmLKv/I13gLEhHJ7aHDhcCCxZPdkvf7oSo= X-ZohoMail-DKIM: pass (identity @groups.io) X-ZM-MESSAGEID: 1665393693569100010 Content-Type: text/plain; charset="utf-8" From: Pierre Gondois The ACPI specification updated some terms in accordance with: s1.1.1 Principle of Inclusive Terminology Update the PCCT parser accordincly with these new terms. Cc: Ray Ni Cc: Zhichao Gao Signed-off-by: Pierre Gondois Reviewed-by: Sami Mujawar --- .../UefiShellAcpiViewCommandLib/Parsers/Pcct/PcctParser.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/ShellPkg/Library/UefiShellAcpiViewCommandLib/Parsers/Pcct/Pcct= Parser.c b/ShellPkg/Library/UefiShellAcpiViewCommandLib/Parsers/Pcct/PcctPa= rser.c index 8cffdaaf0716..8ad39090afe3 100644 --- a/ShellPkg/Library/UefiShellAcpiViewCommandLib/Parsers/Pcct/PcctParser.c +++ b/ShellPkg/Library/UefiShellAcpiViewCommandLib/Parsers/Pcct/PcctParser.c @@ -146,7 +146,7 @@ ValidatePccDoorbellGas ( IN VOID *Context ) { - // For slave subspaces this field is optional, if not present the field + // For responder subspaces this field is optional, if not present the fi= eld // should just contain zeros. if (*PccSubspaceType =3D=3D EFI_ACPI_6_4_PCCT_SUBSPACE_TYPE_4_EXTENDED_P= CC) { if (IsZeroBuffer ( @@ -214,7 +214,7 @@ ValidatePccErrStatusGas ( IN VOID *Context ) { - // This field is ignored by the OSPM on slave channels. + // This field is ignored by the OSPM on responder channels. if (*PccSubspaceType =3D=3D EFI_ACPI_6_4_PCCT_SUBSPACE_TYPE_4_EXTENDED_P= CC) { return; } @@ -237,7 +237,7 @@ ValidatePlatInterrupt ( IN VOID *Context ) { - // If a slave subspace is present in the PCCT, then the global Platform + // If a responder subspace is present in the PCCT, then the global Platf= orm // Interrupt flag must be set to 1. if ((*PccSubspaceType =3D=3D EFI_ACPI_6_4_PCCT_SUBSPACE_TYPE_4_EXTENDED_= PCC) && ((*PccGlobalFlags & EFI_ACPI_6_4_PCCT_FLAGS_PLATFORM_INTERRUPT) !=3D --=20 2.25.1 -=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D- Groups.io Links: You receive all messages sent to this group. View/Reply Online (#94895): https://edk2.groups.io/g/devel/message/94895 Mute This Topic: https://groups.io/mt/94232533/1787277 Group Owner: devel+owner@edk2.groups.io Unsubscribe: https://edk2.groups.io/g/devel/unsub [importer@patchew.org] -=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-