ArmVirtXen.fdf 8.2 KB

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