]> git.proxmox.com Git - mirror_edk2.git/blobdiff - OvmfPkg/OvmfPkgIa32.dsc
OvmfPkg: annotate "PcdVariableStoreSize := PcdFlashNvStorageVariableSize"
[mirror_edk2.git] / OvmfPkg / OvmfPkgIa32.dsc
index 3cba44dff66709b65799cacc6f7e10c497f81a76..7664b50ddef96f8bbc16862a4eb8d2d0d8346c73 100644 (file)
@@ -1,7 +1,8 @@
 ## @file\r
 #  EFI/Framework Open Virtual Machine Firmware (OVMF) platform\r
 #\r
-#  Copyright (c) 2006 - 2011, Intel Corporation. All rights reserved.<BR>\r
+#  Copyright (c) 2006 - 2018, Intel Corporation. All rights reserved.<BR>\r
+#  (C) Copyright 2016 Hewlett Packard Enterprise Development LP<BR>\r
 #\r
 #  This program and the accompanying materials\r
 #  are licensed and made available under the terms and conditions of the BSD License\r
   DSC_SPECIFICATION              = 0x00010005\r
   OUTPUT_DIRECTORY               = Build/OvmfIa32\r
   SUPPORTED_ARCHITECTURES        = IA32\r
-  BUILD_TARGETS                  = DEBUG|RELEASE\r
+  BUILD_TARGETS                  = NOOPT|DEBUG|RELEASE\r
   SKUID_IDENTIFIER               = DEFAULT\r
   FLASH_DEFINITION               = OvmfPkg/OvmfPkgIa32.fdf\r
 \r
+  #\r
+  # Defines for default states.  These can be changed on the command line.\r
+  # -D FLAG=VALUE\r
+  #\r
+  DEFINE SECURE_BOOT_ENABLE      = FALSE\r
+  DEFINE NETWORK_IP6_ENABLE      = FALSE\r
+  DEFINE HTTP_BOOT_ENABLE        = FALSE\r
+  DEFINE SMM_REQUIRE             = FALSE\r
+  DEFINE TLS_ENABLE              = FALSE\r
+  DEFINE TPM2_ENABLE             = FALSE\r
+\r
+  #\r
+  # Flash size selection. Setting FD_SIZE_IN_KB on the command line directly to\r
+  # one of the supported values, in place of any of the convenience macros, is\r
+  # permitted.\r
+  #\r
+!ifdef $(FD_SIZE_1MB)\r
+  DEFINE FD_SIZE_IN_KB           = 1024\r
+!else\r
+!ifdef $(FD_SIZE_2MB)\r
+  DEFINE FD_SIZE_IN_KB           = 2048\r
+!else\r
+!ifdef $(FD_SIZE_4MB)\r
+  DEFINE FD_SIZE_IN_KB           = 4096\r
+!else\r
+  DEFINE FD_SIZE_IN_KB           = 4096\r
+!endif\r
+!endif\r
+!endif\r
+\r
 [BuildOptions]\r
+  GCC:*_UNIXGCC_*_CC_FLAGS             = -DMDEPKG_NDEBUG\r
   GCC:RELEASE_*_*_CC_FLAGS             = -DMDEPKG_NDEBUG\r
   INTEL:RELEASE_*_*_CC_FLAGS           = /D MDEPKG_NDEBUG\r
   MSFT:RELEASE_*_*_CC_FLAGS            = /D MDEPKG_NDEBUG\r
+!if $(TOOL_CHAIN_TAG) != "XCODE5"\r
   GCC:*_*_*_CC_FLAGS                   = -mno-mmx -mno-sse\r
+!endif\r
+\r
+  #\r
+  # Disable deprecated APIs.\r
+  #\r
+  MSFT:*_*_*_CC_FLAGS = /D DISABLE_NEW_DEPRECATED_INTERFACES\r
+  INTEL:*_*_*_CC_FLAGS = /D DISABLE_NEW_DEPRECATED_INTERFACES\r
+  GCC:*_*_*_CC_FLAGS = -D DISABLE_NEW_DEPRECATED_INTERFACES\r
+\r
+[BuildOptions.common.EDKII.DXE_RUNTIME_DRIVER]\r
+  GCC:*_*_*_DLINK_FLAGS = -z common-page-size=0x1000\r
+  XCODE:*_*_*_DLINK_FLAGS =\r
+\r
+# Force PE/COFF sections to be aligned at 4KB boundaries to support page level\r
+# protection of DXE_SMM_DRIVER/SMM_CORE modules\r
+[BuildOptions.common.EDKII.DXE_SMM_DRIVER, BuildOptions.common.EDKII.SMM_CORE]\r
+  GCC:*_*_*_DLINK_FLAGS = -z common-page-size=0x1000\r
+  XCODE:*_*_*_DLINK_FLAGS =\r
 \r
 ################################################################################\r
 #\r
 ################################################################################\r
 [LibraryClasses]\r
   PcdLib|MdePkg/Library/BasePcdLibNull/BasePcdLibNull.inf\r
-  TimerLib|OvmfPkg/Library/AcpiTimerLib/AcpiTimerLib.inf\r
+  TimerLib|OvmfPkg/Library/AcpiTimerLib/BaseAcpiTimerLib.inf\r
   PrintLib|MdePkg/Library/BasePrintLib/BasePrintLib.inf\r
   BaseMemoryLib|MdePkg/Library/BaseMemoryLibRepStr/BaseMemoryLibRepStr.inf\r
   BaseLib|MdePkg/Library/BaseLib/BaseLib.inf\r
+  SafeIntLib|MdePkg/Library/BaseSafeIntLib/BaseSafeIntLib.inf\r
+  BmpSupportLib|MdeModulePkg/Library/BaseBmpSupportLib/BaseBmpSupportLib.inf\r
   SynchronizationLib|MdePkg/Library/BaseSynchronizationLib/BaseSynchronizationLib.inf\r
   CpuLib|MdePkg/Library/BaseCpuLib/BaseCpuLib.inf\r
   PerformanceLib|MdePkg/Library/BasePerformanceLibNull/BasePerformanceLibNull.inf\r
   UefiDecompressLib|MdePkg/Library/BaseUefiDecompressLib/BaseUefiDecompressLib.inf\r
   UefiHiiServicesLib|MdeModulePkg/Library/UefiHiiServicesLib/UefiHiiServicesLib.inf\r
   HiiLib|MdeModulePkg/Library/UefiHiiLib/UefiHiiLib.inf\r
-  GenericBdsLib|IntelFrameworkModulePkg/Library/GenericBdsLib/GenericBdsLib.inf\r
+  SortLib|MdeModulePkg/Library/UefiSortLib/UefiSortLib.inf\r
+  UefiBootManagerLib|MdeModulePkg/Library/UefiBootManagerLib/UefiBootManagerLib.inf\r
+  BootLogoLib|MdeModulePkg/Library/BootLogoLib/BootLogoLib.inf\r
+  FileExplorerLib|MdeModulePkg/Library/FileExplorerLib/FileExplorerLib.inf\r
   CapsuleLib|MdeModulePkg/Library/DxeCapsuleLibNull/DxeCapsuleLibNull.inf\r
   DxeServicesLib|MdePkg/Library/DxeServicesLib/DxeServicesLib.inf\r
+  DxeServicesTableLib|MdePkg/Library/DxeServicesTableLib/DxeServicesTableLib.inf\r
   PeCoffGetEntryPointLib|MdePkg/Library/BasePeCoffGetEntryPointLib/BasePeCoffGetEntryPointLib.inf\r
   PciCf8Lib|MdePkg/Library/BasePciCf8Lib/BasePciCf8Lib.inf\r
+  PciExpressLib|MdePkg/Library/BasePciExpressLib/BasePciExpressLib.inf\r
   PciLib|MdePkg/Library/BasePciLibCf8/BasePciLibCf8.inf\r
-  IoLib|MdePkg/Library/BaseIoLibIntrinsic/BaseIoLibIntrinsic.inf\r
+  PciSegmentLib|MdePkg/Library/BasePciSegmentLibPci/BasePciSegmentLibPci.inf\r
+  IoLib|MdePkg/Library/BaseIoLibIntrinsic/BaseIoLibIntrinsicSev.inf\r
   OemHookStatusCodeLib|MdeModulePkg/Library/OemHookStatusCodeLibNull/OemHookStatusCodeLibNull.inf\r
   SerialPortLib|PcAtChipsetPkg/Library/SerialIoLib/SerialIoLib.inf\r
   MtrrLib|UefiCpuPkg/Library/MtrrLib/MtrrLib.inf\r
   UefiRuntimeServicesTableLib|MdePkg/Library/UefiRuntimeServicesTableLib/UefiRuntimeServicesTableLib.inf\r
   UefiDriverEntryPoint|MdePkg/Library/UefiDriverEntryPoint/UefiDriverEntryPoint.inf\r
   UefiApplicationEntryPoint|MdePkg/Library/UefiApplicationEntryPoint/UefiApplicationEntryPoint.inf\r
-  DevicePathLib|MdePkg/Library/UefiDevicePathLib/UefiDevicePathLib.inf\r
+  DevicePathLib|MdePkg/Library/UefiDevicePathLibDevicePathProtocol/UefiDevicePathLibDevicePathProtocol.inf\r
   NvVarsFileLib|OvmfPkg/Library/NvVarsFileLib/NvVarsFileLib.inf\r
-  FileHandleLib|ShellPkg/Library/UefiFileHandleLib/UefiFileHandleLib.inf\r
+  FileHandleLib|MdePkg/Library/UefiFileHandleLib/UefiFileHandleLib.inf\r
   UefiCpuLib|UefiCpuPkg/Library/BaseUefiCpuLib/BaseUefiCpuLib.inf\r
   SecurityManagementLib|MdeModulePkg/Library/DxeSecurityManagementLib/DxeSecurityManagementLib.inf\r
   NetLib|MdeModulePkg/Library/DxeNetLib/DxeNetLib.inf\r
   DpcLib|MdeModulePkg/Library/DxeDpcLib/DxeDpcLib.inf\r
   UefiUsbLib|MdePkg/Library/UefiUsbLib/UefiUsbLib.inf\r
   SerializeVariablesLib|OvmfPkg/Library/SerializeVariablesLib/SerializeVariablesLib.inf\r
+  QemuFwCfgLib|OvmfPkg/Library/QemuFwCfgLib/QemuFwCfgDxeLib.inf\r
+  VirtioLib|OvmfPkg/Library/VirtioLib/VirtioLib.inf\r
+  LoadLinuxLib|OvmfPkg/Library/LoadLinuxLib/LoadLinuxLib.inf\r
+  MemEncryptSevLib|OvmfPkg/Library/BaseMemEncryptSevLib/BaseMemEncryptSevLib.inf\r
+!if $(SMM_REQUIRE) == FALSE\r
+  LockBoxLib|OvmfPkg/Library/LockBoxLib/LockBoxBaseLib.inf\r
+!endif\r
+  CustomizedDisplayLib|MdeModulePkg/Library/CustomizedDisplayLib/CustomizedDisplayLib.inf\r
+  FrameBufferBltLib|MdeModulePkg/Library/FrameBufferBltLib/FrameBufferBltLib.inf\r
 \r
 !ifdef $(SOURCE_DEBUG_ENABLE)\r
   PeCoffExtraActionLib|SourceLevelDebugPkg/Library/PeCoffExtraActionLibDebug/PeCoffExtraActionLibDebug.inf\r
 !endif\r
 \r
   ResetSystemLib|OvmfPkg/Library/ResetSystemLib/ResetSystemLib.inf\r
-  LocalApicLib|UefiCpuPkg/Library/BaseXApicLib/BaseXApicLib.inf\r
-  DebugPrintErrorLevelLib|MdePkg/Library/BaseDebugPrintErrorLevelLib/BaseDebugPrintErrorLevelLib.inf  \r
+  LocalApicLib|UefiCpuPkg/Library/BaseXApicX2ApicLib/BaseXApicX2ApicLib.inf\r
+  DebugPrintErrorLevelLib|MdePkg/Library/BaseDebugPrintErrorLevelLib/BaseDebugPrintErrorLevelLib.inf\r
+\r
+  IntrinsicLib|CryptoPkg/Library/IntrinsicLib/IntrinsicLib.inf\r
+!if $(TLS_ENABLE) == TRUE\r
+  OpensslLib|CryptoPkg/Library/OpensslLib/OpensslLib.inf\r
+!else\r
+  OpensslLib|CryptoPkg/Library/OpensslLib/OpensslLibCrypto.inf\r
+!endif\r
+\r
+!if $(SECURE_BOOT_ENABLE) == TRUE\r
+  PlatformSecureLib|OvmfPkg/Library/PlatformSecureLib/PlatformSecureLib.inf\r
+  TpmMeasurementLib|SecurityPkg/Library/DxeTpmMeasurementLib/DxeTpmMeasurementLib.inf\r
+  AuthVariableLib|SecurityPkg/Library/AuthVariableLib/AuthVariableLib.inf\r
+!else\r
+  TpmMeasurementLib|MdeModulePkg/Library/TpmMeasurementLibNull/TpmMeasurementLibNull.inf\r
+  AuthVariableLib|MdeModulePkg/Library/AuthVariableLibNull/AuthVariableLibNull.inf\r
+!endif\r
+  VarCheckLib|MdeModulePkg/Library/VarCheckLib/VarCheckLib.inf\r
+\r
+!if $(NETWORK_IP6_ENABLE) == TRUE\r
+  TcpIoLib|MdeModulePkg/Library/DxeTcpIoLib/DxeTcpIoLib.inf\r
+!endif\r
+\r
+!if $(HTTP_BOOT_ENABLE) == TRUE\r
+  HttpLib|MdeModulePkg/Library/DxeHttpLib/DxeHttpLib.inf\r
+!endif\r
+\r
+!if $(TLS_ENABLE) == TRUE\r
+  TlsLib|CryptoPkg/Library/TlsLib/TlsLib.inf\r
+!endif\r
+\r
+  ShellLib|ShellPkg/Library/UefiShellLib/UefiShellLib.inf\r
+  S3BootScriptLib|MdeModulePkg/Library/PiDxeS3BootScriptLib/DxeS3BootScriptLib.inf\r
+  SmbusLib|MdePkg/Library/BaseSmbusLibNull/BaseSmbusLibNull.inf\r
+  OrderedCollectionLib|MdePkg/Library/BaseOrderedCollectionRedBlackTreeLib/BaseOrderedCollectionRedBlackTreeLib.inf\r
+  XenHypercallLib|OvmfPkg/Library/XenHypercallLib/XenHypercallLib.inf\r
+\r
+!if $(TPM2_ENABLE) == TRUE\r
+  Tpm2CommandLib|SecurityPkg/Library/Tpm2CommandLib/Tpm2CommandLib.inf\r
+  Tcg2PhysicalPresenceLib|SecurityPkg/Library/DxeTcg2PhysicalPresenceLib/DxeTcg2PhysicalPresenceLib.inf\r
+  Tcg2PpVendorLib|SecurityPkg/Library/Tcg2PpVendorLibNull/Tcg2PpVendorLibNull.inf\r
+!endif\r
+\r
+[LibraryClasses.common]\r
+  BaseCryptLib|CryptoPkg/Library/BaseCryptLib/BaseCryptLib.inf\r
 \r
 [LibraryClasses.common.SEC]\r
+  TimerLib|OvmfPkg/Library/AcpiTimerLib/BaseRomAcpiTimerLib.inf\r
+  QemuFwCfgLib|OvmfPkg/Library/QemuFwCfgLib/QemuFwCfgSecLib.inf\r
+!ifdef $(DEBUG_ON_SERIAL_PORT)\r
   DebugLib|MdePkg/Library/BaseDebugLibSerialPort/BaseDebugLibSerialPort.inf\r
+!else\r
+  DebugLib|OvmfPkg/Library/PlatformDebugLibIoPort/PlatformRomDebugLibIoPort.inf\r
+!endif\r
   ReportStatusCodeLib|MdeModulePkg/Library/PeiReportStatusCodeLib/PeiReportStatusCodeLib.inf\r
   ExtractGuidedSectionLib|MdePkg/Library/BaseExtractGuidedSectionLib/BaseExtractGuidedSectionLib.inf\r
 !ifdef $(SOURCE_DEBUG_ENABLE)\r
   PeiServicesLib|MdePkg/Library/PeiServicesLib/PeiServicesLib.inf\r
   PeiServicesTablePointerLib|MdePkg/Library/PeiServicesTablePointerLibIdt/PeiServicesTablePointerLibIdt.inf\r
   MemoryAllocationLib|MdePkg/Library/PeiMemoryAllocationLib/PeiMemoryAllocationLib.inf\r
+  CpuExceptionHandlerLib|UefiCpuPkg/Library/CpuExceptionHandlerLib/SecPeiCpuExceptionHandlerLib.inf\r
 \r
 [LibraryClasses.common.PEI_CORE]\r
   HobLib|MdePkg/Library/PeiHobLib/PeiHobLib.inf\r
   ReportStatusCodeLib|MdeModulePkg/Library/PeiReportStatusCodeLib/PeiReportStatusCodeLib.inf\r
   OemHookStatusCodeLib|MdeModulePkg/Library/OemHookStatusCodeLibNull/OemHookStatusCodeLibNull.inf\r
   PeCoffGetEntryPointLib|MdePkg/Library/BasePeCoffGetEntryPointLib/BasePeCoffGetEntryPointLib.inf\r
+!ifdef $(DEBUG_ON_SERIAL_PORT)\r
   DebugLib|MdePkg/Library/BaseDebugLibSerialPort/BaseDebugLibSerialPort.inf\r
+!else\r
+  DebugLib|OvmfPkg/Library/PlatformDebugLibIoPort/PlatformDebugLibIoPort.inf\r
+!endif\r
   PeCoffLib|MdePkg/Library/BasePeCoffLib/BasePeCoffLib.inf\r
 \r
 [LibraryClasses.common.PEIM]\r
   ReportStatusCodeLib|MdeModulePkg/Library/PeiReportStatusCodeLib/PeiReportStatusCodeLib.inf\r
   OemHookStatusCodeLib|MdeModulePkg/Library/OemHookStatusCodeLibNull/OemHookStatusCodeLibNull.inf\r
   PeCoffGetEntryPointLib|MdePkg/Library/BasePeCoffGetEntryPointLib/BasePeCoffGetEntryPointLib.inf\r
+!ifdef $(DEBUG_ON_SERIAL_PORT)\r
   DebugLib|MdePkg/Library/BaseDebugLibSerialPort/BaseDebugLibSerialPort.inf\r
+!else\r
+  DebugLib|OvmfPkg/Library/PlatformDebugLibIoPort/PlatformDebugLibIoPort.inf\r
+!endif\r
   PeCoffLib|MdePkg/Library/BasePeCoffLib/BasePeCoffLib.inf\r
   PeiResourcePublicationLib|MdePkg/Library/PeiResourcePublicationLib/PeiResourcePublicationLib.inf\r
   ExtractGuidedSectionLib|MdePkg/Library/PeiExtractGuidedSectionLib/PeiExtractGuidedSectionLib.inf\r
 !ifdef $(SOURCE_DEBUG_ENABLE)\r
   DebugAgentLib|SourceLevelDebugPkg/Library/DebugAgent/SecPeiDebugAgentLib.inf\r
 !endif\r
+  CpuExceptionHandlerLib|UefiCpuPkg/Library/CpuExceptionHandlerLib/PeiCpuExceptionHandlerLib.inf\r
+  MpInitLib|UefiCpuPkg/Library/MpInitLib/PeiMpInitLib.inf\r
+  QemuFwCfgS3Lib|OvmfPkg/Library/QemuFwCfgS3Lib/PeiQemuFwCfgS3LibFwCfg.inf\r
+  PcdLib|MdePkg/Library/PeiPcdLib/PeiPcdLib.inf\r
+  QemuFwCfgLib|OvmfPkg/Library/QemuFwCfgLib/QemuFwCfgPeiLib.inf\r
+\r
+!if $(TPM2_ENABLE) == TRUE\r
+  BaseCryptLib|CryptoPkg/Library/BaseCryptLib/PeiCryptLib.inf\r
+  Tpm2DeviceLib|SecurityPkg/Library/Tpm2DeviceLibDTpm/Tpm2DeviceLibDTpm.inf\r
+!endif\r
 \r
 [LibraryClasses.common.DXE_CORE]\r
   HobLib|MdePkg/Library/DxeCoreHobLib/DxeCoreHobLib.inf\r
   DxeCoreEntryPoint|MdePkg/Library/DxeCoreEntryPoint/DxeCoreEntryPoint.inf\r
   MemoryAllocationLib|MdeModulePkg/Library/DxeCoreMemoryAllocationLib/DxeCoreMemoryAllocationLib.inf\r
   ReportStatusCodeLib|MdeModulePkg/Library/DxeReportStatusCodeLib/DxeReportStatusCodeLib.inf\r
+!ifdef $(DEBUG_ON_SERIAL_PORT)\r
   DebugLib|MdePkg/Library/BaseDebugLibSerialPort/BaseDebugLibSerialPort.inf\r
-  PcdLib|MdePkg/Library/BasePcdLibNull/BasePcdLibNull.inf\r
+!else\r
+  DebugLib|OvmfPkg/Library/PlatformDebugLibIoPort/PlatformDebugLibIoPort.inf\r
+!endif\r
   ExtractGuidedSectionLib|MdePkg/Library/DxeExtractGuidedSectionLib/DxeExtractGuidedSectionLib.inf\r
 !ifdef $(SOURCE_DEBUG_ENABLE)\r
   DebugAgentLib|SourceLevelDebugPkg/Library/DebugAgent/DxeDebugAgentLib.inf\r
 !endif\r
+  CpuExceptionHandlerLib|UefiCpuPkg/Library/CpuExceptionHandlerLib/DxeCpuExceptionHandlerLib.inf\r
+  PcdLib|MdePkg/Library/DxePcdLib/DxePcdLib.inf\r
 \r
 [LibraryClasses.common.DXE_RUNTIME_DRIVER]\r
+  PcdLib|MdePkg/Library/DxePcdLib/DxePcdLib.inf\r
+  TimerLib|OvmfPkg/Library/AcpiTimerLib/DxeAcpiTimerLib.inf\r
   HobLib|MdePkg/Library/DxeHobLib/DxeHobLib.inf\r
   DxeCoreEntryPoint|MdePkg/Library/DxeCoreEntryPoint/DxeCoreEntryPoint.inf\r
   MemoryAllocationLib|MdePkg/Library/UefiMemoryAllocationLib/UefiMemoryAllocationLib.inf\r
   ReportStatusCodeLib|MdeModulePkg/Library/RuntimeDxeReportStatusCodeLib/RuntimeDxeReportStatusCodeLib.inf\r
+!ifdef $(DEBUG_ON_SERIAL_PORT)\r
   DebugLib|MdePkg/Library/BaseDebugLibSerialPort/BaseDebugLibSerialPort.inf\r
-  PcdLib|MdePkg/Library/DxePcdLib/DxePcdLib.inf\r
+!else\r
+  DebugLib|OvmfPkg/Library/PlatformDebugLibIoPort/PlatformDebugLibIoPort.inf\r
+!endif\r
   UefiRuntimeLib|MdePkg/Library/UefiRuntimeLib/UefiRuntimeLib.inf\r
-  DxeServicesTableLib|MdePkg/Library/DxeServicesTableLib/DxeServicesTableLib.inf\r
+  BaseCryptLib|CryptoPkg/Library/BaseCryptLib/RuntimeCryptLib.inf\r
+  PciLib|OvmfPkg/Library/DxePciLibI440FxQ35/DxePciLibI440FxQ35.inf\r
+  QemuFwCfgS3Lib|OvmfPkg/Library/QemuFwCfgS3Lib/DxeQemuFwCfgS3LibFwCfg.inf\r
 \r
 [LibraryClasses.common.UEFI_DRIVER]\r
+  PcdLib|MdePkg/Library/DxePcdLib/DxePcdLib.inf\r
+  TimerLib|OvmfPkg/Library/AcpiTimerLib/DxeAcpiTimerLib.inf\r
   HobLib|MdePkg/Library/DxeHobLib/DxeHobLib.inf\r
   DxeCoreEntryPoint|MdePkg/Library/DxeCoreEntryPoint/DxeCoreEntryPoint.inf\r
   MemoryAllocationLib|MdePkg/Library/UefiMemoryAllocationLib/UefiMemoryAllocationLib.inf\r
   ReportStatusCodeLib|MdeModulePkg/Library/DxeReportStatusCodeLib/DxeReportStatusCodeLib.inf\r
+!ifdef $(DEBUG_ON_SERIAL_PORT)\r
   DebugLib|MdePkg/Library/BaseDebugLibSerialPort/BaseDebugLibSerialPort.inf\r
-  PcdLib|MdePkg/Library/BasePcdLibNull/BasePcdLibNull.inf\r
+!else\r
+  DebugLib|OvmfPkg/Library/PlatformDebugLibIoPort/PlatformDebugLibIoPort.inf\r
+!endif\r
   UefiScsiLib|MdePkg/Library/UefiScsiLib/UefiScsiLib.inf\r
+  PciLib|OvmfPkg/Library/DxePciLibI440FxQ35/DxePciLibI440FxQ35.inf\r
 \r
 [LibraryClasses.common.DXE_DRIVER]\r
-  HobLib|MdePkg/Library/DxeHobLib/DxeHobLib.inf\r
   PcdLib|MdePkg/Library/DxePcdLib/DxePcdLib.inf\r
+  TimerLib|OvmfPkg/Library/AcpiTimerLib/DxeAcpiTimerLib.inf\r
+  HobLib|MdePkg/Library/DxeHobLib/DxeHobLib.inf\r
   MemoryAllocationLib|MdePkg/Library/UefiMemoryAllocationLib/UefiMemoryAllocationLib.inf\r
   ReportStatusCodeLib|MdeModulePkg/Library/DxeReportStatusCodeLib/DxeReportStatusCodeLib.inf\r
-  DxeServicesTableLib|MdePkg/Library/DxeServicesTableLib/DxeServicesTableLib.inf\r
   UefiScsiLib|MdePkg/Library/UefiScsiLib/UefiScsiLib.inf\r
+!ifdef $(DEBUG_ON_SERIAL_PORT)\r
   DebugLib|MdePkg/Library/BaseDebugLibSerialPort/BaseDebugLibSerialPort.inf\r
+!else\r
+  DebugLib|OvmfPkg/Library/PlatformDebugLibIoPort/PlatformDebugLibIoPort.inf\r
+!endif\r
   NetLib|MdeModulePkg/Library/DxeNetLib/DxeNetLib.inf\r
   IpIoLib|MdeModulePkg/Library/DxeIpIoLib/DxeIpIoLib.inf\r
   UdpIoLib|MdeModulePkg/Library/DxeUdpIoLib/DxeUdpIoLib.inf\r
   DpcLib|MdeModulePkg/Library/DxeDpcLib/DxeDpcLib.inf\r
-  PlatformBdsLib|OvmfPkg/Library/PlatformBdsLib/PlatformBdsLib.inf\r
+  PlatformBootManagerLib|OvmfPkg/Library/PlatformBootManagerLib/PlatformBootManagerLib.inf\r
+  QemuBootOrderLib|OvmfPkg/Library/QemuBootOrderLib/QemuBootOrderLib.inf\r
+  CpuExceptionHandlerLib|UefiCpuPkg/Library/CpuExceptionHandlerLib/DxeCpuExceptionHandlerLib.inf\r
+!if $(SMM_REQUIRE) == TRUE\r
+  LockBoxLib|MdeModulePkg/Library/SmmLockBoxLib/SmmLockBoxDxeLib.inf\r
+!else\r
+  LockBoxLib|OvmfPkg/Library/LockBoxLib/LockBoxDxeLib.inf\r
+!endif\r
+!ifdef $(SOURCE_DEBUG_ENABLE)\r
+  DebugAgentLib|SourceLevelDebugPkg/Library/DebugAgent/DxeDebugAgentLib.inf\r
+!endif\r
+  PciLib|OvmfPkg/Library/DxePciLibI440FxQ35/DxePciLibI440FxQ35.inf\r
+  MpInitLib|UefiCpuPkg/Library/MpInitLib/DxeMpInitLib.inf\r
+  QemuFwCfgS3Lib|OvmfPkg/Library/QemuFwCfgS3Lib/DxeQemuFwCfgS3LibFwCfg.inf\r
+!if $(TPM2_ENABLE) == TRUE\r
+  Tpm2DeviceLib|SecurityPkg/Library/Tpm2DeviceLibTcg2/Tpm2DeviceLibTcg2.inf\r
+!endif\r
 \r
 [LibraryClasses.common.UEFI_APPLICATION]\r
+  PcdLib|MdePkg/Library/DxePcdLib/DxePcdLib.inf\r
+  TimerLib|OvmfPkg/Library/AcpiTimerLib/DxeAcpiTimerLib.inf\r
   HobLib|MdePkg/Library/DxeHobLib/DxeHobLib.inf\r
   MemoryAllocationLib|MdePkg/Library/UefiMemoryAllocationLib/UefiMemoryAllocationLib.inf\r
+  ReportStatusCodeLib|MdeModulePkg/Library/DxeReportStatusCodeLib/DxeReportStatusCodeLib.inf\r
+!ifdef $(DEBUG_ON_SERIAL_PORT)\r
   DebugLib|MdePkg/Library/BaseDebugLibSerialPort/BaseDebugLibSerialPort.inf\r
+!else\r
+  DebugLib|OvmfPkg/Library/PlatformDebugLibIoPort/PlatformDebugLibIoPort.inf\r
+!endif\r
+  PciLib|OvmfPkg/Library/DxePciLibI440FxQ35/DxePciLibI440FxQ35.inf\r
+\r
+[LibraryClasses.common.DXE_SMM_DRIVER]\r
+  PcdLib|MdePkg/Library/DxePcdLib/DxePcdLib.inf\r
+  TimerLib|OvmfPkg/Library/AcpiTimerLib/DxeAcpiTimerLib.inf\r
+  MemoryAllocationLib|MdePkg/Library/SmmMemoryAllocationLib/SmmMemoryAllocationLib.inf\r
+  ReportStatusCodeLib|MdeModulePkg/Library/DxeReportStatusCodeLib/DxeReportStatusCodeLib.inf\r
+  HobLib|MdePkg/Library/DxeHobLib/DxeHobLib.inf\r
+  SmmMemLib|MdePkg/Library/SmmMemLib/SmmMemLib.inf\r
+  SmmServicesTableLib|MdePkg/Library/SmmServicesTableLib/SmmServicesTableLib.inf\r
+!ifdef $(DEBUG_ON_SERIAL_PORT)\r
+  DebugLib|MdePkg/Library/BaseDebugLibSerialPort/BaseDebugLibSerialPort.inf\r
+!else\r
+  DebugLib|OvmfPkg/Library/PlatformDebugLibIoPort/PlatformDebugLibIoPort.inf\r
+!endif\r
+  CpuExceptionHandlerLib|UefiCpuPkg/Library/CpuExceptionHandlerLib/SmmCpuExceptionHandlerLib.inf\r
+!ifdef $(SOURCE_DEBUG_ENABLE)\r
+  DebugAgentLib|SourceLevelDebugPkg/Library/DebugAgent/SmmDebugAgentLib.inf\r
+!endif\r
+  BaseCryptLib|CryptoPkg/Library/BaseCryptLib/SmmCryptLib.inf\r
+  PciLib|OvmfPkg/Library/DxePciLibI440FxQ35/DxePciLibI440FxQ35.inf\r
+\r
+[LibraryClasses.common.SMM_CORE]\r
+  PcdLib|MdePkg/Library/DxePcdLib/DxePcdLib.inf\r
+  TimerLib|OvmfPkg/Library/AcpiTimerLib/DxeAcpiTimerLib.inf\r
+  SmmCorePlatformHookLib|MdeModulePkg/Library/SmmCorePlatformHookLibNull/SmmCorePlatformHookLibNull.inf\r
+  MemoryAllocationLib|MdeModulePkg/Library/PiSmmCoreMemoryAllocationLib/PiSmmCoreMemoryAllocationLib.inf\r
+  ReportStatusCodeLib|MdeModulePkg/Library/DxeReportStatusCodeLib/DxeReportStatusCodeLib.inf\r
+  HobLib|MdePkg/Library/DxeHobLib/DxeHobLib.inf\r
+  SmmMemLib|MdePkg/Library/SmmMemLib/SmmMemLib.inf\r
+  SmmServicesTableLib|MdeModulePkg/Library/PiSmmCoreSmmServicesTableLib/PiSmmCoreSmmServicesTableLib.inf\r
+!ifdef $(DEBUG_ON_SERIAL_PORT)\r
+  DebugLib|MdePkg/Library/BaseDebugLibSerialPort/BaseDebugLibSerialPort.inf\r
+!else\r
+  DebugLib|OvmfPkg/Library/PlatformDebugLibIoPort/PlatformDebugLibIoPort.inf\r
+!endif\r
+  PciLib|OvmfPkg/Library/DxePciLibI440FxQ35/DxePciLibI440FxQ35.inf\r
 \r
 ################################################################################\r
 #\r
 #\r
 ################################################################################\r
 [PcdsFeatureFlag]\r
+  gEfiMdeModulePkgTokenSpaceGuid.PcdHiiOsRuntimeSupport|FALSE\r
   gEfiMdeModulePkgTokenSpaceGuid.PcdStatusCodeUseSerial|FALSE\r
   gEfiMdeModulePkgTokenSpaceGuid.PcdStatusCodeUseMemory|TRUE\r
   gEfiMdeModulePkgTokenSpaceGuid.PcdDxeIplSupportUefiDecompress|FALSE\r
   gEfiMdeModulePkgTokenSpaceGuid.PcdDxeIplSwitchToLongMode|FALSE\r
-  gEfiMdeModulePkgTokenSpaceGuid.PcdResetOnMemoryTypeInformationChange|FALSE\r
-\r
   gEfiMdeModulePkgTokenSpaceGuid.PcdConOutGopSupport|TRUE\r
   gEfiMdeModulePkgTokenSpaceGuid.PcdConOutUgaSupport|FALSE\r
-  gOptionRomPkgTokenSpaceGuid.PcdSupportGop|TRUE\r
-  gOptionRomPkgTokenSpaceGuid.PcdSupportUga|FALSE\r
+  gEfiMdeModulePkgTokenSpaceGuid.PcdInstallAcpiSdtProtocol|TRUE\r
+!if $(SMM_REQUIRE) == TRUE\r
+  gUefiOvmfPkgTokenSpaceGuid.PcdSmmSmramRequire|TRUE\r
+  gUefiCpuPkgTokenSpaceGuid.PcdCpuSmmEnableBspElection|FALSE\r
+!endif\r
 \r
 [PcdsFixedAtBuild]\r
   gEfiMdeModulePkgTokenSpaceGuid.PcdStatusCodeMemorySize|1\r
-\r
+  gEfiMdeModulePkgTokenSpaceGuid.PcdResetOnMemoryTypeInformationChange|FALSE\r
   gEfiMdePkgTokenSpaceGuid.PcdMaximumGuidedExtractHandler|0x10\r
   gEfiMdeModulePkgTokenSpaceGuid.PcdPeiCoreMaxFvSupported|6\r
   gEfiMdeModulePkgTokenSpaceGuid.PcdPeiCoreMaxPeimPerFv|32\r
-  gEfiMdeModulePkgTokenSpaceGuid.PcdMaxVariableSize|0x400\r
-  gEfiMdeModulePkgTokenSpaceGuid.PcdMaxHardwareErrorVariableSize|0x8000\r
-  gEfiMdeModulePkgTokenSpaceGuid.PcdVariableStoreSize|0xc000\r
-  gEfiMdeModulePkgTokenSpaceGuid.PcdFlashNvStorageVariableSize|0xc000\r
-  gEfiMdeModulePkgTokenSpaceGuid.PcdFlashNvStorageFtwWorkingSize|0x2000\r
-  gEfiMdeModulePkgTokenSpaceGuid.PcdFlashNvStorageFtwSpareSize|0x10000\r
+!if ($(FD_SIZE_IN_KB) == 1024) || ($(FD_SIZE_IN_KB) == 2048)\r
+  gEfiMdeModulePkgTokenSpaceGuid.PcdMaxVariableSize|0x2000\r
+  gEfiMdeModulePkgTokenSpaceGuid.PcdMaxAuthVariableSize|0x2800\r
+  # match PcdFlashNvStorageVariableSize purely for convenience\r
+  gEfiMdeModulePkgTokenSpaceGuid.PcdVariableStoreSize|0xe000\r
+!endif\r
+!if $(FD_SIZE_IN_KB) == 4096\r
+  gEfiMdeModulePkgTokenSpaceGuid.PcdMaxVariableSize|0x8400\r
+  gEfiMdeModulePkgTokenSpaceGuid.PcdMaxAuthVariableSize|0x8400\r
+  # match PcdFlashNvStorageVariableSize purely for convenience\r
+  gEfiMdeModulePkgTokenSpaceGuid.PcdVariableStoreSize|0x40000\r
+!endif\r
 \r
   gEfiMdeModulePkgTokenSpaceGuid.PcdVpdBaseAddress|0x0\r
 \r
   gEfiMdePkgTokenSpaceGuid.PcdReportStatusCodePropertyMask|0x07\r
+\r
+  # DEBUG_INIT      0x00000001  // Initialization\r
+  # DEBUG_WARN      0x00000002  // Warnings\r
+  # DEBUG_LOAD      0x00000004  // Load events\r
+  # DEBUG_FS        0x00000008  // EFI File system\r
+  # DEBUG_POOL      0x00000010  // Alloc & Free (pool)\r
+  # DEBUG_PAGE      0x00000020  // Alloc & Free (page)\r
+  # DEBUG_INFO      0x00000040  // Informational debug messages\r
+  # DEBUG_DISPATCH  0x00000080  // PEI/DXE/SMM Dispatchers\r
+  # DEBUG_VARIABLE  0x00000100  // Variable\r
+  # DEBUG_BM        0x00000400  // Boot Manager\r
+  # DEBUG_BLKIO     0x00001000  // BlkIo Driver\r
+  # DEBUG_NET       0x00004000  // SNP Driver\r
+  # DEBUG_UNDI      0x00010000  // UNDI Driver\r
+  # DEBUG_LOADFILE  0x00020000  // LoadFile\r
+  # DEBUG_EVENT     0x00080000  // Event messages\r
+  # DEBUG_GCD       0x00100000  // Global Coherency Database changes\r
+  # DEBUG_CACHE     0x00200000  // Memory range cachability changes\r
+  # DEBUG_VERBOSE   0x00400000  // Detailed debug messages that may\r
+  #                             // significantly impact boot performance\r
+  # DEBUG_ERROR     0x80000000  // Error\r
   gEfiMdePkgTokenSpaceGuid.PcdDebugPrintErrorLevel|0x8000004F\r
+\r
 !ifdef $(SOURCE_DEBUG_ENABLE)\r
   gEfiMdePkgTokenSpaceGuid.PcdDebugPropertyMask|0x17\r
 !else\r
   gEfiMdePkgTokenSpaceGuid.PcdDebugPropertyMask|0x2F\r
 !endif\r
 \r
+  # This PCD is used to set the base address of the PCI express hierarchy. It\r
+  # is only consulted when OVMF runs on Q35. In that case it is programmed into\r
+  # the PCIEXBAR register.\r
+  #\r
+  # On Q35 machine types that QEMU intends to support in the long term, QEMU\r
+  # never lets the RAM below 4 GB exceed 2 GB.\r
+  gEfiMdePkgTokenSpaceGuid.PcdPciExpressBaseAddress|0x80000000\r
+\r
+!ifdef $(SOURCE_DEBUG_ENABLE)\r
   gEfiSourceLevelDebugPkgTokenSpaceGuid.PcdDebugLoadImageMethod|0x2\r
+!endif\r
+\r
+!if $(HTTP_BOOT_ENABLE) == TRUE\r
+  gEfiNetworkPkgTokenSpaceGuid.PcdAllowHttpConnections|TRUE\r
+!endif\r
+\r
+!ifndef $(USE_OLD_SHELL)\r
+  gEfiIntelFrameworkModulePkgTokenSpaceGuid.PcdShellFile|{ 0x83, 0xA5, 0x04, 0x7C, 0x3E, 0x9E, 0x1C, 0x4F, 0xAD, 0x65, 0xE0, 0x52, 0x68, 0xD0, 0xB4, 0xD1 }\r
+!endif\r
+\r
+!if $(SMM_REQUIRE) == TRUE\r
+  gUefiCpuPkgTokenSpaceGuid.PcdCpuSmmStackSize|0x4000\r
+!endif\r
+\r
+  # IRQs 5, 9, 10, 11 are level-triggered\r
+  gPcAtChipsetPkgTokenSpaceGuid.Pcd8259LegacyModeEdgeLevel|0x0E20\r
+\r
+  # Point to the MdeModulePkg/Application/UiApp/UiApp.inf\r
+  gEfiMdeModulePkgTokenSpaceGuid.PcdBootManagerMenuFile|{ 0x21, 0xaa, 0x2c, 0x46, 0x14, 0x76, 0x03, 0x45, 0x83, 0x6e, 0x8a, 0xb6, 0xf4, 0x66, 0x23, 0x31 }\r
 \r
 ################################################################################\r
 #\r
 ################################################################################\r
 \r
 [PcdsDynamicDefault]\r
+  # only set when\r
+  #   ($(SMM_REQUIRE) == FALSE)\r
   gEfiMdeModulePkgTokenSpaceGuid.PcdEmuVariableNvStoreReserved|0\r
+\r
   gEfiMdeModulePkgTokenSpaceGuid.PcdFlashNvStorageVariableBase64|0\r
   gEfiMdeModulePkgTokenSpaceGuid.PcdFlashNvStorageFtwWorkingBase|0\r
   gEfiMdeModulePkgTokenSpaceGuid.PcdFlashNvStorageFtwSpareBase|0\r
+  gEfiMdeModulePkgTokenSpaceGuid.PcdPciDisableBusEnumeration|FALSE\r
+  gEfiMdeModulePkgTokenSpaceGuid.PcdVideoHorizontalResolution|800\r
+  gEfiMdeModulePkgTokenSpaceGuid.PcdVideoVerticalResolution|600\r
+  gEfiMdeModulePkgTokenSpaceGuid.PcdAcpiS3Enable|FALSE\r
+  gUefiOvmfPkgTokenSpaceGuid.PcdOvmfHostBridgePciDevId|0\r
+  gUefiOvmfPkgTokenSpaceGuid.PcdPciIoBase|0x0\r
+  gUefiOvmfPkgTokenSpaceGuid.PcdPciIoSize|0x0\r
+  gUefiOvmfPkgTokenSpaceGuid.PcdPciMmio32Base|0x0\r
+  gUefiOvmfPkgTokenSpaceGuid.PcdPciMmio32Size|0x0\r
+\r
+  gEfiMdePkgTokenSpaceGuid.PcdPlatformBootTimeOut|0\r
+\r
+  # Set video resolution for text setup.\r
+  gEfiMdeModulePkgTokenSpaceGuid.PcdSetupVideoHorizontalResolution|640\r
+  gEfiMdeModulePkgTokenSpaceGuid.PcdSetupVideoVerticalResolution|480\r
+\r
+  gEfiMdeModulePkgTokenSpaceGuid.PcdSmbiosVersion|0x0208\r
+  gEfiMdeModulePkgTokenSpaceGuid.PcdSmbiosDocRev|0x0\r
+  gUefiOvmfPkgTokenSpaceGuid.PcdQemuSmbiosValidated|FALSE\r
+\r
+  # Noexec settings for DXE.\r
+  gEfiMdeModulePkgTokenSpaceGuid.PcdSetNxForStack|FALSE\r
+  gEfiMdeModulePkgTokenSpaceGuid.PcdPropertiesTableEnable|FALSE\r
+\r
+  # UefiCpuPkg PCDs related to initial AP bringup and general AP management.\r
+  gUefiCpuPkgTokenSpaceGuid.PcdCpuMaxLogicalProcessorNumber|64\r
+  gUefiCpuPkgTokenSpaceGuid.PcdCpuApInitTimeOutInMicroSeconds|50000\r
+\r
+  # Set memory encryption mask\r
+  gEfiMdeModulePkgTokenSpaceGuid.PcdPteMemoryEncryptionAddressOrMask|0x0\r
+\r
+!if $(SMM_REQUIRE) == TRUE\r
+  gUefiOvmfPkgTokenSpaceGuid.PcdQ35TsegMbytes|8\r
+  gUefiCpuPkgTokenSpaceGuid.PcdCpuSmmSyncMode|0x01\r
+  gUefiCpuPkgTokenSpaceGuid.PcdCpuSmmApSyncTimeout|100000\r
+!endif\r
+\r
+  gEfiSecurityPkgTokenSpaceGuid.PcdOptionRomImageVerificationPolicy|0x00\r
 \r
+!if $(TPM2_ENABLE) == TRUE\r
+  gEfiSecurityPkgTokenSpaceGuid.PcdTpmInstanceGuid|{0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}\r
+!endif\r
 \r
 ################################################################################\r
 #\r
 #\r
 ################################################################################\r
 [Components]\r
+  OvmfPkg/ResetVector/ResetVector.inf\r
+\r
   #\r
   # SEC Phase modules\r
   #\r
   OvmfPkg/Sec/SecMain.inf {\r
     <LibraryClasses>\r
-      NULL|IntelFrameworkModulePkg/Library/LzmaCustomDecompressLib/LzmaCustomDecompressLib.inf\r
+      NULL|MdeModulePkg/Library/LzmaCustomDecompressLib/LzmaCustomDecompressLib.inf\r
   }\r
 \r
   #\r
     <LibraryClasses>\r
       PcdLib|MdePkg/Library/BasePcdLibNull/BasePcdLibNull.inf\r
   }\r
-  IntelFrameworkModulePkg/Universal/StatusCode/Pei/StatusCodePei.inf\r
+  MdeModulePkg/Universal/ReportStatusCodeRouter/Pei/ReportStatusCodeRouterPei.inf {\r
+    <LibraryClasses>\r
+      PcdLib|MdePkg/Library/BasePcdLibNull/BasePcdLibNull.inf\r
+  }\r
+  MdeModulePkg/Universal/StatusCodeHandler/Pei/StatusCodeHandlerPei.inf {\r
+    <LibraryClasses>\r
+      PcdLib|MdePkg/Library/BasePcdLibNull/BasePcdLibNull.inf\r
+  }\r
   MdeModulePkg/Core/DxeIplPeim/DxeIpl.inf\r
 \r
-  OvmfPkg/PlatformPei/PlatformPei.inf {\r
+  OvmfPkg/PlatformPei/PlatformPei.inf\r
+  UefiCpuPkg/Universal/Acpi/S3Resume2Pei/S3Resume2Pei.inf {\r
     <LibraryClasses>\r
-      PcdLib|MdePkg/Library/PeiPcdLib/PeiPcdLib.inf\r
+!if $(SMM_REQUIRE) == TRUE\r
+      LockBoxLib|MdeModulePkg/Library/SmmLockBoxLib/SmmLockBoxPeiLib.inf\r
+!endif\r
   }\r
+!if $(SMM_REQUIRE) == TRUE\r
+  OvmfPkg/SmmAccess/SmmAccessPei.inf\r
+!endif\r
+  UefiCpuPkg/CpuMpPei/CpuMpPei.inf\r
+\r
+!if $(TPM2_ENABLE) == TRUE\r
+  OvmfPkg/Tcg/Tcg2Config/Tcg2ConfigPei.inf\r
+  SecurityPkg/Tcg/Tcg2Pei/Tcg2Pei.inf {\r
+    <LibraryClasses>\r
+      HashLib|SecurityPkg/Library/HashLibBaseCryptoRouter/HashLibBaseCryptoRouterPei.inf\r
+      NULL|SecurityPkg/Library/HashInstanceLibSha1/HashInstanceLibSha1.inf\r
+      NULL|SecurityPkg/Library/HashInstanceLibSha256/HashInstanceLibSha256.inf\r
+  }\r
+!endif\r
 \r
   #\r
   # DXE Phase modules\r
   #\r
   MdeModulePkg/Core/Dxe/DxeMain.inf {\r
     <LibraryClasses>\r
-      NULL|IntelFrameworkModulePkg/Library/LzmaCustomDecompressLib/LzmaCustomDecompressLib.inf\r
+      NULL|MdeModulePkg/Library/LzmaCustomDecompressLib/LzmaCustomDecompressLib.inf\r
+      DevicePathLib|MdePkg/Library/UefiDevicePathLib/UefiDevicePathLib.inf\r
   }\r
 \r
-  IntelFrameworkModulePkg/Universal/StatusCode/RuntimeDxe/StatusCodeRuntimeDxe.inf\r
+  MdeModulePkg/Universal/ReportStatusCodeRouter/RuntimeDxe/ReportStatusCodeRouterRuntimeDxe.inf\r
+  MdeModulePkg/Universal/StatusCodeHandler/RuntimeDxe/StatusCodeHandlerRuntimeDxe.inf\r
   MdeModulePkg/Universal/PCD/Dxe/Pcd.inf  {\r
    <LibraryClasses>\r
       PcdLib|MdePkg/Library/BasePcdLibNull/BasePcdLibNull.inf\r
   }\r
 \r
   MdeModulePkg/Core/RuntimeDxe/RuntimeDxe.inf\r
-  MdeModulePkg/Universal/SecurityStubDxe/SecurityStubDxe.inf\r
+\r
+  MdeModulePkg/Universal/SecurityStubDxe/SecurityStubDxe.inf {\r
+    <LibraryClasses>\r
+!if $(SECURE_BOOT_ENABLE) == TRUE\r
+      NULL|SecurityPkg/Library/DxeImageVerificationLib/DxeImageVerificationLib.inf\r
+!endif\r
+!if $(TPM2_ENABLE) == TRUE\r
+      NULL|SecurityPkg/Library/DxeTpm2MeasureBootLib/DxeTpm2MeasureBootLib.inf\r
+!endif\r
+  }\r
+\r
   MdeModulePkg/Universal/EbcDxe/EbcDxe.inf\r
-  MdeModulePkg/Universal/SmbiosDxe/SmbiosDxe.inf\r
   PcAtChipsetPkg/8259InterruptControllerDxe/8259.inf\r
   UefiCpuPkg/CpuIo2Dxe/CpuIo2Dxe.inf\r
   UefiCpuPkg/CpuDxe/CpuDxe.inf\r
   PcAtChipsetPkg/8254TimerDxe/8254Timer.inf\r
-  PcAtChipsetPkg/PciHostBridgeDxe/PciHostBridgeDxe.inf\r
-  MdeModulePkg/Bus/Pci/PciBusDxe/PciBusDxe.inf\r
-  PcAtChipsetPkg/KbcResetDxe/Reset.inf\r
-  MdeModulePkg/Universal/Metronome/Metronome.inf {\r
+  OvmfPkg/IncompatiblePciDeviceSupportDxe/IncompatiblePciDeviceSupport.inf\r
+  OvmfPkg/PciHotPlugInitDxe/PciHotPlugInit.inf\r
+  MdeModulePkg/Bus/Pci/PciHostBridgeDxe/PciHostBridgeDxe.inf {\r
     <LibraryClasses>\r
-      TimerLib|OvmfPkg/Library/AcpiTimerLib/AcpiTimerLib.inf\r
+      PciHostBridgeLib|OvmfPkg/Library/PciHostBridgeLib/PciHostBridgeLib.inf\r
+      NULL|OvmfPkg/Library/PlatformHasIoMmuLib/PlatformHasIoMmuLib.inf\r
   }\r
-\r
-  PcAtChipsetPkg/PcatRealTimeClockRuntimeDxe/PcatRealTimeClockRuntimeDxe.inf {\r
+  MdeModulePkg/Bus/Pci/PciBusDxe/PciBusDxe.inf {\r
     <LibraryClasses>\r
-      TimerLib|OvmfPkg/Library/AcpiTimerLib/AcpiTimerLib.inf\r
+      PcdLib|MdePkg/Library/DxePcdLib/DxePcdLib.inf\r
   }\r
-\r
-  IntelFrameworkModulePkg/Universal/BdsDxe/BdsDxe.inf {\r
+  MdeModulePkg/Universal/ResetSystemRuntimeDxe/ResetSystemRuntimeDxe.inf\r
+  MdeModulePkg/Universal/Metronome/Metronome.inf\r
+  PcAtChipsetPkg/PcatRealTimeClockRuntimeDxe/PcatRealTimeClockRuntimeDxe.inf\r
+  MdeModulePkg/Universal/DriverHealthManagerDxe/DriverHealthManagerDxe.inf\r
+  MdeModulePkg/Universal/BdsDxe/BdsDxe.inf {\r
     <LibraryClasses>\r
-      TimerLib|OvmfPkg/Library/AcpiTimerLib/AcpiTimerLib.inf\r
+!ifdef $(CSM_ENABLE)\r
+      NULL|OvmfPkg/Csm/CsmSupportLib/CsmSupportLib.inf\r
+      NULL|IntelFrameworkModulePkg/Library/LegacyBootManagerLib/LegacyBootManagerLib.inf\r
+!endif\r
   }\r
-\r
-  OvmfPkg/BlockMmioToBlockIoDxe/BlockIo.inf\r
-  OvmfPkg/EmuVariableFvbRuntimeDxe/Fvb.inf {\r
+  MdeModulePkg/Logo/LogoDxe.inf\r
+  MdeModulePkg/Application/UiApp/UiApp.inf {\r
     <LibraryClasses>\r
-      PlatformFvbLib|OvmfPkg/Library/EmuVariableFvbLib/EmuVariableFvbLib.inf\r
+      NULL|MdeModulePkg/Library/DeviceManagerUiLib/DeviceManagerUiLib.inf\r
+      NULL|MdeModulePkg/Library/BootManagerUiLib/BootManagerUiLib.inf\r
+      NULL|MdeModulePkg/Library/BootMaintenanceManagerUiLib/BootMaintenanceManagerUiLib.inf\r
+!ifdef $(CSM_ENABLE)\r
+      NULL|IntelFrameworkModulePkg/Library/LegacyBootManagerLib/LegacyBootManagerLib.inf\r
+      NULL|IntelFrameworkModulePkg/Library/LegacyBootMaintUiLib/LegacyBootMaintUiLib.inf\r
+!endif\r
   }\r
-  MdeModulePkg/Universal/FaultTolerantWriteDxe/FaultTolerantWriteDxe.inf\r
-  MdeModulePkg/Universal/Variable/RuntimeDxe/VariableRuntimeDxe.inf\r
+  OvmfPkg/BlockMmioToBlockIoDxe/BlockIo.inf\r
+  OvmfPkg/VirtioPciDeviceDxe/VirtioPciDeviceDxe.inf\r
+  OvmfPkg/Virtio10Dxe/Virtio10.inf\r
+  OvmfPkg/VirtioBlkDxe/VirtioBlk.inf\r
+  OvmfPkg/VirtioScsiDxe/VirtioScsi.inf\r
+  OvmfPkg/VirtioRngDxe/VirtioRng.inf\r
+  OvmfPkg/XenIoPciDxe/XenIoPciDxe.inf\r
+  OvmfPkg/XenBusDxe/XenBusDxe.inf\r
+  OvmfPkg/XenPvBlkDxe/XenPvBlkDxe.inf\r
   MdeModulePkg/Universal/WatchdogTimerDxe/WatchdogTimer.inf\r
   MdeModulePkg/Universal/MonotonicCounterRuntimeDxe/MonotonicCounterRuntimeDxe.inf\r
   MdeModulePkg/Universal/CapsuleRuntimeDxe/CapsuleRuntimeDxe.inf\r
   MdeModulePkg/Universal/Console/ConPlatformDxe/ConPlatformDxe.inf\r
   MdeModulePkg/Universal/Console/ConSplitterDxe/ConSplitterDxe.inf\r
-  MdeModulePkg/Universal/Console/GraphicsConsoleDxe/GraphicsConsoleDxe.inf\r
+  MdeModulePkg/Universal/Console/GraphicsConsoleDxe/GraphicsConsoleDxe.inf {\r
+    <LibraryClasses>\r
+      PcdLib|MdePkg/Library/DxePcdLib/DxePcdLib.inf\r
+  }\r
   MdeModulePkg/Universal/Console/TerminalDxe/TerminalDxe.inf\r
-  MdeModulePkg/Universal/DevicePathDxe/DevicePathDxe.inf\r
+  MdeModulePkg/Universal/DevicePathDxe/DevicePathDxe.inf {\r
+    <LibraryClasses>\r
+      DevicePathLib|MdePkg/Library/UefiDevicePathLib/UefiDevicePathLib.inf\r
+      PcdLib|MdePkg/Library/BasePcdLibNull/BasePcdLibNull.inf\r
+  }\r
   MdeModulePkg/Universal/PrintDxe/PrintDxe.inf\r
   MdeModulePkg/Universal/Disk/DiskIoDxe/DiskIoDxe.inf\r
   MdeModulePkg/Universal/Disk/PartitionDxe/PartitionDxe.inf\r
+  MdeModulePkg/Universal/Disk/RamDiskDxe/RamDiskDxe.inf\r
   MdeModulePkg/Universal/Disk/UnicodeCollation/EnglishDxe/EnglishDxe.inf\r
+  FatPkg/EnhancedFatDxe/Fat.inf\r
+  MdeModulePkg/Universal/Disk/UdfDxe/UdfDxe.inf\r
   MdeModulePkg/Bus/Scsi/ScsiBusDxe/ScsiBusDxe.inf\r
   MdeModulePkg/Bus/Scsi/ScsiDiskDxe/ScsiDiskDxe.inf\r
-  IntelFrameworkModulePkg/Bus/Pci/IdeBusDxe/IdeBusDxe.inf\r
-  PcAtChipsetPkg/Bus/Pci/IdeControllerDxe/IdeControllerDxe.inf\r
+  OvmfPkg/SataControllerDxe/SataControllerDxe.inf\r
+  MdeModulePkg/Bus/Ata/AtaAtapiPassThru/AtaAtapiPassThru.inf\r
+  MdeModulePkg/Bus/Ata/AtaBusDxe/AtaBusDxe.inf\r
+  MdeModulePkg/Bus/Pci/NvmExpressDxe/NvmExpressDxe.inf\r
   MdeModulePkg/Universal/HiiDatabaseDxe/HiiDatabaseDxe.inf\r
   MdeModulePkg/Universal/SetupBrowserDxe/SetupBrowserDxe.inf\r
+  MdeModulePkg/Universal/DisplayEngineDxe/DisplayEngineDxe.inf\r
   MdeModulePkg/Universal/MemoryTest/NullMemoryTestDxe/NullMemoryTestDxe.inf\r
 \r
-  OptionRomPkg/CirrusLogic5430Dxe/CirrusLogic5430Dxe.inf\r
+  OvmfPkg/QemuVideoDxe/QemuVideoDxe.inf\r
+  OvmfPkg/VirtioGpuDxe/VirtioGpu.inf\r
 \r
   #\r
   # ISA Support\r
   IntelFrameworkModulePkg/Bus/Isa/Ps2KeyboardDxe/Ps2keyboardDxe.inf\r
   IntelFrameworkModulePkg/Bus/Isa/IsaFloppyDxe/IsaFloppyDxe.inf\r
 \r
+  #\r
+  # SMBIOS Support\r
+  #\r
+  MdeModulePkg/Universal/SmbiosDxe/SmbiosDxe.inf {\r
+    <LibraryClasses>\r
+      NULL|OvmfPkg/Library/SmbiosVersionLib/DetectSmbiosVersionLib.inf\r
+  }\r
+  OvmfPkg/SmbiosPlatformDxe/SmbiosPlatformDxe.inf\r
+\r
   #\r
   # ACPI Support\r
   #\r
   MdeModulePkg/Universal/Acpi/AcpiTableDxe/AcpiTableDxe.inf\r
-  MdeModulePkg/Universal/Acpi/AcpiPlatformDxe/AcpiPlatformDxe.inf\r
+  OvmfPkg/AcpiPlatformDxe/AcpiPlatformDxe.inf\r
   OvmfPkg/AcpiTables/AcpiTables.inf\r
+  MdeModulePkg/Universal/Acpi/S3SaveStateDxe/S3SaveStateDxe.inf\r
+  MdeModulePkg/Universal/Acpi/BootScriptExecutorDxe/BootScriptExecutorDxe.inf\r
+  MdeModulePkg/Universal/Acpi/BootGraphicsResourceTableDxe/BootGraphicsResourceTableDxe.inf\r
 \r
   #\r
   # Network Support\r
   #\r
-!if $(NETWORK_ENABLE)\r
   MdeModulePkg/Universal/Network/SnpDxe/SnpDxe.inf\r
   MdeModulePkg/Universal/Network/DpcDxe/DpcDxe.inf\r
   MdeModulePkg/Universal/Network/MnpDxe/MnpDxe.inf\r
   MdeModulePkg/Universal/Network/VlanConfigDxe/VlanConfigDxe.inf\r
   MdeModulePkg/Universal/Network/ArpDxe/ArpDxe.inf\r
   MdeModulePkg/Universal/Network/Dhcp4Dxe/Dhcp4Dxe.inf\r
-  MdeModulePkg/Universal/Network/Ip4ConfigDxe/Ip4ConfigDxe.inf\r
   MdeModulePkg/Universal/Network/Ip4Dxe/Ip4Dxe.inf\r
   MdeModulePkg/Universal/Network/Mtftp4Dxe/Mtftp4Dxe.inf\r
-  MdeModulePkg/Universal/Network/Tcp4Dxe/Tcp4Dxe.inf\r
   MdeModulePkg/Universal/Network/Udp4Dxe/Udp4Dxe.inf\r
+!if $(NETWORK_IP6_ENABLE) == TRUE\r
+  NetworkPkg/Ip6Dxe/Ip6Dxe.inf\r
+  NetworkPkg/TcpDxe/TcpDxe.inf\r
+  NetworkPkg/Udp6Dxe/Udp6Dxe.inf\r
+  NetworkPkg/Dhcp6Dxe/Dhcp6Dxe.inf\r
+  NetworkPkg/Mtftp6Dxe/Mtftp6Dxe.inf\r
+  NetworkPkg/UefiPxeBcDxe/UefiPxeBcDxe.inf\r
+  NetworkPkg/IScsiDxe/IScsiDxe.inf\r
+!else\r
+  MdeModulePkg/Universal/Network/Tcp4Dxe/Tcp4Dxe.inf\r
   MdeModulePkg/Universal/Network/UefiPxeBcDxe/UefiPxeBcDxe.inf\r
   MdeModulePkg/Universal/Network/IScsiDxe/IScsiDxe.inf\r
 !endif\r
+!if $(HTTP_BOOT_ENABLE) == TRUE\r
+  NetworkPkg/DnsDxe/DnsDxe.inf\r
+  NetworkPkg/HttpUtilitiesDxe/HttpUtilitiesDxe.inf\r
+  NetworkPkg/HttpDxe/HttpDxe.inf\r
+  NetworkPkg/HttpBootDxe/HttpBootDxe.inf\r
+!endif\r
+!if $(TLS_ENABLE) == TRUE\r
+  NetworkPkg/TlsDxe/TlsDxe.inf\r
+  NetworkPkg/TlsAuthConfigDxe/TlsAuthConfigDxe.inf\r
+!endif\r
+  OvmfPkg/VirtioNetDxe/VirtioNet.inf\r
 \r
   #\r
   # Usb Support\r
   #\r
   MdeModulePkg/Bus/Pci/UhciDxe/UhciDxe.inf\r
   MdeModulePkg/Bus/Pci/EhciDxe/EhciDxe.inf\r
+  MdeModulePkg/Bus/Pci/XhciDxe/XhciDxe.inf\r
   MdeModulePkg/Bus/Usb/UsbBusDxe/UsbBusDxe.inf\r
   MdeModulePkg/Bus/Usb/UsbKbDxe/UsbKbDxe.inf\r
   MdeModulePkg/Bus/Usb/UsbMassStorageDxe/UsbMassStorageDxe.inf\r
 \r
+!ifdef $(CSM_ENABLE)\r
+  IntelFrameworkModulePkg/Csm/BiosThunk/VideoDxe/VideoDxe.inf {\r
+    <LibraryClasses>\r
+      PcdLib|MdePkg/Library/DxePcdLib/DxePcdLib.inf\r
+  }\r
+  IntelFrameworkModulePkg/Csm/LegacyBiosDxe/LegacyBiosDxe.inf\r
+  OvmfPkg/Csm/Csm16/Csm16.inf\r
+!endif\r
+\r
+!ifndef $(USE_OLD_SHELL)\r
+  ShellPkg/DynamicCommand/TftpDynamicCommand/TftpDynamicCommand.inf {\r
+    <PcdsFixedAtBuild>\r
+      gEfiShellPkgTokenSpaceGuid.PcdShellLibAutoInitialize|FALSE\r
+  }\r
+  ShellPkg/Application/Shell/Shell.inf {\r
+    <LibraryClasses>\r
+      ShellCommandLib|ShellPkg/Library/UefiShellCommandLib/UefiShellCommandLib.inf\r
+      NULL|ShellPkg/Library/UefiShellLevel2CommandsLib/UefiShellLevel2CommandsLib.inf\r
+      NULL|ShellPkg/Library/UefiShellLevel1CommandsLib/UefiShellLevel1CommandsLib.inf\r
+      NULL|ShellPkg/Library/UefiShellLevel3CommandsLib/UefiShellLevel3CommandsLib.inf\r
+      NULL|ShellPkg/Library/UefiShellDriver1CommandsLib/UefiShellDriver1CommandsLib.inf\r
+      NULL|ShellPkg/Library/UefiShellDebug1CommandsLib/UefiShellDebug1CommandsLib.inf\r
+      NULL|ShellPkg/Library/UefiShellInstall1CommandsLib/UefiShellInstall1CommandsLib.inf\r
+      NULL|ShellPkg/Library/UefiShellNetwork1CommandsLib/UefiShellNetwork1CommandsLib.inf\r
+!if $(NETWORK_IP6_ENABLE) == TRUE\r
+      NULL|ShellPkg/Library/UefiShellNetwork2CommandsLib/UefiShellNetwork2CommandsLib.inf\r
+!endif\r
+      HandleParsingLib|ShellPkg/Library/UefiHandleParsingLib/UefiHandleParsingLib.inf\r
+      PrintLib|MdePkg/Library/BasePrintLib/BasePrintLib.inf\r
+      BcfgCommandLib|ShellPkg/Library/UefiShellBcfgCommandLib/UefiShellBcfgCommandLib.inf\r
+\r
+    <PcdsFixedAtBuild>\r
+      gEfiMdePkgTokenSpaceGuid.PcdDebugPropertyMask|0xFF\r
+      gEfiShellPkgTokenSpaceGuid.PcdShellLibAutoInitialize|FALSE\r
+      gEfiMdePkgTokenSpaceGuid.PcdUefiLibMaxPrintBufferSize|8000\r
+  }\r
+!endif\r
+\r
+!if $(SECURE_BOOT_ENABLE) == TRUE\r
+  SecurityPkg/VariableAuthenticated/SecureBootConfigDxe/SecureBootConfigDxe.inf\r
+!endif\r
+\r
+  OvmfPkg/PlatformDxe/Platform.inf\r
+  OvmfPkg/IoMmuDxe/IoMmuDxe.inf\r
+\r
+!if $(SMM_REQUIRE) == TRUE\r
+  OvmfPkg/SmmAccess/SmmAccess2Dxe.inf\r
+  OvmfPkg/SmmControl2Dxe/SmmControl2Dxe.inf\r
+  UefiCpuPkg/CpuS3DataDxe/CpuS3DataDxe.inf\r
+\r
+  #\r
+  # SMM Initial Program Load (a DXE_RUNTIME_DRIVER)\r
+  #\r
+  MdeModulePkg/Core/PiSmmCore/PiSmmIpl.inf\r
+\r
+  #\r
+  # SMM_CORE\r
+  #\r
+  MdeModulePkg/Core/PiSmmCore/PiSmmCore.inf\r
+\r
+  #\r
+  # Privileged drivers (DXE_SMM_DRIVER modules)\r
+  #\r
+  UefiCpuPkg/CpuIo2Smm/CpuIo2Smm.inf\r
+  MdeModulePkg/Universal/LockBox/SmmLockBox/SmmLockBox.inf {\r
+    <LibraryClasses>\r
+      LockBoxLib|MdeModulePkg/Library/SmmLockBoxLib/SmmLockBoxSmmLib.inf\r
+  }\r
+  UefiCpuPkg/PiSmmCpuDxeSmm/PiSmmCpuDxeSmm.inf {\r
+    <LibraryClasses>\r
+      SmmCpuPlatformHookLib|UefiCpuPkg/Library/SmmCpuPlatformHookLibNull/SmmCpuPlatformHookLibNull.inf\r
+      SmmCpuFeaturesLib|OvmfPkg/Library/SmmCpuFeaturesLib/SmmCpuFeaturesLib.inf\r
+  }\r
+\r
+  #\r
+  # Variable driver stack (SMM)\r
+  #\r
+  OvmfPkg/QemuFlashFvbServicesRuntimeDxe/FvbServicesSmm.inf\r
+  MdeModulePkg/Universal/FaultTolerantWriteDxe/FaultTolerantWriteSmm.inf\r
+  MdeModulePkg/Universal/Variable/RuntimeDxe/VariableSmm.inf {\r
+    <LibraryClasses>\r
+      NULL|MdeModulePkg/Library/VarCheckUefiLib/VarCheckUefiLib.inf\r
+  }\r
+  MdeModulePkg/Universal/Variable/RuntimeDxe/VariableSmmRuntimeDxe.inf\r
+\r
+!else\r
+\r
+  #\r
+  # Variable driver stack (non-SMM)\r
+  #\r
+  OvmfPkg/QemuFlashFvbServicesRuntimeDxe/FvbServicesRuntimeDxe.inf\r
+  OvmfPkg/EmuVariableFvbRuntimeDxe/Fvb.inf {\r
+    <LibraryClasses>\r
+      PlatformFvbLib|OvmfPkg/Library/EmuVariableFvbLib/EmuVariableFvbLib.inf\r
+  }\r
+  MdeModulePkg/Universal/FaultTolerantWriteDxe/FaultTolerantWriteDxe.inf\r
+  MdeModulePkg/Universal/Variable/RuntimeDxe/VariableRuntimeDxe.inf {\r
+    <LibraryClasses>\r
+      NULL|MdeModulePkg/Library/VarCheckUefiLib/VarCheckUefiLib.inf\r
+  }\r
+!endif\r
+\r
+!if $(TPM2_ENABLE) == TRUE\r
+  SecurityPkg/Tcg/Tcg2Dxe/Tcg2Dxe.inf {\r
+    <LibraryClasses>\r
+      Tpm2DeviceLib|SecurityPkg/Library/Tpm2DeviceLibRouter/Tpm2DeviceLibRouterDxe.inf\r
+      NULL|SecurityPkg/Library/Tpm2DeviceLibDTpm/Tpm2InstanceLibDTpm.inf\r
+      HashLib|SecurityPkg/Library/HashLibBaseCryptoRouter/HashLibBaseCryptoRouterDxe.inf\r
+      NULL|SecurityPkg/Library/HashInstanceLibSha1/HashInstanceLibSha1.inf\r
+      NULL|SecurityPkg/Library/HashInstanceLibSha256/HashInstanceLibSha256.inf\r
+  }\r
+!endif\r