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 10A95740047 for ; Thu, 3 Aug 2023 08:14:46 +0000 (UTC) DKIM-Signature: a=rsa-sha256; bh=lKaPIH2kh9NM34ss0Tguz04CcvFnbmU4bkcTirEXLj8=; 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=1691050485; v=1; b=GB9+DLcU61vG0gRvNkKzXC5c9gf8+yl2YlpQLQHlLh49p3DyOSsEUtfCp4V+cF1Q0THbUyNb FECVyENQPMugmv3wFjQPkMlRedrN8f9v28Gh/OKGGXxVDdgIx/eefWJuROcYwGtSYKyQYvWVC0L A2av7IZhLmxyMKAyMvVYlye4= X-Received: by 127.0.0.2 with SMTP id F7mYYY7687511xbnDKy2t6C7; Thu, 03 Aug 2023 01:14:45 -0700 X-Received: from mgamail.intel.com (mgamail.intel.com [134.134.136.126]) by mx.groups.io with SMTP id smtpd.web11.9583.1691050485121141915 for ; Thu, 03 Aug 2023 01:14:45 -0700 X-IronPort-AV: E=McAfee;i="6600,9927,10790"; a="354717379" X-IronPort-AV: E=Sophos;i="6.01,251,1684825200"; d="scan'208";a="354717379" X-Received: from fmsmga005.fm.intel.com ([10.253.24.32]) by orsmga106.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 03 Aug 2023 01:14:15 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6600,9927,10790"; a="1060156190" X-IronPort-AV: E=Sophos;i="6.01,251,1684825200"; d="scan'208";a="1060156190" X-Received: from fmsmsx601.amr.corp.intel.com ([10.18.126.81]) by fmsmga005.fm.intel.com with ESMTP; 03 Aug 2023 01:14:15 -0700 X-Received: from fmsmsx611.amr.corp.intel.com (10.18.126.91) by fmsmsx601.amr.corp.intel.com (10.18.126.81) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.27; Thu, 3 Aug 2023 01:14:14 -0700 X-Received: from fmsedg602.ED.cps.intel.com (10.1.192.136) by fmsmsx611.amr.corp.intel.com (10.18.126.91) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.27 via Frontend Transport; Thu, 3 Aug 2023 01:14:14 -0700 X-Received: from NAM11-DM6-obe.outbound.protection.outlook.com (104.47.57.177) by edgegateway.intel.com (192.55.55.71) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.1.2507.27; Thu, 3 Aug 2023 01:14:14 -0700 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=Mln01Hpnzo/TlGpGdsGKyY2p+1UpQeAwZBLcQAxyOsauV+mya3/m43UAJEvewbZVfPYwdBducE3TbEfo6wBMogFoBoLYzr24jBOG+gMphC5RBVZzAO6Nz+iFAr9DrrKq4lMGnTgbsQNDowi32DMFP7o7H5XuZMFAZTrGv9PrwYztykTyvfZgbldnEu5lq+dPJOVduTNUnnOSMheRxU1qK7apyj6+FCUVxrnDKkehRE0KgptDeO4hA/v0eGniHqs8BOegJk1eeG0fa4gOaCxU0oio6hsuLpJirCvpzv6ZPP5omREaWfUF+zmLl9FOFcuz+dMT/ogp/nQywLlA/XSZaw== 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=JncDgwuF3o7ymkwuJVrq0YresiHLHhkGtXR3RLs66q8=; b=nxnRP1VjSGfi28G1yRN40wGG5FlxHqIVv246k2X3FQDGOcRX8uZr6/g8LAdaVUqCibW7MIqjGz7NYczkkCKrZwfv/mqAl9MQrDWCnJC8K163Lf99IZ7e5ZGm/dCI9hRex5nGwOdwNCTz4xhsP+iz3Pyahyn7XBNrSftlHI670Hop+YwlaFXgfaj2mCSSjvFHitiR6znrrK464DeWBHVUFvbD+KsqUFyEQ08WYSWPOnfmRR037l6SREg1WISs5bReE/kqQsE9uiS/AjNrKEQDhUnGN+p2PhyctAW1ZGYCg5r8QkbgEHbPfpZ944O9bV44LA7Y9SHckVv5Yn2GZIPoMg== 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 SN7PR11MB8109.namprd11.prod.outlook.com (2603:10b6:806:2e0::20) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6609.32; Thu, 3 Aug 2023 08:14:11 +0000 X-Received: from MN6PR11MB8244.namprd11.prod.outlook.com ([fe80::bf9a:54ca:d270:59b]) by MN6PR11MB8244.namprd11.prod.outlook.com ([fe80::bf9a:54ca:d270:59b%5]) with mapi id 15.20.6631.046; Thu, 3 Aug 2023 08:14:11 +0000 From: "Ni, Ray" To: "devel@edk2.groups.io" , "Ni, Ray" , "Xue, Shengfeng" , "Dong, Eric" , "Kumar, Rahul R" , "kraxel@redhat.com" , "De, Debkumar" , "West, Catharine" CC: "Wu, MingliangX" Subject: Re: [edk2-devel] [PATCH V1 1/1] UefiCpuPkg/ResetVector: Cache Disable should not be set by default in CR0 Thread-Topic: [edk2-devel] [PATCH V1 1/1] UefiCpuPkg/ResetVector: Cache Disable should not be set by default in CR0 Thread-Index: AQHZv6ZdU60BMGIetU+4xp3Iu3zPhq/Lzo4AgAx2CYA= Date: Thu, 3 Aug 2023 08:14:11 +0000 Message-ID: References: <20230726094754.171-1-xueshengfeng@byosoft.com.cn> <177562550EF0534C.27380@groups.io> In-Reply-To: <177562550EF0534C.27380@groups.io> Accept-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-ms-publictraffictype: Email x-ms-traffictypediagnostic: MN6PR11MB8244:EE_|SN7PR11MB8109:EE_ x-ms-office365-filtering-correlation-id: 047654a9-44d6-4edd-4b18-08db93f99e61 x-ld-processed: 46c98d88-e344-4ed4-8496-4ed7712e255d,ExtAddr x-ms-exchange-senderadcheck: 1 x-ms-exchange-antispam-relay: 0 x-microsoft-antispam-message-info: U915pny+zrYWWbuiXrU4yn9sh9qHZYIR3CbRAFs0TVKYTLU/Fp80A7deglly7F5j4rgSGET5gmXIBdrLYGfdxTFuZ2lHUFKwr7VCBLo/hqdFR8Q4M0Y77dzgOW7pUhWgJD6svgIMl4kNhglB4uOukMKju8vZB029/9o/k6H1TZi/qTkLpaShYTFSlC2cAbrvGNx3UbRDdioJa+alBvx1tVF1ykjvVpdJZ8jeZSCM+mf4q/Tu/WsgSUlKEEYHM7sW2CqtEzzvX6Gye+FTetljnvXO4dePMmZ6cgYyHek+bJbbpIU+ry2W0XHEVnfgDzEJOLGgaDKd7GvVtLy0zD914lggBgfR0oj3G9FHGtLUV6Gnbq0OHLSSOdaUhIIz/BmcKbUla/LiNSrLcaymQh26NJDXP/pxlYhw7RxRub4OvbgmLzoR2kxI7yI4LQ64fVm7i1/r0AQjCqTsVKVpTkgVeHH7jTKgHNr+SI8f0W7NJdQzcwVGekZ9dsyxuENyHMnwwN84alwFJsmY41y3ywUz1MtpK0zW5LSYawUsv11wAxBK/HTapDXdozl0py/jvNIP7tAaAfKrdELVo0Xyz4VSPYXw324eOVRxckNfmj17Mnt5bazdIO/YyrKqWgA37e8K5nLtNK4BMZnYE9MaQmNFKZb/rM5ZHaHimfojqXgVt4Q= x-ms-exchange-antispam-messagedata-chunkcount: 1 x-ms-exchange-antispam-messagedata-0: =?us-ascii?Q?+WcA4AaE8w5WKDCTciGU4xYCS+DDNaayBmZQ3jdoa/W4f40daEmpqiYS+KtQ?= =?us-ascii?Q?+athDGuQKREqwpnLi2rGMfqJLFOHPGpcTz4PAI5hGBODAZTkvIpSHgGNNhlc?= =?us-ascii?Q?sOCLcef74qehSStE3ivvSjJdw1EWzqIFfTH/ItPBXa/tH942Eir8mwcWjusn?= =?us-ascii?Q?R9dpGsyb8xD+8jn/wQd7Qsl0IDv1JNsOf/PKIwsNKtQIi9uycqie+aICVZPr?= =?us-ascii?Q?iZqGfmrKfv+28JMUPSdGKNOiJY0SIJjjry2VUc96WmwJz0zPf64Sikz0GUN2?= =?us-ascii?Q?4uirc6aXd8xiEFDX6S2VLsKmkDKsUtX9/DvElv4vuNLJr2EEkEm0hGbgefrp?= =?us-ascii?Q?ND/El+Dv2709BecEUu9ukfIadqUr+02q7Tam2KZGF0rddOPBMkXJD1aHmF64?= =?us-ascii?Q?nmgOy4OutF7jzx2d+JLmPTZw09L9ksNYYAZIq8MBuVH7lpCpRm0EOCy9dvVf?= =?us-ascii?Q?FPcKhulVOdqzO8ZoKuB1XbImtWxowWZ18AfGpF3rf1iitOpCFESE4xsNOSDl?= =?us-ascii?Q?VdWK0RgVsKrft8qKZ3vpzk0apPF1ANPK3ljxSmeh9qGKLv6PRIqo+04gS9by?= =?us-ascii?Q?L/v5QeOy74Fisq6OKveCug3qQQneZ/x8UWxVsqMJa2Zqw6lparZ9Z+eUsoS4?= =?us-ascii?Q?/yfceuwElk7OyPqJCcsrN+5nLlfzeMvBplZ5/5xc0bLXr7aJlWDJTbfQcK14?= =?us-ascii?Q?oymQLyJ3zBkoG5jRemV6oAKB68nRF6oeWQDGP8UMZpWHGF/koOgDzvRvuMMS?= =?us-ascii?Q?Fv2Clxje6WFq+depfYfN9ZCIbyulVCQymBWmMah62m8zjYySSq6KEf1fksbv?= =?us-ascii?Q?uliPZcNs2GGXGk282Q30VBggF0+AHrFcdA+z+C01k6NYr2IMayCZ4Iz6MjJb?= =?us-ascii?Q?vs92tW+feLy8B6kimSccYfcNLPv6Qfj+IWOcqMPoWtazzGziv5AKIMPVrzHj?= =?us-ascii?Q?LiRcPTDgepZ6VvwqgLnHeHhEnM4EGBDMugiYijwW8jktEZupI7JoWctnoW0h?= =?us-ascii?Q?kejpPeMysZgxZppq/U533AZnpr8l6k9HuRR+tXLT3FbruBlCwONXqjX/qpt7?= =?us-ascii?Q?DbemYY+f46gIQHDBqYvE8wvq5VTPqWuY0isblnV8kYtiQFX8wWSGS46zCymy?= =?us-ascii?Q?IN361jC6AzRxPnbi39Rj8/VZcXakQEXo8qv6p1w5zgIoiXtZLEu5dxnFdSmr?= =?us-ascii?Q?KtchlZf4vDEns8/GfktOGreyzoFTRDYx9cRZ52G8YuVk6fVxBBdEVljaQhxm?= =?us-ascii?Q?zdu0jaEQPkZdOmSFYQ++SAtjks6X6HgQgCu2S+BegB9gOcJfCudsWGl0QcNW?= =?us-ascii?Q?jpVJP+CqVOW+ySHAh9kgUXTHUVKf1Kc+aInHrUyZo1etXRkO22n2xojNRlYm?= =?us-ascii?Q?/+9eYK0e0Of0Yfg6bcVFUb5apn7ITcQy5VeZyB135adoL1/bkP9/JSzLjrsO?= =?us-ascii?Q?ug4oMvLvJcVPkNac4odwT1lm8S99tGPMt/mSguBPK90LYjbWXbPajQhPgM+2?= =?us-ascii?Q?du6w8gZQGV5M2DrGBNQtXQDJ/DsMNLLmkoWbqUf6/2XHR9AndqsWASMglIkO?= =?us-ascii?Q?ztVcGMyYrO3W032fhpY=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: 047654a9-44d6-4edd-4b18-08db93f99e61 X-MS-Exchange-CrossTenant-originalarrivaltime: 03 Aug 2023 08:14:11.6208 (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: 9O2H01S1zGyOvOswLKu8xbGltjIt2idbE4SrgMlLZ2Ng2PGObX8z3IAYCtAvfOQ3xUHSbYw5Z58rWwSnAxaFOQ== X-MS-Exchange-Transport-CrossTenantHeadersStamped: SN7PR11MB8109 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: IfQ8LwPzxhd2YkkwYIqsq4fex7686176AA= 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=GB9+DLcU; 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; arc=reject ("signature check failed: fail, {[1] = sig:microsoft.com:reject}") The patch resolves an issue in Boot Guard enabled system that NEM is alread= y enabled by Boot Guard, disabling cache evicts all cache content which is = unexpected. Reviewed-by: Ray Ni > -----Original Message----- > From: devel@edk2.groups.io On Behalf Of Ni, Ray > Sent: Wednesday, July 26, 2023 5:56 PM > To: Xue, Shengfeng ; devel@edk2.groups.io; > Dong, Eric ; Kumar, Rahul R ; > kraxel@redhat.com; De, Debkumar ; West, Catharine > > Cc: Wu, MingliangX > Subject: Re: [edk2-devel] [PATCH V1 1/1] UefiCpuPkg/ResetVector: Cache > Disable should not be set by default in CR0 >=20 > This patch is not right. >=20 > Intel SDM explicitly says the initial CR0 value is 6000_0010. CD bit is s= et. >=20 > So the ResetVector code that still sets CD bit should be good. >=20 > If you are facing NEM enable failure, can you change your NEM enable logi= c to > explicitly clear CD bit instead of changing here? >=20 > Thanks, > Ray >=20 >=20 > > -----Original Message----- > > From: xueshengfeng > > Sent: Wednesday, July 26, 2023 5:48 PM > > To: devel@edk2.groups.io; Dong, Eric ; Ni, Ray > > ; Kumar, Rahul R ; > > kraxel@redhat.com; De, Debkumar ; West, Catharin= e > > > > Cc: Wu, MingliangX ; Wu > > Subject: [PATCH V1 1/1] UefiCpuPkg/ResetVector: Cache Disable should no= t be > > set by default in CR0 > > > > From: "Wu, MingliangX" > > > > REF: https://bugzilla.tianocore.org/show_bug.cgi?id=3D4511 > > > > With 64 bit build we are seeing the CD in control register CR 0 set. > > This causes the NEM to disabled for some specific bios profiles. > > > > Cc: Eric Dong > > Cc: Ray Ni > > Cc: Rahul Kumar > > Cc: Gerd Hoffmann > > Cc: Debkumar De > > Cc: Catharine West > > Signed-off-by: Wu, Mingliang > > --- > > UefiCpuPkg/ResetVector/Vtf0/Ia16/Real16ToFlat32.asm | 2 +- > > 1 file changed, 1 insertion(+), 1 deletion(-) > > > > diff --git a/UefiCpuPkg/ResetVector/Vtf0/Ia16/Real16ToFlat32.asm > > b/UefiCpuPkg/ResetVector/Vtf0/Ia16/Real16ToFlat32.asm > > index f59fc6ead4ba..4af2e875c31c 100644 > > --- a/UefiCpuPkg/ResetVector/Vtf0/Ia16/Real16ToFlat32.asm > > +++ b/UefiCpuPkg/ResetVector/Vtf0/Ia16/Real16ToFlat32.asm > > @@ -7,7 +7,7 @@ > > ; > > ;---------------------------------------------------------------------= --------- > > > > -%define SEC_DEFAULT_CR0 0x40000023 > > +%define SEC_DEFAULT_CR0 0x00000023 > > %define SEC_DEFAULT_CR4 0x640 > > > > BITS 16 > > -- > > 2.26.2.windows.1 > > >=20 >=20 >=20 >=20 >=20 -=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 (#107527): https://edk2.groups.io/g/devel/message/107527 Mute This Topic: https://groups.io/mt/100367559/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-