QemuOpenBoardPkg.dsc 7.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169
  1. ## @file
  2. # QemuOpenBoardPkg.dsc
  3. #
  4. # Description file for QemuOpenBoardPkg
  5. #
  6. # Copyright (c) 2022 Theo Jehl
  7. # SPDX-License-Identifier: BSD-2-Clause-Patent
  8. ##
  9. [Defines]
  10. DSC_SPECIFICATION = 0x0001001C
  11. PLATFORM_GUID = 94797875-D562-40CF-8D55-ADD623C8D46C
  12. PLATFORM_NAME = QemuOpenBoardPkg
  13. PLATFORM_VERSION = 0.1
  14. SUPPORTED_ARCHITECTURES = IA32 | X64
  15. FLASH_DEFINITION = $(PLATFORM_NAME)/$(PLATFORM_NAME).fdf
  16. OUTPUT_DIRECTORY = Build/$(PLATFORM_NAME)
  17. BUILD_TARGETS = DEBUG | RELEASE | NOOPT
  18. SKUID_IDENTIFIER = ALL
  19. SMM_REQUIRED = FALSE
  20. !ifndef $(PEI_ARCH)
  21. !error "PEI_ARCH must be specified to build this feature!"
  22. !endif
  23. !ifndef $(DXE_ARCH)
  24. !error "DXE_ARCH must be specified to build this feature!"
  25. !endif
  26. [SkuIds]
  27. 0 | DEFAULT
  28. [Packages]
  29. MdePkg/MdePkg.dec
  30. MdeModulePkg/MdeModulePkg.dec
  31. MinPlatformPkg/MinPlatformPkg.dec
  32. QemuOpenBoardPkg/QemuOpenBoardPkg.dec
  33. UefiCpuPkg/UefiCpuPkg.dec
  34. OvmfPkg/OvmfPkg.dec
  35. [PcdsFixedAtBuild]
  36. ######################################
  37. # Key Boot Stage and FSP configuration
  38. ######################################
  39. #
  40. # Please select the Boot Stage here.
  41. # Stage 1 - enable debug (system deadloop after debug init)
  42. # Stage 2 - mem init (system deadloop after mem init)
  43. # Stage 3 - boot to shell only
  44. # Stage 4 - boot to OS
  45. # Stage 5 - boot to OS with security boot enabled
  46. # Stage 6 - boot with advanced features enabled
  47. #
  48. gMinPlatformPkgTokenSpaceGuid.PcdBootStage | 4
  49. #
  50. # MinPlatform common include for required feature PCD
  51. # These PCD must be set before the core include files, CoreCommonLib,
  52. # CorePeiLib, and CoreDxeLib.
  53. # Optional MinPlatformPkg features should be enabled after this
  54. #
  55. !include MinPlatformPkg/Include/Dsc/MinPlatformFeaturesPcd.dsc.inc
  56. #
  57. # Commonly used MinPlatform feature configuration logic that maps functionity to stage
  58. #
  59. !include BoardModulePkg/Include/Dsc/CommonStageConfig.dsc.inc
  60. [PcdsFixedAtBuild]
  61. gEfiMdePkgTokenSpaceGuid.PcdDebugPrintErrorLevel | 0x802A00C7
  62. gEfiMdePkgTokenSpaceGuid.PcdFixedDebugPrintErrorLevel | 0x802A00C7
  63. gEfiMdePkgTokenSpaceGuid.PcdDebugPropertyMask | 0x17
  64. # QEMU "memory" is functional even in SEC. For simplicity, we just use that
  65. # "memory" for the temporary RAM
  66. gQemuOpenBoardPkgTokenSpaceGuid.PcdTemporaryRamBase | 0x1000000
  67. gQemuOpenBoardPkgTokenSpaceGuid.PcdTemporaryRamSize | 0x010000
  68. gQemuOpenBoardPkgTokenSpaceGuid.PcdDebugIoPort | 0x402
  69. gEfiMdePkgTokenSpaceGuid.PcdFSBClock | 100000000
  70. # PCIe base address for Q35 machines
  71. # QEMU usable memory below 4G cannot exceed 2.8Gb
  72. gEfiMdePkgTokenSpaceGuid.PcdPciExpressBaseAddress | 0xB0000000
  73. gEfiMdeModulePkgTokenSpaceGuid.PcdEmuVariableNvModeEnable | TRUE
  74. gEfiMdeModulePkgTokenSpaceGuid.PcdResetOnMemoryTypeInformationChange | FALSE
  75. gMinPlatformPkgTokenSpaceGuid.PcdFlashFvFspMBase | 0x00000000 # Will be updated by build
  76. [PcdsFeatureFlag]
  77. gEfiMdeModulePkgTokenSpaceGuid.PcdDxeIplSupportUefiDecompress | TRUE
  78. !if $(DXE_ARCH) == X64
  79. gEfiMdeModulePkgTokenSpaceGuid.PcdDxeIplSwitchToLongMode | TRUE
  80. !else
  81. gEfiMdeModulePkgTokenSpaceGuid.PcdDxeIplSwitchToLongMode | FALSE
  82. !endif
  83. gMinPlatformPkgTokenSpaceGuid.PcdSerialTerminalEnable | TRUE
  84. !if $(SMM_REQUIRED) == TRUE
  85. gUefiOvmfPkgTokenSpaceGuid.PcdSmmSmramRequire | TRUE
  86. gUefiCpuPkgTokenSpaceGuid.PcdCpuHotPlugSupport | FALSE
  87. gEfiMdeModulePkgTokenSpaceGuid.PcdEnableVariableRuntimeCache | FALSE
  88. !endif
  89. [PcdsDynamicDefault]
  90. gUefiOvmfPkgTokenSpaceGuid.PcdOvmfHostBridgePciDevId | 0
  91. # Video setup
  92. gEfiMdeModulePkgTokenSpaceGuid.PcdSetupVideoHorizontalResolution | 640
  93. gEfiMdeModulePkgTokenSpaceGuid.PcdSetupVideoVerticalResolution | 480
  94. gEfiMdeModulePkgTokenSpaceGuid.PcdSmbiosVersion | 0x0208
  95. gEfiMdeModulePkgTokenSpaceGuid.PcdSmbiosDocRev | 0x0
  96. gEfiMdePkgTokenSpaceGuid.PcdPlatformBootTimeOut | 3
  97. gUefiCpuPkgTokenSpaceGuid.PcdCpuMaxLogicalProcessorNumber | 0
  98. gUefiCpuPkgTokenSpaceGuid.PcdCpuBootLogicalProcessorNumber | 0
  99. !if $(SMM_REQUIRED) == TRUE
  100. gUefiOvmfPkgTokenSpaceGuid.PcdQ35TsegMbytes | 8
  101. gUefiOvmfPkgTokenSpaceGuid.PcdQ35SmramAtDefaultSmbase | FALSE
  102. gUefiCpuPkgTokenSpaceGuid.PcdCpuSmmSyncMode | 0x01
  103. gUefiCpuPkgTokenSpaceGuid.PcdCpuSmmApSyncTimeout | 100000
  104. !endif
  105. # Include Common libraries and then stage specific libraries and components
  106. !include MinPlatformPkg/Include/Dsc/CoreCommonLib.dsc
  107. !include MinPlatformPkg/Include/Dsc/CorePeiLib.dsc
  108. !include MinPlatformPkg/Include/Dsc/CoreDxeLib.dsc
  109. !include QemuOpenBoardPkg/Include/Dsc/Stage1.dsc.inc
  110. !include QemuOpenBoardPkg/Include/Dsc/Stage2.dsc.inc
  111. !include QemuOpenBoardPkg/Include/Dsc/Stage3.dsc.inc
  112. !include QemuOpenBoardPkg/Include/Dsc/Stage4.dsc.inc
  113. [LibraryClasses.Common]
  114. QemuOpenFwCfgLib | QemuOpenBoardPkg/Library/QemuOpenFwCfgLib/QemuOpenFwCfgLib.inf
  115. PlatformHookLib | MdeModulePkg/Library/BasePlatformHookLibNull/BasePlatformHookLibNull.inf
  116. PlatformSecLib | QemuOpenBoardPkg/Library/PlatformSecLib/PlatformSecLib.inf
  117. DebugLib | MdePkg/Library/BaseDebugLibSerialPort/BaseDebugLibSerialPort.inf
  118. PciCf8Lib | MdePkg/Library/BasePciCf8Lib/BasePciCf8Lib.inf
  119. TimerLib | OvmfPkg/Library/AcpiTimerLib/BaseAcpiTimerLib.inf
  120. [LibraryClasses.Common.DXE_CORE]
  121. TimerLib | OvmfPkg/Library/AcpiTimerLib/BaseAcpiTimerLib.inf
  122. [LibraryClasses.Common.DXE_DRIVER, LibraryClasses.Common.DXE_RUNTIME_DRIVER, LibraryClasses.Common.DXE_SMM_DRIVER, LibraryClasses.Common.UEFI_DRIVER, LibraryClasses.Common.UEFI_APPLICATION, LibraryClasses.Common.SMM_CORE]
  123. TimerLib | OvmfPkg/Library/AcpiTimerLib/DxeAcpiTimerLib.inf
  124. QemuFwCfgLib | OvmfPkg/Library/QemuFwCfgLib/QemuFwCfgDxeLib.inf
  125. MemEncryptSevLib | OvmfPkg/Library/BaseMemEncryptSevLib/DxeMemEncryptSevLib.inf
  126. MemEncryptTdxLib | OvmfPkg/Library/BaseMemEncryptTdxLib/BaseMemEncryptTdxLibNull.inf
  127. Tcg2PhysicalPresenceLib | OvmfPkg/Library/Tcg2PhysicalPresenceLibNull/DxeTcg2PhysicalPresenceLib.inf
  128. ResetSystemLib | OvmfPkg/Library/ResetSystemLib/DxeResetSystemLib.inf
  129. [LibraryClasses.Common.SEC]
  130. DebugLib | OvmfPkg/Library/PlatformDebugLibIoPort/PlatformRomDebugLibIoPort.inf
  131. [Components.$(DXE_ARCH)]
  132. MdeModulePkg/Bus/Scsi/ScsiBusDxe/ScsiBusDxe.inf
  133. MdeModulePkg/Bus/Scsi/ScsiDiskDxe/ScsiDiskDxe.inf
  134. OvmfPkg/SataControllerDxe/SataControllerDxe.inf
  135. MdeModulePkg/Bus/Ata/AtaAtapiPassThru/AtaAtapiPassThru.inf
  136. MdeModulePkg/Bus/Ata/AtaBusDxe/AtaBusDxe.inf
  137. MdeModulePkg/Bus/Pci/NvmExpressDxe/NvmExpressDxe.inf
  138. MdeModulePkg/Universal/DevicePathDxe/DevicePathDxe.inf
  139. MdeModulePkg/Universal/Disk/DiskIoDxe/DiskIoDxe.inf
  140. MdeModulePkg/Universal/Disk/PartitionDxe/PartitionDxe.inf