ArmVirtQemu.fdf 4.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127
  1. #
  2. # Copyright (c) 2011-2015, ARM Limited. All rights reserved.
  3. # Copyright (c) 2014, Linaro Limited. All rights reserved.
  4. # Copyright (c) 2015 - 2016, Intel Corporation. All rights reserved.
  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. [Defines]
  22. !if $(FD_SIZE_IN_MB) == 2
  23. DEFINE FVMAIN_COMPACT_SIZE = 0x1ff000
  24. !endif
  25. !if $(FD_SIZE_IN_MB) == 3
  26. DEFINE FVMAIN_COMPACT_SIZE = 0x2ff000
  27. !endif
  28. [FD.QEMU_EFI]
  29. BaseAddress = 0x00000000|gArmTokenSpaceGuid.PcdFdBaseAddress # QEMU assigns 0 - 0x8000000 for a BootROM
  30. Size = $(FD_SIZE)|gArmTokenSpaceGuid.PcdFdSize # The size in bytes of the FLASH Device
  31. ErasePolarity = 1
  32. # This one is tricky, it must be: BlockSize * NumBlocks = Size
  33. BlockSize = 0x00001000
  34. NumBlocks = $(FD_NUM_BLOCKS)
  35. ################################################################################
  36. #
  37. # Following are lists of FD Region layout which correspond to the locations of different
  38. # images within the flash device.
  39. #
  40. # Regions must be defined in ascending order and may not overlap.
  41. #
  42. # A Layout Region start with a eight digit hex offset (leading "0x" required) followed by
  43. # the pipe "|" character, followed by the size of the region, also in hex with the leading
  44. # "0x" characters. Like:
  45. # Offset|Size
  46. # PcdOffsetCName|PcdSizeCName
  47. # RegionType <FV, DATA, or FILE>
  48. #
  49. ################################################################################
  50. #
  51. # UEFI has trouble dealing with FVs that reside at physical address 0x0.
  52. # So instead, put a hardcoded 'jump to 0x1000' at offset 0x0, and put the
  53. # real FV at offset 0x1000
  54. #
  55. 0x00000000|0x00001000
  56. DATA = {
  57. !if $(ARCH) == AARCH64
  58. 0x00, 0x04, 0x00, 0x14 # 'b 0x1000' in AArch64 ASM
  59. !else
  60. 0xfe, 0x03, 0x00, 0xea # 'b 0x1000' in AArch32 ASM
  61. !endif
  62. }
  63. 0x00001000|$(FVMAIN_COMPACT_SIZE)
  64. gArmTokenSpaceGuid.PcdFvBaseAddress|gArmTokenSpaceGuid.PcdFvSize
  65. FV = FVMAIN_COMPACT
  66. !include VarStore.fdf.inc
  67. ################################################################################
  68. #
  69. # FV Section
  70. #
  71. # [FV] section is used to define what components or modules are placed within a flash
  72. # device file. This section also defines order the components and modules are positioned
  73. # within the image. The [FV] section consists of define statements, set statements and
  74. # module statements.
  75. #
  76. ################################################################################
  77. !include ArmVirtQemuFvMain.fdf.inc
  78. [FV.FVMAIN_COMPACT]
  79. FvAlignment = 16
  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 ArmPlatformPkg/PrePeiCore/PrePeiCoreUniCore.inf
  96. INF MdeModulePkg/Core/Pei/PeiMain.inf
  97. INF ArmPlatformPkg/PlatformPei/PlatformPeim.inf
  98. INF ArmVirtPkg/MemoryInitPei/MemoryInitPeim.inf
  99. INF ArmPkg/Drivers/CpuPei/CpuPei.inf
  100. INF MdeModulePkg/Core/DxeIplPeim/DxeIpl.inf
  101. !if $(TPM2_ENABLE) == TRUE
  102. INF MdeModulePkg/Universal/PCD/Pei/Pcd.inf
  103. INF MdeModulePkg/Universal/ResetSystemPei/ResetSystemPei.inf
  104. INF OvmfPkg/Tcg/Tcg2Config/Tcg2ConfigPei.inf
  105. INF SecurityPkg/Tcg/Tcg2Pei/Tcg2Pei.inf
  106. !endif
  107. FILE FV_IMAGE = 9E21FD93-9C72-4c15-8C4B-E77F1DB2D792 {
  108. SECTION GUIDED EE4E5898-3914-4259-9D6E-DC7BD79403CF PROCESSING_REQUIRED = TRUE {
  109. SECTION FV_IMAGE = FVMAIN
  110. }
  111. }
  112. !include ArmVirtRules.fdf.inc