From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from foss.arm.com (foss.arm.com [217.140.110.172]) by mx.groups.io with SMTP id smtpd.web11.9616.1681826370899837265 for ; Tue, 18 Apr 2023 06:59:31 -0700 Authentication-Results: mx.groups.io; dkim=missing; spf=pass (domain: arm.com, ip: 217.140.110.172, mailfrom: pierre.gondois@arm.com) 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 093E21684; Tue, 18 Apr 2023 07:00:14 -0700 (PDT) Received: from [10.34.100.129] (pierre123.nice.arm.com [10.34.100.129]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id F075B3F587; Tue, 18 Apr 2023 06:59:28 -0700 (PDT) Message-ID: <1d0a0375-fd22-1f62-2a53-482f8406a3dc@arm.com> Date: Tue, 18 Apr 2023 15:59:19 +0200 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.9.0 Subject: Re: [PATCH edk2-platforms v1 1/1] Platform/ARM: Reduce System Memory Size for FVP with RME extensions To: Sami Mujawar , devel@edk2.groups.io Cc: ardb+tianocore@kernel.org, quic_llindhol@quicinc.com, Suzuki.Poulose@arm.com, Matteo.Carlini@arm.com, Akanksha.Jain2@arm.com, Ben.Adderson@arm.com, nd@arm.com References: <20230417132249.15092-1-sami.mujawar@arm.com> From: "PierreGondois" In-Reply-To: <20230417132249.15092-1-sami.mujawar@arm.com> Content-Language: en-US Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Hi Sami, Tested-by: Pierre Gondois On 4/17/23 15:22, Sami Mujawar wrote: > For older FVPs (without support for RME extension) the top 16MB of > DRAM1 is reserved as Trusted DRAM. However, the latest FVP Base RevC > AEM Model [1] has support for RME extension. When RME extension is > present the top 64MB of DRAM1 (i.e. at the top of the 32bit address > space) is carved out for four-world support in TF-A [2]. > > Therefore, reduce the System Memory size by 64MB. > > Reference: > [1] FVP Base RevC AEM Model (available on x86_64 / Arm64 Linux) > (https://developer.arm.com/Tools%20and%20Software/ > Fixed%20Virtual%20Platforms) > > [2] commit c872072 (https://review.trustedfirmware.org/plugins/gitiles/ > TF-A/trusted-firmware-a/+/c8720729726faffc39ec64f3a02440a48c8c305a)) > > Signed-off-by: Sami Mujawar > --- > Platform/ARM/VExpressPkg/ArmVExpress-FVP-AArch64.dsc | 7 +++++-- > 1 file changed, 5 insertions(+), 2 deletions(-) > > diff --git a/Platform/ARM/VExpressPkg/ArmVExpress-FVP-AArch64.dsc b/Platform/ARM/VExpressPkg/ArmVExpress-FVP-AArch64.dsc > index dc081794cf98a27c667ef85bd27dacd80e9e8bd2..f70a4d52ba06f570e017ab5286f06d87193753e5 100644 > --- a/Platform/ARM/VExpressPkg/ArmVExpress-FVP-AArch64.dsc > +++ b/Platform/ARM/VExpressPkg/ArmVExpress-FVP-AArch64.dsc > @@ -107,9 +107,12 @@ [PcdsFixedAtBuild.common] > gArmPlatformTokenSpaceGuid.PcdCPUCorePrimaryStackSize|0x4000 > gArmPlatformTokenSpaceGuid.PcdCPUCoreSecondaryStackSize|0x0 > > - # System Memory (2GB - 16MB of Trusted DRAM at the top of the 32bit address space) > + # System Memory > + # When RME is supported by the FVP the top 64MB of DRAM1 (i.e. at the top > + # of the 32bit address space) is reserved for four-world support in TF-A. > + # Therefore, set the default System Memory size to (2GB - 64MB). > gArmTokenSpaceGuid.PcdSystemMemoryBase|0x80000000 > - gArmTokenSpaceGuid.PcdSystemMemorySize|0x7F000000 > + gArmTokenSpaceGuid.PcdSystemMemorySize|0x7C000000 > > # Size of the region used by UEFI in permanent memory (Reserved 64MB) > gArmPlatformTokenSpaceGuid.PcdSystemMemoryUefiRegionSize|0x04000000