From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail02.groups.io (mail02.groups.io [66.175.222.108]) by spool.mail.gandi.net (Postfix) with ESMTPS id 3B9E97803DA for ; Wed, 3 Apr 2024 17:34:05 +0000 (UTC) DKIM-Signature: a=rsa-sha256; bh=KWrFaGimFLn1bd1+j703t5oQ3r4UbHLtedypL+FeNRY=; c=relaxed/simple; d=groups.io; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References:MIME-Version:Precedence:List-Subscribe:List-Help:Sender:List-Id:Mailing-List:Delivered-To:Resent-Date:Resent-From:Reply-To:List-Unsubscribe-Post:List-Unsubscribe:Content-Transfer-Encoding; s=20240206; t=1712165643; v=1; b=JXGe4niplr+SZel8CVdke2/SSHjaYKfClnDOuwOh43h09cQGjAHqCQa4YfkA82v3J4Ma712f DBCaCKHBpApV7Eo9PxG6Hwgii6O/tOZAt524qlXpTM84MvDwa3PpHghiGgfy807ZXcCbmOBBvmY NhAnP9Cg2e7V2f+te4dVYosxX4UOxi4LpGCZSF4MXbHFc276A8MtMkeVSonUKMbDjHfbz+uFR3k VUC8VOuAs7KyQdMZxJ8dPskUbiq2ogyTnpdltAIBe/KpMgCCjd9XWGCTHAopAIP541vOio+smYf ixpT8SUI5wJXIFbv/aHRA8BOuaOEEzpsReU+q11lbjvEA== X-Received: by 127.0.0.2 with SMTP id BcJAYY7687511xgKMAKFiDpq; Wed, 03 Apr 2024 10:34:03 -0700 X-Received: from foss.arm.com (foss.arm.com [217.140.110.172]) by mx.groups.io with SMTP id smtpd.web10.17981.1712165643092790513 for ; Wed, 03 Apr 2024 10:34:03 -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 C7A3E1007; Wed, 3 Apr 2024 10:34:33 -0700 (PDT) X-Received: from usa.arm.com (a079755.arm.com [10.162.46.129]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPA id 037B83F766; Wed, 3 Apr 2024 10:34:00 -0700 (PDT) From: "Prabin CA" To: devel@edk2.groups.io Cc: Ard Biesheuvel , Leif Lindholm , Sami Mujawar , Thomas Abraham Subject: [edk2-devel] [edk2-platforms][PATCH v1 2/5] Platform/Sgi: Use PCD value for L2 cache size in PPTT table Date: Wed, 3 Apr 2024 23:03:31 +0530 Message-Id: <20240403173334.3063987-3-prabin.ca@arm.com> In-Reply-To: <20240403173334.3063987-1-prabin.ca@arm.com> References: <20240403173334.3063987-1-prabin.ca@arm.com> MIME-Version: 1.0 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, 03 Apr 2024 10:34:03 -0700 Resent-From: prabin.ca@arm.com Reply-To: devel@edk2.groups.io,prabin.ca@arm.com List-Unsubscribe-Post: List-Unsubscribe=One-Click List-Unsubscribe: X-Gm-Message-State: xs0K1sonmiF6yx324UGErpVSx7686176AA= Content-Transfer-Encoding: quoted-printable X-GND-Status: LEGIT Authentication-Results: spool.mail.gandi.net; dkim=pass header.d=groups.io header.s=20240206 header.b=JXGe4nip; 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 66.175.222.108 as permitted sender) smtp.mailfrom=bounce@groups.io 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) +!endif + ########################################################################= ######## # # Components Section - list of all EDK II Modules needed by this Platfor= m 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 */ = \ 2048, /* Num of sets */ = \ 8, /* Associativity */ = \ PPTT_UNIFIED_CACHE_ATTR, /* Attributes */ = \ --=20 2.34.1 -=-=-=-=-=-=-=-=-=-=-=- Groups.io Links: You receive all messages sent to this group. View/Reply Online (#117380): https://edk2.groups.io/g/devel/message/117380 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] -=-=-=-=-=-=-=-=-=-=-=-