From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from NAM12-BN8-obe.outbound.protection.outlook.com (NAM12-BN8-obe.outbound.protection.outlook.com [40.107.237.73]) by mx.groups.io with SMTP id smtpd.web12.2322.1663706645800889224 for ; Tue, 20 Sep 2022 13:44:06 -0700 Authentication-Results: mx.groups.io; dkim=pass header.i=@nvidia.com header.s=selector2 header.b=psLn+jX6; spf=permerror, err=parse error for token &{10 18 %{i}._ip.%{h}._ehlo.%{d}._spf.vali.email}: invalid domain name (domain: nvidia.com, ip: 40.107.237.73, mailfrom: username@nvidia.com) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=AO7oCFVlaLKJosNknb/45CgedWci4RsUvdYJSq6tS/4Rwr6yc5d1HEfyaEW2Tv+C9uYgRG1fMIkxZyotF7nl3DHq3H1jeMNbcXGxi29N54MgG6D63oDfH7iQP0miMWUwfNaX5thS+CFowQAwTJ0mMeRL9auE6PkuFxFebsz7gcLmrMHs/BRw65Lg+QTsH6nl+ACXoHU9Zgn4vl084nGV+G0OqCr9po+9EZKTlykkfann4ogX4h8tCturdTl2aZYYYxm3QVGhKaiHJvkwmtnw/nRb6IX+1yXPuLNMvYyEHDDjOv/GDnaZ1aiZqDy7AG2bve6l1N4LrddwAFVEzLGmGw== 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=lBEcntZh5oQR9NNrtVW/CND7sliGxpTKEYDr15yA7mQ=; b=Rh0HUmu/hCzrmIklEyM8agn9kGV1NadTwgFsTMYQeqLP96pHHY4ObXnur+219pXyKPIpE9XuS8Kp2m9/jWV0Wo0VpIL9T1NY7tZCD4k+yenuTs+sLq4YCBF5sh3UXWtkIjgfO7LPcE2mUNfzwPd1Y103VXtu0fEc/Ag8e63c6/mrI25xsszhCdCpTy0BvZEatndoR2vHeZhUJCFUPUKpd0GF15YwmLmctYQMmBWTYuM969WzEAho39HLnQvOuNVRg09Sp/zUp15mn83zPr5CIM8XoPLp5DKKeaJ6JQCP0CiKdqSktsdYbYBek1D4RcqAGRCr75qQ5bnkg+NtiH+5zg== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 216.228.117.160) smtp.rcpttodomain=edk2.groups.io smtp.mailfrom=nvidia.com; dmarc=pass (p=reject sp=reject pct=100) action=none header.from=nvidia.com; dkim=none (message not signed); arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=Nvidia.com; s=selector2; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=lBEcntZh5oQR9NNrtVW/CND7sliGxpTKEYDr15yA7mQ=; b=psLn+jX6WxsX+WhZ0wVBcEyVYskeQx7OfKk2/fIWufreEKAC0shJC7WKGcVwVhkXkHHHyETvOEMqV+txdwr+m71k12MiDdLmnKM5T0jvkYtwgYrLEtAUSFFo4JUbmvGe7lakFQpLQwy1g50XVENdNP2061SSTsbjcxmiLRaSIHeczoEcS3uFQv8M6Xmn1l8WHh4NBxUYTobzXfKfZowJKAvT2Dnzkw+LlYHRSs6fLxpKtB8jKrm3RKRDDZQOAY4qJoKslcV4rilDcHi4lISCzv0aWY85WnW0VAaTMwqmICK+JeI3xzDiA63YUHzCXfz+vEt4uc9xbhJGdxzty9QQpg== Received: from DM6PR01CA0019.prod.exchangelabs.com (2603:10b6:5:296::24) by SJ0PR12MB6686.namprd12.prod.outlook.com (2603:10b6:a03:479::22) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5632.16; Tue, 20 Sep 2022 20:44:03 +0000 Received: from DM6NAM11FT038.eop-nam11.prod.protection.outlook.com (2603:10b6:5:296:cafe::ba) by DM6PR01CA0019.outlook.office365.com (2603:10b6:5:296::24) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5654.14 via Frontend Transport; Tue, 20 Sep 2022 20:44:03 +0000 X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 216.228.117.160) smtp.mailfrom=nvidia.com; dkim=none (message not signed) header.d=none;dmarc=pass action=none header.from=nvidia.com; Received-SPF: Pass (protection.outlook.com: domain of nvidia.com designates 216.228.117.160 as permitted sender) receiver=protection.outlook.com; client-ip=216.228.117.160; helo=mail.nvidia.com; pr=C Received: from mail.nvidia.com (216.228.117.160) by DM6NAM11FT038.mail.protection.outlook.com (10.13.173.137) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5654.14 via Frontend Transport; Tue, 20 Sep 2022 20:44:02 +0000 Received: from rnnvmail205.nvidia.com (10.129.68.10) by mail.nvidia.com (10.129.200.66) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.986.26; Tue, 20 Sep 2022 13:43:50 -0700 Received: from drhqmail202.nvidia.com (10.126.190.181) by rnnvmail205.nvidia.com (10.129.68.10) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.986.29; Tue, 20 Sep 2022 13:43:50 -0700 Received: from drhqmail203.nvidia.com (10.126.190.182) by drhqmail202.nvidia.com (10.126.190.181) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.986.29; Tue, 20 Sep 2022 13:43:49 -0700 Received: from swatisrik-X299-A.nvidia.com (10.127.8.9) by mail.nvidia.com (10.126.190.182) with Microsoft SMTP Server id 15.2.986.29 via Frontend Transport; Tue, 20 Sep 2022 13:43:49 -0700 From: Name To: , , , , , , CC: Swatisri Kantamsetti Subject: [PATCH 1/2] MdePkg: Support for MPAM ACPI Table Date: Tue, 20 Sep 2022 14:43:45 -0600 Message-ID: <20beae4fa7cdf1876adbb33f99da41ebd9eaa6be.1663706139.git.swatisrik@nvidia.com> X-Mailer: git-send-email 2.17.1 X-NVConfidentiality: public Return-Path: username@nvidia.com MIME-Version: 1.0 X-EOPAttributedMessage: 0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: DM6NAM11FT038:EE_|SJ0PR12MB6686:EE_ X-MS-Office365-Filtering-Correlation-Id: 91453b8c-ad53-4bfb-6e2a-08da9b48da70 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: SYoljjq8kfrt/lXJPYox1jfVacRRrXdsR+n7xm+m88cud9fXZjHm38iGhB7abHalGp/+ArU013ThwZdaGLaclD6uMMM9uHRrMrageuoqEg6hw33fl6f0/8dQX4IGV+WIIL+ZcDq9ofBgzYdcY/eFM1vPCPXXk+zstAD3qKswAv8m57MfHW6GQc9Y3lbU6BVwSUA+JguZGsasrmE9RxvNfzVwrUq8ZS4su9spvAgsTa3fQF/KpkD133Y0ndPMRYLUatJbmZs9MDYAxTMsXo6aiccte+ABDFxKBoTwRWS0Skg0e43qxLNe4kG9xg0ECSSLFbjJ2b8bzOh7CMaqa94BRZoJmece30vFISwCu8VQBUoBkiVLW33PPs/u9/qPjaxJaj52pFrulEXJYH1hIsDPmIKNJ8ANtsrZJWuMoybgvFVDWhFETSlLeTCYjTjVwRxFRMciWgS+gA5Ng47LFNUQiWwZtIX8bVbNL8l+/oNKZiN4/xCiHp4PLy33VGuj6J+m3jPVxTTivfneE8yb2FmB5ANA25oJ0H1I4nSdZGcluoNuP1JfuOdSkM80Cj+L2EIttkRUSBuoi6R6sW2rC3uR0koZaQMULePswuJ5U/CruK7cx8Dci8VboqjCXowyTTW1jIaLyCcH548Y7PDn/q0IcBeMdHZ+Lr7gIRf9dlk0vKGvJhKoKXt+MUvSVY5uIvpOc0nh4jzjVd6eWDYjbhxTNdQlr+wX++fRDd1duPY472QH8CEWGCWPa6kL1y7ZoRJ0VHfVjwMPkkjSG8742K6Dug== X-Forefront-Antispam-Report: CIP:216.228.117.160;CTRY:US;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:mail.nvidia.com;PTR:dc6edge1.nvidia.com;CAT:NONE;SFS:(13230022)(4636009)(346002)(136003)(396003)(39860400002)(376002)(451199015)(46966006)(36840700001)(40470700004)(6666004)(7696005)(186003)(2616005)(356005)(336012)(110136005)(7636003)(82310400005)(316002)(40460700003)(2906002)(41300700001)(36756003)(4326008)(8676002)(5660300002)(19627235002)(70586007)(47076005)(426003)(478600001)(70206006)(83380400001)(86362001)(26005)(40480700001)(8936002)(82740400003)(36860700001)(107886003);DIR:OUT;SFP:1101; X-OriginatorOrg: Nvidia.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 20 Sep 2022 20:44:02.9692 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 91453b8c-ad53-4bfb-6e2a-08da9b48da70 X-MS-Exchange-CrossTenant-Id: 43083d15-7273-40c1-b7db-39efd9ccc17a X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=43083d15-7273-40c1-b7db-39efd9ccc17a;Ip=[216.228.117.160];Helo=[mail.nvidia.com] X-MS-Exchange-CrossTenant-AuthSource: DM6NAM11FT038.eop-nam11.prod.protection.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: SJ0PR12MB6686 Content-Type: text/plain 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 | 95 ++++++++++++++++++++++++ 2 files changed, 100 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..ca750a6e48 --- /dev/null +++ b/MdePkg/Include/IndustryStandard/Mpam.h @@ -0,0 +1,95 @@ +/** @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 +**/ + +#ifndef _MPAM_H_ +#define _MPAM_H_ + +/// +/// Location Types +/// +#define EFI_ACPI_MPAM_LOCATION_TYPE_PROCESSOR_CACHE 0x00 +#define EFI_ACPI_MPAM_LOCATION_TYPE_MEMORY 0x01 +#define EFI_ACPI_MPAM_LOCATION_TYPE_SMMU 0x02 +#define EFI_ACPI_MPAM_LOCATION_TYPE_MEMORY_CACHE 0x03 +#define EFI_ACPI_MPAM_LOCATION_TYPE_ACPI_DEVICE 0x04 + +/// +/// Interrupt Flags +/// +#define EFI_ACPI_MPAM_LEVEL_TRIG_INTERRUPT_MODE 0x0 +#define EFI_ACPI_MPAM_EDGE_TRIG_INTERRUPT_MODE 0x1 +#define EFI_ACPI_MPAM_WIRED_INTERRUPT_TYPE 0x0 +#define EFI_ACPI_MPAM_PROC_INTR_AFF_TYPE 0x0 +#define EFI_ACPI_MPAM_PROC_CONTAINER_INTR_AFF_TYPE 0x8 +#define EFI_ACPI_MPAM_AFFINITY_VALID 0x10 + +#pragma pack(1) + +/// +/// Memory System Resource Partitioning and Monitoring Table (MPAM) +/// +typedef struct { + EFI_ACPI_DESCRIPTION_HEADER Header; +} EFI_ACPI_6_4_MEMORY_SYSTEM_RESOURCE_PARTITIONING_MONITORING_TABLE_HEADER; + +/// +/// MPAM Revision (as defined in ACPI 6.4 spec.) +/// +#define EFI_ACPI_6_4_MEMORY_SYSTEM_RESOURCE_PARTITIONING_MONITORING_TABLE_REVISION 0x01 + +/// +/// Memory System Controller Node Structure +/// + +typedef struct { + UINT16 Length; + UINT16 Reserved; + 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 Locator1; + UINT32 Locator2; + UINT32 NumFuncDep; +} EFI_ACPI_6_4_MPAM_RESOURCE_NODE; + +/// +/// Functional Dependency Structure +/// + +typedef struct { + UINT32 Producer; + UINT32 Reserved1; +} EFI_ACPI_6_4_MPAM_FUNC_DEP_NODE; + +#pragma pack() + +#endif -- 2.17.1