From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from EUR04-VI1-obe.outbound.protection.outlook.com (EUR04-VI1-obe.outbound.protection.outlook.com [40.107.8.73]) by mx.groups.io with SMTP id smtpd.web08.7111.1613150918895760372 for ; Fri, 12 Feb 2021 09:28:39 -0800 Authentication-Results: mx.groups.io; dkim=pass header.i=@armh.onmicrosoft.com header.s=selector2-armh-onmicrosoft-com header.b=oQkyFUIn; spf=pass (domain: arm.com, ip: 40.107.8.73, mailfrom: sami.mujawar@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=BgTXnMEgLEVKAMXXNq+34cgT+wVtf2bv40IQ1cpZ/20=; b=oQkyFUInGaL7i4XuUHs0GSNWQ0fNOWtJcfsJn9ECPDtoQsJDeRMUqSCOFqXQ3u4re1Eua7RZwyP8nbAXvRkhdWIoAfW5N7lXCb19AOWxuYDaYF6M5wuH9l31nHrZe9tZjxIXfrL5EPJTuS1xxGqfDxnp1tLNplt93tv2BQN+g4o= Received: from DU2PR04CA0110.eurprd04.prod.outlook.com (2603:10a6:10:230::25) by VE1PR08MB4863.eurprd08.prod.outlook.com (2603:10a6:802:ac::10) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3846.29; Fri, 12 Feb 2021 17:28:29 +0000 Received: from DB5EUR03FT024.eop-EUR03.prod.protection.outlook.com (2603:10a6:10:230:cafe::7e) by DU2PR04CA0110.outlook.office365.com (2603:10a6:10:230::25) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3846.25 via Frontend Transport; Fri, 12 Feb 2021 17:28:29 +0000 X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 63.35.35.123) smtp.mailfrom=arm.com; edk2.groups.io; dkim=pass (signature was verified) header.d=armh.onmicrosoft.com;edk2.groups.io; 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; Received: from 64aa7808-outbound-1.mta.getcheckrecipient.com (63.35.35.123) by DB5EUR03FT024.mail.protection.outlook.com (10.152.20.67) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3846.25 via Frontend Transport; Fri, 12 Feb 2021 17:28:29 +0000 Received: ("Tessian outbound 587c3d093005:v71"); Fri, 12 Feb 2021 17:28:29 +0000 X-CR-MTA-TID: 64aa7808 Received: from 039c2a8e3a8f.5 by 64aa7808-outbound-1.mta.getcheckrecipient.com id DB349EC1-0C85-438C-AB06-C615936AAF73.1; Fri, 12 Feb 2021 17:28:24 +0000 Received: from EUR04-VI1-obe.outbound.protection.outlook.com by 64aa7808-outbound-1.mta.getcheckrecipient.com with ESMTPS id 039c2a8e3a8f.5 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384); Fri, 12 Feb 2021 17:28:24 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=IxMJistgavtik8jIIsJrbbcWA7YjgSDJFX5WldYcpgwRYAg3/iYXCaQH9aAjgNZiCszfxzx3nLv/13VgDxXoNEntPTR1reW+5/lovSktCyOJxBUie3/PTrK3QE6eXWDpdJuvS0zFmCJTWjzdW2ous8t0ylA8VxlHhDLPDO3DRqw0GApY4aC0sqU4S+GuD3GNMFj+TxTE3NSuLVReWa/6TLFrhLpAsQYEMuRtZBRCI+RZj7odEp4sU0JKVU4H5audMU8W9LCn7alWDxsLxcMoZ1X0/woAEIWtlcCW6hBgLUsRnTIJWZ6x7hSV8+1JPS2L1HGSc0twMio6/7xOjjlcEA== 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-SenderADCheck; bh=BgTXnMEgLEVKAMXXNq+34cgT+wVtf2bv40IQ1cpZ/20=; b=ivPNd7yam22ijTICO4VRjSpe9rqCnFloQg4VmR0Z6GLvzGa9dXngDcq5kHcEStXmG3PB/l1qyBX5BGwG0zj0sUdsxH9cuYrB+u/kJMUVg5sK3yl9Z3AiLNMnM3WXsTry/c+AiTYxuq33xv7lhJOV6dWWgu2hCSKM0XpyROVxg076ki7XOgqMx26V2Nk2kLGnx1uPURQR682Bu5Dtdwoua9jh6ixBkCzgPrNnlu/3eJNbWKqqd7ltk1vA1xN4ZYERp8/SIHiU7QUAJ6VLuHx0i3JT0D0M15XsDl2UkidnnROBkaaJKd08UbYmXBnHm0P/myil1Uu6O2HUAjkdhYCJdw== 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=BgTXnMEgLEVKAMXXNq+34cgT+wVtf2bv40IQ1cpZ/20=; b=oQkyFUInGaL7i4XuUHs0GSNWQ0fNOWtJcfsJn9ECPDtoQsJDeRMUqSCOFqXQ3u4re1Eua7RZwyP8nbAXvRkhdWIoAfW5N7lXCb19AOWxuYDaYF6M5wuH9l31nHrZe9tZjxIXfrL5EPJTuS1xxGqfDxnp1tLNplt93tv2BQN+g4o= Received: from DB7PR08MB3097.eurprd08.prod.outlook.com (2603:10a6:5:1d::27) by DB9PR08MB6492.eurprd08.prod.outlook.com (2603:10a6:10:23d::9) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3846.27; Fri, 12 Feb 2021 17:28:21 +0000 Received: from DB7PR08MB3097.eurprd08.prod.outlook.com ([fe80::8c43:eec3:76be:9001]) by DB7PR08MB3097.eurprd08.prod.outlook.com ([fe80::8c43:eec3:76be:9001%4]) with mapi id 15.20.3846.035; Fri, 12 Feb 2021 17:28:21 +0000 From: "Sami Mujawar" To: Vijayenthiran Subramaniam , "devel@edk2.groups.io" , "leif@nuviainc.com" , "ardb+tianocore@kernel.org" CC: Thomas Abraham , nd Subject: Re: [edk2-platforms] [PATCH v1 2/3] Platform/ARM/SgiPkg: Add HMAT ACPI table for RdN1EdgeX2 Thread-Topic: [edk2-platforms] [PATCH v1 2/3] Platform/ARM/SgiPkg: Add HMAT ACPI table for RdN1EdgeX2 Thread-Index: AQHW9XuI/wk2qQQ+KE6OpNdwIPwcwqpUywWg Date: Fri, 12 Feb 2021 17:28:21 +0000 Message-ID: References: <1611841351-5039-1-git-send-email-vijayenthiran.subramaniam@arm.com> <1611841351-5039-3-git-send-email-vijayenthiran.subramaniam@arm.com> In-Reply-To: <1611841351-5039-3-git-send-email-vijayenthiran.subramaniam@arm.com> Accept-Language: en-GB, en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-ts-tracking-id: 2EE7DAD48D0FB447BF449D2E559441EE.0 x-checkrecipientchecked: true Authentication-Results-Original: arm.com; dkim=none (message not signed) header.d=none;arm.com; dmarc=none action=none header.from=arm.com; x-originating-ip: [217.140.99.251] x-ms-publictraffictype: Email X-MS-Office365-Filtering-HT: Tenant X-MS-Office365-Filtering-Correlation-Id: 447428ab-83c2-4a2e-a551-08d8cf7b9d0b x-ms-traffictypediagnostic: DB9PR08MB6492:|VE1PR08MB4863: x-ms-exchange-transport-forked: True X-Microsoft-Antispam-PRVS: x-checkrecipientrouted: true nodisclaimer: true x-ms-oob-tlc-oobclassifiers: OLM:9508;OLM:9508; X-MS-Exchange-SenderADCheck: 1 X-Microsoft-Antispam-Untrusted: BCL:0; X-Microsoft-Antispam-Message-Info-Original: T4rbvoLN4tMVYConhlkurK3fDLQJmZzsaJYmBJ5bnSBJ6XT/Z9AeBu7HyAMfNpyVw19Rt3UFk7iH6LkywZd74xe/qkAwoUTi/kLMit58pJKV/F0LPjicyoPNvFNThOPS3Fz+BzzSZsyg94vDKQ/PXq5pCVV8PSIFgjvYBPcjYBbZSSNf1Um52HsWwglCK0wDSZUq6QDpEY0SOxtDqKjL7vYv9uOXXGNNLfIbKdlzyVWwGePrio2RZPEH8tvrUjXvvpLJ3ryglzoNdwPC78Y+89IH0regO/EPPMJj3y1tVYmiNTVTKk5cT/tT1CZM75m2s+r9g3LgBoEmyhFKGiC9YYdRaF+ItjqmOxVntHKWTe2eBY7evENMF++xGZeimHZo/hXNzQ+Mpi5YHNp4ZJNVhvF8+9e4ssp74R41Bo8vYK8xs4NMfszgy+MHcfofGkbe4AhurgVcgNGM2Lk6tz6zl2XmNROV4Nu9sWFsfADnpWifTQoWgoTeh+LhJLSr4SvOf+Y18uCuZMBTIkRpIn+R2EfczEjYKxaO/Edx/TxPkq8ULLk428Zq/Nd13QlZ2nnawLoKK6m9Ruz9F8h35jisPuujhMiZuIwjuURTdMmICdM= X-Forefront-Antispam-Report-Untrusted: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:DB7PR08MB3097.eurprd08.prod.outlook.com;PTR:;CAT:NONE;SFS:(4636009)(39860400002)(366004)(346002)(376002)(136003)(396003)(71200400001)(66476007)(64756008)(2906002)(8676002)(110136005)(33656002)(53546011)(52536014)(66446008)(4326008)(54906003)(186003)(66946007)(76116006)(6506007)(86362001)(478600001)(26005)(5660300002)(7696005)(19627235002)(9686003)(8936002)(316002)(83380400001)(66556008)(55016002)(966005);DIR:OUT;SFP:1101; x-ms-exchange-antispam-messagedata: =?us-ascii?Q?hVc8SDqrKbTONkXLhK/pwHpiV6YnwpdIdK6bRprmWG06fCyb2PzSfWSxndsp?= =?us-ascii?Q?GEh3sjIOYkSBDMbyBlf6SOx9vPgr4MzHKeV7Vp9RCNqMbY9WINzNBCLo8jOm?= =?us-ascii?Q?yWkJISAHz0V759bUAMwWr6NFKdDRqDBcvs1i904EBGqlZLiyTiTNrPxzCXB9?= =?us-ascii?Q?pSfbANfryj1Twvhr0lSnDfrGt2KAHOks1lwNJK/5w9CYnMbQBNEfIqJxWlm6?= =?us-ascii?Q?wsViljYAv5naiVBGz55KW4Qaowpqg7nrDdxhDkpOyhpyBrfyX+MFuEsusf5L?= =?us-ascii?Q?pb6L2uj0T9xccUM6Qt+WfItBrmAtUpOzoQfagyVEmD95nOy42sNaGIbT7ToI?= =?us-ascii?Q?DJOVzKTuBP2ZJzNI/3BZxLZs9NlSBJmg6+P+HzDfUFvLT9QtrEqm0Vos4WU4?= =?us-ascii?Q?cHPoui+C2CS+ueiDXjGdUFjS+kBNHAs/06LYc/AhamjzyqrcWBGecf8zT5UU?= =?us-ascii?Q?7N95I5EDs2Wo1mYml2dSgzUB0sgnBNywaWDhtuKA50ds58316Px76YP7a953?= =?us-ascii?Q?TL0liE33eM0fpeBSURdzIVyPx+Ex/n0Jqvyn5ZwLrbuR5XAOOGROTmE/MtRV?= =?us-ascii?Q?TlTySBE65D7iIBBT+RE37hFkS9LJNEDrCw+9wTnMB+DUWAXrRjdNRZyhQiDv?= =?us-ascii?Q?1B3YsOJ1Y8r0NMEK30423L9rkR6lt0k9mJz/E5+dESeWbjqRR1X9BzRA0zwh?= =?us-ascii?Q?mjiiezNwr6NX9DomqWf9Dk/yqbDU0fy7luDqXSfnDpenXcLZNN0Png8zhOo1?= =?us-ascii?Q?3JC/0VHjgKwORaDFlv84Jazo7HCydYoZxeQJHx/W4HKcMrkSV4FYp008hYNT?= =?us-ascii?Q?Tk3isgu25obEqrM6tyhxABhv4AUKZtapQA/LxsF4gA2uSjO40G9+sjooxVAq?= =?us-ascii?Q?DVR4FJGVoPN5HWUhnZKWql7UrNAamIyAovwAEZlD+hi2LoKEwhM6Gg7VtXzw?= =?us-ascii?Q?j3faISzXjg7PTRepYX2HOb6Hab9BPSUkijbZwR+6zW2vNdIwe9O8sLo0kj+2?= =?us-ascii?Q?mVyhfk6EZsWUnlulkzqzZNyN6Hu5LEY8Vo727fK3R0DHjysG1mYkyNagVjPU?= =?us-ascii?Q?c5D6jcZEYgDdBFi2Z8JuycnbRhQBw93UvtNncnbMTHdHdOn0XEaZZjSHOFv/?= =?us-ascii?Q?q7mDI5jGoYgUHd8u3TD3uQUW9nD7Dct87/uGc3bDLVkHrxaHh8YAhvzz0POR?= =?us-ascii?Q?Km1nqBbSB4NJWAtEH9BkTh8fmLkR2fN7asU6wYMNGftt26CerNG4CtoQgSFM?= =?us-ascii?Q?RbX0mF5VaHXN7lF98vpLqYCHX5cUccMF8bFyfmkYw9Ab5iWVuZzONrrNP2iW?= =?us-ascii?Q?5ge3hHclnt7xJpHptQ2RNAcL?= MIME-Version: 1.0 X-MS-Exchange-Transport-CrossTenantHeadersStamped: DB9PR08MB6492 Original-Authentication-Results: arm.com; dkim=none (message not signed) header.d=none;arm.com; dmarc=none action=none header.from=arm.com; Return-Path: Sami.Mujawar@arm.com X-EOPAttributedMessage: 0 X-MS-Exchange-Transport-CrossTenantHeadersStripped: DB5EUR03FT024.eop-EUR03.prod.protection.outlook.com X-MS-Office365-Filtering-Correlation-Id-Prvs: 1776b178-7c40-4d63-38e0-08d8cf7b9856 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: 2P0bEM2W9bB0Q53aVRYCU1OX7TEiwDezsewfQiIqxyDOzfPbpb/ZbhCUmPj6r9wPbKavv91EEaHGEEJACOWAsfB1Mw7K2FmKLNu16FD8qW0RZ55CI329LSb7MxZNXcxPEf62e1vLI3OfHvZLWeQiDfKmeby5bTGAl+jLAXRfNp5fl3XTeLwiag+d6NFF2WhTXlAc9S/cOLEvy7LC15aXxFVL7SfJuF+CC97siaN6/AL3Gw8mR4IM8mV4Io2dtKxTO+65CcRjihYwAfjki2jSCj/wXXp2+KblZR7vpywlM4MzIpjnh6vIGM1zkdmuhISaPzVGMxYiDm21Fgvvzjz5SxHgIOlv+M9LroMCZIMfpfWNGvwQxwgy2UMTT7QGwdJYaTJRjX1Vuoj65UKCg3O4YVkjLCK+5S+gTPFhsiSWBO7thYY8YC1TkJbtVl+mpSZ9N4HFNqjvHO9KtZn6BgUn/KBcyRo0E4VVPL9Lyci0HG/YnPVLQlfU60TEORtI1JPP3rcamC8K6+quD23Ga1DphH0tumyiUnZEi5XsAFDJj2UPhWNClXay6m9urc20148xnw0qha+p0e458pfolmDZ3t3DK+fHEELtng7gUY//PglW2gDp1WUWyhEs+DkQHPcdDv1hcmS1ZNH3KdMtuDUpmotV9sA4IZOFIvRcT97iOLHhla9hev27Ji4XhZyuRZPxZLV8us8heq3sLhncFlg1iiBWcifTqmdjkihQ0M/L6AU= 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:(4636009)(396003)(136003)(376002)(39860400002)(346002)(36840700001)(46966006)(5660300002)(82310400003)(356005)(83380400001)(19627235002)(26005)(70586007)(54906003)(36860700001)(55016002)(47076005)(70206006)(8676002)(81166007)(2906002)(4326008)(82740400003)(110136005)(336012)(8936002)(478600001)(316002)(966005)(86362001)(9686003)(53546011)(7696005)(186003)(52536014)(6506007)(33656002);DIR:OUT;SFP:1101; X-OriginatorOrg: arm.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 12 Feb 2021 17:28:29.5558 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 447428ab-83c2-4a2e-a551-08d8cf7b9d0b 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: DB5EUR03FT024.eop-EUR03.prod.protection.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: VE1PR08MB4863 Content-Language: en-US Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable Hi Vijay, Please find my response inline marked [SAMI]. Regards, Sami Mujawar -----Original Message----- From: Vijayenthiran Subramaniam =20 Sent: 28 January 2021 01:43 PM To: devel@edk2.groups.io; leif@nuviainc.com; ardb+tianocore@kernel.org; Sam= i Mujawar Cc: Thomas Abraham Subject: [edk2-platforms] [PATCH v1 2/3] Platform/ARM/SgiPkg: Add HMAT ACPI= table for RdN1EdgeX2 Add HMAT table support for RD-N1-Edge Dual-chip platform. Signed-off-by: Vijayenthiran Subramaniam --- Platform/ARM/SgiPkg/AcpiTables/RdN1EdgeX2AcpiTables.inf | 1 + Platform/ARM/SgiPkg/AcpiTables/RdN1EdgeX2/Hmat.aslc | 108 ++++++++++++= ++++++++ 2 files changed, 109 insertions(+) diff --git a/Platform/ARM/SgiPkg/AcpiTables/RdN1EdgeX2AcpiTables.inf b/Plat= form/ARM/SgiPkg/AcpiTables/RdN1EdgeX2AcpiTables.inf index d44f02ab0c16..36d41281439d 100644 --- a/Platform/ARM/SgiPkg/AcpiTables/RdN1EdgeX2AcpiTables.inf +++ b/Platform/ARM/SgiPkg/AcpiTables/RdN1EdgeX2AcpiTables.inf @@ -22,6 +22,7 @@ [Sources] Iort.aslc Mcfg.aslc RdN1Edge/Dsdt.asl + RdN1EdgeX2/Hmat.aslc RdN1EdgeX2/Madt.aslc RdN1EdgeX2/Srat.aslc Spcr.aslc diff --git a/Platform/ARM/SgiPkg/AcpiTables/RdN1EdgeX2/Hmat.aslc b/Platform= /ARM/SgiPkg/AcpiTables/RdN1EdgeX2/Hmat.aslc new file mode 100644 index 000000000000..29d089aed053 --- /dev/null +++ b/Platform/ARM/SgiPkg/AcpiTables/RdN1EdgeX2/Hmat.aslc @@ -0,0 +1,108 @@ +/** @file +* Heterogeneous Memory Attribute Table (HMAT) +* +* Copyright (c) 2020, ARM Limited. All rights reserved. +* +* SPDX-License-Identifier: BSD-2-Clause-Patent +* +**/ + +#include "SgiAcpiHeader.h" +#include "SgiPlatform.h" +#include +#include +#include [SAMI] Use for Sgi headers. See https://edk2-docs.gitbook.io/edk-= ii-c-coding-standards-specification/5_source_files/55_preprocessor_directiv= es#5-5-1-1-use-the-proper-file-delimiters-when-including-files Also, it should be possible to move the Sgi headers here. [/SAMI] + +#define CHIP_CNT FixedPcdGet32 (PcdChipCount) +#define INITATOR_PROXIMITY_DOMAIN_CNT 2 +#define TARGET_PROXIMITY_DOMIAIN_CNT 2 + +// +// HMAT Table +// +#pragma pack (1) + +typedef struct { + UINT32 InitatorProximityDomain[INITATOR_PROXIMITY_DOMAIN_CNT]; + UINT32 TargetProximityDomiain[TARGET_PROXIMITY_DOMIAIN_CNT]; + UINT16 MatrixEntry[INITATOR_PROXIMITY_DOMAIN_CNT * TARGET_PROXIMITY_DOM= IAIN_CNT]; +} InitiatorTargetProximityMatrix; [SAMI] Please follow structure typedef and tag naming convention.=20 See https://edk2-docs.gitbook.io/edk-ii-c-coding-standards-specification/4_= naming_conventions/45_name_space_rules#4-5-1-names-shall-be-used-consistent= ly-within-the-same-type [/SAMI] + +typedef struct { + EFI_ACPI_6_3_HETEROGENEOUS_MEMORY_ATTRIBUTE_TABLE_HEADER = Header; + EFI_ACPI_6_3_HMAT_STRUCTURE_MEMORY_PROXIMITY_DOMAIN_ATTRIBUTES = Proximity[CHIP_CNT]; + EFI_ACPI_6_3_HMAT_STRUCTURE_SYSTEM_LOCALITY_LATENCY_AND_BANDWIDTH_INFO = LatencyInfo; + InitiatorTargetProximityMatrix = Matrix; + EFI_ACPI_6_3_HMAT_STRUCTURE_MEMORY_SIDE_CACHE_INFO = MemSideCache0; + EFI_ACPI_6_3_HMAT_STRUCTURE_MEMORY_SIDE_CACHE_INFO = MemSideCache1; +} EFI_ACPI_HETEROGENEOUS_MEMORY_ATTRIBUTE_TABLE; + +#pragma pack () + +#define HMAT_STRUCTURE_MEMORY_SIDE_CACHE_INFO_CACHE_ATTRIBUTES_INIT( = \ + TotalCacheLevels, CacheLevel, CacheAssociativity, WritePolicy, CacheLine= Size \ + ) = \ [SAMI] Align ). It would be preferable to follow the alignment style of a f= unction. Indeed, a space before the starting parenthesis would not work. [/SAMI] +{ = \ + TotalCacheLevels, CacheLevel, CacheAssociativity, WritePolicy, CacheLine= Size \ +} + +EFI_ACPI_HETEROGENEOUS_MEMORY_ATTRIBUTE_TABLE Hmat =3D { + // Header + { + ARM_ACPI_HEADER ( + EFI_ACPI_6_3_HETEROGENEOUS_MEMORY_ATTRIBUTE_TABLE_SIGNATURE, + EFI_ACPI_HETEROGENEOUS_MEMORY_ATTRIBUTE_TABLE, + EFI_ACPI_6_3_HETEROGENEOUS_MEMORY_ATTRIBUTE_TABLE_REVISION + ), + { + EFI_ACPI_RESERVED_BYTE, + EFI_ACPI_RESERVED_BYTE, + EFI_ACPI_RESERVED_BYTE, + EFI_ACPI_RESERVED_BYTE + }, + }, + + // Memory Proximity Domain + { + EFI_ACPI_6_3_HMAT_STRUCTURE_MEMORY_PROXIMITY_DOMAIN_ATTRIBUTES_INIT ( + 1, 0x0, 0x0), + EFI_ACPI_6_3_HMAT_STRUCTURE_MEMORY_PROXIMITY_DOMAIN_ATTRIBUTES_INIT ( + 1, 0x1, 0x1), + }, + + // Latency Info + EFI_ACPI_6_3_HMAT_STRUCTURE_SYSTEM_LOCALITY_LATENCY_AND_BANDWIDTH_INFO_I= NIT ( + 0, 0, INITATOR_PROXIMITY_DOMAIN_CNT, TARGET_PROXIMITY_DOMIAIN_CNT, 100= ), + { + {0, 1}, {0, 1}, + { + 10, 20, + 20, 10, + } + }, + + // Memory Side Cache + EFI_ACPI_6_3_HMAT_STRUCTURE_MEMORY_SIDE_CACHE_INFO_INIT ( + 0x0, SIZE_8MB, [SAMI] Alignment. See https://edk2-docs.gitbook.io/edk-ii-c-coding-standar= ds-specification/5_source_files/52_spacing#5-2-2-4-subsequent-lines-of-mult= i-line-function-calls-should-line-up-two-spaces-from-the-beginning-of-the-f= unction-name [/SAMI] + HMAT_STRUCTURE_MEMORY_SIDE_CACHE_INFO_CACHE_ATTRIBUTES_INIT ( + 1, + 1, + 2, + 2, + 64 // 64 bytes cache line length + ), + 0), + + EFI_ACPI_6_3_HMAT_STRUCTURE_MEMORY_SIDE_CACHE_INFO_INIT ( + 0x1, SIZE_8MB, + HMAT_STRUCTURE_MEMORY_SIDE_CACHE_INFO_CACHE_ATTRIBUTES_INIT ( + 1, + 1, + 2, + 2, + 64 // 64 bytes cache line length + ), + 0), +}; + +VOID* CONST ReferenceAcpiTable =3D &Hmat; [SAMI] Add a comment to indicate that the above line is to prevent the opti= miser from discarding the table. [/SAMI] --=20 2.17.1