REF: https://bugzilla.tianocore.org/show_bug.cgi?id=3100 It is not necessary to have a PEI phase in the UEFI payload since no specific PEI task is required. This patch adds a UefiPayloadEntry driver to get UEFI Payload required information from the bootloaders, convert them into a HOB list, load DXE core and transfer control to it. Here is the change details: 1) Removed PEI phase, including Peicore, BlSupportPei, SecCore, etc. 2) Added UefiPayloadEntry driver. this is the only driver before DXE core. 3) Added Pure X64 support, dropped Pure IA32 (Could add later if required) 64bit payload with 32bit entry point is still supported. 4) Use one DSC file UefiPayloadPkg.dsc to support X64 and IA32X64 build. Removed UefiPayloadIa32.dsc and UefiPayloadIa32X64.dsc Tested with SBL and coreboot on QEMU. Signed-off-by: Guo Dong <guo.dong@intel.com> Reviewed-by: Maurice Ma <maurice.ma@intel.com> Reviewed-by: Benjamin You <benjamin.you@intel.com>
94 lines
2.8 KiB
INI
94 lines
2.8 KiB
INI
## @file
|
|
# This is the first module for UEFI payload.
|
|
#
|
|
# Copyright (c) 2006 - 2020, Intel Corporation. All rights reserved.<BR>
|
|
# Copyright (c) 2017, AMD Incorporated. All rights reserved.<BR>
|
|
#
|
|
# SPDX-License-Identifier: BSD-2-Clause-Patent
|
|
#
|
|
##
|
|
|
|
[Defines]
|
|
INF_VERSION = 0x00010005
|
|
BASE_NAME = PayloadEntry
|
|
FILE_GUID = 2119BBD7-9432-4f47-B5E2-5C4EA31B6BDC
|
|
MODULE_TYPE = SEC
|
|
VERSION_STRING = 1.0
|
|
|
|
#
|
|
# The following information is for reference only and not required by the build tools.
|
|
#
|
|
# VALID_ARCHITECTURES = IA32 X64
|
|
#
|
|
|
|
[Sources]
|
|
UefiPayloadEntry.c
|
|
LoadDxeCore.c
|
|
MemoryAllocation.c
|
|
|
|
[Sources.Ia32]
|
|
X64/VirtualMemory.h
|
|
X64/VirtualMemory.c
|
|
Ia32/DxeLoadFunc.c
|
|
Ia32/IdtVectorAsm.nasm
|
|
Ia32/SecEntry.nasm
|
|
|
|
[Sources.X64]
|
|
X64/VirtualMemory.h
|
|
X64/VirtualMemory.c
|
|
X64/DxeLoadFunc.c
|
|
X64/SecEntry.nasm
|
|
|
|
[Packages]
|
|
MdePkg/MdePkg.dec
|
|
MdeModulePkg/MdeModulePkg.dec
|
|
UefiCpuPkg/UefiCpuPkg.dec
|
|
UefiPayloadPkg/UefiPayloadPkg.dec
|
|
|
|
[LibraryClasses]
|
|
BaseMemoryLib
|
|
DebugLib
|
|
BaseLib
|
|
SerialPortLib
|
|
IoLib
|
|
BlParseLib
|
|
HobLib
|
|
PeCoffLib
|
|
PlatformSupportLib
|
|
UefiCpuLib
|
|
|
|
[Guids]
|
|
gEfiMemoryTypeInformationGuid
|
|
gEfiFirmwareFileSystem2Guid
|
|
gUefiSystemTableInfoGuid
|
|
gEfiGraphicsInfoHobGuid
|
|
gEfiGraphicsDeviceInfoHobGuid
|
|
gUefiAcpiBoardInfoGuid
|
|
|
|
[FeaturePcd.IA32]
|
|
gEfiMdeModulePkgTokenSpaceGuid.PcdDxeIplSwitchToLongMode ## CONSUMES
|
|
|
|
[FeaturePcd.X64]
|
|
gEfiMdeModulePkgTokenSpaceGuid.PcdDxeIplBuildPageTables ## CONSUMES
|
|
|
|
|
|
[Pcd.IA32,Pcd.X64]
|
|
gEfiMdeModulePkgTokenSpaceGuid.PcdUse1GPageTable ## SOMETIMES_CONSUMES
|
|
gEfiMdeModulePkgTokenSpaceGuid.PcdPteMemoryEncryptionAddressOrMask ## CONSUMES
|
|
gEfiMdeModulePkgTokenSpaceGuid.PcdNullPointerDetectionPropertyMask ## CONSUMES
|
|
gEfiMdeModulePkgTokenSpaceGuid.PcdHeapGuardPropertyMask ## CONSUMES
|
|
gEfiMdeModulePkgTokenSpaceGuid.PcdCpuStackGuard ## CONSUMES
|
|
gEfiMdeModulePkgTokenSpaceGuid.PcdUse5LevelPageTable ## SOMETIMES_CONSUMES
|
|
gEfiMdeModulePkgTokenSpaceGuid.PcdGhcbBase ## CONSUMES
|
|
gEfiMdeModulePkgTokenSpaceGuid.PcdGhcbSize ## CONSUMES
|
|
|
|
gUefiPayloadPkgTokenSpaceGuid.PcdPayloadFdMemBase
|
|
gUefiPayloadPkgTokenSpaceGuid.PcdPayloadFdMemSize
|
|
gUefiPayloadPkgTokenSpaceGuid.PcdPayloadStackTop
|
|
gUefiPayloadPkgTokenSpaceGuid.PcdSystemMemoryUefiRegionSize
|
|
|
|
gEfiMdeModulePkgTokenSpaceGuid.PcdSetNxForStack ## SOMETIMES_CONSUMES
|
|
gEfiMdeModulePkgTokenSpaceGuid.PcdDxeNxMemoryProtectionPolicy ## SOMETIMES_CONSUMES
|
|
gEfiMdeModulePkgTokenSpaceGuid.PcdImageProtectionPolicy ## SOMETIMES_CONSUMES
|
|
|