SbsaQemu.fdf 12 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320
  1. #
  2. # Copyright (c) 2019, Linaro Limited. All rights reserved.
  3. #
  4. # SPDX-License-Identifier: BSD-2-Clause-Patent
  5. #
  6. ################################################################################
  7. #
  8. # FD Section for FLASH0
  9. #
  10. # The [FD] Section is made up of the definition statements and a
  11. # description of what goes into the Flash Device Image. Each FD section
  12. # defines one flash "device" image. A flash device image may be one of
  13. # the following: Removable media bootable image (like a boot floppy
  14. # image,) an Option ROM image (that would be "flashed" into an add-in
  15. # card,) a System "Flash" image (that would be burned into a system's
  16. # flash) or an Update ("Capsule") image that will be used to update and
  17. # existing system flash.
  18. #
  19. ################################################################################
  20. [FD.SBSA_FLASH0]
  21. BaseAddress = 0x00000000
  22. Size = 0x00200000
  23. ErasePolarity = 1
  24. BlockSize = 0x00001000
  25. NumBlocks = 0x200
  26. ################################################################################
  27. #
  28. # Following are lists of FD Region layout which correspond to the locations of different
  29. # images within the flash device.
  30. #
  31. # Regions must be defined in ascending order and may not overlap.
  32. #
  33. # A Layout Region start with a eight digit hex offset (leading "0x" required) followed by
  34. # the pipe "|" character, followed by the size of the region, also in hex with the leading
  35. # "0x" characters. Like:
  36. # Offset|Size
  37. # PcdOffsetCName|PcdSizeCName
  38. # RegionType <FV, DATA, or FILE>
  39. #
  40. ################################################################################
  41. ## Place for Trusted Firmware
  42. # flash0 is secure so we put here the BL1
  43. 0x00000000|0x00008000
  44. FILE = Platform/Qemu/Sbsa/bl1.bin
  45. # and FIP (BL2 + BL31)
  46. 0x00008000|0x00020000
  47. FILE = Platform/Qemu/Sbsa/fip.bin
  48. ################################################################################
  49. #
  50. # FD Section for FLASH1
  51. #
  52. ################################################################################
  53. [FD.SBSA_FLASH1]
  54. BaseAddress = 0x10000000|gArmTokenSpaceGuid.PcdFdBaseAddress
  55. Size = 0x002C0000|gArmTokenSpaceGuid.PcdFdSize
  56. ErasePolarity = 1
  57. BlockSize = 0x00001000
  58. NumBlocks = 0x2C0
  59. ## Place for EFI (BL33)
  60. # This offset (if any as it is 0x0 currently) + BaseAddress (0x10000000) must be set in PRELOADED_BL33_BASE at ATF
  61. 0x00000000|0x00200000
  62. gArmTokenSpaceGuid.PcdFvBaseAddress|gArmTokenSpaceGuid.PcdFvSize
  63. FV = FVMAIN_COMPACT
  64. ## Place for Variables. They share flash1 with EFI
  65. # Must be aligned to Flash Block size 0x40000
  66. 0x00200000|0x00040000
  67. gEfiMdeModulePkgTokenSpaceGuid.PcdFlashNvStorageVariableBase|gEfiMdeModulePkgTokenSpaceGuid.PcdFlashNvStorageVariableSize
  68. #NV_VARIABLE_STORE
  69. DATA = {
  70. ## This is the EFI_FIRMWARE_VOLUME_HEADER
  71. # ZeroVector []
  72. 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
  73. 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
  74. # FileSystemGuid: gEfiSystemNvDataFvGuid =
  75. # { 0xFFF12B8D, 0x7696, 0x4C8B,
  76. # { 0xA9, 0x85, 0x27, 0x47, 0x07, 0x5B, 0x4F, 0x50 }}
  77. 0x8D, 0x2B, 0xF1, 0xFF, 0x96, 0x76, 0x8B, 0x4C,
  78. 0xA9, 0x85, 0x27, 0x47, 0x07, 0x5B, 0x4F, 0x50,
  79. # FvLength: 0xC0000
  80. 0x00, 0x00, 0x0C, 0x00, 0x00, 0x00, 0x00, 0x00,
  81. # Signature "_FVH" # Attributes
  82. 0x5f, 0x46, 0x56, 0x48, 0xff, 0xfe, 0x04, 0x00,
  83. # HeaderLength # CheckSum # ExtHeaderOffset #Reserved #Revision
  84. 0x48, 0x00, 0x28, 0x09, 0x00, 0x00, 0x00, 0x02,
  85. # Blockmap[0]: 0x3 Blocks * 0x40000 Bytes / Block
  86. 0x3, 0x00, 0x00, 0x00, 0x00, 0x00, 0x04, 0x00,
  87. # Blockmap[1]: End
  88. 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
  89. ## This is the VARIABLE_STORE_HEADER
  90. # It is compatible with SECURE_BOOT_ENABLE == FALSE as well.
  91. # Signature: gEfiAuthenticatedVariableGuid =
  92. # { 0xaaf32c78, 0x947b, 0x439a,
  93. # { 0xa1, 0x80, 0x2e, 0x14, 0x4e, 0xc3, 0x77, 0x92 }}
  94. 0x78, 0x2c, 0xf3, 0xaa, 0x7b, 0x94, 0x9a, 0x43,
  95. 0xa1, 0x80, 0x2e, 0x14, 0x4e, 0xc3, 0x77, 0x92,
  96. # Size: 0x40000 (gEfiMdeModulePkgTokenSpaceGuid.PcdFlashNvStorageVariableSize) -
  97. # 0x48 (size of EFI_FIRMWARE_VOLUME_HEADER) = 0x3ffb8
  98. # This can speed up the Variable Dispatch a bit.
  99. 0xB8, 0xFF, 0x03, 0x00,
  100. # FORMATTED: 0x5A #HEALTHY: 0xFE #Reserved: UINT16 #Reserved1: UINT32
  101. 0x5A, 0xFE, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00
  102. }
  103. 0x00240000|0x00040000
  104. gEfiMdeModulePkgTokenSpaceGuid.PcdFlashNvStorageFtwWorkingBase|gEfiMdeModulePkgTokenSpaceGuid.PcdFlashNvStorageFtwWorkingSize
  105. #NV_FTW_WORKING
  106. DATA = {
  107. # EFI_FAULT_TOLERANT_WORKING_BLOCK_HEADER->Signature = gEdkiiWorkingBlockSignatureGuid =
  108. # { 0x9e58292b, 0x7c68, 0x497d, { 0xa0, 0xce, 0x65, 0x0, 0xfd, 0x9f, 0x1b, 0x95 }}
  109. 0x2b, 0x29, 0x58, 0x9e, 0x68, 0x7c, 0x7d, 0x49,
  110. 0xa0, 0xce, 0x65, 0x0, 0xfd, 0x9f, 0x1b, 0x95,
  111. # Crc:UINT32 #WorkingBlockValid:1, WorkingBlockInvalid:1, Reserved
  112. 0x5b, 0xe7, 0xc6, 0x86, 0xFE, 0xFF, 0xFF, 0xFF,
  113. # WriteQueueSize: UINT64
  114. 0xE0, 0xFF, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00
  115. }
  116. 0x00280000|0x00040000
  117. gEfiMdeModulePkgTokenSpaceGuid.PcdFlashNvStorageFtwSpareBase|gEfiMdeModulePkgTokenSpaceGuid.PcdFlashNvStorageFtwSpareSize
  118. #NV_FTW_SPARE
  119. ################################################################################
  120. #
  121. # FV Section
  122. #
  123. # [FV] section is used to define what components or modules are placed within a flash
  124. # device file. This section also defines order the components and modules are positioned
  125. # within the image. The [FV] section consists of define statements, set statements and
  126. # module statements.
  127. #
  128. ################################################################################
  129. [FV.FvMain]
  130. FvNameGuid = 706c8e7f-306e-4dbc-a4ca-c8615d0d1b96
  131. BlockSize = 0x40
  132. NumBlocks = 0 # This FV gets compressed so make it just big enough
  133. FvAlignment = 16 # FV alignment and FV attributes setting.
  134. ERASE_POLARITY = 1
  135. MEMORY_MAPPED = TRUE
  136. STICKY_WRITE = TRUE
  137. LOCK_CAP = TRUE
  138. LOCK_STATUS = TRUE
  139. WRITE_DISABLED_CAP = TRUE
  140. WRITE_ENABLED_CAP = TRUE
  141. WRITE_STATUS = TRUE
  142. WRITE_LOCK_CAP = TRUE
  143. WRITE_LOCK_STATUS = TRUE
  144. READ_DISABLED_CAP = TRUE
  145. READ_ENABLED_CAP = TRUE
  146. READ_STATUS = TRUE
  147. READ_LOCK_CAP = TRUE
  148. READ_LOCK_STATUS = TRUE
  149. INF MdeModulePkg/Core/Dxe/DxeMain.inf
  150. INF MdeModulePkg/Universal/PCD/Dxe/Pcd.inf
  151. #
  152. # PI DXE Drivers producing Architectural Protocols (EFI Services)
  153. #
  154. INF ArmPkg/Drivers/CpuDxe/CpuDxe.inf
  155. INF MdeModulePkg/Core/RuntimeDxe/RuntimeDxe.inf
  156. INF MdeModulePkg/Universal/SecurityStubDxe/SecurityStubDxe.inf
  157. INF MdeModulePkg/Universal/CapsuleRuntimeDxe/CapsuleRuntimeDxe.inf
  158. INF MdeModulePkg/Universal/FaultTolerantWriteDxe/FaultTolerantWriteDxe.inf
  159. INF MdeModulePkg/Universal/Variable/RuntimeDxe/VariableRuntimeDxe.inf
  160. INF SecurityPkg/VariableAuthenticated/SecureBootConfigDxe/SecureBootConfigDxe.inf
  161. INF MdeModulePkg/Universal/MonotonicCounterRuntimeDxe/MonotonicCounterRuntimeDxe.inf
  162. INF MdeModulePkg/Universal/ResetSystemRuntimeDxe/ResetSystemRuntimeDxe.inf
  163. INF EmbeddedPkg/RealTimeClockRuntimeDxe/RealTimeClockRuntimeDxe.inf
  164. INF EmbeddedPkg/MetronomeDxe/MetronomeDxe.inf
  165. INF MdeModulePkg/Universal/HiiDatabaseDxe/HiiDatabaseDxe.inf
  166. #
  167. # Multiple Console IO support
  168. #
  169. INF MdeModulePkg/Universal/Console/ConPlatformDxe/ConPlatformDxe.inf
  170. INF MdeModulePkg/Universal/Console/ConSplitterDxe/ConSplitterDxe.inf
  171. INF MdeModulePkg/Universal/Console/GraphicsConsoleDxe/GraphicsConsoleDxe.inf
  172. INF MdeModulePkg/Universal/Console/TerminalDxe/TerminalDxe.inf
  173. INF MdeModulePkg/Universal/SerialDxe/SerialDxe.inf
  174. INF ArmPkg/Drivers/ArmGic/ArmGicDxe.inf
  175. INF ArmPkg/Drivers/TimerDxe/TimerDxe.inf
  176. INF OvmfPkg/VirtNorFlashDxe/VirtNorFlashDxe.inf
  177. INF MdeModulePkg/Universal/WatchdogTimerDxe/WatchdogTimer.inf
  178. #
  179. # FAT filesystem + GPT/MBR partitioning + UDF filesystem
  180. #
  181. INF MdeModulePkg/Universal/Disk/DiskIoDxe/DiskIoDxe.inf
  182. INF MdeModulePkg/Universal/Disk/PartitionDxe/PartitionDxe.inf
  183. INF FatPkg/EnhancedFatDxe/Fat.inf
  184. INF MdeModulePkg/Universal/Disk/UnicodeCollation/EnglishDxe/EnglishDxe.inf
  185. INF MdeModulePkg/Universal/Disk/UdfDxe/UdfDxe.inf
  186. #
  187. # UEFI application (Shell Embedded Boot Loader)
  188. #
  189. INF ShellPkg/Application/Shell/Shell.inf
  190. #
  191. # Bds
  192. #
  193. INF MdeModulePkg/Universal/DevicePathDxe/DevicePathDxe.inf
  194. INF MdeModulePkg/Universal/DisplayEngineDxe/DisplayEngineDxe.inf
  195. INF MdeModulePkg/Universal/SetupBrowserDxe/SetupBrowserDxe.inf
  196. INF MdeModulePkg/Universal/DriverHealthManagerDxe/DriverHealthManagerDxe.inf
  197. INF MdeModulePkg/Universal/BdsDxe/BdsDxe.inf
  198. INF MdeModulePkg/Application/UiApp/UiApp.inf
  199. #
  200. # Networking stack
  201. #
  202. !include NetworkPkg/Network.fdf.inc
  203. #
  204. # SCSI Bus and Disk Driver
  205. #
  206. INF MdeModulePkg/Bus/Scsi/ScsiBusDxe/ScsiBusDxe.inf
  207. INF MdeModulePkg/Bus/Scsi/ScsiDiskDxe/ScsiDiskDxe.inf
  208. #
  209. # ACPI support
  210. #
  211. INF MdeModulePkg/Universal/Acpi/AcpiTableDxe/AcpiTableDxe.inf
  212. INF MdeModulePkg/Universal/Acpi/AcpiPlatformDxe/AcpiPlatformDxe.inf
  213. INF Silicon/Qemu/SbsaQemu/Drivers/SbsaQemuAcpiDxe/SbsaQemuAcpiDxe.inf
  214. INF RuleOverride = ACPITABLE Silicon/Qemu/SbsaQemu/AcpiTables/AcpiTables.inf
  215. INF MdeModulePkg/Universal/Acpi/BootGraphicsResourceTableDxe/BootGraphicsResourceTableDxe.inf
  216. #
  217. # SMBIOS support
  218. #
  219. INF ArmPkg/Universal/Smbios/ProcessorSubClassDxe/ProcessorSubClassDxe.inf
  220. INF ArmPkg/Universal/Smbios/SmbiosMiscDxe/SmbiosMiscDxe.inf
  221. INF MdeModulePkg/Universal/SmbiosDxe/SmbiosDxe.inf
  222. INF Silicon/Qemu/SbsaQemu/Drivers/SbsaQemuSmbiosDxe/SbsaQemuSmbiosDxe.inf
  223. #
  224. # PCI support
  225. #
  226. INF ArmPkg/Drivers/ArmPciCpuIo2Dxe/ArmPciCpuIo2Dxe.inf
  227. INF MdeModulePkg/Bus/Pci/PciHostBridgeDxe/PciHostBridgeDxe.inf
  228. INF MdeModulePkg/Bus/Pci/PciBusDxe/PciBusDxe.inf
  229. #
  230. # USB Support
  231. #
  232. INF MdeModulePkg/Bus/Pci/UhciDxe/UhciDxe.inf
  233. INF MdeModulePkg/Bus/Pci/EhciDxe/EhciDxe.inf
  234. INF MdeModulePkg/Bus/Pci/XhciDxe/XhciDxe.inf
  235. INF MdeModulePkg/Bus/Usb/UsbBusDxe/UsbBusDxe.inf
  236. INF MdeModulePkg/Bus/Usb/UsbKbDxe/UsbKbDxe.inf
  237. INF MdeModulePkg/Bus/Usb/UsbMassStorageDxe/UsbMassStorageDxe.inf
  238. #
  239. # TianoCore logo (splash screen)
  240. #
  241. INF MdeModulePkg/Logo/LogoDxe.inf
  242. #
  243. # Ramdisk support
  244. #
  245. INF MdeModulePkg/Universal/Disk/RamDiskDxe/RamDiskDxe.inf
  246. [FV.FVMAIN_COMPACT]
  247. FvAlignment = 16
  248. ERASE_POLARITY = 1
  249. MEMORY_MAPPED = TRUE
  250. STICKY_WRITE = TRUE
  251. LOCK_CAP = TRUE
  252. LOCK_STATUS = TRUE
  253. WRITE_DISABLED_CAP = TRUE
  254. WRITE_ENABLED_CAP = TRUE
  255. WRITE_STATUS = TRUE
  256. WRITE_LOCK_CAP = TRUE
  257. WRITE_LOCK_STATUS = TRUE
  258. READ_DISABLED_CAP = TRUE
  259. READ_ENABLED_CAP = TRUE
  260. READ_STATUS = TRUE
  261. READ_LOCK_CAP = TRUE
  262. READ_LOCK_STATUS = TRUE
  263. INF ArmPlatformPkg/PrePeiCore/PrePeiCoreUniCore.inf
  264. INF MdeModulePkg/Core/Pei/PeiMain.inf
  265. INF ArmPlatformPkg/PlatformPei/PlatformPeim.inf
  266. INF ArmPlatformPkg/MemoryInitPei/MemoryInitPeim.inf
  267. INF ArmPkg/Drivers/CpuPei/CpuPei.inf
  268. INF MdeModulePkg/Universal/PCD/Pei/Pcd.inf
  269. INF MdeModulePkg/Core/DxeIplPeim/DxeIpl.inf
  270. # IDE/AHCI Support
  271. INF OvmfPkg/SataControllerDxe/SataControllerDxe.inf
  272. INF MdeModulePkg/Bus/Ata/AtaAtapiPassThru/AtaAtapiPassThru.inf
  273. INF MdeModulePkg/Bus/Ata/AtaBusDxe/AtaBusDxe.inf
  274. INF MdeModulePkg/Bus/Scsi/ScsiBusDxe/ScsiBusDxe.inf
  275. INF MdeModulePkg/Bus/Scsi/ScsiDiskDxe/ScsiDiskDxe.inf
  276. # NonDiscoverableDevices
  277. INF Silicon/Qemu/SbsaQemu/Drivers/SbsaQemuPlatformDxe/SbsaQemuPlatformDxe.inf
  278. INF MdeModulePkg/Bus/Pci/NonDiscoverablePciDeviceDxe/NonDiscoverablePciDeviceDxe.inf
  279. #VGA
  280. INF OvmfPkg/QemuVideoDxe/QemuVideoDxe.inf
  281. FILE FV_IMAGE = 9E21FD93-9C72-4c15-8C4B-E77F1DB2D792 {
  282. SECTION GUIDED EE4E5898-3914-4259-9D6E-DC7BD79403CF PROCESSING_REQUIRED = TRUE {
  283. SECTION FV_IMAGE = FVMAIN
  284. }
  285. }
  286. !include ArmVirtPkg/ArmVirtRules.fdf.inc