From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mga04.intel.com (mga04.intel.com [192.55.52.120]) by mx.groups.io with SMTP id smtpd.web11.1838.1678861480221471341 for ; Tue, 14 Mar 2023 23:24:40 -0700 Authentication-Results: mx.groups.io; dkim=fail reason="unable to parse pub key" header.i=@intel.com header.s=intel header.b=DeCXzVpE; spf=pass (domain: intel.com, ip: 192.55.52.120, mailfrom: ray.ni@intel.com) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1678861480; x=1710397480; h=from:to:cc:subject:date:message-id:references: in-reply-to:content-transfer-encoding:mime-version; bh=Oz3JzLSgOfD+IpVMz0znQ+bwfaDrgslYWkuYrwwFIpI=; b=DeCXzVpEmwVKiwh+RnUHwcKnyzxQSTlagf+TdP6iVqdC/r2R1Ve07ABl 9ki67PePdAdj9LyvLqsFj6VwCqH/PQzR66Ia/10SEKWtbkipuuklGIJqn OnAVNvRvi+g+QdRJEchW4lS7CeX4lOGtb2Ly1sZl0wrsJnVdc00BfA10N cOCFvdUhrajY+eDH4Y0K2F+0RLI8dKzhMExMRjdQDWwvKdGdh9EO6A9yx 3pokrHrpU9NB0E02kXEPKis/jEL7gTrX0fzRGQO2uo+poGuXPXKywpL0R TgN6LLtYLXvmDhdK9eID2j0GBgOHmPdV+uOUvafFMDcruN6kvVBxyOH7R Q==; X-IronPort-AV: E=McAfee;i="6500,9779,10649"; a="336312241" X-IronPort-AV: E=Sophos;i="5.98,262,1673942400"; d="scan'208";a="336312241" Received: from orsmga001.jf.intel.com ([10.7.209.18]) by fmsmga104.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 14 Mar 2023 23:24:31 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6500,9779,10649"; a="711806697" X-IronPort-AV: E=Sophos;i="5.98,262,1673942400"; d="scan'208";a="711806697" Received: from orsmsx601.amr.corp.intel.com ([10.22.229.14]) by orsmga001.jf.intel.com with ESMTP; 14 Mar 2023 23:24:31 -0700 Received: from orsmsx611.amr.corp.intel.com (10.22.229.24) by ORSMSX601.amr.corp.intel.com (10.22.229.14) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.21; Tue, 14 Mar 2023 23:24:31 -0700 Received: from orsmsx602.amr.corp.intel.com (10.22.229.15) by ORSMSX611.amr.corp.intel.com (10.22.229.24) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.21; Tue, 14 Mar 2023 23:24:30 -0700 Received: from ORSEDG602.ED.cps.intel.com (10.7.248.7) 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.21 via Frontend Transport; Tue, 14 Mar 2023 23:24:30 -0700 Received: from NAM10-MW2-obe.outbound.protection.outlook.com (104.47.55.107) by edgegateway.intel.com (134.134.137.103) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.1.2507.21; Tue, 14 Mar 2023 23:24:30 -0700 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=UnXD7556sSAYW5Q3BuBHWlzy5YwbSQlv5XHzOWzcVsd6W+R374pafpr7fBE+1n34k7SjT1ih/iix5aB7X0fLr+2ZpvIk3dscIQ2/kA7+wrk/tdHHlxYRke7d4Fk2bBw5HflG9ATS0WX5jcDP2v68AI6/n6IuCQk+S3yPaj2Eavvh2wIhN4FlhhU3+/sMRaJHYziYYvyD/PjkzYKih7PwxmEQ7qsAKijiea96zWk5Vym3D75lZgbMF5UPe3Cw+Zs3CfCaz8mHd/9he+a6uyYYIWxyo7ReLJu9E8VFKLXjP3yAcyh3F20K8l0k8/MtifvoWxYkG4URPko9VLInITcgeQ== 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=m52iIx+LprJ+J4asgDJXMmDAaXMfdcbnFNCaLlceIH4=; b=c3ZAOBrwAlbtmWNwT+JbTzTzvVanQJwqCLK5JgCZkGyJCAPz7lQRwXWJIczFEPKi6tWUPOhgC5P+nsPXkTDj3+NHl41LHVkn7UOgkgavTGY/tza1lyqEaeuMhqseSQHV/DhIsdloyRcla7Mn2rGWfN46cRzOaw6Jr7XkECRjjHwVmVjSIjR07I9NGpbO18QhMprszMX3kwOlq+y8UoAObsiNNUUDM6IAG5VddgPEOg/ezoNc8WnKkDB7rQvyeqFTV2ec3ZpCthjeFNJyGF6sP4SWMRdLBrjzvu6cFWuRD/Fh9LjRCPOp1R8Ca2JYbGv5WDovXU936ruUMhIujDJO+Q== 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 Received: from MN6PR11MB8244.namprd11.prod.outlook.com (2603:10b6:208:470::14) by PH7PR11MB7121.namprd11.prod.outlook.com (2603:10b6:510:20c::7) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6178.29; Wed, 15 Mar 2023 06:24:28 +0000 Received: from MN6PR11MB8244.namprd11.prod.outlook.com ([fe80::ae07:e96a:4a24:8a69]) by MN6PR11MB8244.namprd11.prod.outlook.com ([fe80::ae07:e96a:4a24:8a69%7]) with mapi id 15.20.6178.024; Wed, 15 Mar 2023 06:24:28 +0000 From: "Ni, Ray" To: "Tan, Dun" , "devel@edk2.groups.io" CC: "Dong, Eric" , "Kumar, Rahul R" , Gerd Hoffmann Subject: Re: [Patch V2 11/14] UefiCpuPkg/CpuPageTableLib: Enable PAE paging Thread-Topic: [Patch V2 11/14] UefiCpuPkg/CpuPageTableLib: Enable PAE paging Thread-Index: AQHZUaYV4ahg0LtspkqjsgpKqL1oFq77ZwsQ Date: Wed, 15 Mar 2023 06:24:28 +0000 Message-ID: References: <20230308100758.669-1-dun.tan@intel.com> <20230308100758.669-12-dun.tan@intel.com> In-Reply-To: <20230308100758.669-12-dun.tan@intel.com> Accept-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: authentication-results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=intel.com; x-ms-publictraffictype: Email x-ms-traffictypediagnostic: MN6PR11MB8244:EE_|PH7PR11MB7121:EE_ x-ms-office365-filtering-correlation-id: 40a6f7e6-e4fc-45e2-cc02-08db251dee0a x-ms-exchange-senderadcheck: 1 x-ms-exchange-antispam-relay: 0 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: IOyJI0FUYzIWJP1A6i3cMkDEa0VgMTubHSehZc0lOLN19d/4eaJbdOcJsLEnHkyKg475IW1RFZNwcOTVq4vdUA3snt0DBNT/rBgKkSto3A2UcKrTykOOlDXiRSdB1DMseFqSG8R4MRG6LmIHX+kBilcMdl/dDYVqBYPK09CXIiiMsflbpxIT8leCZXowzO2L6uaswFgfoCDRTL6e+FrkeqOYLpN9L1lvb/HGgg9SosNWepFSUkbESn3ieAWyl3a5I7Td5YIh6G1sFrP1J0jYhXEUq0QZWj+fpgDGd7A3fBQDUJkyWXu4iwLw3VyoHsmAUhZqRdEJ43Zh4BevwgZIALZuIezqK/o7d7/J4HdiKCEwAXjqBBQYDGRRmSqBuFyYB3NH/wz63nkMcBKunooeUKIpg++KNkXWF8flrfbgG4FA0IzlQRwrx73WYBe6sYM6fe50wsvwgmxeFHQ9E+pOd/mygLLwkoxPmvMJFC3ODsmZDp56wUZ83xm33hTErsjUd1ztdUsX2L6uAwfv5QAcHEt+14/ys9OG2KuP6CpWi+lFsoGriQTTCoTn+dC4iej4S0hcA93SWnvyPctuAc/7CtcwtKm2o9fuyT8Tbtkw7WQe4ynpe0DnuxCo+ESuEjamxKY298Am5VtyDp6sKWXofB5vUhfwwv+4Nzj7QwHMT0gT2eqq3dtWNbvs/Ul2/XFFoe+4X/ReUM/GD4Vlp7siTQ== x-forefront-antispam-report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:MN6PR11MB8244.namprd11.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230025)(396003)(366004)(346002)(39860400002)(376002)(136003)(451199018)(478600001)(83380400001)(71200400001)(186003)(9686003)(6506007)(54906003)(76116006)(66946007)(316002)(110136005)(7696005)(26005)(64756008)(66476007)(66446008)(66556008)(19627235002)(8676002)(4326008)(41300700001)(52536014)(8936002)(4744005)(5660300002)(38100700002)(122000001)(82960400001)(2906002)(55016003)(86362001)(38070700005)(33656002);DIR:OUT;SFP:1102; x-ms-exchange-antispam-messagedata-chunkcount: 1 x-ms-exchange-antispam-messagedata-0: =?us-ascii?Q?GO/NqXgDR7YigN3E13Pf5GnMdtaFIXxOBRWET1gBZEG1l+S/cOrytG6+nIIe?= =?us-ascii?Q?0TdOkfoGsILwnk/CS1YUtbE8bdteXFeatdqpswmGqa6blwb8fR5Z90t/rTuu?= =?us-ascii?Q?xjj1vvfZV19LjbNO/gB79dxck8EWcLcnOF7il4EvoIdP+womn4IJJBx/XvKO?= =?us-ascii?Q?AKmqo3dT5Ftfmb6eBRXhgLzqT4W9IbyE4xLaJCF++8uh2SbWmRXWZZCnOb9S?= =?us-ascii?Q?bLFcHnvDtejzNYfNqt5m+jxHRhMv+hFaiBBOMEGDMouZZcXK9uMzYf5Ipjio?= =?us-ascii?Q?7HaO6tyXpZBILPrW7me0Xz/qggXI5vKkZ7LPn3kg5SWBp8saYPR8jAye2e6V?= =?us-ascii?Q?EADua3eX1skaVGGOVL0dLEZKNU33LLvckDzIpaLsSnIE/Fn+E4jBY/p+KldY?= =?us-ascii?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ClyTga1EcOqQ0++VA2y4aSQ?= =?us-ascii?Q?r131o+9ZIELcKcB4lmfhv7KRT4DfT05l+CRCJdoZnxddzdSIwnV8HmDzAmeP?= =?us-ascii?Q?uyaKOpp0LJoga1n241TWXuA6vFMlRySigy0sSd8zgRDb9/uunVS4i/rp1q4T?= =?us-ascii?Q?UaQBNRd9vCFgidQ5Wky03iCHh3vyrFUMcHSwFE3iyvczX+bYnuS4eDyDKMFC?= =?us-ascii?Q?PqpKHEvUCGYBGIq7lDCrnDUa8WynUXASyJOpHyv0S8CDhizxVTmny72kU9Tj?= =?us-ascii?Q?VBJL15Z2lF1b4i36Y6Pq6bZbsDr1C3vsLF4tJzBF?= 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: 40a6f7e6-e4fc-45e2-cc02-08db251dee0a X-MS-Exchange-CrossTenant-originalarrivaltime: 15 Mar 2023 06:24:28.0396 (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: qdTd+rD+3RjFGlvCvCZ7ynYcfiaXgy3JiznnDCjScwlSp2branQXGSVbisnSOQUr/VUfioAeZTaem6jlVYUGWA== X-MS-Exchange-Transport-CrossTenantHeadersStamped: PH7PR11MB7121 Return-Path: ray.ni@intel.com X-OriginatorOrg: intel.com Content-Language: en-US Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable > + if (PagingMode =3D=3D PagingPae) { > + // > + // These fields of PAE paging PDPTE should be 0 according to SDM. > + // 1. can you update comments to explain such as: "These fields are treated as ReadWrite, .... by the common map logic. So th= ey might be set to 1." > + TopPagingEntry.PdptePae.Bits.MustBeZero =3D 0; > + TopPagingEntry.PdptePae.Bits.MustBeZero2 =3D 0; 2. Above code sets the CR3 value. You should update the 4 PDPTE entries.