From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mga07.intel.com (mga07.intel.com [134.134.136.100]) by mx.groups.io with SMTP id smtpd.web10.48955.1680246654388619656 for ; Fri, 31 Mar 2023 00:10:54 -0700 Authentication-Results: mx.groups.io; dkim=fail reason="unable to parse pub key" header.i=@intel.com header.s=intel header.b=N4kS1HtB; spf=pass (domain: intel.com, ip: 134.134.136.100, mailfrom: dun.tan@intel.com) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1680246654; x=1711782654; h=from:to:cc:subject:date:message-id:references: in-reply-to:content-transfer-encoding:mime-version; bh=+0dv0v4b120QlO/gw11snRalwowx0P4Tx5HGxE2n+Ns=; b=N4kS1HtBJZ530RPlkPkXcwoRayhMnnIlKd3V8iUB+5fRDuP32mKb/nLW Xch9RWHbYWtT5gS8TW+gdpIJ94N8mCCidy8Bj5MWZaHGMgjNBZvnEVjPV xGJ7IM+22TvDcxPYTnppsl+/Z0rBhr/NBfbcaSlup9jiCTU1DxdlqXHX9 UqLZrAKZruH+psftzbDl3OT86xCFzK6GlrJwkjDRtLOPlGox7tKk8D8bS Ft66YoLdsEjc+6WdbjHYxYN56ip3qCJxS24SatN3M9YA2FV/PPELbN9Qc ecPMSvhxlm7DcJZqs6BqrOkIwmFAFJq9GeqCWNlVzFYTDegeMVdQy8GmT A==; X-IronPort-AV: E=McAfee;i="6600,9927,10665"; a="406391061" X-IronPort-AV: E=Sophos;i="5.98,307,1673942400"; d="scan'208";a="406391061" Received: from fmsmga001.fm.intel.com ([10.253.24.23]) by orsmga105.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 31 Mar 2023 00:10:04 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6600,9927,10665"; a="828607652" X-IronPort-AV: E=Sophos;i="5.98,307,1673942400"; d="scan'208";a="828607652" Received: from fmsmsx603.amr.corp.intel.com ([10.18.126.83]) by fmsmga001.fm.intel.com with ESMTP; 31 Mar 2023 00:10:03 -0700 Received: from fmsmsx602.amr.corp.intel.com (10.18.126.82) by fmsmsx603.amr.corp.intel.com (10.18.126.83) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.21; Fri, 31 Mar 2023 00:10:03 -0700 Received: from FMSEDG603.ED.cps.intel.com (10.1.192.133) by fmsmsx602.amr.corp.intel.com (10.18.126.82) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.21 via Frontend Transport; Fri, 31 Mar 2023 00:10:03 -0700 Received: from NAM12-BN8-obe.outbound.protection.outlook.com (104.47.55.176) by edgegateway.intel.com (192.55.55.68) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.1.2507.21; Fri, 31 Mar 2023 00:10:03 -0700 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=P0BxzhAFbZJXjPVBK4Lhx9MU4yrc9cRp849DD8Paiw28xGYmpIA7ZuGcnNhmiMuctwk+6Oezy1D37bf2UwjUAeQt4z0zV+DBn6/M30BXsiftCBHCvvOEb3Y4QaLpG6tLB3aVwqFHuJYkUILsTGElL3qvH6hSdJLxYjTNKAvodssX7Og7Fju2pBwLX/dbF6K4gORVBujQmDpEntvi7wnfgUDJjuabjyQFNa3lb2KEC029us5z2cdLOeIIj7zknXaotd5bk/FCuH06xP3T16Dep96L8nQtDidQAMnYbk0qjwLbfYogfY8Ovi3m/IBGrVcGMzuEreHj47ebiGmqlskIqg== 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=pe1I3v7juXIdAs3LSpuF2gzCboykLvZPv7nDZF5sK5w=; b=PsKv8pIFwK6DRS5gGNZ8y1IQWBgwBVACIFL2XYTPPbTJRh7soxvAvFsqqJ3mTmjUEytYkUtlNCdh+t0g7WGkmnioEAgWvP6cvS805lGvk6Ua6ill68BwSYcYvA9f1g4VGGgwfZc2yxjVCbLO6IMvFmDtJqQNOzxmk2gHYK4BHeIcidr1JnK+aAa/gAr4IRyDACXUWM/D5KRAguVU7Rj/jXPpvTOEh+TC4XaRwy+eKi7+Z7Sm3Ez3AIzbX79rDn0t+tw+in12VstpY7P525D//T6QcpbnsZOZ3un6K9V55eZrUcpvv49TfPmYQnKa9bgmy1Z8rKSvfCtr/ak7cZDjxw== 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 BN9PR11MB5483.namprd11.prod.outlook.com (2603:10b6:408:104::10) by IA0PR11MB8333.namprd11.prod.outlook.com (2603:10b6:208:491::16) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6254.22; Fri, 31 Mar 2023 07:10:00 +0000 Received: from BN9PR11MB5483.namprd11.prod.outlook.com ([fe80::2ac6:e032:8994:2e12]) by BN9PR11MB5483.namprd11.prod.outlook.com ([fe80::2ac6:e032:8994:2e12%4]) with mapi id 15.20.6254.022; Fri, 31 Mar 2023 07:09:59 +0000 From: "duntan" To: "Ni, Ray" , "devel@edk2.groups.io" CC: "Bi, Dandan" , "Gao, Liming" , "Wang, Jian J" Subject: Re: [PATCH 7/9] MdeModulePkg/DxeIpl: Create page table by CpuPageTableLib Thread-Topic: [PATCH 7/9] MdeModulePkg/DxeIpl: Create page table by CpuPageTableLib Thread-Index: AQHZYR82Bgk1snFskEa+qCDSLp4Kt68Ud/PwgAAEwpA= Date: Fri, 31 Mar 2023 07:09:59 +0000 Message-ID: References: <20230328024302.2085-1-dun.tan@intel.com> <20230328024302.2085-8-dun.tan@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: BN9PR11MB5483:EE_|IA0PR11MB8333:EE_ x-ms-office365-filtering-correlation-id: 491248de-25d6-43ff-1347-08db31b6f0e8 x-ld-processed: 46c98d88-e344-4ed4-8496-4ed7712e255d,ExtAddr x-ms-exchange-senderadcheck: 1 x-ms-exchange-antispam-relay: 0 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: PPZ38ALTJs+xdDQOsRbz80btnPOVy/arTSvwEJf+3t2xAmhqSUfSgwyKSlBj/Z+aUrl5Orj6hGLqW3H3E7O2EXZdwp8p/42RP7HT7GUaeKoUFGgj7mbeuLC2NtrjVGpmeGy9y1vuCGbgGF7jBOZpdNyGxMQ+Hd9iOJV0n3sI1bQuU+iTMogLpKkb+YWj127o+lI0/+GFonRfJK1/J9++aL5Fu+1ntsTuKnhV/dCaVL56Pj8rHHY9FJXHNlgZan4qwewPNUHTZP3kunb7yFM4LwkvoeCGeLRe4S6WvAzfeL0aKCR+glkf6dODN0M6rVaObTbpP4fivKxA6dHzFNye5TWr4laO/IpngwWAgQ9Yh5skRLXmVMuqLBNPYqNkyHSZcYt35kv+u7hM92Fb8tZy4Jrf8m/VH0WPTewVw+jdZ5Qq1Yu0a5CTU+tIJb6uPFIsrGY1nKYwtn8SfAa78KMvsGOCCwHJt3rJe/Cl4x5cvOgYmcpwbUVTDG5WTTZfL76bSGzm5SBWtIra1fFvko68TKGJaKmq5FwnEU64Nx5I7NekD+KbgLZvn9dPg4MIzaWYS6X8n4TX39b0xIt5kpnNVgqzRVZdTaamYR8GdM/bJ3yUipbYnBwBBshugX6b2Cio x-forefront-antispam-report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:BN9PR11MB5483.namprd11.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230028)(376002)(136003)(346002)(39860400002)(396003)(366004)(451199021)(26005)(186003)(9686003)(2906002)(53546011)(6506007)(33656002)(55016003)(38070700005)(38100700002)(122000001)(86362001)(82960400001)(83380400001)(71200400001)(7696005)(52536014)(5660300002)(8936002)(8676002)(4744005)(66446008)(110136005)(66946007)(76116006)(4326008)(64756008)(66556008)(66476007)(107886003)(19627235002)(316002)(478600001)(41300700001)(54906003);DIR:OUT;SFP:1102; x-ms-exchange-antispam-messagedata-chunkcount: 1 x-ms-exchange-antispam-messagedata-0: =?us-ascii?Q?IpuUzTiJt5J5TKpelJPDkMUACu1ekXcLwvQptekdXIjfKxRP/uteyI6NwKzZ?= =?us-ascii?Q?UuXDri//Pja525V3mTHogyzS7oTvufWRWTTlW7v2zKJe3ZnPM9FU+QOEUy8Q?= =?us-ascii?Q?GO3lx6M7p3BXARCGgvpaK4MJ7v7fWA6dKp1TKfVGiv54cAZlGnxdR3WY9Vlt?= =?us-ascii?Q?QTKDn0GEZ39A0vAqeoRocIZ3Wlu9A0qwxKe5UOkZiIVSxNxhs3eImqpkfchk?= =?us-ascii?Q?t1gPs9vLepCDVpRHN+dxZKZCCCOpov1QlikZBNWgVRLTPXklriNwqVfpHaZP?= =?us-ascii?Q?wTTNJO5omLftM276rXgcNIFHQ1WcWcft4QTzaE8ZIQ1a9PS58bV9oG9kCC65?= =?us-ascii?Q?U8CfUis2mEMFa78srz62ThmBY3MU/pHsjUE18iMLEnXjjVeCVRbgesysSEs8?= =?us-ascii?Q?HaeUdmf3UpiBGiw4XmLKSJkxQMBN3UYeswj4pC/RlkLYXOjLDaLbWUnVLd55?= =?us-ascii?Q?vC7bt4LuV/FqaaecbEoZFx/5pddYdhfl+33qoY0Dpz5sIcIQ8I/IpKpnvKsu?= =?us-ascii?Q?Q4w8Secpa09jwGprFnjHo395vOu7g2K9U3P04i4uYI0hRzqFaajMGE5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SJAAXTq042GZmV+qvg/yzamXikp7RRrGk62T0pRU5deZbY?= =?us-ascii?Q?dohXHs5zTJT6rs0BPJ7QX4dyjEZcBrVpbBQ5anz83gyTgf3diHX6xBAytWdQ?= =?us-ascii?Q?HwdJN37xs0wviARq2Kw=3D?= MIME-Version: 1.0 X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-AuthSource: BN9PR11MB5483.namprd11.prod.outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: 491248de-25d6-43ff-1347-08db31b6f0e8 X-MS-Exchange-CrossTenant-originalarrivaltime: 31 Mar 2023 07:09:59.8127 (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: Nt5uJB7IhF29ostSBpa+cSWDJOuote0yil5+pjYJQMzuqZa1SY9VETSeeulgfcylmlTH9lssBzE3p7c361M9fQ== X-MS-Exchange-Transport-CrossTenantHeadersStamped: IA0PR11MB8333 Return-Path: dun.tan@intel.com X-OriginatorOrg: intel.com Content-Language: en-US Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable Ray, Thanks for the comments. I'll modify the code in next version patch set. Thanks, Dun -----Original Message----- From: Ni, Ray =20 Sent: Friday, March 31, 2023 3:01 PM To: Tan, Dun ; devel@edk2.groups.io Cc: Bi, Dandan ; Gao, Liming ; Wang, Jian J Subject: RE: [PATCH 7/9] MdeModulePkg/DxeIpl: Create page table by CpuPageT= ableLib Thanks for the cleanup: 166(+) 679(-). 2 minor comments: > UINTN > CreateIdentityMappingPageTables ( > + IN BOOLEAN Is32BitPageTable, [Ray] Can you change the parameter name as Is64bitPageTable? Because 64bit = is the trend, I don't like to say future is "FALSE". > + MapAttribute.Uint64 =3D 0; [Ray] Can you add explicitly "MapAttribute.Bits.Present =3D 0"? > + MapMask.Uint64 =3D 0; > + MapMask.Bits.Present =3D 1; > + if (IsNullDetectionEnabled ()) { > + CreateOrUpdatePageTable (&PageTable, PagingMode, 0, SIZE_4KB,=20 > + &MapAttribute, &MapMask); } >=20