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:45 -0700 Authentication-Results: mx.groups.io; dkim=fail reason="unable to parse pub key" header.i=@intel.com header.s=intel header.b=LfN41Vi0; 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=1679637645; x=1711173645; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=sKtIAr9FzbjKuM2KH4/nYsYeVGhrd+Qt9PeUyj1T+kw=; b=LfN41Vi0n4lHto9suV+4iZIh2S1o5YR8ZiXbmQSp3vwUJyKF+7Iw95UR RStzvl0pjWRxFRSodyZ6w4r1E2AHSQ7BTdrDxb5e9MDrmACZIVSBLzb0I zvgvWagskaE8Yy8wvgTpA3mK+ASBlXEZsV5qPMdumrZjnf+r5dKLV7fYR QWQG1dZdzouhm2k3tW0IMphvja2+exWgYlxd7UydXqFXxk4NyjP34GoTL 5VW5lwjWpSO8Ui85+p+MBBo+X64OVQt98Mjz0TT51rX0Nt3SIueylhWrr Sl/kqTNer07VmkE/+caIZsSuVVlvJPewtoJS2Y22iZ360yTGUxdbZ2i9g g==; X-IronPort-AV: E=McAfee;i="6600,9927,10658"; a="320093912" X-IronPort-AV: E=Sophos;i="5.98,286,1673942400"; d="scan'208";a="320093912" 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:45 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6600,9927,10658"; a="1012122068" X-IronPort-AV: E=Sophos;i="5.98,286,1673942400"; d="scan'208";a="1012122068" 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:43 -0700 From: "duntan" To: devel@edk2.groups.io Cc: Eric Dong , Ray Ni , Rahul Kumar , Gerd Hoffmann Subject: [Patch V5 07/22] UefiCpuPkg/MpInitLib: Add code to initialize MapMask Date: Fri, 24 Mar 2023 14:00:05 +0800 Message-Id: <20230324060020.940-8-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 In function CreatePageTable(), add code to initialize MapMask to MAX_UINT64. When creating new page table or map non-present range to present, all attributes should be provided. 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/MpInitLib/X64/CreatePageTable.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/UefiCpuPkg/Library/MpInitLib/X64/CreatePageTable.c b/UefiCpuPkg/Library/MpInitLib/X64/CreatePageTable.c index 7cf91ed9c4..f20068152b 100644 --- a/UefiCpuPkg/Library/MpInitLib/X64/CreatePageTable.c +++ b/UefiCpuPkg/Library/MpInitLib/X64/CreatePageTable.c @@ -36,10 +36,7 @@ CreatePageTable ( MapAttribute.Uint64 = Address; MapAttribute.Bits.Present = 1; MapAttribute.Bits.ReadWrite = 1; - - MapMask.Bits.PageTableBaseAddress = 1; - MapMask.Bits.Present = 1; - MapMask.Bits.ReadWrite = 1; + MapMask.Uint64 = MAX_UINT64; PageTable = 0; PageTableBufferSize = 0; -- 2.31.1.windows.1