From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail05.groups.io (mail05.groups.io [45.79.224.7]) by spool.mail.gandi.net (Postfix) with ESMTPS id 5693174004D for ; Wed, 5 Jun 2024 15:16:47 +0000 (UTC) DKIM-Signature: a=rsa-sha256; bh=y2RM71fhrygDtJd8ySvIoYUDC4WbFw9OaLAUH72izcE=; c=relaxed/simple; d=groups.io; h=Received-SPF:Authentication-Results-Original:Message-ID:Date:User-Agent:Subject:To:Cc:References:From:In-Reply-To:MIME-Version:NoDisclaimer:Original-Authentication-Results:Precedence:List-Subscribe:List-Help:Sender:List-Id:Mailing-List:Delivered-To:Resent-Date:Resent-From:Reply-To:List-Unsubscribe-Post:List-Unsubscribe:Content-Type:Content-Language; s=20240206; t=1717600607; v=1; b=a1gahXSuSMXCfdNXlwBjIlcA5x2E4JHHZfglpBpZbG4TJtFjIyfQ4Oq//YAw6+O94hHExDFM vaPfSIoEj5BcF8jnyf1R4kSLLp8dmIIXmj5IRr5NIkCkRmN3lN/X8jhHZ/RrpXiFOpFAFfIzSc8 wfIFaWR/XAvGOiurz+TvvtTqOdVoVhqyoJuiHhmXhSjE3ICyylKeQjfWb9myZEmEnHk6YE+fvW0 ZyfkIgxWmN2v7ZFucuGAldo09lFZAwJneO1TItd5sRV2rYLHcBQvgFXVRWhIAC2qtK019cfGVgo AKIgDtjP4mUIzJY8KFlmKfRSq4f4KLCth+QW3VuaE0+Qw== X-Received: by 127.0.0.2 with SMTP id c89SYY7687511x6PTB4OFlL8; Wed, 05 Jun 2024 08:16:45 -0700 X-Received: from EUR05-DB8-obe.outbound.protection.outlook.com (EUR05-DB8-obe.outbound.protection.outlook.com [40.107.20.47]) by mx.groups.io with SMTP id smtpd.web10.18110.1717600604452016890 for ; Wed, 05 Jun 2024 08:16:44 -0700 X-Received: from DUZP191CA0071.EURP191.PROD.OUTLOOK.COM (2603:10a6:10:4fa::11) by AS8PR08MB8705.eurprd08.prod.outlook.com (2603:10a6:20b:565::19) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7633.23; Wed, 5 Jun 2024 15:16:37 +0000 X-Received: from DU2PEPF00028D08.eurprd03.prod.outlook.com (2603:10a6:10:4fa:cafe::64) by DUZP191CA0071.outlook.office365.com (2603:10a6:10:4fa::11) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7656.16 via Frontend Transport; Wed, 5 Jun 2024 15:16:37 +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=arm.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 X-Received: from 64aa7808-outbound-1.mta.getcheckrecipient.com (63.35.35.123) by DU2PEPF00028D08.mail.protection.outlook.com (10.167.242.168) with Microsoft SMTP Server (version=TLS1_3, cipher=TLS_AES_256_GCM_SHA384) id 15.20.7633.15 via Frontend Transport; Wed, 5 Jun 2024 15:16:37 +0000 X-Received: ("Tessian outbound eccca8f339e8:v327"); Wed, 05 Jun 2024 15:16:37 +0000 X-CheckRecipientChecked: true X-CR-MTA-CID: fe77dd45bfb5f2a8 X-CR-MTA-TID: 64aa7808 X-Received: from 562542b026ff.2 by 64aa7808-outbound-1.mta.getcheckrecipient.com id 848EA608-4F8D-4582-8E6E-F90FC713B91A.1; Wed, 05 Jun 2024 15:16:30 +0000 X-Received: from EUR05-VI1-obe.outbound.protection.outlook.com by 64aa7808-outbound-1.mta.getcheckrecipient.com with ESMTPS id 562542b026ff.2 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384); Wed, 05 Jun 2024 15:16:30 +0000 Authentication-Results-Original: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=arm.com; X-Received: from AS8PR08MB6806.eurprd08.prod.outlook.com (2603:10a6:20b:39b::12) by PAXPR08MB6574.eurprd08.prod.outlook.com (2603:10a6:102:12d::20) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7633.31; Wed, 5 Jun 2024 15:16:27 +0000 X-Received: from AS8PR08MB6806.eurprd08.prod.outlook.com ([fe80::3935:6d9d:93a2:cbf3]) by AS8PR08MB6806.eurprd08.prod.outlook.com ([fe80::3935:6d9d:93a2:cbf3%5]) with mapi id 15.20.7633.021; Wed, 5 Jun 2024 15:16:27 +0000 Message-ID: <71b501b6-de8e-422b-be74-e37cf4c77edb@arm.com> Date: Wed, 5 Jun 2024 16:16:25 +0100 User-Agent: Mozilla Thunderbird Subject: Re: [edk2-devel] [edk2-platforms][PATCH v1 2/5] Platform/Sgi: Use PCD value for L2 cache size in PPTT table To: Prabin CA , devel@edk2.groups.io Cc: Ard Biesheuvel , Leif Lindholm , Thomas Abraham , nd@arm.com References: <20240403173334.3063987-1-prabin.ca@arm.com> <20240403173334.3063987-3-prabin.ca@arm.com> From: "Sami Mujawar" In-Reply-To: <20240403173334.3063987-3-prabin.ca@arm.com> X-ClientProxiedBy: LO4P123CA0098.GBRP123.PROD.OUTLOOK.COM (2603:10a6:600:191::13) To AS8PR08MB6806.eurprd08.prod.outlook.com (2603:10a6:20b:39b::12) MIME-Version: 1.0 X-MS-TrafficTypeDiagnostic: AS8PR08MB6806:EE_|PAXPR08MB6574:EE_|DU2PEPF00028D08:EE_|AS8PR08MB8705:EE_ X-MS-Office365-Filtering-Correlation-Id: cb66a062-bb32-4ff3-7cd2-08dc85727e70 x-checkrecipientrouted: true NoDisclaimer: true X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam-Untrusted: BCL:0;ARA:13230031|1800799015|376005|366007; X-Microsoft-Antispam-Message-Info-Original: =?us-ascii?Q?XCh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ho?= =?us-ascii?Q?zGqRNXd8Llp8zklPZygb21zi9tR3iVhLc4aTOFiFuCUoJP+q1dnxQTM0fFCp?= =?us-ascii?Q?hu2Dwd2R/2sDtGsRjtCRSgmA+GWflDAQ9CqlnjswO+MD1SGT19VMOa+1RojK?= =?us-ascii?Q?unWGU74nmsAkLfyA4tGXdlBOwdNDlxYRBTGW8ueVV8jOTzzyZ8vYYXwZsEAD?= =?us-ascii?Q?W1Qa5yMUQILIzJZGHKDrgXKqDBSj5iIPBgyNyTPv04tFGC6bT472J3YpGPNq?= =?us-ascii?Q?NwYgjFAI4rkfWzCdKOdUnb5j+Hu6WvVgLUXg9X14aiQ+GkmBNbOiWAGApSUj?= =?us-ascii?Q?zMvjC+LfU7ST9VY1MJZ2IGTlccwQ3duHIy3o83rhIYFm/pf5rQP2dITCQap2?= =?us-ascii?Q?0eHZ05JknkoaWDP9DEEYol3jrjaztcr8wsYnxa1XJg=3D=3D?= 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:(13230031)(1800799015)(376005)(366007);DIR:OUT;SFP:1101; X-MS-Exchange-Transport-CrossTenantHeadersStamped: PAXPR08MB6574 Original-Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=arm.com; X-EOPAttributedMessage: 0 X-MS-Exchange-Transport-CrossTenantHeadersStripped: DU2PEPF00028D08.eurprd03.prod.outlook.com X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id-Prvs: 7f9440df-66bb-453d-0bee-08dc8572788c X-Microsoft-Antispam-Message-Info: =?utf-8?B?V2pUQ1lUMUgzQ1ltTHplRmlMVDNKY0s0M3NRWFZyZEhwNm12cE9mNFE1d1RU?= =?utf-8?B?ZWppTEJMektoaG1tUVhjYzNQZ2dPOTVRS0tUanJXeGpBK2dPV2ZaSXhacnlR?= =?ut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azYxMnBkNnR5blcwWkptaVQ0SFE9PQ==?= X-OriginatorOrg: arm.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 05 Jun 2024 15:16:37.3834 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: cb66a062-bb32-4ff3-7cd2-08dc85727e70 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: DU2PEPF00028D08.eurprd03.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: AS8PR08MB8705 Precedence: Bulk List-Subscribe: List-Help: Sender: devel@edk2.groups.io List-Id: Mailing-List: list devel@edk2.groups.io; contact devel+owner@edk2.groups.io Resent-Date: Wed, 05 Jun 2024 08:16:45 -0700 Resent-From: sami.mujawar@arm.com Reply-To: devel@edk2.groups.io,sami.mujawar@arm.com List-Unsubscribe-Post: List-Unsubscribe=One-Click List-Unsubscribe: X-Gm-Message-State: 9o2JYo6wICR0OxifLlxntNARx7686176AA= Content-Type: multipart/alternative; boundary="------------39MK4utL04OTK4KX6JyHfeeZ" Content-Language: en-US X-GND-Status: LEGIT Authentication-Results: spool.mail.gandi.net; dkim=pass header.d=groups.io header.s=20240206 header.b=a1gahXSu; dmarc=fail reason="SPF not aligned (relaxed), DKIM not aligned (relaxed)" header.from=arm.com (policy=none); spf=pass (spool.mail.gandi.net: domain of bounce@groups.io designates 45.79.224.7 as permitted sender) smtp.mailfrom=bounce@groups.io --------------39MK4utL04OTK4KX6JyHfeeZ Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: quoted-printable Hi Prabin, Thank you for this patch. Please see my response inline marked [SAMI]. With that fixed, Reviewed-by: Sami Mujawar Regards, Sami Mujawar On 4/3/24 18:33, Prabin CA wrote: > The PcdL2CacheSize PCD specifies the size of L2 cache of the CPU. > Use the size specified by this PCD in the PPTT table of the > RD-N2 platform. > > The PLAT_L2_CACHE_SIZE build time parameter is used to set the size of > the CPU's L2 cache and this allows changing the value of the L2 cache > size depending the variant of the RD-N2 platform being build. RD-V2 > platform is an example of such a variant. > > Signed-off-by: Prabin CA > --- > Platform/ARM/SgiPkg/RdN2/RdN2.dsc | 4 ++++ > Platform/ARM/SgiPkg/AcpiTables/RdN2AcpiTables.inf | 1 + > Platform/ARM/SgiPkg/AcpiTables/RdN2/Pptt.aslc | 4 +++- > 3 files changed, 8 insertions(+), 1 deletion(-) > > diff --git a/Platform/ARM/SgiPkg/RdN2/RdN2.dsc b/Platform/ARM/SgiPkg/RdN2= /RdN2.dsc > index 49a317a930e0..634edc2416c4 100644 > --- a/Platform/ARM/SgiPkg/RdN2/RdN2.dsc > +++ b/Platform/ARM/SgiPkg/RdN2/RdN2.dsc > @@ -45,6 +45,10 @@ [PcdsFixedAtBuild.common] > gArmPlatformTokenSpaceGuid.PcdCoreCount|1 > gArmPlatformTokenSpaceGuid.PcdClusterCount|16 > =20 > +!ifdef $(PLAT_L2_CACHE_SIZE) > + gArmSgiTokenSpaceGuid.PcdL2CacheSize|$(PLAT_L2_CACHE_SIZE) [SAMI] I think there is no need for PLAT_L2_CACHE_SIZE. The pcd can be=20 set from the build command line using the something like '--pcd=20 PcdL2CacheSize=3D0x10000'. Can you check, please? Also update the commit message to document that the Pcd can be=20 configured from the build command line and provide an example. [/SAMI] > +!endif > + > #######################################################################= ######### > # > # Components Section - list of all EDK II Modules needed by this Platfo= rm > diff --git a/Platform/ARM/SgiPkg/AcpiTables/RdN2AcpiTables.inf b/Platform= /ARM/SgiPkg/AcpiTables/RdN2AcpiTables.inf > index afc38385c051..fb5e6e72c9e8 100644 > --- a/Platform/ARM/SgiPkg/AcpiTables/RdN2AcpiTables.inf > +++ b/Platform/ARM/SgiPkg/AcpiTables/RdN2AcpiTables.inf > @@ -64,6 +64,7 @@ [FixedPcd] > gArmSgiTokenSpaceGuid.PcdGtFrame1Gsiv > gArmSgiTokenSpaceGuid.PcdIoVirtSocExpBlk0Base > gArmSgiTokenSpaceGuid.PcdIoVirtSocExpBlkUartEnable > + gArmSgiTokenSpaceGuid.PcdL2CacheSize > gArmSgiTokenSpaceGuid.PcdMaxAddressBitsPerChip > gArmSgiTokenSpaceGuid.PcdOscLpiEnable > gArmSgiTokenSpaceGuid.PcdOscCppcEnable > diff --git a/Platform/ARM/SgiPkg/AcpiTables/RdN2/Pptt.aslc b/Platform/ARM= /SgiPkg/AcpiTables/RdN2/Pptt.aslc > index b8cb04459be2..c37f04582f9c 100644 > --- a/Platform/ARM/SgiPkg/AcpiTables/RdN2/Pptt.aslc > +++ b/Platform/ARM/SgiPkg/AcpiTables/RdN2/Pptt.aslc > @@ -21,6 +21,8 @@ > #include "SgiAcpiHeader.h" > #include "SgiPlatform.h" > =20 > +#define L2_CACHE_SIZE FixedPcdGet32 (PcdL2CacheSize) > + > /** Define helper macro for populating processor core information. > =20 > @param [in] PackageId Package instance number. > @@ -81,7 +83,7 @@ > EFI_ACPI_6_4_PPTT_STRUCTURE_CACHE_INIT ( = \ > PPTT_CACHE_STRUCTURE_FLAGS, /* Flag */ = \ > 0, /* Next level of cache */ = \ > - SIZE_1MB, /* Size */ = \ > + L2_CACHE_SIZE, /* Size */ = \ [SAMI] I think you can use FixedPcdGet32 (PcdL2CacheSize) in the above=20 macro directly. [/SAMI] > 2048, /* Num of sets */ = \ > 8, /* Associativity */ = \ > PPTT_UNIFIED_CACHE_ATTR, /* Attributes */ = \ -=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 (#119476): https://edk2.groups.io/g/devel/message/119476 Mute This Topic: https://groups.io/mt/105313652/7686176 Group Owner: devel+owner@edk2.groups.io Unsubscribe: https://edk2.groups.io/g/devel/unsub [rebecca@openfw.io] -=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D- --------------39MK4utL04OTK4KX6JyHfeeZ Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: 8bit

Hi Prabin,

Thank you for this patch.

Please see my response inline marked [SAMI].

With that fixed,

Reviewed-by: Sami Mujawar <sami.mujawar@arm.com>

Regards,

Sami Mujawar

On 4/3/24 18:33, Prabin CA wrote:
The PcdL2CacheSize PCD specifies the size of L2 cache of the CPU.
Use the size specified by this PCD in the PPTT table of the
RD-N2 platform.

The PLAT_L2_CACHE_SIZE build time parameter is used to set the size of
the CPU's L2 cache and this allows changing the value of the L2 cache
size depending the variant of the RD-N2 platform being build. RD-V2
platform is an example of such a variant.

Signed-off-by: Prabin CA <prabin.ca@arm.com>
---
 Platform/ARM/SgiPkg/RdN2/RdN2.dsc                 | 4 ++++
 Platform/ARM/SgiPkg/AcpiTables/RdN2AcpiTables.inf | 1 +
 Platform/ARM/SgiPkg/AcpiTables/RdN2/Pptt.aslc     | 4 +++-
 3 files changed, 8 insertions(+), 1 deletion(-)

diff --git a/Platform/ARM/SgiPkg/RdN2/RdN2.dsc b/Platform/ARM/SgiPkg/RdN2/RdN2.dsc
index 49a317a930e0..634edc2416c4 100644
--- a/Platform/ARM/SgiPkg/RdN2/RdN2.dsc
+++ b/Platform/ARM/SgiPkg/RdN2/RdN2.dsc
@@ -45,6 +45,10 @@ [PcdsFixedAtBuild.common]
   gArmPlatformTokenSpaceGuid.PcdCoreCount|1
   gArmPlatformTokenSpaceGuid.PcdClusterCount|16
 
+!ifdef $(PLAT_L2_CACHE_SIZE)
+   gArmSgiTokenSpaceGuid.PcdL2CacheSize|$(PLAT_L2_CACHE_SIZE)

[SAMI] I think there is no need for PLAT_L2_CACHE_SIZE. The pcd can be set from the build command line using the something like '--pcd PcdL2CacheSize=0x10000'.

Can you check, please?

Also update the commit message to document that the Pcd can be configured from the build command line and provide an example.

[/SAMI]

+!endif
+
 ################################################################################
 #
 # Components Section - list of all EDK II Modules needed by this Platform
diff --git a/Platform/ARM/SgiPkg/AcpiTables/RdN2AcpiTables.inf b/Platform/ARM/SgiPkg/AcpiTables/RdN2AcpiTables.inf
index afc38385c051..fb5e6e72c9e8 100644
--- a/Platform/ARM/SgiPkg/AcpiTables/RdN2AcpiTables.inf
+++ b/Platform/ARM/SgiPkg/AcpiTables/RdN2AcpiTables.inf
@@ -64,6 +64,7 @@ [FixedPcd]
   gArmSgiTokenSpaceGuid.PcdGtFrame1Gsiv
   gArmSgiTokenSpaceGuid.PcdIoVirtSocExpBlk0Base
   gArmSgiTokenSpaceGuid.PcdIoVirtSocExpBlkUartEnable
+  gArmSgiTokenSpaceGuid.PcdL2CacheSize
   gArmSgiTokenSpaceGuid.PcdMaxAddressBitsPerChip
   gArmSgiTokenSpaceGuid.PcdOscLpiEnable
   gArmSgiTokenSpaceGuid.PcdOscCppcEnable
diff --git a/Platform/ARM/SgiPkg/AcpiTables/RdN2/Pptt.aslc b/Platform/ARM/SgiPkg/AcpiTables/RdN2/Pptt.aslc
index b8cb04459be2..c37f04582f9c 100644
--- a/Platform/ARM/SgiPkg/AcpiTables/RdN2/Pptt.aslc
+++ b/Platform/ARM/SgiPkg/AcpiTables/RdN2/Pptt.aslc
@@ -21,6 +21,8 @@
 #include "SgiAcpiHeader.h"
 #include "SgiPlatform.h"
 
+#define L2_CACHE_SIZE  FixedPcdGet32 (PcdL2CacheSize)
+
 /** Define helper macro for populating processor core information.
 
   @param [in] PackageId Package instance number.
@@ -81,7 +83,7 @@
     EFI_ACPI_6_4_PPTT_STRUCTURE_CACHE_INIT (                                   \
       PPTT_CACHE_STRUCTURE_FLAGS,           /* Flag */                         \
       0,                                    /* Next level of cache */          \
-      SIZE_1MB,                             /* Size */                         \
+      L2_CACHE_SIZE,                        /* Size */                         \

[SAMI] I think you can use FixedPcdGet32 (PcdL2CacheSize) in the above macro directly. 

[/SAMI]

       2048,                                 /* Num of sets */                  \
       8,                                    /* Associativity */                \
       PPTT_UNIFIED_CACHE_ATTR,              /* Attributes */                   \
_._,_._,_

Groups.io Links:

You receive all messages sent to this group.

View/Reply Online (#119476) | | Mute This Topic | New Topic
Your Subscription | Contact Group Owner | Unsubscribe [rebecca@openfw.io]

_._,_._,_
--------------39MK4utL04OTK4KX6JyHfeeZ--