OvmfPkg: Introduce XenPlatformPei
Introduce XenPlatformPei, a copy of OvmfPkg/PlatformPei without some of QEMU specific initialization, Xen does not support QemuFwCfg. This new module will be adjusted to accommodate Xen PVH. fw_cfg dependents that have been removed, which are dynamically skipped when running PlatformPei on Xen: - GetFirstNonAddress(): controlling the 64-bit PCI MMIO aperture via the (experimental) "opt/ovmf/X-PciMmio64Mb" file - GetFirstNonAddress(): honoring the hotplug DIMM area ("etc/reserved-memory-end") in the placement of the 64-bit PCI MMIO aperture - NoexecDxeInitialization() is removed, so PcdPropertiesTableEnable and PcdSetNxForStack are left constant FALSE (not set dynamically from fw_cfg "opt/ovmf/PcdXxxx") - MaxCpuCountInitialization(), PublishPeiMemory(): the max CPU count is not taken from the QemuFwCfgItemSmpCpuCount fw_cfg key; PcdCpuMaxLogicalProcessorNumber is used intact and PcdCpuApInitTimeOutInMicroSeconds is never changed or used. - InitializeXenPlatform(), S3Verification(): S3 is assumed disabled (not consulting "etc/system-states" via QemuFwCfgS3Enabled()). - InstallFeatureControlCallback(): the feature control MSR is not set from "etc/msr_feature_control" (also removed FeatureControl.c as there is nothing been executed) Also removed: - SMRAM/TSEG-related low mem size adjusting (PcdSmmSmramRequire is assumed FALSE) in PublishPeiMemory(), - QemuInitializeRam() entirely, Xen related changes: - Have removed the module variable mXen, as it should be always true. - Have the platform PEI initialization fails if Xen has not been detected. Ref: https://bugzilla.tianocore.org/show_bug.cgi?id=1689 Signed-off-by: Anthony PERARD <anthony.perard@citrix.com> Reviewed-by: Laszlo Ersek <lersek@redhat.com> Message-Id: <20190813113119.14804-5-anthony.perard@citrix.com>
This commit is contained in:
committed by
Laszlo Ersek
parent
c05de360ec
commit
3b96221f77
96
OvmfPkg/XenPlatformPei/XenPlatformPei.inf
Normal file
96
OvmfPkg/XenPlatformPei/XenPlatformPei.inf
Normal file
@@ -0,0 +1,96 @@
|
||||
## @file
|
||||
# Platform PEI driver
|
||||
#
|
||||
# This module provides platform specific function to detect boot mode.
|
||||
# Copyright (c) 2006 - 2019, Intel Corporation. All rights reserved.<BR>
|
||||
# Copyright (c) 2019, Citrix Systems, Inc.
|
||||
#
|
||||
# SPDX-License-Identifier: BSD-2-Clause-Patent
|
||||
#
|
||||
##
|
||||
|
||||
[Defines]
|
||||
INF_VERSION = 0x00010005
|
||||
BASE_NAME = XenPlatformPei
|
||||
FILE_GUID = f112a6ee-993a-4f0b-8295-e52029d9b4ba
|
||||
MODULE_TYPE = PEIM
|
||||
VERSION_STRING = 1.0
|
||||
ENTRY_POINT = InitializeXenPlatform
|
||||
|
||||
#
|
||||
# The following information is for reference only and not required by the build tools.
|
||||
#
|
||||
# VALID_ARCHITECTURES = IA32 X64 EBC
|
||||
#
|
||||
|
||||
[Sources]
|
||||
AmdSev.c
|
||||
ClearCache.c
|
||||
Cmos.c
|
||||
Cmos.h
|
||||
Fv.c
|
||||
MemDetect.c
|
||||
Platform.c
|
||||
Platform.h
|
||||
Xen.c
|
||||
Xen.h
|
||||
|
||||
[Packages]
|
||||
MdePkg/MdePkg.dec
|
||||
MdeModulePkg/MdeModulePkg.dec
|
||||
SecurityPkg/SecurityPkg.dec
|
||||
UefiCpuPkg/UefiCpuPkg.dec
|
||||
OvmfPkg/OvmfPkg.dec
|
||||
|
||||
[Guids]
|
||||
gEfiMemoryTypeInformationGuid
|
||||
gEfiXenInfoGuid
|
||||
|
||||
[LibraryClasses]
|
||||
BaseLib
|
||||
CacheMaintenanceLib
|
||||
DebugLib
|
||||
HobLib
|
||||
IoLib
|
||||
PciLib
|
||||
ResourcePublicationLib
|
||||
PeiServicesLib
|
||||
PeimEntryPoint
|
||||
MtrrLib
|
||||
MemEncryptSevLib
|
||||
PcdLib
|
||||
|
||||
[Pcd]
|
||||
gUefiOvmfPkgTokenSpaceGuid.PcdOvmfPeiMemFvBase
|
||||
gUefiOvmfPkgTokenSpaceGuid.PcdOvmfPeiMemFvSize
|
||||
gUefiOvmfPkgTokenSpaceGuid.PcdOvmfDxeMemFvBase
|
||||
gUefiOvmfPkgTokenSpaceGuid.PcdOvmfDxeMemFvSize
|
||||
gUefiOvmfPkgTokenSpaceGuid.PcdOvmfLockBoxStorageBase
|
||||
gUefiOvmfPkgTokenSpaceGuid.PcdOvmfLockBoxStorageSize
|
||||
gUefiOvmfPkgTokenSpaceGuid.PcdOvmfHostBridgePciDevId
|
||||
gUefiOvmfPkgTokenSpaceGuid.PcdPciIoBase
|
||||
gUefiOvmfPkgTokenSpaceGuid.PcdPciIoSize
|
||||
gUefiOvmfPkgTokenSpaceGuid.PcdPciMmio32Base
|
||||
gUefiOvmfPkgTokenSpaceGuid.PcdPciMmio32Size
|
||||
gUefiOvmfPkgTokenSpaceGuid.PcdPciMmio64Base
|
||||
gUefiOvmfPkgTokenSpaceGuid.PcdPciMmio64Size
|
||||
gUefiOvmfPkgTokenSpaceGuid.PcdQ35TsegMbytes
|
||||
gEfiMdeModulePkgTokenSpaceGuid.PcdFlashNvStorageFtwSpareSize
|
||||
gEfiMdeModulePkgTokenSpaceGuid.PcdEmuVariableNvStoreReserved
|
||||
gEfiMdeModulePkgTokenSpaceGuid.PcdPciDisableBusEnumeration
|
||||
gEfiMdeModulePkgTokenSpaceGuid.PcdDxeIplSwitchToLongMode
|
||||
gEfiMdeModulePkgTokenSpaceGuid.PcdUse1GPageTable
|
||||
gEfiMdeModulePkgTokenSpaceGuid.PcdPteMemoryEncryptionAddressOrMask
|
||||
gEfiSecurityPkgTokenSpaceGuid.PcdOptionRomImageVerificationPolicy
|
||||
gUefiCpuPkgTokenSpaceGuid.PcdCpuLocalApicBaseAddress
|
||||
|
||||
[FixedPcd]
|
||||
gEfiMdePkgTokenSpaceGuid.PcdPciExpressBaseAddress
|
||||
|
||||
[Ppis]
|
||||
gEfiPeiMasterBootModePpiGuid
|
||||
gEfiPeiMpServicesPpiGuid
|
||||
|
||||
[Depex]
|
||||
TRUE
|
||||
|
Reference in New Issue
Block a user