This is for conformance with the TCG "Platform Reset Attack Mitigation Specification". Because clearing the CPU caches at boot doesn't impact performance significantly, do it unconditionally, for simplicity's sake. Flush the cache on all logical processors, thanks to EFI_PEI_MP_SERVICES_PPI and CacheMaintenanceLib. Cc: Jordan Justen <jordan.l.justen@intel.com> Cc: Laszlo Ersek <lersek@redhat.com> Cc: Ard Biesheuvel <ard.biesheuvel@linaro.org> Cc: Anthony Perard <anthony.perard@citrix.com> Cc: Julien Grall <julien.grall@linaro.org> Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com> Tested-by: Anthony PERARD <anthony.perard@citrix.com> Reviewed-by: Laszlo Ersek <lersek@redhat.com> Regression-tested-by: Laszlo Ersek <lersek@redhat.com> Reviewed-by: Michael D Kinney <michael.d.kinney@intel.com> [lersek@redhat.com: remove bogus Message-Id line from commit msg]
124 lines
3.9 KiB
INI
124 lines
3.9 KiB
INI
## @file
|
|
# Platform PEI driver
|
|
#
|
|
# This module provides platform specific function to detect boot mode.
|
|
# Copyright (c) 2006 - 2018, Intel Corporation. All rights reserved.<BR>
|
|
#
|
|
# This program and the accompanying materials
|
|
# are licensed and made available under the terms and conditions of the BSD License
|
|
# which accompanies this distribution. The full text of the license may be found at
|
|
# http://opensource.org/licenses/bsd-license.php
|
|
#
|
|
# THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
|
|
# WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
|
|
#
|
|
##
|
|
|
|
[Defines]
|
|
INF_VERSION = 0x00010005
|
|
BASE_NAME = PlatformPei
|
|
FILE_GUID = 222c386d-5abc-4fb4-b124-fbb82488acf4
|
|
MODULE_TYPE = PEIM
|
|
VERSION_STRING = 1.0
|
|
ENTRY_POINT = InitializePlatform
|
|
|
|
#
|
|
# 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
|
|
FeatureControl.c
|
|
Fv.c
|
|
MemDetect.c
|
|
Platform.c
|
|
Platform.h
|
|
Xen.c
|
|
Xen.h
|
|
|
|
[Packages]
|
|
IntelFrameworkModulePkg/IntelFrameworkModulePkg.dec
|
|
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
|
|
PeiServicesTablePointerLib
|
|
PeimEntryPoint
|
|
QemuFwCfgLib
|
|
QemuFwCfgS3Lib
|
|
MtrrLib
|
|
MemEncryptSevLib
|
|
PcdLib
|
|
|
|
[Pcd]
|
|
gUefiOvmfPkgTokenSpaceGuid.PcdOvmfPeiMemFvBase
|
|
gUefiOvmfPkgTokenSpaceGuid.PcdOvmfPeiMemFvSize
|
|
gUefiOvmfPkgTokenSpaceGuid.PcdOvmfDxeMemFvBase
|
|
gUefiOvmfPkgTokenSpaceGuid.PcdOvmfDxeMemFvSize
|
|
gUefiOvmfPkgTokenSpaceGuid.PcdOvmfSecPeiTempRamBase
|
|
gUefiOvmfPkgTokenSpaceGuid.PcdOvmfSecPeiTempRamSize
|
|
gUefiOvmfPkgTokenSpaceGuid.PcdOvmfSecPageTablesBase
|
|
gUefiOvmfPkgTokenSpaceGuid.PcdOvmfSecPageTablesSize
|
|
gUefiOvmfPkgTokenSpaceGuid.PcdOvmfLockBoxStorageBase
|
|
gUefiOvmfPkgTokenSpaceGuid.PcdOvmfLockBoxStorageSize
|
|
gUefiOvmfPkgTokenSpaceGuid.PcdGuidedExtractHandlerTableSize
|
|
gUefiOvmfPkgTokenSpaceGuid.PcdOvmfHostBridgePciDevId
|
|
gUefiOvmfPkgTokenSpaceGuid.PcdPciIoBase
|
|
gUefiOvmfPkgTokenSpaceGuid.PcdPciIoSize
|
|
gUefiOvmfPkgTokenSpaceGuid.PcdPciMmio32Base
|
|
gUefiOvmfPkgTokenSpaceGuid.PcdPciMmio32Size
|
|
gUefiOvmfPkgTokenSpaceGuid.PcdPciMmio64Base
|
|
gUefiOvmfPkgTokenSpaceGuid.PcdPciMmio64Size
|
|
gUefiOvmfPkgTokenSpaceGuid.PcdOvmfDecompressionScratchEnd
|
|
gUefiOvmfPkgTokenSpaceGuid.PcdQ35TsegMbytes
|
|
gEfiMdePkgTokenSpaceGuid.PcdGuidedExtractHandlerTableAddress
|
|
gEfiMdeModulePkgTokenSpaceGuid.PcdFlashNvStorageFtwSpareSize
|
|
gEfiMdeModulePkgTokenSpaceGuid.PcdFlashNvStorageVariableSize
|
|
gEfiMdeModulePkgTokenSpaceGuid.PcdEmuVariableNvStoreReserved
|
|
gEfiMdeModulePkgTokenSpaceGuid.PcdPciDisableBusEnumeration
|
|
gEfiMdeModulePkgTokenSpaceGuid.PcdDxeIplSwitchToLongMode
|
|
gEfiMdeModulePkgTokenSpaceGuid.PcdUse1GPageTable
|
|
gEfiMdeModulePkgTokenSpaceGuid.PcdSetNxForStack
|
|
gEfiMdeModulePkgTokenSpaceGuid.PcdPropertiesTableEnable
|
|
gEfiMdeModulePkgTokenSpaceGuid.PcdAcpiS3Enable
|
|
gEfiMdeModulePkgTokenSpaceGuid.PcdPteMemoryEncryptionAddressOrMask
|
|
gEfiSecurityPkgTokenSpaceGuid.PcdOptionRomImageVerificationPolicy
|
|
gUefiCpuPkgTokenSpaceGuid.PcdCpuLocalApicBaseAddress
|
|
gUefiCpuPkgTokenSpaceGuid.PcdCpuMaxLogicalProcessorNumber
|
|
gUefiCpuPkgTokenSpaceGuid.PcdCpuApInitTimeOutInMicroSeconds
|
|
gUefiCpuPkgTokenSpaceGuid.PcdCpuApStackSize
|
|
|
|
[FixedPcd]
|
|
gEfiMdePkgTokenSpaceGuid.PcdPciExpressBaseAddress
|
|
|
|
[FeaturePcd]
|
|
gUefiOvmfPkgTokenSpaceGuid.PcdSmmSmramRequire
|
|
|
|
[Ppis]
|
|
gEfiPeiMasterBootModePpiGuid
|
|
gEfiPeiMpServicesPpiGuid
|
|
|
|
[Depex]
|
|
TRUE
|
|
|