From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mga05.intel.com (mga05.intel.com [192.55.52.43]) by mx.groups.io with SMTP id smtpd.web10.67098.1679557268568440146 for ; Thu, 23 Mar 2023 00:41:20 -0700 Authentication-Results: mx.groups.io; dkim=fail reason="unable to parse pub key" header.i=@intel.com header.s=intel header.b=KRbqCqlh; spf=pass (domain: intel.com, ip: 192.55.52.43, 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=1679557280; x=1711093280; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=Ow+LcQlE+LgX+7MQaNs+7k1nWAAvcXDgoh3dB9Eqgy8=; b=KRbqCqlhDq5HYdxQgzBtoDUCejM/iAhd20EEbSQExcTTJm1ySn882eAJ oKtPE8T2+VC/OK7S4XGq0DzqK1eG0MLwuhVN7MbPk26dr0zq6OGa2/31Z 4b78gqdZwSVMxyA3yZ7vIqJKl//Bi9nMUb6MCZ8goXk+OGRNrncbxwXVk pMUQdH4fjMt6P/Wjqxc2icvHz4pJwikSKzNZyAqCVDBEmOWo+RA23O2dE reqoHeu1vKMOJNMM85MYfVWaYm0r7edkAqK9beBn2PuLmsx9x90lZxk2L GRKSJWcZKeJrmYUw8EzHHWIKDXdBG/M1Bo8Qys0qwB4/2HIEOSh+bw/Le Q==; X-IronPort-AV: E=McAfee;i="6600,9927,10657"; a="425699555" X-IronPort-AV: E=Sophos;i="5.98,283,1673942400"; d="scan'208";a="425699555" Received: from fmsmga007.fm.intel.com ([10.253.24.52]) by fmsmga105.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 23 Mar 2023 00:41:20 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6600,9927,10657"; a="684616828" X-IronPort-AV: E=Sophos;i="5.98,283,1673942400"; d="scan'208";a="684616828" Received: from shwdeopenlab702.ccr.corp.intel.com ([10.239.55.92]) by fmsmga007-auth.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 23 Mar 2023 00:41:18 -0700 From: "duntan" To: devel@edk2.groups.io Cc: Eric Dong , Ray Ni , Rahul Kumar , Gerd Hoffmann Subject: [Patch V4 05/21] UefiCpuPkg/CpuPageTableLib:Clear PageSize bit(Bit7) for non-leaf Date: Thu, 23 Mar 2023 15:40:41 +0800 Message-Id: <20230323074057.549-6-dun.tan@intel.com> X-Mailer: git-send-email 2.31.1.windows.1 In-Reply-To: <20230323074057.549-1-dun.tan@intel.com> References: <20230323074057.549-1-dun.tan@intel.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Clear PageSize bit(Bit7) for non-leaf entry in PageTableLibSetPnle. This function is used to set non-leaf entry attributes so it should make sure that the PageSize bit of the entry should be 0. Signed-off-by: Dun Tan Cc: Eric Dong Cc: Ray Ni Cc: Rahul Kumar Cc: Gerd Hoffmann --- UefiCpuPkg/Library/CpuPageTableLib/CpuPageTableMap.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/UefiCpuPkg/Library/CpuPageTableLib/CpuPageTableMap.c b/UefiCpuPkg/Library/CpuPageTableLib/CpuPageTableMap.c index ad68792ca8..cf0cfeca77 100644 --- a/UefiCpuPkg/Library/CpuPageTableLib/CpuPageTableMap.c +++ b/UefiCpuPkg/Library/CpuPageTableLib/CpuPageTableMap.c @@ -202,7 +202,8 @@ PageTableLibSetPnle ( Pnle->Bits.Nx = Attribute->Bits.Nx; } - Pnle->Bits.Accessed = 0; + Pnle->Bits.Accessed = 0; + Pnle->Bits.MustBeZero = 0; // // Set the attributes (WT, CD, A) to 0. -- 2.31.1.windows.1