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.6855.1683683821598850620 for ; Tue, 09 May 2023 18:57:01 -0700 Authentication-Results: mx.groups.io; dkim=fail reason="unable to parse pub key" header.i=@intel.com header.s=intel header.b=FhJDUcE9; spf=pass (domain: intel.com, ip: 192.55.52.120, mailfrom: jiaxin.wu@intel.com) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1683683821; x=1715219821; h=from:to:cc:subject:date:message-id:references: in-reply-to:content-transfer-encoding:mime-version; bh=hu8YDy3RLygPqHh3cDk+Fz1AM1J2r+Xj7CxB4eB1ln4=; b=FhJDUcE9yhCsQ/MGeRv2Xdp5YsXMbeYiKwvov7Q57+HoYw2Iy/v98Q/t 8hkcf9JEefuz41gsDMHvWDBIhWcIm8DIvbvRWJMXTAMngMJ2bD6r3G/sv 2Ay/zsgFwMoe+FEkb4668Uc1fgenjPTiqjXQkEfnP5leDZtILT7UunTJw ejwCX6DMJu0lXb1kK+8IH08wdXzTkLxIxpDV+iVrmRS0gun1raY/37jzk euwrXEjYOJAuVI9K/wujzWuZsuS2gDmKw4TPk2E3D0tHwgXeVaqFvppzm ++xZTT/P2JqNhDW18OrgYwwl6usGR5dAbliLAV/nvgyZwkDpcT/ikkLar g==; X-IronPort-AV: E=McAfee;i="6600,9927,10705"; a="348939295" X-IronPort-AV: E=Sophos;i="5.99,263,1677571200"; d="scan'208";a="348939295" Received: from orsmga007.jf.intel.com ([10.7.209.58]) by fmsmga104.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 09 May 2023 18:57:01 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6600,9927,10705"; a="693218652" X-IronPort-AV: E=Sophos;i="5.99,263,1677571200"; d="scan'208";a="693218652" Received: from orsmsx603.amr.corp.intel.com ([10.22.229.16]) by orsmga007.jf.intel.com with ESMTP; 09 May 2023 18:57:00 -0700 Received: from orsmsx601.amr.corp.intel.com (10.22.229.14) by ORSMSX603.amr.corp.intel.com (10.22.229.16) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.23; Tue, 9 May 2023 18:57:00 -0700 Received: from ORSEDG601.ED.cps.intel.com (10.7.248.6) 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.23 via Frontend Transport; Tue, 9 May 2023 18:57:00 -0700 Received: from NAM11-CO1-obe.outbound.protection.outlook.com (104.47.56.168) by edgegateway.intel.com (134.134.137.102) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.1.2507.23; Tue, 9 May 2023 18:57:00 -0700 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=FoPurtGET9c1uD0AGa+n7bL+uY/stRLP8FZPwnUIzFy1LJFtfQBegEJpOCogx42XaeNHZ1lVTuChxEk+txNSIji+A2h+KOuRvETX0Q055/PcC1fP8Rau9DJusJ9Oz/IR4dkDqvR3bm33kbhlSogVpVj5a/ThVf08H/JmuO4fgXW+xGHCwkexXB92MJmzvvzk7cpvtxLIPeVCA8aLd3gKn2S21ywH4HHtFBurxEBIYtuGVwO7PcXSCilDad6AZHQAPChTR8TJD1JD84lBFUW44v3lX2EntPwUSG3pJdhwMrY2fkmBIKKONQiGrt4QjiS2ChEkCBvaJ/owlUREPrAyuw== 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=F2pGOY0QDiix1g6TdzWfBo8K85yFW8bHDDfbSzR/yxU=; b=kdWBHE3acRetOMfs1cY7ofwPgmYPgvTlhyUil2Cpbt6qRgZMKcRPPbA3k64ukoceqhCBG1RIIdtwFDSAoa4xzuBnSndQeOa4T20qme+NfcYGlPmUmLion7c8VdBwg0QtuCB7hrUbE7cJ+I9B+VWmM2RAagX7ZNnZ7y+UOYDbMNswrIcUCcYrIv1lMi0FYtzcGCrCpcja1XHtX+34cl5GoXsnFryb+djP8BYSRBJfmDnESvy62QdScoaOXAnG47mGR/Qz/BMXHojQwJBLDFBbDrFw7EB3pZm24iUFoEHQR/MohfCzI510sVDaF9dW/MKDDJNcX0tS1X8RkpsD6+afEQ== 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 MN0PR11MB6158.namprd11.prod.outlook.com (2603:10b6:208:3ca::18) by DS0PR11MB8113.namprd11.prod.outlook.com (2603:10b6:8:127::11) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6363.31; Wed, 10 May 2023 01:56:54 +0000 Received: from MN0PR11MB6158.namprd11.prod.outlook.com ([fe80::647e:54e0:2be7:9d02]) by MN0PR11MB6158.namprd11.prod.outlook.com ([fe80::647e:54e0:2be7:9d02%2]) with mapi id 15.20.6363.032; Wed, 10 May 2023 01:56:53 +0000 From: "Wu, Jiaxin" To: Gerd Hoffmann , "devel@edk2.groups.io" CC: "Dong, Eric" , "Ni, Ray" , "Zeng, Star" , "Kumar, Rahul R" Subject: Re: [edk2-devel] [PATCH v1 2/3] UefiCpuPkg/CpuMpPei: Enable PAE page table if CR0.PG is not set Thread-Topic: [edk2-devel] [PATCH v1 2/3] UefiCpuPkg/CpuMpPei: Enable PAE page table if CR0.PG is not set Thread-Index: AQHZgoRo1EPijnIfPkSYzQ3GLpqOvK9SsoMw Date: Wed, 10 May 2023 01:56:53 +0000 Message-ID: References: <20230509102253.16632-1-jiaxin.wu@intel.com> <20230509102253.16632-3-jiaxin.wu@intel.com> In-Reply-To: Accept-Language: zh-CN, 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: MN0PR11MB6158:EE_|DS0PR11MB8113:EE_ x-ms-office365-filtering-correlation-id: 947011fe-1729-463d-0d1f-08db50f9d417 x-ms-exchange-senderadcheck: 1 x-ms-exchange-antispam-relay: 0 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: eruotBcTxmTqD7g3kGPWkn4PfkgwL+0mtcUJSrGz1wJKiDAa5R1YVQ5/jtcJwiOd0NoayFMDoNR9OBxnI0KAUtJd8+8KxIPmKxpJwGVE9l0B3oc4qDcX6wgaw3HV4Iwnq+2YSuum3x0SKcpUznESJi2lahX+9brGrDI7YfGl5sHpiF0nmQo3Th2MKT9ihHJjSpa14xp2ANffhRav25laHN8fE9wlep4ZC4ytxGqt7BXoYDHT48LeSvDVUUuE1OWqDXSyide3jTxE4yIl7ByT1OGOH/hagwmf3BiaVdEc4WVyJrtwl7NEfaQQqNvUv0JngeBj7bbKnSd/IZLxQKg2HdVCa4Ar/CNHCJHvfn4Q68U6uScyNSy53GasOBD2ZEg5mc8kjwCg4RnUeogEuBriwQIc7+j63W/ZbxVrqHlHum3bDTWsxy4Bg2Ltgq68+w8mT/mk+PbUMai0aTz5E93gTCLEeubVphwtKiiTGb5RYJ91ZNv5JGMkDGLVkAG4Yv4GQwJKDLx6eRM+wHB3CMAIm8mPrxpNZdnYZvJqXjFyWed0Z5CrhTYymA/FtMxH8GHr0NadFfOjFCl50SRPN3PuO0KgdKf1/KmE4KO42hKGG9GKHL4dehaIXwP3VwsAnoeX x-forefront-antispam-report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:MN0PR11MB6158.namprd11.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230028)(6029001)(346002)(136003)(376002)(396003)(39860400002)(366004)(451199021)(4744005)(54906003)(2906002)(316002)(8936002)(8676002)(64756008)(66446008)(4326008)(66556008)(5660300002)(66476007)(41300700001)(110136005)(478600001)(66946007)(71200400001)(76116006)(52536014)(7696005)(9686003)(6506007)(26005)(53546011)(107886003)(186003)(82960400001)(38100700002)(55016003)(83380400001)(38070700005)(33656002)(86362001)(122000001);DIR:OUT;SFP:1102; x-ms-exchange-antispam-messagedata-chunkcount: 1 x-ms-exchange-antispam-messagedata-0: =?us-ascii?Q?mgw6k1hHJW5TIohO37BoOFFnZBueDLK26wdvs6Tc+yOgQCeaOFRQuw6sV2fq?= =?us-ascii?Q?TIAnyRaetEj521c0c6LEISWKoFaa3tzvr30dH5JBluiTo7xdkXzwgLPGdNyU?= =?us-ascii?Q?3E6aHe5wgHE4FnXFQaFTDfH0ghdn+vFfKmPiGCdwgGzG7M2SP09kWgfRJLLH?= =?us-ascii?Q?6qGac8eQ/hVzBurR/BKCSxmtKmSRF9z2cRIEdis/VvxBy7UTPZR2TcFSBDFU?= =?us-ascii?Q?hePaghllddXSv25pqOWUg/oaxpUWYCQAiFRTcFJgEqEBcjSGBCur3RY0BIZ6?= =?us-ascii?Q?b81iWJdK8ed1MNRNLYFOtGIWI2xrowTA0Q0Uc1e9dj8L7hskHWjpVCzXgp+y?= =?us-ascii?Q?6Oi/enya/7xCYCqy6A5X0m+pj/Td1zkAFR4vuL9L8EAC/+Ncy+9Vsn8v6+9W?= =?us-ascii?Q?x82CTAFrJvXy+YB+DntalVrhNtkNKv9VZDYukQWWVHU8tvYtfBCTSnBT4KOi?= =?us-ascii?Q?GCwLVwWKajnOymiJGiV7fMbm7HkNwFSQSpZaVCnDCjmr9OPZ8FE0qxziG3B2?= =?us-ascii?Q?P42/0lVcD3UZr1nJhMrTol+roou6jgpKX7pXMcSgMyVjoSPuJekDPVAlcoLS?= =?us-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n9WBIvJtbdF93dRo18Jq+hZgLC?= =?us-ascii?Q?auzAogWKH/MBDyZmz+dNRPqMyTI71auEakhLWpM0xUVwqdCfuw1U3Vtl1StI?= =?us-ascii?Q?r60dy6X6yRQMEPEqUYWtwjRHW16tc8ESxHaTJQOW?= MIME-Version: 1.0 X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-AuthSource: MN0PR11MB6158.namprd11.prod.outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: 947011fe-1729-463d-0d1f-08db50f9d417 X-MS-Exchange-CrossTenant-originalarrivaltime: 10 May 2023 01:56:53.8397 (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: YE2Gxs7VCMuW9d0sphe+d8jnf1kGOXPeHazmLCvZK6agxBQz/PdxctM8MBSdoVlZ0zvDQuWBt8b12gkhL0sh/A== X-MS-Exchange-Transport-CrossTenantHeadersStamped: DS0PR11MB8113 Return-Path: jiaxin.wu@intel.com X-OriginatorOrg: intel.com Content-Language: en-US Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable Agree, I will replace it with simple assert check: ASSERT (sizeof (UINTN) =3D=3D sizeof (UINT32)); Thanks, Jiaxin=20 > -----Original Message----- > From: Gerd Hoffmann > Sent: Tuesday, May 9, 2023 10:42 PM > To: devel@edk2.groups.io; Wu, Jiaxin > Cc: Dong, Eric ; Ni, Ray ; Zeng, S= tar > ; Kumar, Rahul R > Subject: Re: [edk2-devel] [PATCH v1 2/3] UefiCpuPkg/CpuMpPei: Enable PAE > page table if CR0.PG is not set >=20 > Hi, >=20 > > + // > > + // Check CPU runs in 32bit mode. > > + // > > + MsrEfer.Uint64 =3D AsmReadMsr64 (MSR_CORE_IA32_EFER); > > + if (MsrEfer.Bits.LMA =3D=3D 1) { >=20 > Checking this at runtime is pointless. 32bit code would simply > not work in long mode and visa versa. >=20 > take care, > Gerd