]> git.proxmox.com Git - mirror_edk2.git/blobdiff - EmulatorPkg/EmulatorPkg.dsc
UefiPayloadPkg: Add PCI root bridge info hob support for SBL
[mirror_edk2.git] / EmulatorPkg / EmulatorPkg.dsc
index 0af2d1ff958c8fc62785ea673d1dc8f2f4f86113..554c13ddb500d3760c31ab348c180ee3119f3406 100644 (file)
@@ -4,8 +4,9 @@
 # The Emulation Platform can be used to debug individual modules, prior to creating\r
 # a real platform. This also provides an example for how an DSC is created.\r
 #\r
-# Copyright (c) 2006 - 2019, Intel Corporation. All rights reserved.<BR>\r
+# Copyright (c) 2006 - 2021, Intel Corporation. All rights reserved.<BR>\r
 # Portions copyright (c) 2010 - 2011, Apple Inc. All rights reserved.<BR>\r
+# Copyright (c) Microsoft Corporation.\r
 #\r
 # SPDX-License-Identifier: BSD-2-Clause-Patent\r
 #\r
   DEFINE NETWORK_IP6_ENABLE       = FALSE\r
   DEFINE NETWORK_TLS_ENABLE       = FALSE\r
   DEFINE NETWORK_HTTP_BOOT_ENABLE = FALSE\r
+  DEFINE NETWORK_HTTP_ENABLE      = FALSE\r
   DEFINE NETWORK_ISCSI_ENABLE     = FALSE\r
+  DEFINE SECURE_BOOT_ENABLE       = FALSE\r
+\r
+  #\r
+  # Redfish definition\r
+  #\r
+  DEFINE REDFISH_ENABLE = FALSE\r
 \r
 [SkuIds]\r
   0|DEFAULT\r
 \r
+!include MdePkg/MdeLibs.dsc.inc\r
+\r
 [LibraryClasses]\r
   #\r
   # Entry point\r
   #\r
   PlatformBootManagerLib|EmulatorPkg/Library/PlatformBmLib/PlatformBmLib.inf\r
   KeyMapLib|EmulatorPkg/Library/KeyMapLibNull/KeyMapLibNull.inf\r
-\r
+  !if $(REDFISH_ENABLE) == TRUE\r
+    RedfishPlatformHostInterfaceLib|EmulatorPkg/Library/RedfishPlatformHostInterfaceLib/RedfishPlatformHostInterfaceLib.inf\r
+    RedfishPlatformCredentialLib|EmulatorPkg/Library/RedfishPlatformCredentialLib/RedfishPlatformCredentialLib.inf\r
+  !endif\r
   #\r
   # Misc\r
   #\r
   LockBoxLib|MdeModulePkg/Library/LockBoxNullLib/LockBoxNullLib.inf\r
   CpuExceptionHandlerLib|MdeModulePkg/Library/CpuExceptionHandlerLibNull/CpuExceptionHandlerLibNull.inf\r
   TpmMeasurementLib|MdeModulePkg/Library/TpmMeasurementLibNull/TpmMeasurementLibNull.inf\r
-  AuthVariableLib|MdeModulePkg/Library/AuthVariableLibNull/AuthVariableLibNull.inf\r
   VarCheckLib|MdeModulePkg/Library/VarCheckLib/VarCheckLib.inf\r
+  VariablePolicyLib|MdeModulePkg/Library/VariablePolicyLib/VariablePolicyLibRuntimeDxe.inf\r
+  VariablePolicyHelperLib|MdeModulePkg/Library/VariablePolicyHelperLib/VariablePolicyHelperLib.inf\r
   SortLib|MdeModulePkg/Library/BaseSortLib/BaseSortLib.inf\r
   ShellLib|ShellPkg/Library/UefiShellLib/UefiShellLib.inf\r
   FileHandleLib|MdePkg/Library/UefiFileHandleLib/UefiFileHandleLib.inf\r
 \r
+!if $(SECURE_BOOT_ENABLE) == TRUE\r
+  RngLib|MdePkg/Library/BaseRngLibTimerLib/BaseRngLibTimerLib.inf\r
+  IntrinsicLib|CryptoPkg/Library/IntrinsicLib/IntrinsicLib.inf\r
+  OpensslLib|CryptoPkg/Library/OpensslLib/OpensslLibCrypto.inf\r
+  PlatformSecureLib|SecurityPkg/Library/PlatformSecureLibNull/PlatformSecureLibNull.inf\r
+  AuthVariableLib|SecurityPkg/Library/AuthVariableLib/AuthVariableLib.inf\r
+  SecureBootVariableLib|SecurityPkg/Library/SecureBootVariableLib/SecureBootVariableLib.inf\r
+  SecureBootVariableProvisionLib|SecurityPkg/Library/SecureBootVariableProvisionLib/SecureBootVariableProvisionLib.inf\r
+!else\r
+  AuthVariableLib|MdeModulePkg/Library/AuthVariableLibNull/AuthVariableLibNull.inf\r
+!endif\r
+\r
 [LibraryClasses.common.SEC]\r
   PeiServicesLib|EmulatorPkg/Library/SecPeiServicesLib/SecPeiServicesLib.inf\r
   PcdLib|MdePkg/Library/BasePcdLibNull/BasePcdLibNull.inf\r
   TimerLib|EmulatorPkg/Library/DxeCoreTimerLib/DxeCoreTimerLib.inf\r
   EmuThunkLib|EmulatorPkg/Library/DxeEmuLib/DxeEmuLib.inf\r
 \r
+[LibraryClasses.common.DXE_DRIVER, LibraryClasses.common.UEFI_DRIVER, LibraryClasses.common.UEFI_APPLICATION]\r
+!if $(SECURE_BOOT_ENABLE) == TRUE\r
+  BaseCryptLib|CryptoPkg/Library/BaseCryptLib/BaseCryptLib.inf\r
+!endif\r
+\r
+[LibraryClasses.common.DXE_RUNTIME_DRIVER]\r
+!if $(SECURE_BOOT_ENABLE) == TRUE\r
+  BaseCryptLib|CryptoPkg/Library/BaseCryptLib/RuntimeCryptLib.inf\r
+!endif\r
+\r
 [LibraryClasses.common.DXE_RUNTIME_DRIVER, LibraryClasses.common.UEFI_DRIVER, LibraryClasses.common.DXE_DRIVER, LibraryClasses.common.UEFI_APPLICATION]\r
   HobLib|MdePkg/Library/DxeHobLib/DxeHobLib.inf\r
   PcdLib|MdePkg/Library/DxePcdLib/DxePcdLib.inf\r
 \r
 [PcdsFeatureFlag]\r
   gEfiMdeModulePkgTokenSpaceGuid.PcdDxeIplSwitchToLongMode|FALSE\r
-  gEfiMdeModulePkgTokenSpaceGuid.PcdStatusCodeUseSerial|TRUE\r
   gEfiMdeModulePkgTokenSpaceGuid.PcdPeiCoreImageLoaderSearchTeSectionFirst|FALSE\r
   gEfiMdeModulePkgTokenSpaceGuid.PcdDxeIplBuildPageTables|FALSE\r
 \r
   gEfiMdePkgTokenSpaceGuid.PcdDebugPropertyMask|0x1f\r
   gEfiMdeModulePkgTokenSpaceGuid.PcdMaxSizeNonPopulateCapsule|0x0\r
   gEfiMdeModulePkgTokenSpaceGuid.PcdMaxSizePopulateCapsule|0x0\r
+  gEfiMdeModulePkgTokenSpaceGuid.PcdStatusCodeUseSerial|TRUE\r
 \r
   gEmulatorPkgTokenSpaceGuid.PcdEmuFirmwareFdSize|0x002a0000\r
   gEmulatorPkgTokenSpaceGuid.PcdEmuFirmwareBlockSize|0x10000\r
   gEmulatorPkgTokenSpaceGuid.PcdEmuFirmwareVolume|L"../FV/FV_RECOVERY.fd"\r
+!if $(SECURE_BOOT_ENABLE) == TRUE\r
+  gEfiMdeModulePkgTokenSpaceGuid.PcdMaxAuthVariableSize|0x2800\r
+  gEfiSecurityPkgTokenSpaceGuid.PcdUserPhysicalPresence|TRUE\r
+!endif\r
 \r
   gEmulatorPkgTokenSpaceGuid.PcdEmuMemorySize|L"64!64"\r
 \r
   #  0-PCANSI, 1-VT100, 2-VT00+, 3-UTF8, 4-TTYTERM\r
   gEfiMdePkgTokenSpaceGuid.PcdDefaultTerminalType|1\r
 \r
+!if $(REDFISH_ENABLE) == TRUE\r
+  gEfiRedfishPkgTokenSpaceGuid.PcdRedfishRestExServiceDevicePath.DevicePathMatchMode|DEVICE_PATH_MATCH_MAC_NODE\r
+  gEfiRedfishPkgTokenSpaceGuid.PcdRedfishRestExServiceDevicePath.DevicePathNum|1\r
+  #\r
+  # Below is the MAC address of network adapter on EDK2 Emulator platform.\r
+  # You can use ifconfig under EFI shell to get the MAC address of network adapter on EDK2 Emulator platform.\r
+  #\r
+  gEfiRedfishPkgTokenSpaceGuid.PcdRedfishRestExServiceDevicePath.DevicePath|{DEVICE_PATH("MAC(000000000000,0x1)")}\r
+  gEfiRedfishPkgTokenSpaceGuid.PcdRedfishRestExServiceAccessModeInBand|False\r
+  gEfiRedfishPkgTokenSpaceGuid.PcdRedfishDiscoverAccessModeInBand|False\r
+!endif\r
+\r
 [PcdsDynamicDefault.common.DEFAULT]\r
   gEfiMdeModulePkgTokenSpaceGuid.PcdFlashNvStorageFtwSpareBase64|0\r
   gEfiMdeModulePkgTokenSpaceGuid.PcdFlashNvStorageFtwWorkingBase64|0\r
 \r
 [Components]\r
 !if "IA32" in $(ARCH) || "X64" in $(ARCH)\r
-  !if "MSFT" in $(FAMILY)\r
+  !if "MSFT" in $(FAMILY) || $(WIN_HOST_BUILD) == TRUE\r
     ##\r
     #  Emulator, OS WIN application\r
+    #  CLANGPDB is cross OS tool chain. It depends on WIN_HOST_BUILD flag\r
+    #  to build WinHost application.\r
     ##\r
     EmulatorPkg/Win/Host/WinHost.inf\r
   !else\r
   EmulatorPkg/ResetRuntimeDxe/Reset.inf\r
   MdeModulePkg/Core/RuntimeDxe/RuntimeDxe.inf\r
   EmulatorPkg/FvbServicesRuntimeDxe/FvbServicesRuntimeDxe.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
+  }\r
+\r
   MdeModulePkg/Universal/EbcDxe/EbcDxe.inf\r
   MdeModulePkg/Universal/MemoryTest/NullMemoryTestDxe/NullMemoryTestDxe.inf\r
   EmulatorPkg/EmuThunkDxe/EmuThunk.inf\r
   EmulatorPkg/PlatformSmbiosDxe/PlatformSmbiosDxe.inf\r
   EmulatorPkg/TimerDxe/Timer.inf\r
 \r
+!if $(SECURE_BOOT_ENABLE) == TRUE\r
+  SecurityPkg/VariableAuthenticated/SecureBootConfigDxe/SecureBootConfigDxe.inf\r
+!endif\r
 \r
   MdeModulePkg/Universal/Variable/RuntimeDxe/VariableRuntimeDxe.inf {\r
     <LibraryClasses>\r
 \r
   MdeModulePkg/Universal/Console/TerminalDxe/TerminalDxe.inf\r
   MdeModulePkg/Universal/BdsDxe/BdsDxe.inf\r
+!if "XCODE5" not in $(TOOL_CHAIN_TAG)\r
   MdeModulePkg/Logo/LogoDxe.inf\r
+!endif\r
   MdeModulePkg/Universal/LoadFileOnFv2/LoadFileOnFv2.inf\r
   MdeModulePkg/Application/UiApp/UiApp.inf {\r
    <LibraryClasses>\r
 \r
   FatPkg/EnhancedFatDxe/Fat.inf\r
 \r
+!if "XCODE5" not in $(TOOL_CHAIN_TAG)\r
   ShellPkg/DynamicCommand/TftpDynamicCommand/TftpDynamicCommand.inf {\r
     <PcdsFixedAtBuild>\r
       gEfiShellPkgTokenSpaceGuid.PcdShellLibAutoInitialize|FALSE\r
   }\r
+!endif\r
   ShellPkg/Application/Shell/Shell.inf {\r
     <LibraryClasses>\r
       ShellCommandLib|ShellPkg/Library/UefiShellCommandLib/UefiShellCommandLib.inf\r
       NULL|ShellPkg/Library/UefiShellInstall1CommandsLib/UefiShellInstall1CommandsLib.inf\r
       NULL|ShellPkg/Library/UefiShellNetwork1CommandsLib/UefiShellNetwork1CommandsLib.inf\r
       HandleParsingLib|ShellPkg/Library/UefiHandleParsingLib/UefiHandleParsingLib.inf\r
+      OrderedCollectionLib|MdePkg/Library/BaseOrderedCollectionRedBlackTreeLib/BaseOrderedCollectionRedBlackTreeLib.inf\r
       SortLib|MdeModulePkg/Library/UefiSortLib/UefiSortLib.inf\r
       PrintLib|MdePkg/Library/BasePrintLib/BasePrintLib.inf\r
 #      SafeBlockIoLib|ShellPkg/Library/SafeBlockIoLib/SafeBlockIoLib.inf\r
 \r
 !include NetworkPkg/Network.dsc.inc\r
 \r
+!if $(REDFISH_ENABLE) == TRUE\r
+  EmulatorPkg/Application/RedfishPlatformConfig/RedfishPlatformConfig.inf\r
+!endif\r
+!include RedfishPkg/Redfish.dsc.inc\r
+\r
 [BuildOptions]\r
   #\r
   # Disable deprecated APIs.\r
 \r
   MSFT:DEBUG_*_*_CC_FLAGS = /Od /Oy-\r
   MSFT:NOOPT_*_*_CC_FLAGS = /Od /Oy-\r
+  GCC:DEBUG_CLANGPDB_*_CC_FLAGS =-O0 -Wno-unused-command-line-argument -Wno-incompatible-pointer-types -Wno-enum-conversion -Wno-incompatible-pointer-types -Wno-sometimes-uninitialized -Wno-constant-conversion -Wno-main-return-type\r
 \r
   MSFT:*_*_*_DLINK_FLAGS     = /ALIGN:4096 /FILEALIGN:4096 /SUBSYSTEM:CONSOLE\r
   MSFT:DEBUG_*_*_DLINK_FLAGS = /EXPORT:InitializeDriver=$(IMAGE_ENTRY_POINT) /BASE:0x10000\r
   MSFT:NOOPT_*_*_DLINK_FLAGS = /EXPORT:InitializeDriver=$(IMAGE_ENTRY_POINT) /BASE:0x10000\r
+\r
+!if $(WIN_HOST_BUILD) == TRUE\r
+  #\r
+  # CLANGPDB tool chain depends on WIN_HOST_BUILD flag to generate the windows application.\r
+  #\r
+  GCC:*_CLANGPDB_*_DLINK_FLAGS     = /ALIGN:4096 /FILEALIGN:4096 /SUBSYSTEM:CONSOLE\r
+  GCC:DEBUG_CLANGPDB_*_DLINK_FLAGS = /EXPORT:InitializeDriver=$(IMAGE_ENTRY_POINT) /BASE:0x10000\r
+  GCC:NOOPT_CLANGPDB_*_DLINK_FLAGS = /EXPORT:InitializeDriver=$(IMAGE_ENTRY_POINT) /BASE:0x10000\r
+!endif\r