## @file
#  Platform PEI driver
#
#  This module provides platform specific function to detect boot mode.
#  Copyright (c) 2006 - 2024, Intel Corporation. All rights reserved.<BR>
#
#  SPDX-License-Identifier: BSD-2-Clause-Patent
#
##

[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
  MemTypeInfo.c
  Platform.c
  Platform.h
  SmmRelocation.c

[Packages]
  EmbeddedPkg/EmbeddedPkg.dec
  MdePkg/MdePkg.dec
  MdeModulePkg/MdeModulePkg.dec
  SecurityPkg/SecurityPkg.dec
  UefiCpuPkg/UefiCpuPkg.dec
  QemuPkg/QemuPkg.dec
  QemuQ35Pkg/QemuQ35Pkg.dec

[Guids]
  gEfiMemoryTypeInformationGuid
  gFdtHobGuid
  gDxeMemoryProtectionSettingsGuid # MU_CHANGE
  gMmMemoryProtectionSettingsGuid # MU_CHANGE

[LibraryClasses]
  BaseLib
  CacheMaintenanceLib
  CcExitLib
  DebugLib
  HobLib
  IoLib
  PciLib
  ResourcePublicationLib
  PeiServicesLib
  PeiServicesTablePointerLib
  PeimEntryPoint
  QemuFwCfgLib
  QemuFwCfgSimpleParserLib
  MtrrLib
  MemEncryptSevLib
  PcdLib
  SmmRelocationLib

[Pcd]
  gUefiQemuQ35PkgTokenSpaceGuid.PcdOvmfPeiMemFvBase
  gUefiQemuQ35PkgTokenSpaceGuid.PcdOvmfPeiMemFvSize
  gUefiQemuQ35PkgTokenSpaceGuid.PcdOvmfDxeMemFvBase
  gUefiQemuQ35PkgTokenSpaceGuid.PcdOvmfDxeMemFvSize
  gUefiQemuQ35PkgTokenSpaceGuid.PcdSecPeiTemporaryRamBase
  gUefiQemuQ35PkgTokenSpaceGuid.PcdSecPeiTemporaryRamSize
  gUefiQemuQ35PkgTokenSpaceGuid.PcdOvmfSecPageTablesBase
  gUefiQemuQ35PkgTokenSpaceGuid.PcdOvmfSecPageTablesSize
  gUefiQemuQ35PkgTokenSpaceGuid.PcdOvmfSecGhcbPageTableBase
  gUefiQemuQ35PkgTokenSpaceGuid.PcdOvmfSecGhcbPageTableSize
  gUefiQemuQ35PkgTokenSpaceGuid.PcdOvmfSecGhcbBase
  gUefiQemuQ35PkgTokenSpaceGuid.PcdOvmfSecGhcbSize
  gUefiQemuQ35PkgTokenSpaceGuid.PcdGuidedExtractHandlerTableSize
  gQemuPkgTokenSpaceGuid.PcdOvmfHostBridgePciDevId
  gUefiQemuQ35PkgTokenSpaceGuid.PcdPciIoBase
  gUefiQemuQ35PkgTokenSpaceGuid.PcdPciIoSize
  gUefiQemuQ35PkgTokenSpaceGuid.PcdPciMmio32Base
  gUefiQemuQ35PkgTokenSpaceGuid.PcdPciMmio32Size
  gUefiQemuQ35PkgTokenSpaceGuid.PcdPciMmio64Base
  gUefiQemuQ35PkgTokenSpaceGuid.PcdPciMmio64Size
  gUefiQemuQ35PkgTokenSpaceGuid.PcdOvmfDecompressionScratchEnd
  gUefiQemuQ35PkgTokenSpaceGuid.PcdQ35TsegMbytes
  gUefiQemuQ35PkgTokenSpaceGuid.PcdQ35SmramAtDefaultSmbase
  gEfiMdePkgTokenSpaceGuid.PcdGuidedExtractHandlerTableAddress
  gEfiMdeModulePkgTokenSpaceGuid.PcdFlashNvStorageFtwSpareSize
  gEfiMdeModulePkgTokenSpaceGuid.PcdFlashNvStorageVariableSize
  gEfiMdeModulePkgTokenSpaceGuid.PcdEmuVariableNvStoreReserved

  gEfiMdeModulePkgTokenSpaceGuid.PcdDxeIplSwitchToLongMode
  gEfiMdeModulePkgTokenSpaceGuid.PcdUse1GPageTable
  # gEfiMdeModulePkgTokenSpaceGuid.PcdSetNxForStack MU_CHANGE
  gEfiMdeModulePkgTokenSpaceGuid.PcdPteMemoryEncryptionAddressOrMask
  gEfiMdeModulePkgTokenSpaceGuid.PcdGhcbBase
  gEfiMdeModulePkgTokenSpaceGuid.PcdGhcbSize
  gEfiSecurityPkgTokenSpaceGuid.PcdOptionRomImageVerificationPolicy
  gUefiCpuPkgTokenSpaceGuid.PcdCpuLocalApicBaseAddress
  gUefiCpuPkgTokenSpaceGuid.PcdCpuMaxLogicalProcessorNumber
  gUefiCpuPkgTokenSpaceGuid.PcdCpuBootLogicalProcessorNumber
  gUefiCpuPkgTokenSpaceGuid.PcdCpuApStackSize
  gUefiCpuPkgTokenSpaceGuid.PcdSevEsIsEnabled
  gEfiMdePkgTokenSpaceGuid.PcdConfidentialComputingGuestAttr
  gUefiCpuPkgTokenSpaceGuid.PcdGhcbHypervisorFeatures

[FixedPcd]
  gUefiQemuQ35PkgTokenSpaceGuid.PcdOvmfCpuidBase
  gUefiQemuQ35PkgTokenSpaceGuid.PcdOvmfCpuidSize
  gEfiMdePkgTokenSpaceGuid.PcdPciExpressBaseAddress
  gEmbeddedTokenSpaceGuid.PcdMemoryTypeEfiACPIMemoryNVS
  gEmbeddedTokenSpaceGuid.PcdMemoryTypeEfiACPIReclaimMemory
  gEmbeddedTokenSpaceGuid.PcdMemoryTypeEfiReservedMemoryType
  gEmbeddedTokenSpaceGuid.PcdMemoryTypeEfiRuntimeServicesCode
  gEmbeddedTokenSpaceGuid.PcdMemoryTypeEfiRuntimeServicesData
  gUefiQemuQ35PkgTokenSpaceGuid.PcdOvmfSecGhcbBackupBase
  gUefiQemuQ35PkgTokenSpaceGuid.PcdOvmfSecGhcbBackupSize
  gUefiQemuQ35PkgTokenSpaceGuid.PcdOvmfWorkAreaBase
  gUefiQemuQ35PkgTokenSpaceGuid.PcdOvmfWorkAreaSize
  gUefiQemuQ35PkgTokenSpaceGuid.PcdOvmfSnpSecretsBase
  gUefiQemuQ35PkgTokenSpaceGuid.PcdOvmfSnpSecretsSize
  gUefiQemuQ35PkgTokenSpaceGuid.PcdOvmfFdBaseAddress   # MU_CHANGE: Report flash region as MMIO hob
  gUefiQemuQ35PkgTokenSpaceGuid.PcdOvmfFirmwareFdSize  # MU_CHANGE: Report flash region as MMIO hob

[FeaturePcd]
  gUefiQemuQ35PkgTokenSpaceGuid.PcdCsmEnable
  gQemuPkgTokenSpaceGuid.PcdSmmSmramRequire
  gQemuPkgTokenSpaceGuid.PcdEnableMemoryProtection

[Ppis]
  gEfiPeiMasterBootModePpiGuid
  gEfiPeiMpServicesPpiGuid
  gEfiPeiReadOnlyVariable2PpiGuid
  gEdkiiPeiMpServices2PpiGuid

[Depex]
  TRUE

