From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from EUR05-AM6-obe.outbound.protection.outlook.com (EUR05-AM6-obe.outbound.protection.outlook.com [40.107.22.62]) by mx.groups.io with SMTP id smtpd.web08.17568.1664795877517738326 for ; Mon, 03 Oct 2022 04:17:58 -0700 Authentication-Results: mx.groups.io; dkim=pass header.i=@armh.onmicrosoft.com header.s=selector2-armh-onmicrosoft-com header.b=bw64nl+k; spf=pass (domain: arm.com, ip: 40.107.22.62, mailfrom: sami.mujawar@arm.com) ARC-Seal: i=2; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=pass; b=V9zYbfE4PABODnu3QCxn18DGHppn6YVXp7l13I/Gz2mdTM3qrw3JD+qF1kPykiCmjjYKVs5UtJSNWrfEJj9QZJpT8xo/Is8uOnHRUbUMMi56ANaCDNOa6opql/Hv5yzd8NpYvvzNZjVIzVXlOvRg+g0IE3tJN9Nz2UNwJFDuxjyGXkwqHePKXMw4IYdpVmWynfp7XZxkyEv1uyqd34hZF2FWFUbH2zJXqeQMlaMB8AeX2eG+H4aqHx24dyIFnGR+Y5Z9V61c5tXnGCCICP7+Pkp9b5AknIAKJV2Jkt+bq9UUgiWJiuVKt1dsytHNFvfzJ/2WyEME+x2lvCJ5EdiYZA== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=urD5Qund57ewk9O/End2YSp0TIFmGNnrG999nPQWW5k=; b=ON1bmTsgG7DuSrGSoc1O1XMVP3uOjRGkpSCNOspbuHDSG2lNQur9+fLrIjXOQ3eHWhW3a2FVMK7YXAFwp1Vue/7RrzLnOEJ1K7uI+2rq8IzHXCuKuHHg0YLDxJEJSXmmMuEdoqnhenoB9d5Txn8he+v8j6h9lm8bnp/o+UHiToOpq8c8nHnnh/XswD1fQxG669gXTR3+50k68YOZAc7JjNmQEC4HPAUl90zblvvV8Tx7CKeQvpZkg1uUOQIZ6ha7B9Kn077dcI5ms3GdsIxAn4H6JiO44lN8kYv3o6HZP19VJicUBN8BM32pm9SPylwltVAYTfIjp2tzZKCwfOMRFg== ARC-Authentication-Results: i=2; mx.microsoft.com 1; spf=pass (sender ip is 63.35.35.123) smtp.rcpttodomain=edk2.groups.io smtp.mailfrom=arm.com; dmarc=pass (p=none sp=none pct=100) action=none header.from=arm.com; dkim=pass (signature was verified) header.d=armh.onmicrosoft.com; arc=pass (0 oda=1 ltdi=1 spf=[1,1,smtp.mailfrom=arm.com] dkim=[1,1,header.d=arm.com] dmarc=[1,1,header.from=arm.com]) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=armh.onmicrosoft.com; s=selector2-armh-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=urD5Qund57ewk9O/End2YSp0TIFmGNnrG999nPQWW5k=; b=bw64nl+kCAUqjIb6OVLMiBLyiwylC8wnbMm3wal+8ii45UojkiINNYTsrJ/mraV3PQrtLFh2kfom94itxoV7OY0Z1xDhRPKrScLGBxb2K5ZDXzpXwLKkUDxwFbPPfDG0g/YkrT32n9rLsjgvw/fYDtz4uulmBMxW4RXU62RL1rw= Received: from AS9PR04CA0108.eurprd04.prod.outlook.com (2603:10a6:20b:50e::25) by PAVPR08MB8967.eurprd08.prod.outlook.com (2603:10a6:102:326::5) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5676.23; Mon, 3 Oct 2022 11:17:46 +0000 Received: from AM7EUR03FT051.eop-EUR03.prod.protection.outlook.com (2603:10a6:20b:50e:cafe::43) by AS9PR04CA0108.outlook.office365.com (2603:10a6:20b:50e::25) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5676.30 via Frontend Transport; Mon, 3 Oct 2022 11:17:46 +0000 X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 63.35.35.123) smtp.mailfrom=arm.com; dkim=pass (signature was verified) header.d=armh.onmicrosoft.com;dmarc=pass action=none header.from=arm.com; Received-SPF: Pass (protection.outlook.com: domain of arm.com designates 63.35.35.123 as permitted sender) receiver=protection.outlook.com; client-ip=63.35.35.123; helo=64aa7808-outbound-1.mta.getcheckrecipient.com; pr=C Received: from 64aa7808-outbound-1.mta.getcheckrecipient.com (63.35.35.123) by AM7EUR03FT051.mail.protection.outlook.com (100.127.140.64) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5676.17 via Frontend Transport; Mon, 3 Oct 2022 11:17:45 +0000 Received: ("Tessian outbound c2c2da38ad67:v128"); Mon, 03 Oct 2022 11:17:45 +0000 X-CheckRecipientChecked: true X-CR-MTA-CID: 95e3014d0811070f X-CR-MTA-TID: 64aa7808 Received: from 4cf255eeab8c.2 by 64aa7808-outbound-1.mta.getcheckrecipient.com id ADABC7E7-EEB0-4FF0-A5BE-B7FBDDC6F6F6.1; Mon, 03 Oct 2022 11:17:35 +0000 Received: from EUR04-VI1-obe.outbound.protection.outlook.com by 64aa7808-outbound-1.mta.getcheckrecipient.com with ESMTPS id 4cf255eeab8c.2 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384); Mon, 03 Oct 2022 11:17:35 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=YYHCs2m1OehF5e6nFTuQvTYArEWtUJkdm+0ymzA0GSA9aI2NYxKwihWnKy5WNyb+QgccIIxT30/GaJtJWlLRX/RAsAhCx6yEHE4Q+C+4aZb5369QckuNlTgX+UuvkA6ZmVjBN6xFQKMzBE3rZmPaCncz1NL3YXU9voCubdLaG0T40Iw1JyX6lXUJnvR+tc9DejbwfDbYgPzcWuX7m7JwiQkovxJAB0RP+A9q3wy1EHAeHqwJTp/ywl8KGz/kD8xmoxlMyhJ6E8WY23dLDgiRlj7wgu9lmwhwnxipMwoEFEcHaKdYrVjqiWEUgz8BI7rXodyW/jHjM4nEsZ8pRc5p0g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=urD5Qund57ewk9O/End2YSp0TIFmGNnrG999nPQWW5k=; b=aahcQX+DUiMoc2tm7fniSE2TxSBZf/0N334TNiwVbBK6wt3Qaduw0LGOlSSH41IeXDyAgfOvhq1mUXdxFQ1+61vBHYGVfiU+ifCOeeTRp1nGj6vHNZBfO6VcedA9sxTrei8sqa+dQll3Mfhje+P6MGgeewgMdl8CJSjRDx7AIqfa9wgofXKIiVxd1jotlZHcRNpuwzaEMBKReAG+SFr4jN9t44d9kvjsdQ/Qomm6J3Zqk3bUtUGUXK5SBShfulhzqu3XOeqqzOFT9uiybb5WqVK5I+m7WIPTyeyShj0TRIEHV9CjWjJrfr5vkTKig2rb65N7E8gzAO4m2h7B6bOrZA== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=arm.com; dmarc=pass action=none header.from=arm.com; dkim=pass header.d=arm.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=armh.onmicrosoft.com; s=selector2-armh-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=urD5Qund57ewk9O/End2YSp0TIFmGNnrG999nPQWW5k=; b=bw64nl+kCAUqjIb6OVLMiBLyiwylC8wnbMm3wal+8ii45UojkiINNYTsrJ/mraV3PQrtLFh2kfom94itxoV7OY0Z1xDhRPKrScLGBxb2K5ZDXzpXwLKkUDxwFbPPfDG0g/YkrT32n9rLsjgvw/fYDtz4uulmBMxW4RXU62RL1rw= Authentication-Results-Original: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=arm.com; Received: from AS8PR08MB6806.eurprd08.prod.outlook.com (2603:10a6:20b:39b::12) by AS8PR08MB6006.eurprd08.prod.outlook.com (2603:10a6:20b:29a::24) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5676.24; Mon, 3 Oct 2022 11:17:33 +0000 Received: from AS8PR08MB6806.eurprd08.prod.outlook.com ([fe80::283c:fe2e:699d:2bf]) by AS8PR08MB6806.eurprd08.prod.outlook.com ([fe80::283c:fe2e:699d:2bf%4]) with mapi id 15.20.5676.030; Mon, 3 Oct 2022 11:17:32 +0000 Message-ID: <1c2b4e97-babb-988b-1fff-78d1ba20eb59@arm.com> Date: Mon, 3 Oct 2022 12:17:28 +0100 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:102.0) Gecko/20100101 Thunderbird/102.3.0 Subject: Re: [PATCH 1/2] Mde Pkg: Support for MPAM ACPI Table To: Swatisri Kantamsetti , Name , devel@edk2.groups.io, Alexei.Fedorov@arm.com, michael.d.kinney@intel.com, gaoliming@byosoft.com.cn, zhiguang.liu@intel.com Cc: "nd@arm.com" , Rohit Mathew , Thanu.Rangarajan@arm.com References: <7f8a5c9bbdf1a1f01c6fc822fa298067d280079a.1660667637.git.swatisrik@nvidia.com> From: "Sami Mujawar" In-Reply-To: <7f8a5c9bbdf1a1f01c6fc822fa298067d280079a.1660667637.git.swatisrik@nvidia.com> X-ClientProxiedBy: LO2P265CA0324.GBRP265.PROD.OUTLOOK.COM (2603:10a6:600:a4::24) To AS8PR08MB6806.eurprd08.prod.outlook.com (2603:10a6:20b:39b::12) MIME-Version: 1.0 X-MS-TrafficTypeDiagnostic: AS8PR08MB6806:EE_|AS8PR08MB6006:EE_|AM7EUR03FT051:EE_|PAVPR08MB8967:EE_ X-MS-Office365-Filtering-Correlation-Id: 208e92bd-6f0f-4af1-e32f-08daa530e5d4 x-checkrecipientrouted: true NoDisclaimer: true X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam-Untrusted: BCL:0; X-Microsoft-Antispam-Message-Info-Original: RVVLfU9JRDzZN63bm1QAOMUaacGGxcWUz93XGHBmmWEUhPgj0kGEJr6EUTgXc0mDpxIUEiLkcmCzAhZ01s922Oe6kIrSFEHUOEU2AReH+nZV6Nf2eg1o4ZC323Kgtb071S+37+umLy/RdmbU2tBkqveKREvOt6MNCLr6oMLCp3t6POPVj9UhLAVvxmRerCo+A1LU7vOKaJvLcqen0KdztFB7GltABii3PnYTGdb9edi6DT+XMT6WcCtqMFk9wIUic7BAt7wMHEYwvkd4PBYBIl298U6q5/ND50jThht9O6xa/oEuf2tJHe6+AhQmbX0lYyudPKvmhM0jYafWll18/qa4bz4N5qx3j9nVU4OCjHtvrYr5jzERIT2ZJ+K+N2d9rGYzUFqvVKtUz8eaBRgS2e7zRyvVVOYn2ra143FlQg7QbMe9RunDDtFDFxtxgGuu4stFa+HbRT4ihCPEGHA4/DOk08D0fY01ed9tqOT+G12PiddrSqj/iIhlkZOAbVeqTPHyyHYaKig8WP1dOo5E3b4AEfrDUQrl+/28k7UttT5U1HueS9EgF7uJC+oofSZEXATx0TtjLXsLjrqniTyULm1HHUEm/ow+IiULFlrI08YCqz9BXY1TuIJTxFugpmv0lngFBfPHYJ+RV55KBHWAEYUO6QcaDaBifuYF9bTYkgBQM2XG44aEbHCsy8JRZdehXIfpSGKaAOgQ8UeqHEUtMKV14XHz7Bcc2W225m6ZHqj4dVrfkqb9DhtR6Kau/CCLHFgcwO60gAtIX5KUTDEHKV01Q0l1D3UMAyR7PHMAx/sYiy/GjXS4Ywea0yvLzjhZjRfJ3UtypEPhN64uxG7QhA== X-Forefront-Antispam-Report-Untrusted: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:AS8PR08MB6806.eurprd08.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230022)(4636009)(396003)(346002)(376002)(39860400002)(366004)(136003)(451199015)(316002)(166002)(66476007)(8676002)(19627235002)(478600001)(66556008)(38100700002)(4326008)(186003)(6486002)(66946007)(966005)(6506007)(33964004)(53546011)(6512007)(2616005)(6666004)(54906003)(26005)(36756003)(31696002)(110136005)(83380400001)(86362001)(31686004)(8936002)(30864003)(5660300002)(44832011)(41300700001)(2906002)(45980500001)(43740500002);DIR:OUT;SFP:1101; X-MS-Exchange-Transport-CrossTenantHeadersStamped: AS8PR08MB6006 Original-Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=arm.com; Return-Path: Sami.Mujawar@arm.com X-EOPAttributedMessage: 0 X-MS-Exchange-Transport-CrossTenantHeadersStripped: AM7EUR03FT051.eop-EUR03.prod.protection.outlook.com X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id-Prvs: 8efc7263-dceb-4b6a-6500-08daa530dd16 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: eYsDaFkQgZNzisswXD6hqieFAqdcvQhg1fX0qXgBetRvgXUYVUbw60y6KGa899zvupNLUFqIxZyaQaazoUJGOkSlN7hPga90HR875txqqtiJjba3MQS3TZUmdUzPFihSima/G2UUpANvnw9zsyua7Q6xLV9u+nu9K8sdm59qzWIrz6lg5xCrQPn10SdrmHs+NTc2abXSQV6Ler2SJVq8jCPIRsO+ryE2L5yMkcww56qUjGw0sj9fT4phMUrcnaQ3U6b2ncQ/SSDgXmjIMwySY3qNuvuell02nINgST+AREwdl24Jt8sftbj954nQEqmrRo9+ohvlQoCv4HR8S6CfE1bgxPWcv0yDQFeiTprD3LvCng5f+pxqgpp/7JHYaUcwLmMhyUUMYgh6t7/HzMyKTpmdA3cQEfozVFzBcL38DG1hbGgdwOGo81+5kMb0swKXdFGsELmBWVT7tb5+2Qn1gT0tmUUiIAdk1YoQfbf4t34RJQFW218vcYm3lDqH/HZSiobjIjUuBgqMACfe9/b48MzcKoZMLr+59znj9NgATAaP14/kaFQ253zcIgPLVrAxug8qtvPxdDaICILCE8C/eNsFi2awkM86YwdlFl6gawsXCgFD4ruGsf0KQl3G2+EtAGb+1JQr4s4yhR4OgnO78WP+S/I9WmXcmfRY0WkGw88vpxj3avZuGDzA6omVsU6Gse1hdA+FaxMi4ttu+pmWklde+hftyTfjZ0zPD/FlU5HVpcJ5dzwl3L4uysOJ3gPcn58+rM/tJyiQtjGMGFmKo3p8zyWZlbkfsX1jYeqe/WA5wz1ozD+rSmDCa5MGCi5hKkLTQIOLk6QgunaMFe83uw== X-Forefront-Antispam-Report: CIP:63.35.35.123;CTRY:IE;LANG:en;SCL:1;SRV:;IPV:CAL;SFV:NSPM;H:64aa7808-outbound-1.mta.getcheckrecipient.com;PTR:ec2-63-35-35-123.eu-west-1.compute.amazonaws.com;CAT:NONE;SFS:(13230022)(4636009)(346002)(39860400002)(136003)(376002)(396003)(451199015)(36840700001)(40470700004)(46966006)(36860700001)(40480700001)(36756003)(31696002)(86362001)(356005)(82740400003)(70206006)(8676002)(81166007)(166002)(40460700003)(70586007)(4326008)(82310400005)(54906003)(316002)(2906002)(186003)(110136005)(19627235002)(47076005)(8936002)(41300700001)(30864003)(44832011)(336012)(5660300002)(83380400001)(2616005)(53546011)(966005)(6486002)(478600001)(26005)(6512007)(6506007)(33964004)(6666004)(31686004)(43740500002);DIR:OUT;SFP:1101; X-OriginatorOrg: arm.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 03 Oct 2022 11:17:45.8512 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 208e92bd-6f0f-4af1-e32f-08daa530e5d4 X-MS-Exchange-CrossTenant-Id: f34e5979-57d9-4aaa-ad4d-b122a662184d X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=f34e5979-57d9-4aaa-ad4d-b122a662184d;Ip=[63.35.35.123];Helo=[64aa7808-outbound-1.mta.getcheckrecipient.com] X-MS-Exchange-CrossTenant-AuthSource: AM7EUR03FT051.eop-EUR03.prod.protection.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: PAVPR08MB8967 Content-Type: multipart/alternative; boundary="------------QiKLiJXN64HKcejQGxFZl57N" --------------QiKLiJXN64HKcejQGxFZl57N Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit Hi Swatisri, Apologies for the delay in feedback. There is a new version of "ACPI for Memory System Resource Partitioning and Monitoring 2.0, Platform Design Document" published on 2022/Sep/30 at https://developer.arm.com/documentation/den0065/latest. The version 2.0 of ACPI MPAM table has a few errata fixes and some new additions. Therefore, the version 1.0 of the ACPI MPAM table stands deprecated and must not be used. I would therefore suggest that this patch is updated to reflect ACPI MPAM table version 2.0. I also have some feedback below that would still apply. Regards, Sami Mujawar On 16/08/2022 09:18 pm, Name wrote: > From: Swatisri Kantamsetti > > Added MPAM table header, MSC and Resource Node > info structures > > Signed-off-by: Swatisri Kantamsetti > --- > MdePkg/Include/IndustryStandard/Acpi64.h | 5 ++ > MdePkg/Include/IndustryStandard/Mpam.h | 69 ++++++++++++++++++++++++ > 2 files changed, 74 insertions(+) > create mode 100644 MdePkg/Include/IndustryStandard/Mpam.h > > diff --git a/MdePkg/Include/IndustryStandard/Acpi64.h b/MdePkg/Include/IndustryStandard/Acpi64.h > index fe5ebfac2b..e54f631186 100644 > --- a/MdePkg/Include/IndustryStandard/Acpi64.h > +++ b/MdePkg/Include/IndustryStandard/Acpi64.h > @@ -2952,6 +2952,11 @@ typedef struct { > /// > #define EFI_ACPI_6_4_PROCESSOR_PROPERTIES_TOPOLOGY_TABLE_STRUCTURE_SIGNATURE SIGNATURE_32('P', 'P', 'T', 'T') > > +/// > +/// "MPAM" Memory System Resource Partitioning And Monitoring Table > +/// > +#define EFI_ACPI_6_4_MEMORY_SYSTEM_RESOURCE_PARTITIONING_MONITORING_TABLE_STRUCTURE_SIGNATURE SIGNATURE_32('M', 'P', 'A', 'M') > + > /// > /// "PSDT" Persistent System Description Table > /// > diff --git a/MdePkg/Include/IndustryStandard/Mpam.h b/MdePkg/Include/IndustryStandard/Mpam.h > new file mode 100644 > index 0000000000..e0f75f0114 > --- /dev/null > +++ b/MdePkg/Include/IndustryStandard/Mpam.h > @@ -0,0 +1,69 @@ > +/** @file > + ACPI Memory System Resource Partitioning And Monitoring (MPAM) > + as specified in ARM spec DEN0065 > + > + Copyright (c) 2022, NVIDIA CORPORATION. All rights reserved. > + Copyright (c) 2022, ARM Limited. All rights reserved. > + SPDX-License-Identifier: BSD-2-Clause-Patent [SAMI] Please add a '@par Specification Reference:' section as shown in https://edk2-docs.gitbook.io/edk-ii-c-coding-standards-specification/5_source_files/53_include_files#5.3.7-include-files-shall-not-generate-code-or-define-data-variables. e.g. @par Specification Reference: - [1] ACPI for Memory System Resource Partitioning and Monitoring 2.0, Platform Design Document          (https://developer.arm.com/documentation/den0065/latest) [/SAMI] > +**/ > + > +#ifndef _MPAM_H_ > +#define _MPAM_H_ [SAMI] I think the leading underscore should not be present, see https://edk2-docs.gitbook.io/edk-ii-c-coding-standards-specification/4_naming_conventions/43_identifiers#4.3.5.4-the-names-of-guard-macros-shall-end-with-an-underscore-character. > + > +#pragma pack(1) > + > +/// > +/// Memory System Resource Partitioning and Monitoring Table (MPAM) > +/// > +typedef struct { > + EFI_ACPI_DESCRIPTION_HEADER Header; > + UINT32 NumNodes; > + UINT32 NodeOffset; > + UINT32 Reserved; [SAMI] I do not see the NumNodes, NodeOffset and the Reserved filed in the specification. Can you check, please? > +} EFI_ACPI_6_4_MEMORY_SYSTEM_RESOURCE_PARTITIONING_MONITORING_TABLE_HEADER; [SAMI] I think the infix '_6_4_' is not going to work, as the ACPI MPAM table specification is not going to be in sync with the ACPI specification revision. So, this can be dropped. Also, it may be better to add a @glossary section in the file header describing the MPAM acronym and abbreviate the structure names to EFI_ACPI_MPAM_TABLE_HEADER. The macro describing the table revision can also follow a similar approach. [/SAMI] > + > +/// > +/// MPAM Revision (as defined in ACPI 6.4 spec.) [SAMI] I believe this should be (a defined by the 'ACPI for Memory System Resource Partitioning and Monitoring, Platform Design Document'). Or simply refer it as '(as defined by [1])'. > +/// > +#define EFI_ACPI_6_4_MEMORY_SYSTEM_RESOURCE_PARTITIONING_MONITORING_TABLE_REVISION 0x01 [SAMI] Please move this definition before the definition of EFI_ACPI_6_4_MEMORY_SYSTEM_RESOURCE_PARTITIONING_MONITORING_TABLE_HEADER. The ACPI MPAM 1.0 table revision was 0. But for ACPI MPAM table 2.0 the revision is 1, so there is no need to change. > + > +/// > +/// Memory System Controller Node Structure > +/// > + > +typedef struct { > + UINT16 Length; > + UINT16 Reserved; [SAMI] ACPI MPAM 2.0 introduces splits the Reserved field to introduce 'Interface type'. > + UINT32 Identifier; > + UINT64 BaseAddress; > + UINT32 MmioSize; > + UINT32 OverflowInterrupt; > + UINT32 OverflowInterruptFlags; > + UINT32 Reserved1; > + UINT32 OverflowInterruptAff; > + UINT32 ErrorInterrupt; > + UINT32 ErrorInterruptFlags; > + UINT32 Reserved2; > + UINT32 ErrorInterruptAff; > + UINT32 MaxNRdyUsec; > + UINT64 LinkedDeviceHwId; > + UINT32 LinkedDeviceInstanceHwId; > + UINT32 NumResourceNodes; > +} EFI_ACPI_6_4_MPAM_MSC_NODE; > + > +/// > +/// Resource Node Structure > +/// > + > +typedef struct { > + UINT32 Identifier; > + UINT8 RisIndex; > + UINT16 Reserved1; > + UINT8 LocatorType; > + UINT64 Locator; [SAMI] Would it be possible to define a Locator structure with the first field as the LocatorType followed by a union of Locators type specific structures? > + UINT32 NumFuncDep; > +} EFI_ACPI_6_4_MPAM_RESOURCE_NODE; > + [SAMI] Do you have plans to add definitions for the other structures defined by the specifications, or the intention is to add them as required? Also, if possible, it would be good to add an ACPI MPAM table parser to Acpiview. [/SAMI] > +#pragma pack() > + > +#endif --------------QiKLiJXN64HKcejQGxFZl57N Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Hi Swatisri,

Apologies for the delay in feedback.

There is a new version of "ACPI for Memory System Resource Partitioning and Monitoring 2.0, Platform Design Document" publish= ed on 2022/Sep/30 at https://developer.arm.com/documentation/den0065= /latest.

The version 2.0 of ACPI MPAM table has a few errata fixes and some new additions. Therefore, the version 1.0 of the ACPI MPAM table stands deprecated and must not be used.

I would therefore suggest that this patch is updated to reflect ACPI MPAM table version 2.0. I also have some feedback below that would still apply.

Regards,

Sami Mujawar

On 16/08/2022 09:18 pm, Name wrote:
From: Swatisri Kantamsetti <sw=
atisrik@nvidia.com>

Added MPAM table header, MSC and Resource Node
info structures

Signed-off-by: Swatisri Kantamsetti <swatisrik@nvidia.com>
---
 MdePkg/Include/IndustryStandard/Acpi64.h |  5 ++
 MdePkg/Include/IndustryStandard/Mpam.h   | 69 ++++++++++++++++++++++++
 2 files changed, 74 insertions(+)
 create mode 100644 MdePkg/Include/IndustryStandard/Mpam.h

diff --git a/MdePkg/Include/IndustryStandard/Acpi64.h b/MdePkg/Include/Indu=
stryStandard/Acpi64.h
index fe5ebfac2b..e54f631186 100644
--- a/MdePkg/Include/IndustryStandard/Acpi64.h
+++ b/MdePkg/Include/IndustryStandard/Acpi64.h
@@ -2952,6 +2952,11 @@ typedef struct {
 ///
 #define EFI_ACPI_6_4_PROCESSOR_PROPERTIES_TOPOLOGY_TABLE_STRUCTURE_SIGNATU=
RE  SIGNATURE_32('P', 'P', 'T', 'T')
=20
+///
+/// "MPAM" Memory System Resource Partitioning And Monitoring Ta=
ble
+///
+#define EFI_ACPI_6_4_MEMORY_SYSTEM_RESOURCE_PARTITIONING_MONITORING_TABLE_=
STRUCTURE_SIGNATURE  SIGNATURE_32('M', 'P', 'A', 'M')
+
 ///
 /// "PSDT" Persistent System Description Table
 ///
diff --git a/MdePkg/Include/IndustryStandard/Mpam.h b/MdePkg/Include/Indust=
ryStandard/Mpam.h
new file mode 100644
index 0000000000..e0f75f0114
--- /dev/null
+++ b/MdePkg/Include/IndustryStandard/Mpam.h
@@ -0,0 +1,69 @@
+/** @file
+  ACPI Memory System Resource Partitioning And Monitoring (MPAM)
+  as specified in ARM spec DEN0065
+
+  Copyright (c) 2022, NVIDIA CORPORATION. All rights reserved.
+  Copyright (c) 2022, ARM Limited. All rights reserved.
+  SPDX-License-Identifier: BSD-2-Clause-Patent

[SAMI] Please add a '@par Specification Reference:'  section as shown in https://edk= 2-docs.gitbook.io/edk-ii-c-coding-standards-specification/5_source_files/53= _include_files#5.3.7-include-files-shall-not-generate-code-or-define-data-v= ariables.

e.g.

@= par Specification Reference:

= - [1] ACPI for Memory System Resource Partitioning and Monitoring 2.0, Platform Design Document

         (https://developer.arm.com/documentation/den0065/latest)

[/SAMI]

+**/
+
+#ifndef _MPAM_H_
+#define _MPAM_H_
[SAMI] I think the leading underscore should not be present, see htt= ps://edk2-docs.gitbook.io/edk-ii-c-coding-standards-specification/4_naming_= conventions/43_identifiers#4.3.5.4-the-names-of-guard-macros-shall-end-with= -an-underscore-character.
+
+#pragma pack(1)
+
+///
+/// Memory System Resource Partitioning and Monitoring Table (MPAM)
+///
+typedef struct {
+  EFI_ACPI_DESCRIPTION_HEADER    Header;
+  UINT32                         NumNodes;
+  UINT32                         NodeOffset;
+  UINT32                         Reserved;
[SAMI] I do not see the NumNodes, NodeOffset and the Reserved filed in the specification. Can you check, please?
+} EFI_ACPI_6_4_MEMORY_SYSTEM_RESOURCE_PARTITIONING_MONITORING_TABLE_HEADER=
;

[SAMI] I think the infix '_6_4_' is not going to work, as the ACPI MPAM table specification is not going to be in sync with the ACPI specification revision. So, this can be dropped.

Also, it may be better to add a @glossary section in the file header describing the MPAM acronym and abbreviate the structure names to EFI_ACPI_MPAM_TABLE_HEADER. The macro describing the table revision can also follow a similar approach.

[/SAMI]

+
+///
+/// MPAM Revision (as defined in ACPI 6.4 spec.)
[SAMI] I believe this should be (a defined by the 'ACPI for Memory System Resource Partitioning and Monitoring, Platform Design Document'). Or simply refer it as '(as defined by [1])'.
+///
+#define EFI_ACPI_6_4_MEMORY_SYSTEM_RESOURCE_PARTITIONING_MONITORING_TABLE_=
REVISION  0x01
[SAMI] Please move this definition before the definition of EFI_ACPI_6_4_MEMORY_SYSTEM_RESOURCE_PARTITIONING_MONITORING_TABLE_HEADER. The ACPI MPAM 1.0 table revision was 0. But for ACPI MPAM table 2.0 the revision is 1, so there is no need to change.
+
+///
+/// Memory System Controller Node Structure
+///
+
+typedef struct {
+  UINT16    Length;
+  UINT16    Reserved;
[SAMI] ACPI MPAM 2.0 introduces splits the Reserved field to introduce 'Interface type'.
+  UINT32    Identifier;
+  UINT64    BaseAddress;
+  UINT32    MmioSize;
+  UINT32    OverflowInterrupt;
+  UINT32    OverflowInterruptFlags;
+  UINT32    Reserved1;
+  UINT32    OverflowInterruptAff;
+  UINT32    ErrorInterrupt;
+  UINT32    ErrorInterruptFlags;
+  UINT32    Reserved2;
+  UINT32    ErrorInterruptAff;
+  UINT32    MaxNRdyUsec;
+  UINT64    LinkedDeviceHwId;
+  UINT32    LinkedDeviceInstanceHwId;
+  UINT32    NumResourceNodes;
+} EFI_ACPI_6_4_MPAM_MSC_NODE;
+
+///
+/// Resource Node Structure
+///
+
+typedef struct {
+  UINT32    Identifier;
+  UINT8     RisIndex;
+  UINT16    Reserved1;
+  UINT8     LocatorType;
+  UINT64    Locator;

[SAMI] Would it be possible to define a Locator structure with the first field as the LocatorType followed by a union of Locators type specific structures?

+  UINT32    NumFuncDep;
+} EFI_ACPI_6_4_MPAM_RESOURCE_NODE;
+

[SAMI] Do you have plans to add definitions for the other structures defined by the specifications, or the intention is to add them as required?

Also, if possible, it would be good to add an ACPI MPAM table parser to Acpiview.

[/SAMI]

+#pragma pack()
+
+#endif
--------------QiKLiJXN64HKcejQGxFZl57N--