From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mga06.intel.com (mga06.intel.com [134.134.136.31]) by mx.groups.io with SMTP id smtpd.web11.7471.1679290475232002420 for ; Sun, 19 Mar 2023 22:34:39 -0700 Authentication-Results: mx.groups.io; dkim=fail reason="unable to parse pub key" header.i=@intel.com header.s=intel header.b=d6ndlg4a; spf=pass (domain: intel.com, ip: 134.134.136.31, 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=1679290479; x=1710826479; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=SiY/Gsw6pjG6BdXOt0fwN8FLmaegC0FobEEcKH7Y9Pk=; b=d6ndlg4aH51GRnqVmqOOuzJkMEbLs19v6wqaG/hHpm3ceArwe8oR6w5q L+CXBc+aM7lPqOP1/sHl9NSp1K3gcVcKuuf/FpVY1Xjl7DJO/976UgBKY 6QjymmvTb/dsdCfZy2G3FQdy3Bz7QssgoK0/39Tju6m2bcCqRfgRh7u7d a7Y90AdSTnskGaBozt1O6ybmXPxKpzNB6lcVnueJmEOazdHCto4G+neeg 5j2b+u/0hrIVfcrfBMW6j9xiT4q+wYB5pHItSXLnZ+PQRMZ2DZkuszerR la/vYrl+qXZMLYd0JjHifPWnHLepvVMfm82KERGgofm3v9NEeSo7QLxH4 Q==; X-IronPort-AV: E=McAfee;i="6600,9927,10654"; a="401155505" X-IronPort-AV: E=Sophos;i="5.98,274,1673942400"; d="scan'208";a="401155505" Received: from fmsmga003.fm.intel.com ([10.253.24.29]) by orsmga104.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 19 Mar 2023 22:34:39 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6600,9927,10654"; a="770059412" X-IronPort-AV: E=Sophos;i="5.98,274,1673942400"; d="scan'208";a="770059412" Received: from shwdeopenlab702.ccr.corp.intel.com ([10.239.55.92]) by fmsmga003-auth.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 19 Mar 2023 22:34:37 -0700 From: "duntan" To: devel@edk2.groups.io Cc: Eric Dong , Ray Ni , Rahul Kumar , Gerd Hoffmann Subject: [Patch V3 05/18] UefiCpuPkg/CpuPageTableLib:Clear PageSize bit(Bit7) for non-leaf Date: Mon, 20 Mar 2023 13:33:16 +0800 Message-Id: <20230320053329.410-6-dun.tan@intel.com> X-Mailer: git-send-email 2.31.1.windows.1 In-Reply-To: <20230320053329.410-1-dun.tan@intel.com> References: <20230320053329.410-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 1f17d8a6d4..d623b62401 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