Acidanthera UEFI Development Kit based on EDK II edk2-stable202311
Go to file
Jian J Wang f32bfe6d06 UefiCpuPkg/MpInitLib: split wake up buffer into two parts
If PcdDxeNxMemoryProtectionPolicy is set to enable protection for memory
of EfiBootServicesCode, EfiConventionalMemory, the BIOS will hang at a page
fault exception during MP initialization.

The root cause is that the AP wake up buffer, which is below 1MB and used
to hold both AP init code and data, is type of EfiConventionalMemory (not
really allocated because of potential conflict with legacy code), and is
marked as non-executable. During the transition from real address mode
to long mode, the AP init code has to enable paging which will then cause
itself a page fault exception because it's just running in non-executable
memory.

The solution is splitting AP wake up buffer into two part: lower part is
still below 1MB and shared with legacy system, higher part is really
allocated memory of BootServicesCode type. The init code in the memory
below 1MB will not enable paging but just switch to protected mode and
jump to higher memory, in which the init code will enable paging and
switch to long mode.

Cc: Jiewen Yao <jiewen.yao@intel.com>
Cc: Ruiyu Ni <ruiyu.ni@intel.com>
Cc: Eric Dong <eric.dong@intel.com>
Cc: Laszlo Ersek <lersek@redhat.com>
Contributed-under: TianoCore Contribution Agreement 1.1
Signed-off-by: Jian J Wang <jian.j.wang@intel.com>
Reviewed-by: Eric Dong <eric.dong@intel.com>
2018-01-18 17:03:22 +08:00
AppPkg
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: Use nasm as the preferred assembly source files for XCODE5 tool 2018-01-16 23:29:55 +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 CryptoPkg/OpensslLib: ignore uninitialized warning 2018-01-18 16:22:14 +08:00
DuetPkg
EdkCompatibilityPkg
EdkShellBinPkg
EdkShellPkg
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
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 IntelFsp2WrapperPkg: Update BaseFspWrapperApiLib to pass XCODE5 build 2018-01-18 15:39:54 +08:00
IntelFspPkg
IntelFspWrapperPkg
IntelSiliconPkg IntelSiliconPkg IntelVTdDxe: Fix DMA does not work issue 2018-01-18 10:36:56 +08:00
MdeModulePkg MdeModulePkg/DxeIpIoLib: Fixed the error ASSERT incorrectly used in IpIoAddIp(). 2018-01-17 08:29:48 +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
OvmfPkg OvmfPkg: Don't add -mno-mmx -mno-sse option for XCODE5 tool chain 2018-01-16 23:43:15 +08: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
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
UefiCpuPkg UefiCpuPkg/MpInitLib: split wake up buffer into two parts 2018-01-18 17:03:22 +08:00
UnixPkg
Vlv2DeviceRefCodePkg
Vlv2TbltDevicePkg Fix License Header. 2017-12-26 11:06:01 +08:00
.gitignore
.gitmodules CryptoPkg: Adding OpenSSL as one submodule of EDKII repo 2018-01-18 14:06:15 +08:00
BuildNotes2.txt
Contributions.txt
Edk2Setup.bat
License.txt
Maintainers.txt Edk2: Update Maintainers.txt to remove PerformancePkg 2017-12-27 10:49:33 +08:00
Readme.md
edksetup.bat
edksetup.sh

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