Acidanthera UEFI Development Kit based on EDK II edk2-stable202311
Go to file
Brijesh Singh b721aa749b OvmfPkg/BaseMemEncryptSevLib: Enable protection for newly added page table
Commit 2ac1730bf2 (MdeModulePkg/DxeIpl: Mark page table as read-only)
sets the memory pages used for page table as read-only after paging is
setup and sets CR0.WP to protect CPU modifying the read-only pages.
The commit causes #PF when MemEncryptSevClearPageEncMask() or
MemEncryptSevSetPageEncMask() tries to change the page-table attributes.

This patch takes the similar approach as Commit 147fd35c3e
(UefiCpuPkg/CpuDxe: Enable protection for newly added page table).
When page table protection is enabled, we disable it temporarily before
changing the page table attributes.

This patch makes use of the same approach as Commit 2ac1730bf2
(MdeModulePkg/DxeIpl: Mark page table as read-only)) for allocating
page table memory from reserved memory pool, which helps to reduce a
potential "split" operation.

The patch duplicates code from commit 147fd35c3e. The code duplication
will be removed after we implement page table manipulation library. See
bugzilla https://bugzilla.tianocore.org/show_bug.cgi?id=847.

Cc: Jian J Wang <jian.j.wang@intel.com>
Cc: Jiewen Yao <jiewen.yao@intel.com>
Cc: Jordan Justen <jordan.l.justen@intel.com>
Cc: Laszlo Ersek <lersek@redhat.com>
Cc: Ard Biesheuvel <ard.biesheuvel@linaro.org>
Contributed-under: TianoCore Contribution Agreement 1.1
Signed-off-by: Brijesh Singh <brijesh.singh@amd.com>
Acked-by: Laszlo Ersek <lersek@redhat.com>
2018-01-15 21:18:50 +01:00
AppPkg AppPkg/WebServer: Fix build failure. 2017-09-14 08:55:09 +08:00
ArmPkg ArmPkg/Library/ArmLib: add ArmWriteSctlr 2018-01-15 12:02:25 +00:00
ArmPlatformPkg ArmPlatformPkg: retire obsolete PCDs 2017-12-12 17:40:17 +00:00
ArmVirtPkg ArmVirtPkg: add NOOPT target to platform .DSCs 2017-12-06 20:49:31 +00:00
BaseTools BaseTools: Enable MAX_CONCURRENT_THREAD_NUMBER = 0 feature 2018-01-15 19:51:21 +08:00
BeagleBoardPkg BeagleBoardPkg: clone MemoryInitPeiLib 2017-11-30 17:08:41 +00:00
Conf
CorebootModulePkg CorebootModulePkg/CbSupportDxe: Remove duplicated IO Space addition 2017-11-16 10:52:00 +08:00
CorebootPayloadPkg CorebootPayloadPkg: Fix build failure due to Tftp/Dp library removal 2017-11-29 10:56:12 +08:00
CryptoPkg CrptoPkg/BaseCryptLib: Fix type mismatch when calling OpenSSL function 2018-01-15 16:39:52 +08:00
DuetPkg DuetPkg: Fix Xcode 9 Beta treating 32-bit left shift as undefined 2017-08-11 08:44:54 +08:00
EdkCompatibilityPkg edk2: Move License.txt file to root 2017-08-03 11:02:17 -07:00
EdkShellBinPkg edk2: Move License.txt file to root 2017-08-03 11:02:17 -07:00
EdkShellPkg edk2: Move License.txt file to root 2017-08-03 11:02:17 -07:00
EmbeddedPkg EmbeddedPkg/FdtLib: build fdt_empty_tree.c 2018-01-15 12:07:39 +00:00
EmulatorPkg EmulatorPkg: Fix build failure due to Tftp library removal 2017-12-07 15:56:26 +08:00
FatBinPkg FatBinPkg: New EnhancedFatDxe binaries for IA32, X64, EBC and IPF 2017-12-22 09:40:18 +08:00
FatPkg edk2: Move License.txt file to root 2017-08-03 11:02:17 -07:00
IntelFrameworkModulePkg IntelFrameworkModulePkg/KeyboardDxe: Use macro to enable/disable page 0 2017-12-08 14:38:45 +08:00
IntelFrameworkPkg IntelFrameworkPkg/LegacyBios.h: Add a macro to guarantee page 0 access 2017-12-08 14:38:44 +08:00
IntelFsp2Pkg IntelFsp2Pkg-Tools: GenCfgOpt.py shouldn't include specific UPD name 2017-11-08 20:44:29 +08:00
IntelFsp2WrapperPkg IntelFspWrapperPkg: Convert INF file to dos format 2017-12-28 12:48:03 +08:00
IntelFspPkg edk2: Move License.txt file to root 2017-08-03 11:02:17 -07:00
IntelFspWrapperPkg edk2: Move License.txt file to root 2017-08-03 11:02:17 -07:00
IntelSiliconPkg IntelSiliconPkg IntelVTdDxe: Support early SetAttributes() 2018-01-05 10:26:34 +08:00
MdeModulePkg MdeModulePkg/DebugLib: Print partial when format string is too long 2018-01-15 18:03:37 +08:00
MdePkg MdePkg/BaseLib: add attribute 'RETURNS_TWICE' to SetJump 2018-01-10 11:42:17 +08:00
NetworkPkg NetworkPkg: Fix incorrect parameter check in PXE.Mtftp() function. 2018-01-15 18:02:01 +08:00
Nt32Pkg Nt32Pkg: Add VS2017 support in SecMain 2017-11-29 16:03:13 +08:00
Omap35xxPkg Omap35xxPkg: add GetTimeInNanoSecond implementation 2017-11-30 14:32:30 +00:00
OptionRomPkg edk2: Move License.txt file to root 2017-08-03 11:02:17 -07:00
OvmfPkg OvmfPkg/BaseMemEncryptSevLib: Enable protection for newly added page table 2018-01-15 21:18:50 +01:00
PcAtChipsetPkg PcAtChipsetPkg: Add description for new added PCD in commit e78aab9d2 2017-11-29 15:57:54 +08:00
QuarkPlatformPkg QuarkPlatformPkg: Use DpDynamicCommand to replace PerformancePkg/dp 2017-12-02 16:40:14 +08:00
QuarkSocPkg QuarkSocPkg/QNCSmmDispatcher: Fix use after free issue #2 2017-08-16 19:42:17 -07:00
SecurityPkg SecurityPkg/PhysicalPresenceLib: Reject illegal PCR bank allocation 2018-01-15 16:40:11 +08:00
ShellBinPkg ShellBinPkg: Ia32/X64 Shell binary update. 2017-12-22 09:22:05 +08:00
ShellPkg ShellPkg/UefiShellLevel2CommandsLib: add missing EFIAPI call conv spec 2018-01-08 23:15:02 +01:00
SignedCapsulePkg SignedCapsulePkg: Update EdkiiSystemCapsuleLib to check PCD value 2017-12-08 13:31:00 +08:00
SourceLevelDebugPkg SourceLevelDebugPkg: Convert source file to DOS format 2017-12-28 12:48:04 +08:00
StdLib StdLib/BsdSocketLib: Remove unused variables 2017-11-13 07:39:06 -08:00
StdLibPrivateInternalFiles edk2: Move License.txt file to root 2017-08-03 11:02:17 -07:00
UefiCpuPkg UefiCpuPkg: Enhance feature dependency check 2018-01-15 15:39:50 +08:00
UnixPkg
Vlv2DeviceRefCodePkg edk2: Move License.txt file to root 2017-08-03 11:02:17 -07:00
Vlv2TbltDevicePkg Fix License Header. 2017-12-26 11:06:01 +08:00
.gitignore edk2: Add .DS_Store to .gitignore for macOS 2017-05-19 15:14:34 -07:00
BuildNotes2.txt
Contributions.txt edk2: Fix typo in Contributions.txt 2017-08-16 17:50:44 +08:00
Edk2Setup.bat Edk2Setup.bat: Fix build errors from VS tools PREFIX ENV missing 2016-11-05 09:10:58 +08:00
License.txt edk2: Move License.txt file to root 2017-08-03 11:02:17 -07:00
Maintainers.txt Edk2: Update Maintainers.txt to remove PerformancePkg 2017-12-27 10:49:33 +08:00
Readme.md edk2: Add Readme.md to root of edk2 repository 2017-08-03 11:02:25 -07:00
edksetup.bat BaseTools: suppress usage instructions with rebuild options 2017-07-04 10:16:13 +08:00
edksetup.sh BaseTools/edksetup.sh: fix invalid test for current working directory 2017-08-10 12:54:58 +08:00

Readme.md

EDK II Project

A modern, feature-rich, cross-platform firmware development environment for the UEFI and PI specifications from www.uefi.org.

Contributions to the EDK II open source project are covered by the TianoCore Contribution Agreement 1.1

The majority of the content in the EDK II open source project uses a BSD 2-Clause License. The EDK II open source project contains the following components that are covered by additional licenses:

The EDK II Project is composed of packages. The maintainers for each package are listed in Maintainers.txt.

Resources