From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mx0a-0031df01.pphosted.com (mx0a-0031df01.pphosted.com [205.220.168.131]) by mx.groups.io with SMTP id smtpd.web10.8986.1681824648311101982 for ; Tue, 18 Apr 2023 06:30:48 -0700 Authentication-Results: mx.groups.io; dkim=pass header.i=@quicinc.com header.s=qcppdkim1 header.b=dKAFs/aA; spf=permerror, err=parse error for token &{10 18 %{ir}.%{v}.%{d}.spf.has.pphosted.com}: invalid domain name (domain: quicinc.com, ip: 205.220.168.131, mailfrom: quic_llindhol@quicinc.com) Received: from pps.filterd (m0279865.ppops.net [127.0.0.1]) by mx0a-0031df01.pphosted.com (8.17.1.19/8.17.1.19) with ESMTP id 33I70Joh023630; Tue, 18 Apr 2023 13:30:44 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=quicinc.com; h=date : from : to : cc : subject : message-id : references : mime-version : content-type : in-reply-to; s=qcppdkim1; bh=D39IOVZfQwjT/zEXdlKRfEXteSKqGiY94D9sNrVthP4=; b=dKAFs/aAh1xr0hk9uFs7gbHH2QNv3gFEnhFqwdYj601FVXTI2Zf4DIEz8Hd4fqPVXhjw Ws2AcPvz5PJ/lDsmo+3YJS2hHlyZCPcbT+uwzdxqLq/O7/hFOZfAxnjBzXq6mIP5OkQX 4xOLl1qVxXP7O68lZIyrvV6vlTmy5D5i/+9ndeEfuKII/GcRwOcgIMC0phuilq8Xodv+ Uw50rLpD3FUZpwtAxoPGres9MXOKvX5B2CrkN+mKkXUf+ZfaqunY0+eMeb+ST6p5Hpa2 cefAXBP2dkLZUo/0F/yYqIXqZep/cIH62vEoKw+K9KmLxeIUVIIGHna4gHQpxdMLbqXp Uw== Received: from nasanppmta05.qualcomm.com (i-global254.qualcomm.com [199.106.103.254]) by mx0a-0031df01.pphosted.com (PPS) with ESMTPS id 3q1a6ca84f-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Tue, 18 Apr 2023 13:30:44 +0000 Received: from nasanex01c.na.qualcomm.com (nasanex01c.na.qualcomm.com [10.45.79.139]) by NASANPPMTA05.qualcomm.com (8.17.1.5/8.17.1.5) with ESMTPS id 33IDUh2d028993 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Tue, 18 Apr 2023 13:30:43 GMT Received: from qc-i7.hemma.eciton.net (10.80.80.8) by nasanex01c.na.qualcomm.com (10.45.79.139) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.986.42; Tue, 18 Apr 2023 06:30:41 -0700 Date: Tue, 18 Apr 2023 14:30:37 +0100 From: "Leif Lindholm" To: , CC: , , , , , , Subject: Re: [edk2-devel] [PATCH edk2-platforms v1 1/1] Platform/ARM: Reduce System Memory Size for FVP with RME extensions Message-ID: References: <20230417132249.15092-1-sami.mujawar@arm.com> MIME-Version: 1.0 In-Reply-To: <20230417132249.15092-1-sami.mujawar@arm.com> X-Originating-IP: [10.80.80.8] X-ClientProxiedBy: nasanex01a.na.qualcomm.com (10.52.223.231) To nasanex01c.na.qualcomm.com (10.45.79.139) X-QCInternal: smtphost X-Proofpoint-Virus-Version: vendor=nai engine=6200 definitions=5800 signatures=585085 X-Proofpoint-ORIG-GUID: 6bn7IFzqATmoOyt7GfSbRCdAxhO1pxqI X-Proofpoint-GUID: 6bn7IFzqATmoOyt7GfSbRCdAxhO1pxqI X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.254,Aquarius:18.0.942,Hydra:6.0.573,FMLib:17.11.170.22 definitions=2023-04-18_09,2023-04-18_01,2023-02-09_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 suspectscore=0 spamscore=0 mlxscore=0 malwarescore=0 phishscore=0 priorityscore=1501 mlxlogscore=451 bulkscore=0 impostorscore=0 clxscore=1011 adultscore=0 lowpriorityscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2303200000 definitions=main-2304180118 Content-Type: text/plain; charset="us-ascii" Content-Disposition: inline Hi Sami, On Mon, Apr 17, 2023 at 14:22:49 +0100, 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. This is clearly needed in order to not break things, so Reviewed-by: Leif Lindholm *but* this is really just extending the life of a horrible hack. Ideally, the ARM ltd. platforms should lead the way in providing reference implementations - since inevitably people will look to those for creating new platform ports. Things like this should be runtime discoverable. / Leif > 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 > -- > 'Guid(CE165669-3EF3-493F-B85D-6190EE5B9759)' > > > > > >