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.web10.57357.1679971453177357092 for ; Mon, 27 Mar 2023 19:44:13 -0700 Authentication-Results: mx.groups.io; dkim=fail reason="unable to parse pub key" header.i=@intel.com header.s=intel header.b=aNjCy9nM; 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=1679971453; x=1711507453; h=from:to:subject:date:message-id:mime-version: content-transfer-encoding; bh=rVzCNFRhUOdrtqS4C3EU5S7qVFXlmbpWnvg5DOfZhrA=; b=aNjCy9nM2kDXQdNEpGSqdLKyBNl+jOFhlYbet0FY03XgNO04B9ASrksx FldqvW8rA+ZqboER51QgInD+LC7lUdKdhyW7W4NbSGPKMdLpTdDmzKhAD mVfFrrIARl+Q6no26T98in3ShW7XljFNhWAo9dnoycMjLo+0d2dWQaGaw QteSh4ykLudqdL1HIXpX/g5WPwhxs6vFKDcitqDIRp11HGy6ki6MR7AaT WLP/7+KM5zppQabaqX5YU8+WsAA42+Cf2BZphxJ1R6VDmTBy+6RdPL9jA +1L5zWNm3WFdsjBiaXycYa88fIVkShw5oMRJAIuIVm7LR5l1+mbhGdyLJ w==; X-IronPort-AV: E=McAfee;i="6600,9927,10662"; a="320852640" X-IronPort-AV: E=Sophos;i="5.98,296,1673942400"; d="scan'208";a="320852640" Received: from orsmga004.jf.intel.com ([10.7.209.38]) by fmsmga107.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 27 Mar 2023 19:44:04 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6600,9927,10662"; a="807700323" X-IronPort-AV: E=Sophos;i="5.98,296,1673942400"; d="scan'208";a="807700323" Received: from shwdeopenlab702.ccr.corp.intel.com ([10.239.55.92]) by orsmga004-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 27 Mar 2023 19:43:59 -0700 From: "duntan" To: devel@edk2.groups.io Subject: [PATCH 0/9] Create page table by CpuPageTableLib in DxeIpl Date: Tue, 28 Mar 2023 10:42:53 +0800 Message-Id: <20230328024302.2085-1-dun.tan@intel.com> X-Mailer: git-send-email 2.31.1.windows.1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit This patch set is to create page table by CpuPageTableLib in DxeIpl. With the CpuPageTableLib, we can create or update page table by calling PageTableMap() in CpuPageTableLib multiple times. Then the original page table manipulating code can be removed. Dun Tan (9): ArmVirtPkg: Add CpuPageTableLib required by DxeIpl in DSC EmulatorPkg: Add CpuPageTableLib required by DxeIpl in DSC IntelFsp2Pkg: Add CpuPageTableLib required by DxeIpl in DSC MdeModulePkg: Add CpuPageTableLib required by DxeIpl in DSC OvmfPkg: Add CpuPageTableLib required by DxeIpl in DSC file MdeModulePkg: Add UefiCpuPkg.dec to pass DependencyCheck MdeModulePkg/DxeIpl: Create page table by CpuPageTableLib MdeModulePkg/DxeIpl: Remove duplicated code to enable NX MdeModulePkg/DxeIpl: Refinement to the code to set PageTable as RO ArmVirtPkg/ArmVirtCloudHv.dsc | 2 ++ ArmVirtPkg/ArmVirtQemu.dsc | 3 ++- EmulatorPkg/EmulatorPkg.dsc | 3 ++- IntelFsp2Pkg/Tools/Tests/QemuFspPkg.dsc | 3 ++- MdeModulePkg/Core/DxeIplPeim/DxeIpl.h | 3 ++- MdeModulePkg/Core/DxeIplPeim/DxeIpl.inf | 4 +++- MdeModulePkg/Core/DxeIplPeim/Ia32/DxeLoadFunc.c | 112 ++++------------------------------------------------------------------------------------------------------------ MdeModulePkg/Core/DxeIplPeim/X64/DxeLoadFunc.c | 5 +++-- MdeModulePkg/Core/DxeIplPeim/X64/VirtualMemory.c | 709 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ MdeModulePkg/Core/DxeIplPeim/X64/VirtualMemory.h | 182 ++++++++++---------------------------------------------------------------------------------------------------------------------------------------------------------------------------- MdeModulePkg/MdeModulePkg.ci.yaml | 5 +++-- MdeModulePkg/MdeModulePkg.dsc | 3 ++- OvmfPkg/AmdSev/AmdSevX64.dsc | 2 +- OvmfPkg/Bhyve/BhyveX64.dsc | 3 ++- OvmfPkg/CloudHv/CloudHvX64.dsc | 2 +- OvmfPkg/Microvm/MicrovmX64.dsc | 2 +- OvmfPkg/OvmfPkgIa32.dsc | 3 ++- OvmfPkg/OvmfPkgIa32X64.dsc | 2 +- OvmfPkg/OvmfPkgX64.dsc | 2 +- OvmfPkg/OvmfXen.dsc | 2 +- 20 files changed, 202 insertions(+), 850 deletions(-) -- 2.31.1.windows.1