From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mga17.intel.com (mga17.intel.com [192.55.52.151]) by mx.groups.io with SMTP id smtpd.web11.94534.1679637641374533517 for ; Thu, 23 Mar 2023 23:00:41 -0700 Authentication-Results: mx.groups.io; dkim=fail reason="unable to parse pub key" header.i=@intel.com header.s=intel header.b=EanWkMLb; spf=pass (domain: intel.com, ip: 192.55.52.151, 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=1679637641; x=1711173641; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=Q7fQazGVxyp8h6/q3IfngSTsagQo6i6PLobDjlsvXzE=; b=EanWkMLbknXi2ytLQOHCcVI1z9nSpNExyg/7Dd2hejDl5bl5+3kha3sS mXyMmVxiCQ3lQINElliMbLYg8hfPk2UzgYsxPG5nMg1PTD56dcF0y3F4A mq85YFT0V8TEHa6ro1XbpxzDFApGxbS1G235RHK5z542ahibfpDlK3ZZa FZEi0s1JP+pvXSlVJVC82toGcOqntSo4e19Djl8P6YkGBPCJgMN992HLE LLJgdcyDHfRCkkmf1zRs/5Czm4emCd6cwV8x9fGZlIMQQKzMjdKTeAhPw FRo+dbKqqgvnu3X1QqcVsrZ2AakPR9VeOvzfF7RAXTxqLNwwQmDCLPCLc w==; X-IronPort-AV: E=McAfee;i="6600,9927,10658"; a="320093898" X-IronPort-AV: E=Sophos;i="5.98,286,1673942400"; d="scan'208";a="320093898" Received: from fmsmga005.fm.intel.com ([10.253.24.32]) by fmsmga107.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 23 Mar 2023 23:00:41 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6600,9927,10658"; a="1012122054" X-IronPort-AV: E=Sophos;i="5.98,286,1673942400"; d="scan'208";a="1012122054" Received: from shwdeopenlab702.ccr.corp.intel.com ([10.239.55.92]) by fmsmga005-auth.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 23 Mar 2023 23:00:39 -0700 From: "duntan" To: devel@edk2.groups.io Cc: Eric Dong , Ray Ni , Rahul Kumar , Gerd Hoffmann Subject: [Patch V5 05/22] UefiCpuPkg/CpuPageTableLib:Clear PageSize bit(Bit7) for non-leaf Date: Fri, 24 Mar 2023 14:00:03 +0800 Message-Id: <20230324060020.940-6-dun.tan@intel.com> X-Mailer: git-send-email 2.31.1.windows.1 In-Reply-To: <20230324060020.940-1-dun.tan@intel.com> References: <20230324060020.940-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 Reviewed-by: Ray Ni Cc: Rahul Kumar Tested-by: Gerd Hoffmann Acked-by: 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 6ab2961790..a242710afa 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