From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mga04.intel.com (mga04.intel.com [192.55.52.120]) by mx.groups.io with SMTP id smtpd.web11.50534.1680255406621979007 for ; Fri, 31 Mar 2023 02:36:46 -0700 Authentication-Results: mx.groups.io; dkim=fail reason="unable to parse pub key" header.i=@intel.com header.s=intel header.b=jb6towf+; spf=pass (domain: intel.com, ip: 192.55.52.120, 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=1680255406; x=1711791406; h=from:to:subject:date:message-id:mime-version: content-transfer-encoding; bh=jAbfaxjB/SwBleuqLV2iqK2m4+lE41qHtv4E7skEipQ=; b=jb6towf+wSn65cfPAz4R+iDkRMvIAk18tF6FE7zwRwr9L81GPIfGRd74 XL9pcIGwE/em9lVAO3u2pepK+m4wVbdRI2xW1nkdeB3+l3NHhsb9f7vi1 WNo11+wnyKvI3CEUz7Ktsh6+CFi6T0Zhn9pzeSeb2iURyxhmAceUNjBf+ 1DPQCxeN+nbk9BSvaMgaNQJMtY5Bid1GboFnwlHcYMwD1nVDuLN/9Keq/ yyljNVemiczgo1MTs1MPyTBGsRmGCOEAMN7tV49y38aD/YNxvmdQV1Z1g ec7Smq1aISa1nLXQ/eMNsn27nU+YljiYXMnnSwzIkmX7gP923nnyxGM5/ Q==; X-IronPort-AV: E=McAfee;i="6600,9927,10665"; a="340133696" X-IronPort-AV: E=Sophos;i="5.98,307,1673942400"; d="scan'208";a="340133696" Received: from orsmga003.jf.intel.com ([10.7.209.27]) by fmsmga104.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 31 Mar 2023 02:36:36 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6600,9927,10665"; a="635229491" X-IronPort-AV: E=Sophos;i="5.98,307,1673942400"; d="scan'208";a="635229491" Received: from shwdeopenlab702.ccr.corp.intel.com ([10.239.55.92]) by orsmga003-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 31 Mar 2023 02:36:35 -0700 From: "duntan" To: devel@edk2.groups.io Subject: [Patch V2 0/8] Create page table by CpuPageTableLib in DxeIpl Date: Fri, 31 Mar 2023 17:33:36 +0800 Message-Id: <20230331093344.2609-1-dun.tan@intel.com> X-Mailer: git-send-email 2.31.1.windows.1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit In this V2 patch set: 1.Remove the unneeded patch for ArmVirtPkg 2.In this patch 'Create page table by CpuPageTableLib', change the input parameter name from Is32BitPageTable to Is64BitPageTable and add a line of "MapAttribute.Bits.Present = 0" before set a range to non-present. 3.In this patch 'Refinement to the code to set PageTable as RO', add a line of "MapAttribute.Bits.ReadWrite = 0" before set a range to ReadOnly. Dun Tan (8): 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 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 | 711 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ 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 +- 18 files changed, 200 insertions(+), 849 deletions(-) -- 2.31.1.windows.1