ArmVirtXen.fdf 7.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225
  1. #
  2. # Copyright (c) 2011-2015, ARM Limited. All rights reserved.
  3. # Copyright (c) 2014, Linaro Limited. All rights reserved.
  4. # Copyright (c) 2015 - 2019, Intel Corporation. All rights reserved.<BR>
  5. #
  6. # SPDX-License-Identifier: BSD-2-Clause-Patent
  7. #
  8. ################################################################################
  9. #
  10. # FD Section
  11. # The [FD] Section is made up of the definition statements and a
  12. # description of what goes into the Flash Device Image. Each FD section
  13. # defines one flash "device" image. A flash device image may be one of
  14. # the following: Removable media bootable image (like a boot floppy
  15. # image,) an Option ROM image (that would be "flashed" into an add-in
  16. # card,) a System "Flash" image (that would be burned into a system's
  17. # flash) or an Update ("Capsule") image that will be used to update and
  18. # existing system flash.
  19. #
  20. ################################################################################
  21. [FD.XEN_EFI]
  22. BaseAddress = 0x00000000|gArmTokenSpaceGuid.PcdFdBaseAddress
  23. Size = 0x00200000|gArmTokenSpaceGuid.PcdFdSize
  24. ErasePolarity = 1
  25. # This one is tricky, it must be: BlockSize * NumBlocks = Size
  26. BlockSize = 0x00001000
  27. NumBlocks = 0x200
  28. ################################################################################
  29. #
  30. # Following are lists of FD Region layout which correspond to the locations of different
  31. # images within the flash device.
  32. #
  33. # Regions must be defined in ascending order and may not overlap.
  34. #
  35. # A Layout Region start with a eight digit hex offset (leading "0x" required) followed by
  36. # the pipe "|" character, followed by the size of the region, also in hex with the leading
  37. # "0x" characters. Like:
  38. # Offset|Size
  39. # PcdOffsetCName|PcdSizeCName
  40. # RegionType <FV, DATA, or FILE>
  41. #
  42. ################################################################################
  43. #
  44. # Implement the Linux kernel header layout so that the Xen loader will identify
  45. # it as something bootable, and execute it with a FDT pointer in x0 or r2.
  46. # This area will be reused to store a copy of the FDT so round it up to 8 KB.
  47. #
  48. 0x00000000|0x00002000
  49. DATA = {
  50. !if $(ARCH) == AARCH64
  51. 0x01, 0x00, 0x00, 0x10, # code0: adr x1, .
  52. 0xff, 0x07, 0x00, 0x14, # code1: b 0x2000
  53. 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, # text_offset: 512 KB
  54. 0x00, 0x00, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, # image_size: 2 MB
  55. 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, # flags
  56. 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, # res2
  57. 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, # res3
  58. 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, # res4
  59. 0x41, 0x52, 0x4d, 0x64, # magic: "ARM\x64"
  60. 0x00, 0x00, 0x00, 0x00 # res5
  61. !else
  62. 0x08, 0x10, 0x4f, 0xe2, # adr r1, .
  63. 0x02, 0x00, 0xa0, 0xe1, # mov r0, r2 (DTB)
  64. 0x00, 0x00, 0xa0, 0xe1, # nop
  65. 0x00, 0x00, 0xa0, 0xe1, # nop
  66. 0x00, 0x00, 0xa0, 0xe1, # nop
  67. 0x00, 0x00, 0xa0, 0xe1, # nop
  68. 0x00, 0x00, 0xa0, 0xe1, # nop
  69. 0x00, 0x00, 0xa0, 0xe1, # nop
  70. 0xf6, 0x07, 0x00, 0xea, # b 0x2000
  71. 0x18, 0x28, 0x6f, 0x01, # magic
  72. 0x00, 0x00, 0x00, 0x00, # start
  73. 0x00, 0x00, 0x20, 0x00, # image size: 2 MB
  74. 0x01, 0x02, 0x03, 0x04 # endiannness flag
  75. !endif
  76. }
  77. 0x00002000|0x001fe000
  78. gArmTokenSpaceGuid.PcdFvBaseAddress|gArmTokenSpaceGuid.PcdFvSize
  79. FV = FVMAIN_COMPACT
  80. ################################################################################
  81. #
  82. # FV Section
  83. #
  84. # [FV] section is used to define what components or modules are placed within a flash
  85. # device file. This section also defines order the components and modules are positioned
  86. # within the image. The [FV] section consists of define statements, set statements and
  87. # module statements.
  88. #
  89. ################################################################################
  90. [FV.FvMain]
  91. FvNameGuid = 4d2d8743-6337-4c3f-a1d9-7cc7efd283db
  92. BlockSize = 0x40
  93. NumBlocks = 0 # This FV gets compressed so make it just big enough
  94. FvAlignment = 16 # FV alignment and FV attributes setting.
  95. ERASE_POLARITY = 1
  96. MEMORY_MAPPED = TRUE
  97. STICKY_WRITE = TRUE
  98. LOCK_CAP = TRUE
  99. LOCK_STATUS = TRUE
  100. WRITE_DISABLED_CAP = TRUE
  101. WRITE_ENABLED_CAP = TRUE
  102. WRITE_STATUS = TRUE
  103. WRITE_LOCK_CAP = TRUE
  104. WRITE_LOCK_STATUS = TRUE
  105. READ_DISABLED_CAP = TRUE
  106. READ_ENABLED_CAP = TRUE
  107. READ_STATUS = TRUE
  108. READ_LOCK_CAP = TRUE
  109. READ_LOCK_STATUS = TRUE
  110. INF MdeModulePkg/Core/Dxe/DxeMain.inf
  111. INF MdeModulePkg/Universal/PCD/Dxe/Pcd.inf
  112. INF ArmVirtPkg/XenioFdtDxe/XenioFdtDxe.inf
  113. INF ArmVirtPkg/FdtClientDxe/FdtClientDxe.inf
  114. #
  115. # PI DXE Drivers producing Architectural Protocols (EFI Services)
  116. #
  117. INF ArmPkg/Drivers/CpuDxe/CpuDxe.inf
  118. INF MdeModulePkg/Core/RuntimeDxe/RuntimeDxe.inf
  119. INF MdeModulePkg/Universal/SecurityStubDxe/SecurityStubDxe.inf
  120. INF MdeModulePkg/Universal/CapsuleRuntimeDxe/CapsuleRuntimeDxe.inf
  121. INF MdeModulePkg/Universal/Variable/RuntimeDxe/VariableRuntimeDxe.inf
  122. INF MdeModulePkg/Universal/MonotonicCounterRuntimeDxe/MonotonicCounterRuntimeDxe.inf
  123. INF MdeModulePkg/Universal/ResetSystemRuntimeDxe/ResetSystemRuntimeDxe.inf
  124. INF EmbeddedPkg/RealTimeClockRuntimeDxe/RealTimeClockRuntimeDxe.inf
  125. INF EmbeddedPkg/MetronomeDxe/MetronomeDxe.inf
  126. INF MdeModulePkg/Universal/HiiDatabaseDxe/HiiDatabaseDxe.inf
  127. #
  128. # Multiple Console IO support
  129. #
  130. INF MdeModulePkg/Universal/Console/ConPlatformDxe/ConPlatformDxe.inf
  131. INF MdeModulePkg/Universal/Console/TerminalDxe/TerminalDxe.inf
  132. INF MdeModulePkg/Universal/SerialDxe/SerialDxe.inf
  133. INF ArmPkg/Drivers/ArmGic/ArmGicDxe.inf
  134. INF ArmPkg/Drivers/TimerDxe/TimerDxe.inf
  135. INF MdeModulePkg/Universal/WatchdogTimerDxe/WatchdogTimer.inf
  136. #
  137. # FAT filesystem + GPT/MBR partitioning
  138. #
  139. INF MdeModulePkg/Universal/Disk/DiskIoDxe/DiskIoDxe.inf
  140. INF MdeModulePkg/Universal/Disk/PartitionDxe/PartitionDxe.inf
  141. INF FatPkg/EnhancedFatDxe/Fat.inf
  142. INF MdeModulePkg/Universal/Disk/UnicodeCollation/EnglishDxe/EnglishDxe.inf
  143. INF MdeModulePkg/Universal/Disk/UdfDxe/UdfDxe.inf
  144. #
  145. # UEFI application (Shell Embedded Boot Loader)
  146. #
  147. INF ShellPkg/Application/Shell/Shell.inf
  148. INF ShellPkg/DynamicCommand/TftpDynamicCommand/TftpDynamicCommand.inf
  149. #
  150. # Bds
  151. #
  152. INF MdeModulePkg/Universal/DevicePathDxe/DevicePathDxe.inf
  153. INF MdeModulePkg/Universal/DisplayEngineDxe/DisplayEngineDxe.inf
  154. INF MdeModulePkg/Universal/SetupBrowserDxe/SetupBrowserDxe.inf
  155. INF MdeModulePkg/Universal/BdsDxe/BdsDxe.inf
  156. INF MdeModulePkg/Application/UiApp/UiApp.inf
  157. INF OvmfPkg/XenBusDxe/XenBusDxe.inf
  158. INF OvmfPkg/XenPvBlkDxe/XenPvBlkDxe.inf
  159. #
  160. # ACPI support
  161. #
  162. INF ArmVirtPkg/XenPlatformHasAcpiDtDxe/XenPlatformHasAcpiDtDxe.inf
  163. !if $(ARCH) == AARCH64
  164. INF MdeModulePkg/Universal/Acpi/AcpiTableDxe/AcpiTableDxe.inf
  165. INF ArmVirtPkg/XenAcpiPlatformDxe/XenAcpiPlatformDxe.inf
  166. #
  167. # EBC support
  168. #
  169. INF MdeModulePkg/Universal/EbcDxe/EbcDxe.inf
  170. !endif
  171. #
  172. # Ramdisk support
  173. #
  174. INF MdeModulePkg/Universal/Disk/RamDiskDxe/RamDiskDxe.inf
  175. [FV.FVMAIN_COMPACT]
  176. FvAlignment = 16
  177. ERASE_POLARITY = 1
  178. MEMORY_MAPPED = TRUE
  179. STICKY_WRITE = TRUE
  180. LOCK_CAP = TRUE
  181. LOCK_STATUS = TRUE
  182. WRITE_DISABLED_CAP = TRUE
  183. WRITE_ENABLED_CAP = TRUE
  184. WRITE_STATUS = TRUE
  185. WRITE_LOCK_CAP = TRUE
  186. WRITE_LOCK_STATUS = TRUE
  187. READ_DISABLED_CAP = TRUE
  188. READ_ENABLED_CAP = TRUE
  189. READ_STATUS = TRUE
  190. READ_LOCK_CAP = TRUE
  191. READ_LOCK_STATUS = TRUE
  192. INF ArmVirtPkg/PrePi/ArmVirtPrePiUniCoreRelocatable.inf
  193. FILE FV_IMAGE = 9E21FD93-9C72-4c15-8C4B-E77F1DB2D792 {
  194. SECTION GUIDED EE4E5898-3914-4259-9D6E-DC7BD79403CF PROCESSING_REQUIRED = TRUE {
  195. SECTION FV_IMAGE = FVMAIN
  196. }
  197. }
  198. !include ArmVirtRules.fdf.inc