ArmVirtCloudHv.fdf 8.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253
  1. #
  2. # Copyright (c) 2021, ARM Limited. All rights reserved.
  3. #
  4. # SPDX-License-Identifier: BSD-2-Clause-Patent
  5. #
  6. ################################################################################
  7. #
  8. # FD Section
  9. # The [FD] Section is made up of the definition statements and a
  10. # description of what goes into the Flash Device Image. Each FD section
  11. # defines one flash "device" image. A flash device image may be one of
  12. # the following: Removable media bootable image (like a boot floppy
  13. # image,) an Option ROM image (that would be "flashed" into an add-in
  14. # card,) a System "Flash" image (that would be burned into a system's
  15. # flash) or an Update ("Capsule") image that will be used to update and
  16. # existing system flash.
  17. #
  18. ################################################################################
  19. [Defines]
  20. !if $(FD_SIZE_IN_MB) == 2
  21. DEFINE FVMAIN_COMPACT_SIZE = 0x1ff000
  22. !endif
  23. !if $(FD_SIZE_IN_MB) == 3
  24. DEFINE FVMAIN_COMPACT_SIZE = 0x2ff000
  25. !endif
  26. [FD.CLOUDHV_EFI]
  27. BaseAddress = 0x00000000|gArmTokenSpaceGuid.PcdFdBaseAddress # cloud-hypervisor assigns 0 - 0x8000000 for a BootROM
  28. Size = $(FD_SIZE)|gArmTokenSpaceGuid.PcdFdSize # The size in bytes of the FLASH Device
  29. ErasePolarity = 1
  30. # This one is tricky, it must be: BlockSize * NumBlocks = Size
  31. BlockSize = 0x00001000
  32. NumBlocks = $(FD_NUM_BLOCKS)
  33. ################################################################################
  34. #
  35. # Following are lists of FD Region layout which correspond to the locations of different
  36. # images within the flash device.
  37. #
  38. # Regions must be defined in ascending order and may not overlap.
  39. #
  40. # A Layout Region start with a eight digit hex offset (leading "0x" required) followed by
  41. # the pipe "|" character, followed by the size of the region, also in hex with the leading
  42. # "0x" characters. Like:
  43. # Offset|Size
  44. # PcdOffsetCName|PcdSizeCName
  45. # RegionType <FV, DATA, or FILE>
  46. #
  47. ################################################################################
  48. #
  49. # UEFI has trouble dealing with FVs that reside at physical address 0x0.
  50. # So instead, put a hardcoded 'jump to 0x1000' at offset 0x0, and put the
  51. # real FV at offset 0x1000
  52. #
  53. 0x00000000|0x00001000
  54. DATA = {
  55. !if $(ARCH) == AARCH64
  56. 0x00, 0x04, 0x00, 0x14 # 'b 0x1000' in AArch64 ASM
  57. !else
  58. 0xfe, 0x03, 0x00, 0xea # 'b 0x1000' in AArch32 ASM
  59. !endif
  60. }
  61. 0x00001000|$(FVMAIN_COMPACT_SIZE)
  62. gArmTokenSpaceGuid.PcdFvBaseAddress|gArmTokenSpaceGuid.PcdFvSize
  63. FV = FVMAIN_COMPACT
  64. !include VarStore.fdf.inc
  65. ################################################################################
  66. #
  67. # FV Section
  68. #
  69. # [FV] section is used to define what components or modules are placed within a flash
  70. # device file. This section also defines order the components and modules are positioned
  71. # within the image. The [FV] section consists of define statements, set statements and
  72. # module statements.
  73. #
  74. ################################################################################
  75. [FV.FvMain]
  76. FvNameGuid = 2A88A00E-E267-C8BF-0E80-AE1BD504ED90
  77. BlockSize = 0x40
  78. NumBlocks = 0 # This FV gets compressed so make it just big enough
  79. FvAlignment = 16 # FV alignment and FV attributes setting.
  80. ERASE_POLARITY = 1
  81. MEMORY_MAPPED = TRUE
  82. STICKY_WRITE = TRUE
  83. LOCK_CAP = TRUE
  84. LOCK_STATUS = TRUE
  85. WRITE_DISABLED_CAP = TRUE
  86. WRITE_ENABLED_CAP = TRUE
  87. WRITE_STATUS = TRUE
  88. WRITE_LOCK_CAP = TRUE
  89. WRITE_LOCK_STATUS = TRUE
  90. READ_DISABLED_CAP = TRUE
  91. READ_ENABLED_CAP = TRUE
  92. READ_STATUS = TRUE
  93. READ_LOCK_CAP = TRUE
  94. READ_LOCK_STATUS = TRUE
  95. INF MdeModulePkg/Core/Dxe/DxeMain.inf
  96. INF MdeModulePkg/Universal/PCD/Dxe/Pcd.inf
  97. INF OvmfPkg/Fdt/VirtioFdtDxe/VirtioFdtDxe.inf
  98. INF EmbeddedPkg/Drivers/FdtClientDxe/FdtClientDxe.inf
  99. INF OvmfPkg/Fdt/HighMemDxe/HighMemDxe.inf
  100. #
  101. # PI DXE Drivers producing Architectural Protocols (EFI Services)
  102. #
  103. INF ArmPkg/Drivers/CpuDxe/CpuDxe.inf
  104. INF MdeModulePkg/Core/RuntimeDxe/RuntimeDxe.inf
  105. INF MdeModulePkg/Universal/SecurityStubDxe/SecurityStubDxe.inf
  106. INF MdeModulePkg/Universal/CapsuleRuntimeDxe/CapsuleRuntimeDxe.inf
  107. INF MdeModulePkg/Universal/FaultTolerantWriteDxe/FaultTolerantWriteDxe.inf
  108. INF MdeModulePkg/Universal/Variable/RuntimeDxe/VariableRuntimeDxe.inf
  109. !if $(SECURE_BOOT_ENABLE) == TRUE
  110. INF SecurityPkg/VariableAuthenticated/SecureBootConfigDxe/SecureBootConfigDxe.inf
  111. !endif
  112. INF MdeModulePkg/Universal/MonotonicCounterRuntimeDxe/MonotonicCounterRuntimeDxe.inf
  113. INF MdeModulePkg/Universal/ResetSystemRuntimeDxe/ResetSystemRuntimeDxe.inf
  114. INF EmbeddedPkg/RealTimeClockRuntimeDxe/RealTimeClockRuntimeDxe.inf
  115. INF EmbeddedPkg/MetronomeDxe/MetronomeDxe.inf
  116. INF MdeModulePkg/Universal/HiiDatabaseDxe/HiiDatabaseDxe.inf
  117. #
  118. # Multiple Console IO support
  119. #
  120. INF MdeModulePkg/Universal/Console/ConPlatformDxe/ConPlatformDxe.inf
  121. INF MdeModulePkg/Universal/Console/ConSplitterDxe/ConSplitterDxe.inf
  122. INF MdeModulePkg/Universal/Console/GraphicsConsoleDxe/GraphicsConsoleDxe.inf
  123. INF MdeModulePkg/Universal/Console/TerminalDxe/TerminalDxe.inf
  124. INF MdeModulePkg/Universal/SerialDxe/SerialDxe.inf
  125. INF ArmPkg/Drivers/ArmGic/ArmGicDxe.inf
  126. INF ArmPkg/Drivers/TimerDxe/TimerDxe.inf
  127. INF MdeModulePkg/Universal/WatchdogTimerDxe/WatchdogTimer.inf
  128. #
  129. # FAT filesystem + GPT/MBR partitioning + UDF filesystem + virtio-fs
  130. #
  131. INF MdeModulePkg/Universal/Disk/DiskIoDxe/DiskIoDxe.inf
  132. INF MdeModulePkg/Universal/Disk/PartitionDxe/PartitionDxe.inf
  133. INF FatPkg/EnhancedFatDxe/Fat.inf
  134. INF MdeModulePkg/Universal/Disk/UnicodeCollation/EnglishDxe/EnglishDxe.inf
  135. INF MdeModulePkg/Universal/Disk/UdfDxe/UdfDxe.inf
  136. INF OvmfPkg/VirtioFsDxe/VirtioFsDxe.inf
  137. #
  138. # Status Code Routing
  139. #
  140. INF MdeModulePkg/Universal/ReportStatusCodeRouter/RuntimeDxe/ReportStatusCodeRouterRuntimeDxe.inf
  141. #
  142. # Platform Driver
  143. #
  144. INF OvmfPkg/VirtioBlkDxe/VirtioBlk.inf
  145. INF OvmfPkg/VirtioNetDxe/VirtioNet.inf
  146. INF OvmfPkg/VirtioScsiDxe/VirtioScsi.inf
  147. INF OvmfPkg/VirtioRngDxe/VirtioRng.inf
  148. #
  149. # UEFI application (Shell Embedded Boot Loader)
  150. #
  151. INF ShellPkg/Application/Shell/Shell.inf
  152. INF ShellPkg/DynamicCommand/TftpDynamicCommand/TftpDynamicCommand.inf
  153. INF ShellPkg/DynamicCommand/HttpDynamicCommand/HttpDynamicCommand.inf
  154. INF OvmfPkg/LinuxInitrdDynamicShellCommand/LinuxInitrdDynamicShellCommand.inf
  155. #
  156. # Bds
  157. #
  158. INF MdeModulePkg/Universal/DevicePathDxe/DevicePathDxe.inf
  159. INF MdeModulePkg/Universal/DisplayEngineDxe/DisplayEngineDxe.inf
  160. INF MdeModulePkg/Universal/SetupBrowserDxe/SetupBrowserDxe.inf
  161. INF MdeModulePkg/Universal/DriverHealthManagerDxe/DriverHealthManagerDxe.inf
  162. INF MdeModulePkg/Universal/BdsDxe/BdsDxe.inf
  163. INF MdeModulePkg/Application/UiApp/UiApp.inf
  164. #
  165. # SCSI Bus and Disk Driver
  166. #
  167. INF MdeModulePkg/Bus/Scsi/ScsiBusDxe/ScsiBusDxe.inf
  168. INF MdeModulePkg/Bus/Scsi/ScsiDiskDxe/ScsiDiskDxe.inf
  169. #
  170. # ACPI Support
  171. #
  172. INF ArmVirtPkg/CloudHvPlatformHasAcpiDtDxe/CloudHvHasAcpiDtDxe.inf
  173. !if $(ARCH) == AARCH64
  174. INF MdeModulePkg/Universal/Acpi/AcpiTableDxe/AcpiTableDxe.inf
  175. INF MdeModulePkg/Universal/Acpi/BootGraphicsResourceTableDxe/BootGraphicsResourceTableDxe.inf
  176. INF ArmVirtPkg/CloudHvAcpiPlatformDxe/CloudHvAcpiPlatformDxe.inf
  177. !endif
  178. #
  179. # PCI support
  180. #
  181. INF ArmPkg/Drivers/ArmPciCpuIo2Dxe/ArmPciCpuIo2Dxe.inf
  182. INF MdeModulePkg/Bus/Pci/PciHostBridgeDxe/PciHostBridgeDxe.inf
  183. INF MdeModulePkg/Bus/Pci/PciBusDxe/PciBusDxe.inf
  184. INF OvmfPkg/PciHotPlugInitDxe/PciHotPlugInit.inf
  185. INF OvmfPkg/VirtioPciDeviceDxe/VirtioPciDeviceDxe.inf
  186. INF OvmfPkg/Virtio10Dxe/Virtio10.inf
  187. #
  188. # TianoCore logo (splash screen)
  189. #
  190. INF MdeModulePkg/Logo/LogoDxe.inf
  191. #
  192. # Ramdisk support
  193. #
  194. INF MdeModulePkg/Universal/Disk/RamDiskDxe/RamDiskDxe.inf
  195. [FV.FVMAIN_COMPACT]
  196. FvAlignment = 16
  197. ERASE_POLARITY = 1
  198. MEMORY_MAPPED = TRUE
  199. STICKY_WRITE = TRUE
  200. LOCK_CAP = TRUE
  201. LOCK_STATUS = TRUE
  202. WRITE_DISABLED_CAP = TRUE
  203. WRITE_ENABLED_CAP = TRUE
  204. WRITE_STATUS = TRUE
  205. WRITE_LOCK_CAP = TRUE
  206. WRITE_LOCK_STATUS = TRUE
  207. READ_DISABLED_CAP = TRUE
  208. READ_ENABLED_CAP = TRUE
  209. READ_STATUS = TRUE
  210. READ_LOCK_CAP = TRUE
  211. READ_LOCK_STATUS = TRUE
  212. INF ArmPlatformPkg/PrePeiCore/PrePeiCoreUniCore.inf
  213. INF MdeModulePkg/Core/Pei/PeiMain.inf
  214. INF ArmPlatformPkg/PlatformPei/PlatformPeim.inf
  215. INF ArmPlatformPkg/MemoryInitPei/MemoryInitPeim.inf
  216. INF ArmPkg/Drivers/CpuPei/CpuPei.inf
  217. INF MdeModulePkg/Universal/PCD/Pei/Pcd.inf
  218. INF MdeModulePkg/Universal/Variable/Pei/VariablePei.inf
  219. INF MdeModulePkg/Core/DxeIplPeim/DxeIpl.inf
  220. FILE FV_IMAGE = 9E21FD93-9C72-4c15-8C4B-E77F1DB2D792 {
  221. SECTION GUIDED EE4E5898-3914-4259-9D6E-DC7BD79403CF PROCESSING_REQUIRED = TRUE {
  222. SECTION FV_IMAGE = FVMAIN
  223. }
  224. }
  225. !include ArmVirtRules.fdf.inc