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 36F9AAC0AE8 for ; Fri, 1 Dec 2023 05:28:21 +0000 (UTC) DKIM-Signature: a=rsa-sha256; bh=iVL2TTtlS5fZmkQkV8hRYle8hqAgZqrosOi7eMfseEw=; 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=1701408500; v=1; b=qeKM57Use+tX2U8BvNfGlbCsxT4LyMCnaNgqW3+uFEykIm3xsod6v2hhAILgMOk93ouDVtFg YkMaq71yvAqPDBejiUyX7MGsXZN06C3sZJXRlLsz6pd5yP4jYfXdOx1+ni4SspLTYWy/qEslU+r AqnzGANzNmwtc+WyQlKTv9JI= X-Received: by 127.0.0.2 with SMTP id RM9SYY7687511xsBl7U0kJu5; Thu, 30 Nov 2023 21:28:20 -0800 X-Received: from mgamail.intel.com (mgamail.intel.com [198.175.65.13]) by mx.groups.io with SMTP id smtpd.web11.16402.1701408500198468985 for ; Thu, 30 Nov 2023 21:28:20 -0800 X-IronPort-AV: E=McAfee;i="6600,9927,10910"; a="441457" X-IronPort-AV: E=Sophos;i="6.04,241,1695711600"; d="scan'208";a="441457" X-Received: from orsmga001.jf.intel.com ([10.7.209.18]) by orvoesa105.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 30 Nov 2023 21:28:19 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6600,9927,10910"; a="803928767" X-IronPort-AV: E=Sophos;i="6.04,241,1695711600"; d="scan'208";a="803928767" X-Received: from orsmsx602.amr.corp.intel.com ([10.22.229.15]) by orsmga001.jf.intel.com with ESMTP/TLS/AES256-GCM-SHA384; 30 Nov 2023 21:28:18 -0800 X-Received: from orsmsx610.amr.corp.intel.com (10.22.229.23) by ORSMSX602.amr.corp.intel.com (10.22.229.15) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.34; Thu, 30 Nov 2023 21:28:18 -0800 X-Received: from orsedg603.ED.cps.intel.com (10.7.248.4) by orsmsx610.amr.corp.intel.com (10.22.229.23) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.34 via Frontend Transport; Thu, 30 Nov 2023 21:28:18 -0800 X-Received: from NAM12-BN8-obe.outbound.protection.outlook.com (104.47.55.169) by edgegateway.intel.com (134.134.137.100) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.1.2507.34; Thu, 30 Nov 2023 21:28:18 -0800 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=lTx7JH2VdQojn1zJ7O+t+96Vpgj3fxLPOFljcNu3sKWkoAdGjcanKMNG6MwTiv9v3YJYjNGYOzqOEu9MjCq3hk88bgSAB9K4+gqpFGjV7qE0rRg62ptaNUuMRnaooeNcB/Wtmzsalg3m2p7LUmheu/k+7ToGN18nqBerwIMSoIjHGKJG5GPaVNV2/IHn+T+XCIfV/YQdqVOiSeZMlSlNOk+MCvgdt9WRdD/fYmbk1Vo1pHLwwZWUZC+gncsjl3bRL0YXfaAmskcTgBrDrTE22FVlXJpneEl+OxLcf33VkbeeNKmgEv+lXKxR3U8P+spyXo4NSRbIWlMfS6eXT431vQ== 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=rQAFKST+DMyl208qx6fPANNFXQ3xid0ypO+CXRPkO/M=; b=OBKi0Z3BSljotvwMRKLYQXsIAXJY6/tkdb7xsn46PVNlthfNonMfqEP5SC2FHWPo9g/xBkq/CTj1caPaCejiMAkxEefPmP46QWzOyCEhUTGY/KXy/fuwwkYLgkezPS1sUMKcJKJjRxUlMn2zH7bpc3+pN+X4k3BMvsfqjd+fH9vQOLqrBkRxPDYdGTJC5h9kH7SevhyjTR9KnWDfHWc9hRbk5kW4YK7Oy2+jfg93A1ooMv55KsRc+4pbq0QUm9RXnXrjBs1BmLZwbYGrEXjWx73G82Lqb/bCOGSFtC/c6CWadcU/2hQ/HW1ebBMwOSkLFv0/HWOMEQk9DtF1miqLzA== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=intel.com; dmarc=pass action=none header.from=intel.com; dkim=pass header.d=intel.com; arc=none X-Received: from MN6PR11MB8244.namprd11.prod.outlook.com (2603:10b6:208:470::14) by CH3PR11MB8561.namprd11.prod.outlook.com (2603:10b6:610:1ad::18) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7046.23; Fri, 1 Dec 2023 05:28:16 +0000 X-Received: from MN6PR11MB8244.namprd11.prod.outlook.com ([fe80::b614:1f5e:8b0c:9858]) by MN6PR11MB8244.namprd11.prod.outlook.com ([fe80::b614:1f5e:8b0c:9858%4]) with mapi id 15.20.7046.027; Fri, 1 Dec 2023 05:28:16 +0000 From: "Ni, Ray" To: "S, Ashraf Ali" , "devel@edk2.groups.io" CC: "Kumar, Rahul R" , "West, Catharine" , "V, Sangeetha" Subject: Re: [edk2-devel] [PATCH] UefiCpuPkg/ResetVector: Option for 1G Page Table Size increase Thread-Topic: [PATCH] UefiCpuPkg/ResetVector: Option for 1G Page Table Size increase Thread-Index: AQHaI7OgEKnsy20hXk2oSRen+kjucbCT5n2A Date: Fri, 1 Dec 2023 05:28:16 +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: MN6PR11MB8244:EE_|CH3PR11MB8561:EE_ x-ms-office365-filtering-correlation-id: 315d4926-5c5d-41d3-ce1e-08dbf22e5224 x-ms-exchange-senderadcheck: 1 x-ms-exchange-antispam-relay: 0 x-microsoft-antispam-message-info: 4YE4sIXEIucNearepbIgPt9MCfyOPCW8FwAV88WvW3aRi4YMclZHGgGHdiBYDjknxIQu2a+LdJWgbAOTChQtd7udPQbSlSqSZiXHGrB/At3K6xiKiWlTZL435/bFLBJrmNmvDW/jf3ryK21FlKtQvwrmSagq1T1Hz+u53Q95YVaMHLLRXXwvqHd8prAajrzck4KlCkuJUn6Vk33jeuJemXQQdmigfA3sYUk1h7cbH2t/qKpF2J06YgtsH5wn8wdC/D8vcuOcZglNldqjA9xhSgdhbZjFz9UszWcs7VJfY5Q7cxsTDCGIaqvHgG4633M/MYVPCj51Pxs1YN7WFInlQ4BLJhM0InN1QY1ozsQpX8h8CuyUnSiMKq4EMjV8BGfUrkq7Cy0yc8rD4XNhv9MSvELL9Bj1P/gxvC4jx/eH217gL2O69NsBnlX7Ht87uJXY1qPibAtNjsM7PlGeYS3xqXkuoAFd8oaBffCus5UaDZU2Peds16AtGuB1lI2Qgee6IxMf5Nec8DLGG6HQq83xQpk7oposTHTWgGJC0RNFsXwX+namoNihzXLgtxRxJEXwGyZEpEnvr6aTQGPd7dOf2PlIMeKnIr2rbB5tTI16VUbazcImxlQ/jgypEOoZPSIf x-ms-exchange-antispam-messagedata-chunkcount: 1 x-ms-exchange-antispam-messagedata-0: =?us-ascii?Q?0oau6hckKed+n3QLUFdhtkLjyf7mS+0Pk//09eKChp9kV4C1EPQzkHqju/Yz?= =?us-ascii?Q?Diz5HV1L4uRPt7+lmnnwQdpAJG558nbzX6Ip2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5EzPfYG8gTahazEos0I+9rztOTUCfbf088MATT+v1vWQEwQNnjjhA8bZ?= =?us-ascii?Q?22180tuYtMKS4X6k1jTi7gZ4eLJJzUxketw/GBiTdiebBocWlL7QC8pnR55V?= =?us-ascii?Q?45L+L0o2EeAcoLyEPnV59EBMEO3c7/dlsPjNwpr3QJGaKsnOWkUuNN31bN7X?= =?us-ascii?Q?znfCl3zpsWwEClWnSOGA5vMzitETi1vOWz/XzXCqcb5hmpAK9BS2Lfmj69bC?= =?us-ascii?Q?GhkJGdbP0X3ZnlxGP4FKhSM4X50LOW0oCFXif7dAIDdCksW5LB5A0e77hc67?= =?us-ascii?Q?zs4RQ5lVOcpU4eKloA0CThvYGSAjY8mw66Lr5vKPAE40zeuXPNhS4BdZY9jB?= =?us-ascii?Q?uKR+ZKzfXuBsIIvVoMrv4bJGuArn8qDMjFrm9bAaybcVqfNwnG+noh22UMAK?= =?us-ascii?Q?EbGEIZeWPRKa7oAJy7e9IcwZFH8tZgVSIQsKqQk+WvfSdLDwgIQPn1F9PY8i?= =?us-ascii?Q?02bTrbBuFmJiplO974QKbCK0p3HRNGwAAGvcPXkWsx1VEhXySTEzEKOeA6mC?= =?us-ascii?Q?tOK/+ueuidaamOVYKdtZPuV/vHJkQUyIu9n08tVxyhaGrsGpsvluoOvP1lOa?= =?us-ascii?Q?QLWtnlyQdlrJOc5HZYM=3D?= MIME-Version: 1.0 X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-AuthSource: MN6PR11MB8244.namprd11.prod.outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: 315d4926-5c5d-41d3-ce1e-08dbf22e5224 X-MS-Exchange-CrossTenant-originalarrivaltime: 01 Dec 2023 05:28:16.3145 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 46c98d88-e344-4ed4-8496-4ed7712e255d X-MS-Exchange-CrossTenant-mailboxtype: HOSTED X-MS-Exchange-CrossTenant-userprincipalname: m38kI7OMxFu/c+9ddlKchVzw5aEsllT9GD3HrerpoZk6OtNcVyOK7tR13ibPJUF7u/26t2lPIPhOp5Mxk6qk/A== X-MS-Exchange-Transport-CrossTenantHeadersStamped: CH3PR11MB8561 X-OriginatorOrg: intel.com 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,ray.ni@intel.com List-Unsubscribe-Post: List-Unsubscribe=One-Click List-Unsubscribe: X-Gm-Message-State: PmSZx9fQVoTcKxNsU6bOeIuLx7686176AA= 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=qeKM57Us; arc=reject ("signature check failed: fail, {[1] = sig:microsoft.com:reject}"); dmarc=fail reason="SPF not aligned (relaxed), DKIM not aligned (relaxed)" header.from=intel.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 Ashraf, When we implement the reset vector, we assume that 512GB page table occupie= s minimal flash size and also sufficient for XIP code. Any code that wants more page table coverage should create a new page table= , either in the temporary ram (when physical mem is not ready) or in physical= ram. Why does this patch increase the default 512 GB coverage? Thanks, Ray > -----Original Message----- > From: S, Ashraf Ali > Sent: Friday, December 1, 2023 1:35 AM > To: devel@edk2.groups.io > Cc: S, Ashraf Ali ; Kumar, Rahul R > ; Ni, Ray ; West, Catharine > ; V, Sangeetha > Subject: [PATCH] UefiCpuPkg/ResetVector: Option for 1G Page Table Size > increase >=20 > Currently 1G Page table is restricted 512GB. this patch can help to > increase the page table size based on the input. default will be 512GB > build option PAGE_TABLE_1G_SIZE is used to increase the page table size >=20 > Cc: Rahul Kumar > Cc: Ray Ni > Cc: Catharine West > Cc: V Sangeetha > Signed-off-by: Ashraf Ali S > --- > UefiCpuPkg/ResetVector/Vtf0/ReadMe.txt | 4 ++-- > UefiCpuPkg/ResetVector/Vtf0/Vtf0.inf | 2 ++ > UefiCpuPkg/ResetVector/Vtf0/X64/PageTables.asm | 13 +++++++++++-- > 3 files changed, 15 insertions(+), 4 deletions(-) >=20 > diff --git a/UefiCpuPkg/ResetVector/Vtf0/ReadMe.txt > b/UefiCpuPkg/ResetVector/Vtf0/ReadMe.txt > index 4fcb15c3b1..4d153fc1a7 100644 > --- a/UefiCpuPkg/ResetVector/Vtf0/ReadMe.txt > +++ b/UefiCpuPkg/ResetVector/Vtf0/ReadMe.txt > @@ -1,10 +1,10 @@ >=20 > =3D=3D=3D HOW TO USE VTF0 =3D=3D=3D > Add this line to your DSC [Components.IA32] or [Components.X64] section: > - UefiCpuPkg/ResetVector/Vtf0/ResetVector.inf > + UefiCpuPkg/ResetVector/Vtf0/Vtf0.inf >=20 > Add this line to your FDF FV section: > - INF RuleOverride=3DRESET_VECTOR > UefiCpuPkg/ResetVector/Vtf0/ResetVector.inf > + INF RuleOverride=3DRESET_VECTOR UefiCpuPkg/ResetVector/Vtf0/Vtf0.inf >=20 > In your FDF FFS file rules sections add: > [Rule.Common.SEC.RESET_VECTOR] > diff --git a/UefiCpuPkg/ResetVector/Vtf0/Vtf0.inf > b/UefiCpuPkg/ResetVector/Vtf0/Vtf0.inf > index 6b406163db..96106a4b11 100644 > --- a/UefiCpuPkg/ResetVector/Vtf0/Vtf0.inf > +++ b/UefiCpuPkg/ResetVector/Vtf0/Vtf0.inf > @@ -53,5 +53,7 @@ > # -DARCH_X64, -DARCH_IA32 > # * for using 1G page table: > # -DPAGE_TABLE_1G > +# * for incresing the 1G page table size (Size in GBs): > +# -DPAGE_TABLE_1G_SIZE=3D1024 > # * for different debug channels: > # -DDEBUG_SERIAL, -DDEBUG_PORT80, or not specify any debug channel > diff --git a/UefiCpuPkg/ResetVector/Vtf0/X64/PageTables.asm > b/UefiCpuPkg/ResetVector/Vtf0/X64/PageTables.asm > index 7960b141be..b080dc5296 100644 > --- a/UefiCpuPkg/ResetVector/Vtf0/X64/PageTables.asm > +++ b/UefiCpuPkg/ResetVector/Vtf0/X64/PageTables.asm > @@ -1,7 +1,7 @@ > ;-----------------------------------------------------------------------= ------- > ; @file > ; Emits Page Tables for 1:1 mapping. > -; If using 1G page table, map addresses 0 - 0x8000000000 (512GB), > +; If using 1G page table, map addresses 0 - 0x8000000000 (512GB, Size ca= n > be increse via PAGE_TABLE_1G_SIZE), > ; else, map addresses 0 - 0x100000000 (4GB) > ; > ; Copyright (c) 2021 - 2023, Intel Corporation. All rights reserved.
> @@ -39,6 +39,15 @@ BITS 64 > %define PAGE_PDPTE_1GB(x) ((x << 30) + PAGE_BLE_ATTR) > %define PAGE_PDE_2MB(x) ((x << 21) + PAGE_BLE_ATTR) >=20 > +%ifdef PAGE_TABLE_1G_SIZE > + %define PAGE_PDPTE_1GB_SIZE PAGE_TABLE_1G_SIZE > +%else > + ; > + ; Default 512GB of 1G Page Table > + ; > + %define PAGE_PDPTE_1GB_SIZE 512 > +%endif > + > ALIGN 16 >=20 > %ifdef PAGE_TABLE_1G > @@ -47,7 +56,7 @@ Pdp: > ; Page-directory pointer table (512 * 1GB entries =3D> 512GB) > ; > %assign i 0 > - %rep 512 > + %rep PAGE_PDPTE_1GB_SIZE > DQ PAGE_PDPTE_1GB(i) > %assign i i+1 > %endrep > -- > 2.39.1.windows.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 (#111968): https://edk2.groups.io/g/devel/message/111968 Mute This Topic: https://groups.io/mt/102898657/7686176 Group Owner: devel+owner@edk2.groups.io Unsubscribe: https://edk2.groups.io/g/devel/leave/12367111/7686176/19134562= 12/xyzzy [rebecca@openfw.io] -=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-