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 02941D810A5 for ; Wed, 4 Oct 2023 14:38:10 +0000 (UTC) DKIM-Signature: a=rsa-sha256; bh=jeO25Jdsyy8RME/FW1VhuFmzJjRwocUg43CDNPW4k7E=; c=relaxed/simple; d=groups.io; h=ARC-Seal:ARC-Message-Signature:ARC-Authentication-Results:From:To:CC:Subject:Thread-Topic:Thread-Index:Date:Message-ID:References:In-Reply-To:Accept-Language:MIME-Version:Precedence:List-Subscribe:List-Help:Sender:List-Id:Mailing-List:Delivered-To:Reply-To:List-Unsubscribe-Post:List-Unsubscribe:Content-Language:Content-Type:Content-Transfer-Encoding; s=20140610; t=1696430289; v=1; b=V9bw/8ht0qKlbxTYia49clerZt6VLirdMe+A2PZXAbkBCOKfjMOBJYobtggmSm5g471CJTFS NUwqkbJTBGd1IoOzxlNQxBqMeMnpFi6fRiI/ZSy5b80Odxhn+zbpbniY0mYsxHt7d5k61E5GZiq QTKFgm+1ukb3I1/FvPzh9GoU= X-Received: by 127.0.0.2 with SMTP id l29sYY7687511xymH5uavtdt; Wed, 04 Oct 2023 07:38:09 -0700 X-Received: from NAM02-DM3-obe.outbound.protection.outlook.com (NAM02-DM3-obe.outbound.protection.outlook.com [40.107.95.59]) by mx.groups.io with SMTP id smtpd.web11.20187.1696430288911011010 for ; Wed, 04 Oct 2023 07:38:09 -0700 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=LCeY9QHwRsTE7khViuKQ0WCPndlNUvBiOlyDQQ9mfFmd/HAjDHLWjcUcsUOH4FoTdtI/P7TxqrpyhNSsjYWbcbltXo6x7zZZnN5wke6Tp9bnieduSYZkUTIw76Q2Qe3e1C4ObyEFrU5WDyefvQV5KsbxUYJb5WKmgVI2gymlyRlzKsnWR97fSoAqb+E25apSXqtP+q3ZtRLPewdko9InjcGkne7smx8u+J5iuhWUTgOzv246YknRLFaGKF40PgFQqIP1quIY2YadqWu2YdD0J9EmiQQFby+GTXTPp348Tf3QeGB48xNtRCpVhTXciyCVT4dPdQiwXgRBO6Y4aHj7ng== 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-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=4YA9XO5AsGQKrQjKfJ+zhzPYAyHqAbd2OYfyo7BaPrs=; b=SYSO1vGlAIZUwEZ5kmQylf7a6lQgxZ9paBdo3P6UutFr2CZcasrrF/BIrOaHwIaN0oXA/EjiUbqAj8zlMp9CyQLqqaS+7jaLXCjpRUkHGAyIg5PElII2y2cSQc2pS5ac1gJ9oUbEeRbfVr4Vmen9o0B/U0OGVnajXVFVrlVNfwA0Llm97+YgDvrBg/xzxwxZF8iJnF71XyZYqM58V8bfn3Z6+ZQpYyhIR78YMr+PQ8CbbFwiaJ2NEG4BX/tcxD4M+5mJNhVWNyO8obKN3NtfEoK+KJaHSrsRc39Mq49lyqHvQ852zRKK39qov61yxIUg/z8cF5DSJUURXyjrzu1Cew== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=nvidia.com; dmarc=pass action=none header.from=nvidia.com; dkim=pass header.d=nvidia.com; arc=none X-Received: from DS7PR12MB5789.namprd12.prod.outlook.com (2603:10b6:8:74::21) by BY5PR12MB4081.namprd12.prod.outlook.com (2603:10b6:a03:20e::21) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6838.31; Wed, 4 Oct 2023 14:38:06 +0000 X-Received: from DS7PR12MB5789.namprd12.prod.outlook.com ([fe80::639c:a3f3:9403:ed05]) by DS7PR12MB5789.namprd12.prod.outlook.com ([fe80::639c:a3f3:9403:ed05%5]) with mapi id 15.20.6838.033; Wed, 4 Oct 2023 14:38:06 +0000 From: "Jeff Brasen via groups.io" To: "devel@edk2.groups.io" CC: "jian.j.wang@intel.com" , "gaoliming@byosoft.com.cn" , "dandan.bi@intel.com" , Ashish Singhal Subject: Re: [edk2-devel] [PATCH] MdeModulePkg/DxeCore: Allow relocation of images with large address Thread-Topic: [PATCH] MdeModulePkg/DxeCore: Allow relocation of images with large address Thread-Index: AQHZh4fZtUhrEVBB/kGqYkEodk0CkrAWydowgCPHwAA= Date: Wed, 4 Oct 2023 14:38:05 +0000 Message-ID: References: In-Reply-To: Accept-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-ms-publictraffictype: Email x-ms-traffictypediagnostic: DS7PR12MB5789:EE_|BY5PR12MB4081:EE_ x-ms-office365-filtering-correlation-id: 38924352-cf92-4c58-65ea-08dbc4e785af x-ms-exchange-senderadcheck: 1 x-ms-exchange-antispam-relay: 0 x-microsoft-antispam-message-info: E8luyK6rPQSczaEWS737wmhoHq69CTeGkgMmWK3W2BjXcGYIXckgjVO5QOXjajJQKUzuwZBN5bJYKwyzih4hR994nsDoGHtifIkff7XJU/J6TvH0s5Wftb7m2w50+kbn4DjPB1RKDPirTdBJgSNRmUdUMXaC318lFBfq7sOLqyklrFdVJKAKiZUScaqkysd0Mf7/4bakwyww6sBRRwHeEfsQ03XKdwlsn7sIfdvDIKiArwsE7vBY4O5WfYjAycHkw5TuLIhPKNF4adq8aNOUxQcXIXFfYllr2s+jWBGrojprwYuJI8b/CmTe+W+9HCH43jGyFDPtJ/EEUQjuw/crbnK/4tVLWrHVWbAjOzYPFamwxeo32KX7c6e9znZqbism4ETifru3iTFmleA/XnnyC9ACcE3uSxoMn0Rv1Gp5Ie6D0A7iUFH65hGLIm4KC9AzUUrH/rfLCc3cKYUBIaQIAxcg8z1CqROYvfiqx3GgndgjcQBF41dsjN8pC5Rc/n12izT/9yIuIGYhc8PuopcAgDYMSl2lJZV7TcF1voc8Wr3u0oyUZz2AraDBAhBwjYhE+vgDqboEN9OuI8LBWZ8NNnYgAwbsUY9CTrytDpjjgr9BI0/UH5pTq6JvDjgaGHte x-ms-exchange-antispam-messagedata-chunkcount: 1 x-ms-exchange-antispam-messagedata-0: =?us-ascii?Q?zHf+qpNv0AzDEBLBNaryDvjmvTzPum2Cj348XhLjmuVShwwPRxylVn14lHT0?= =?us-ascii?Q?L3H1XornJmCEcRuzJKYJGOQRRnRTzaLoemQmrvaFgfAj8XjbfTLLDWcJGZoj?= =?us-ascii?Q?g5n9EPI6YbNPw4vw3so8RjIZqWBdpXrIHkJdLN153jlH8ZEP9MqdSCykOmry?= =?us-ascii?Q?5Ty+Wy8RmEeqnHLC/qGKZhasEla3FSt3P0vKe9ryXhvXVAfJFNevN9ZgYfcb?= =?us-ascii?Q?gD+rDb9d9zXCY07OZ0cCfD9nT0vo4QD7OdDcXlNcIpZwHMB9K+FwP4wfkOVT?= =?us-ascii?Q?qmS78/0UeX2X7oaTJWMjeDXi2DZ8PIVl+tUZRTapHUIpEpelCapvXXv/MiMV?= =?us-ascii?Q?T6sMGQbOaVfP7d61xcuqUD9aEKG3jAA/nFW0RcgeMsfZ91W+7oHuJd6GmXYQ?= =?us-ascii?Q?SgjJwHQjWiXyMo7BK4MGWnhiYGi2+FE33IVN4b1r1ApzGl7YvuLJVErNhdL+?= =?us-ascii?Q?6LB0uQCYgBdoBqQFlEcjgfwlSHmysZue+sS/U1fRkVZi3QV8+D13QRpM2XhN?= =?us-ascii?Q?pYlWrhrpxc0aDOb+Uv0BD750egkotjosEsuEkp7ix5pE9Q+jKGv7oN345S1h?= =?us-ascii?Q?tRDOh6FG/qZ06mwns/obS090MkNXy0pIrYxePKw/Qahq0JCVKX0+KqUmwW6o?= =?us-ascii?Q?K5JwByQr/S/8J+kXK/9xfhRCvIOzvGgc1SjtxprTiTi0/zn3ngN70fPWxQJx?= =?us-ascii?Q?gb7ELUJOu67Ddt5+Slh0Kzi8BbqY9CIeAQgbz6905ngGvMbdE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change-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-AuthSource: DS7PR12MB5789.namprd12.prod.outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: 38924352-cf92-4c58-65ea-08dbc4e785af X-MS-Exchange-CrossTenant-originalarrivaltime: 04 Oct 2023 14:38:05.7480 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 43083d15-7273-40c1-b7db-39efd9ccc17a X-MS-Exchange-CrossTenant-mailboxtype: HOSTED X-MS-Exchange-CrossTenant-userprincipalname: FLNKvR+KwjMkVPwRPYlH5riWqSv3oOWWmJJO+HUXmIB41Z/k8pvWmL0xibRhsj/cYfeQaCjDD6k2ZXuQl3tRaA== X-MS-Exchange-Transport-CrossTenantHeadersStamped: BY5PR12MB4081 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 Reply-To: devel@edk2.groups.io,jbrasen@nvidia.com List-Unsubscribe-Post: List-Unsubscribe=One-Click List-Unsubscribe: X-Gm-Message-State: lauvCU5mEtcaXLRx0eWXFHUMx7686176AA= Content-Language: en-US Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable X-GND-Status: LEGIT Authentication-Results: spool.mail.gandi.net; dkim=pass header.d=groups.io header.s=20140610 header.b="V9bw/8ht"; spf=pass (spool.mail.gandi.net: domain of bounce@groups.io designates 66.175.222.108 as permitted sender) smtp.mailfrom=bounce@groups.io; dmarc=none; arc=reject ("signature check failed: fail, {[1] = sig:microsoft.com:reject}") Anyone have any thoughts on this patch? Thanks, Jeff > -----Original Message----- > From: Jeff Brasen > Sent: Monday, September 11, 2023 2:14 PM > To: devel@edk2.groups.io > Cc: jian.j.wang@intel.com; gaoliming@byosoft.com.cn; > dandan.bi@intel.com; Ashish Singhal > Subject: RE: [PATCH] MdeModulePkg/DxeCore: Allow relocation of images > with large address >=20 > Any thoughts/feedback on this patch? >=20 > Thanks, > Jeff >=20 >=20 > > -----Original Message----- > > From: Jeff Brasen > > Sent: Monday, May 15, 2023 5:49 PM > > To: devel@edk2.groups.io > > Cc: jian.j.wang@intel.com; gaoliming@byosoft.com.cn; > > dandan.bi@intel.com; Jeff Brasen ; Ashish Singhal > > > > Subject: [PATCH] MdeModulePkg/DxeCore: Allow relocation of images > with > > large address > > > > Add PCD to control if modules with start addresses in PE/COFF > > > 0x100000 attempt to load at specified address. > > If a module has an address in this range and there is untested memory > > DxeCore will attempt to promote all memory to tested which bypasses > > any memory testing that would occur later in boot. > > > > There are several existing AARCH64 option roms that have base > > addresses of 0x180000000. > > > > Signed-off-by: Jeff Brasen > > Reviewed-by: Ashish Singhal > > --- > > MdeModulePkg/Core/Dxe/DxeMain.inf | 1 + > > MdeModulePkg/Core/Dxe/Image/Image.c | 4 +++- > > MdeModulePkg/MdeModulePkg.dec | 7 +++++++ > > 3 files changed, 11 insertions(+), 1 deletion(-) > > > > diff --git a/MdeModulePkg/Core/Dxe/DxeMain.inf > > b/MdeModulePkg/Core/Dxe/DxeMain.inf > > index 35d5bf0dee..16871f2021 100644 > > --- a/MdeModulePkg/Core/Dxe/DxeMain.inf > > +++ b/MdeModulePkg/Core/Dxe/DxeMain.inf > > @@ -187,6 +187,7 @@ > > gEfiMdeModulePkgTokenSpaceGuid.PcdHeapGuardPropertyMask > > ## CONSUMES > > gEfiMdeModulePkgTokenSpaceGuid.PcdCpuStackGuard = ## > > CONSUMES > > > gEfiMdeModulePkgTokenSpaceGuid.PcdFwVolDxeMaxEncapsulationDepth > > ## CONSUMES > > + gEfiMdeModulePkgTokenSpaceGuid.PcdImageLargeAddressLoad > > ## CONSUMES > > > > # [Hob] > > # RESOURCE_DESCRIPTOR ## CONSUMES > > diff --git a/MdeModulePkg/Core/Dxe/Image/Image.c > > b/MdeModulePkg/Core/Dxe/Image/Image.c > > index 9dbfb2a1fa..6bc3a549ae 100644 > > --- a/MdeModulePkg/Core/Dxe/Image/Image.c > > +++ b/MdeModulePkg/Core/Dxe/Image/Image.c > > @@ -680,7 +680,9 @@ CoreLoadPeImage ( > > ); > > } > > } else { > > - if ((Image->ImageContext.ImageAddress >=3D 0x100000) || Image- > > >ImageContext.RelocationsStripped) { > > + if ((PcdGetBool (PcdImageLargeAddressLoad) && ((Image- > > >ImageContext.ImageAddress) >=3D 0x100000)) || > > + Image->ImageContext.RelocationsStripped) > > + { > > Status =3D CoreAllocatePages ( > > AllocateAddress, > > (EFI_MEMORY_TYPE)(Image- > > >ImageContext.ImageCodeMemoryType), > > diff --git a/MdeModulePkg/MdeModulePkg.dec > > b/MdeModulePkg/MdeModulePkg.dec index 95dd077e19..6fd1bd7b8f > > 100644 > > --- a/MdeModulePkg/MdeModulePkg.dec > > +++ b/MdeModulePkg/MdeModulePkg.dec > > @@ -1116,6 +1116,13 @@ > > # @Prompt Output MMIO address of Trace Hub message. > > > > > gEfiMdeModulePkgTokenSpaceGuid.PcdTraceHubDebugMmioAddress|0|UI > N > > T64|0x30001058 > > > > + ## Indicates if images with large load address (>0x100000) should > > attempted to load at specified location. > > + # If enabled, attempt to allocate at specfied location will be > > + attempted with > > a fall back to any address. > > + # TRUE - UEFI will attempt to load at specified location.
> > + # FALSE - UEFI will load at any address
> > + # @Prompt Enable large address image loading. > > + > > + > > > gEfiMdeModulePkgTokenSpaceGuid.PcdImageLargeAddressLoad|TRUE|BO > OL > > EAN|0 > > + x30001059 > > + > > [PcdsFixedAtBuild, PcdsPatchableInModule] > > ## Dynamic type PCD can be registered callback function for Pcd > > setting action. > > # PcdMaxPeiPcdCallBackNumberPerPcdEntry indicates the maximum > > number of callback function > > -- > > 2.25.1 -=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 (#109320): https://edk2.groups.io/g/devel/message/109320 Mute This Topic: https://groups.io/mt/98916659/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-