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:25 -0700 Authentication-Results: mx.groups.io; dkim=fail reason="unable to parse pub key" header.i=@intel.com header.s=intel header.b=FS2hawUl; 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=1679557285; x=1711093285; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=0+VF4PRRCm4qzaBsr/v3gxDJPLlKY+Xr3jp6wZV/W6M=; b=FS2hawUlWXBI1KHA9LMK/Bwh9W90pP4ycfXVI0EeSdYiApterNhw2pIJ R/FeiYa/MWpv/QhVyWlOuxVDLaGhbygoWYIARO/ijHrqIPvc1aX5FIWfY pphkjSby678POxnhVpT5bWyqiZh/0zLLTbDn8qO98XMP7O/dfvj7D2VZm KVBsh7FFcPJenQCZUuolQgUc1Q0FVhdmXWP4AardHTmCWLXsGFtkbU1PF jzuncF1BAsOFZ+DwSgkCu3/qvTxRnr/HckYqRuBvgJbcdjbRYfFcFEyrT I7Pfg3ttevUtXQzQSX7TC90gtHDxEv3l61W+HP8TOPAhTmBTQCOvnAhif A==; X-IronPort-AV: E=McAfee;i="6600,9927,10657"; a="425699593" X-IronPort-AV: E=Sophos;i="5.98,283,1673942400"; d="scan'208";a="425699593" 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:25 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6600,9927,10657"; a="684616835" X-IronPort-AV: E=Sophos;i="5.98,283,1673942400"; d="scan'208";a="684616835" 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:23 -0700 From: "duntan" To: devel@edk2.groups.io Cc: Eric Dong , Ray Ni , Rahul Kumar , Gerd Hoffmann Subject: [Patch V4 07/21] UefiCpuPkg/MpInitLib: Add code to initialize MapMask Date: Thu, 23 Mar 2023 15:40:43 +0800 Message-Id: <20230323074057.549-8-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 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 Cc: Ray Ni Cc: Rahul Kumar Cc: 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