Add the 'AsmRelocateApLoopStartGeneric' for X64 processors except 64-bit AMD processors with SEV-ES. Remove the unused arguments of AsmRelocateApLoopStartGeneric, updated the stack offset. Create PageTable for the allocated reserved memory. Only keep 4GB limitation of memory allocation for the case APs still need to be transferred to 32-bit mode before OS. Cc: Guo Dong <guo.dong@intel.com> Cc: Ray Ni <ray.ni@intel.com> Cc: Sean Rhodes <sean@starlabs.systems> Cc: James Lu <james.lu@intel.com> Cc: Gua Guo <gua.guo@intel.com> Signed-off-by: Yuanhao Xie <yuanhao.xie@intel.com> Acked-by: Gerd Hoffmann <kraxel@redhat.com> Tested-by: Gerd Hoffmann <kraxel@redhat.com> Reviewed-by: Ray Ni <ray.ni@intel.com>
87 lines
2.8 KiB
INI
87 lines
2.8 KiB
INI
## @file
|
|
# MP Initialize Library instance for DXE driver.
|
|
#
|
|
# Copyright (c) 2016 - 2023, Intel Corporation. All rights reserved.<BR>
|
|
# SPDX-License-Identifier: BSD-2-Clause-Patent
|
|
#
|
|
##
|
|
|
|
[Defines]
|
|
INF_VERSION = 0x00010005
|
|
BASE_NAME = DxeMpInitLib
|
|
MODULE_UNI_FILE = DxeMpInitLib.uni
|
|
FILE_GUID = B88F7146-9834-4c55-BFAC-481CC0C33736
|
|
MODULE_TYPE = DXE_DRIVER
|
|
VERSION_STRING = 1.1
|
|
LIBRARY_CLASS = MpInitLib|DXE_DRIVER
|
|
|
|
#
|
|
# The following information is for reference only and not required by the build tools.
|
|
#
|
|
# VALID_ARCHITECTURES = IA32 X64
|
|
#
|
|
|
|
[Sources.IA32]
|
|
Ia32/AmdSev.c
|
|
Ia32/MpFuncs.nasm
|
|
Ia32/CreatePageTable.c
|
|
|
|
[Sources.X64]
|
|
X64/AmdSev.c
|
|
X64/MpFuncs.nasm
|
|
X64/CreatePageTable.c
|
|
|
|
[Sources.common]
|
|
AmdSev.c
|
|
MpEqu.inc
|
|
DxeMpLib.c
|
|
MpLib.c
|
|
MpLib.h
|
|
Microcode.c
|
|
|
|
[Packages]
|
|
MdePkg/MdePkg.dec
|
|
MdeModulePkg/MdeModulePkg.dec
|
|
UefiCpuPkg/UefiCpuPkg.dec
|
|
|
|
[LibraryClasses]
|
|
BaseLib
|
|
LocalApicLib
|
|
MemoryAllocationLib
|
|
HobLib
|
|
MtrrLib
|
|
CpuLib
|
|
UefiCpuLib
|
|
UefiBootServicesTableLib
|
|
DebugAgentLib
|
|
SynchronizationLib
|
|
PcdLib
|
|
CcExitLib
|
|
MicrocodeLib
|
|
[LibraryClasses.X64]
|
|
CpuPageTableLib
|
|
|
|
[Protocols]
|
|
gEfiTimerArchProtocolGuid ## SOMETIMES_CONSUMES
|
|
|
|
[Guids]
|
|
gEfiEventExitBootServicesGuid ## CONSUMES ## Event
|
|
gEfiEventLegacyBootGuid ## SOMETIMES_CONSUMES ## Event
|
|
gEdkiiMicrocodePatchHobGuid ## SOMETIMES_CONSUMES ## HOB
|
|
|
|
[Pcd]
|
|
gUefiCpuPkgTokenSpaceGuid.PcdCpuMaxLogicalProcessorNumber ## CONSUMES
|
|
gUefiCpuPkgTokenSpaceGuid.PcdCpuBootLogicalProcessorNumber ## CONSUMES
|
|
gUefiCpuPkgTokenSpaceGuid.PcdCpuApInitTimeOutInMicroSeconds ## SOMETIMES_CONSUMES
|
|
gUefiCpuPkgTokenSpaceGuid.PcdCpuApStackSize ## CONSUMES
|
|
gUefiCpuPkgTokenSpaceGuid.PcdCpuMicrocodePatchAddress ## CONSUMES
|
|
gUefiCpuPkgTokenSpaceGuid.PcdCpuMicrocodePatchRegionSize ## CONSUMES
|
|
gUefiCpuPkgTokenSpaceGuid.PcdCpuApLoopMode ## CONSUMES
|
|
gUefiCpuPkgTokenSpaceGuid.PcdCpuApTargetCstate ## SOMETIMES_CONSUMES
|
|
gUefiCpuPkgTokenSpaceGuid.PcdCpuApStatusCheckIntervalInMicroSeconds ## CONSUMES
|
|
gUefiCpuPkgTokenSpaceGuid.PcdGhcbHypervisorFeatures ## CONSUMES
|
|
gUefiCpuPkgTokenSpaceGuid.PcdSevEsWorkAreaBase ## SOMETIMES_CONSUMES
|
|
gEfiMdeModulePkgTokenSpaceGuid.PcdCpuStackGuard ## CONSUMES
|
|
gEfiMdeModulePkgTokenSpaceGuid.PcdGhcbBase ## CONSUMES
|
|
gEfiMdePkgTokenSpaceGuid.PcdConfidentialComputingGuestAttr ## CONSUMES
|