2 # Copyright (c) 2018 - 2022, ARM Limited. All rights reserved.
4 # SPDX-License-Identifier: BSD-2-Clause-Patent
8 ################################################################################
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.
20 ################################################################################
23 BaseAddress = 0x00000000|gArmTokenSpaceGuid.PcdFdBaseAddress
24 # The size in bytes of the FLASH Device
25 Size = 0x00200000|gArmTokenSpaceGuid.PcdFdSize
28 # This one is tricky, it must be: BlockSize * NumBlocks = Size
29 BlockSize = 0x00001000
32 ################################################################################
34 # Following are lists of FD Region layout which correspond to the locations of different
35 # images within the flash device.
37 # Regions must be defined in ascending order and may not overlap.
39 # A Layout Region start with a eight digit hex offset (leading "0x" required) followed by
40 # the pipe "|" character, followed by the size of the region, also in hex with the leading
41 # "0x" characters. Like:
43 # PcdOffsetCName|PcdSizeCName
44 # RegionType <FV, DATA, or FILE>
46 ################################################################################
49 # Implement the Linux kernel header layout so that the loader will identify
50 # it as something bootable, and execute it with a FDT pointer in x0 or r2.
51 # This area will be reused to store a copy of the FDT so round it up to 32 KB.
55 !if $(ARCH) == AARCH64
56 0x01, 0x00, 0x00, 0x10, # code0: adr x1, .
57 0xff, 0x1f, 0x00, 0x14, # code1: b 0x8000
58 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, # text_offset: 512 KB
59 0x00, 0x00, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, # image_size: 2 MB
60 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, # flags
61 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, # res2
62 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, # res3
63 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, # res4
64 0x41, 0x52, 0x4d, 0x64, # magic: "ARM\x64"
65 0x00, 0x00, 0x00, 0x00 # res5
67 0x08, 0x10, 0x4f, 0xe2, # adr r1, .
68 0x02, 0x00, 0xa0, 0xe1, # mov r0, r2 (DTB)
69 0x00, 0x00, 0xa0, 0xe1, # nop
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
76 0xf6, 0x1f, 0x00, 0xea, # b 0x8000
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
85 gArmTokenSpaceGuid.PcdFvBaseAddress|gArmTokenSpaceGuid.PcdFvSize
88 ################################################################################
92 # [FV] section is used to define what components or modules are placed within a flash
93 # device file. This section also defines order the components and modules are positioned
94 # within the image. The [FV] section consists of define statements, set statements and
97 ################################################################################
100 FvNameGuid = 8A91C08E-7D9D-4933-84D6-901D26D0766E
102 NumBlocks = 0 # This FV gets compressed so make it just big enough
103 FvAlignment = 16 # FV alignment and FV attributes setting.
109 WRITE_DISABLED_CAP = TRUE
110 WRITE_ENABLED_CAP = TRUE
112 WRITE_LOCK_CAP = TRUE
113 WRITE_LOCK_STATUS = TRUE
114 READ_DISABLED_CAP = TRUE
115 READ_ENABLED_CAP = TRUE
118 READ_LOCK_STATUS = TRUE
120 INF MdeModulePkg/Core/Dxe/DxeMain.inf
121 INF MdeModulePkg/Universal/PCD/Dxe/Pcd.inf
122 INF OvmfPkg/Fdt/VirtioFdtDxe/VirtioFdtDxe.inf
123 INF EmbeddedPkg/Drivers/FdtClientDxe/FdtClientDxe.inf
124 INF ArmVirtPkg/KvmtoolPlatformDxe/KvmtoolPlatformDxe.inf
125 INF OvmfPkg/Fdt/HighMemDxe/HighMemDxe.inf
128 # PI DXE Drivers producing Architectural Protocols (EFI Services)
130 INF ArmPkg/Drivers/CpuDxe/CpuDxe.inf
131 INF MdeModulePkg/Core/RuntimeDxe/RuntimeDxe.inf
132 INF MdeModulePkg/Universal/SecurityStubDxe/SecurityStubDxe.inf
133 INF MdeModulePkg/Universal/CapsuleRuntimeDxe/CapsuleRuntimeDxe.inf
134 INF MdeModulePkg/Universal/FaultTolerantWriteDxe/FaultTolerantWriteDxe.inf
135 INF MdeModulePkg/Universal/Variable/RuntimeDxe/VariableRuntimeDxe.inf
137 INF MdeModulePkg/Universal/MonotonicCounterRuntimeDxe/MonotonicCounterRuntimeDxe.inf
138 INF MdeModulePkg/Universal/ResetSystemRuntimeDxe/ResetSystemRuntimeDxe.inf
140 INF MdeModulePkg/Universal/Metronome/Metronome.inf
141 INF PcAtChipsetPkg/PcatRealTimeClockRuntimeDxe/PcatRealTimeClockRuntimeDxe.inf
143 INF MdeModulePkg/Universal/HiiDatabaseDxe/HiiDatabaseDxe.inf
146 # Multiple Console IO support
148 INF MdeModulePkg/Universal/Console/ConPlatformDxe/ConPlatformDxe.inf
149 INF MdeModulePkg/Universal/Console/ConSplitterDxe/ConSplitterDxe.inf
150 INF MdeModulePkg/Universal/Console/GraphicsConsoleDxe/GraphicsConsoleDxe.inf
151 INF MdeModulePkg/Universal/Console/TerminalDxe/TerminalDxe.inf
152 INF MdeModulePkg/Universal/SerialDxe/SerialDxe.inf
154 INF ArmPkg/Drivers/ArmGic/ArmGicDxe.inf
155 INF ArmPkg/Drivers/TimerDxe/TimerDxe.inf
156 INF MdeModulePkg/Universal/WatchdogTimerDxe/WatchdogTimer.inf
157 INF ArmPlatformPkg/Drivers/NorFlashDxe/NorFlashDxe.inf
160 # FAT filesystem + GPT/MBR partitioning + UDF filesystem
162 INF MdeModulePkg/Universal/Disk/DiskIoDxe/DiskIoDxe.inf
163 INF MdeModulePkg/Universal/Disk/PartitionDxe/PartitionDxe.inf
164 INF FatPkg/EnhancedFatDxe/Fat.inf
165 INF MdeModulePkg/Universal/Disk/UnicodeCollation/EnglishDxe/EnglishDxe.inf
166 INF MdeModulePkg/Universal/Disk/UdfDxe/UdfDxe.inf
171 INF OvmfPkg/VirtioBlkDxe/VirtioBlk.inf
172 INF OvmfPkg/VirtioNetDxe/VirtioNet.inf
173 INF OvmfPkg/VirtioScsiDxe/VirtioScsi.inf
174 INF OvmfPkg/VirtioRngDxe/VirtioRng.inf
176 INF ShellPkg/Application/Shell/Shell.inf
177 INF ShellPkg/DynamicCommand/TftpDynamicCommand/TftpDynamicCommand.inf
182 INF MdeModulePkg/Universal/DevicePathDxe/DevicePathDxe.inf
183 INF MdeModulePkg/Universal/DisplayEngineDxe/DisplayEngineDxe.inf
184 INF MdeModulePkg/Universal/SetupBrowserDxe/SetupBrowserDxe.inf
185 INF MdeModulePkg/Universal/DriverHealthManagerDxe/DriverHealthManagerDxe.inf
186 INF MdeModulePkg/Universal/BdsDxe/BdsDxe.inf
187 INF MdeModulePkg/Application/UiApp/UiApp.inf
190 # SCSI Bus and Disk Driver
192 INF MdeModulePkg/Bus/Scsi/ScsiBusDxe/ScsiBusDxe.inf
193 INF MdeModulePkg/Bus/Scsi/ScsiDiskDxe/ScsiDiskDxe.inf
198 INF ArmPkg/Drivers/ArmPciCpuIo2Dxe/ArmPciCpuIo2Dxe.inf
199 INF MdeModulePkg/Bus/Pci/PciHostBridgeDxe/PciHostBridgeDxe.inf
200 INF MdeModulePkg/Bus/Pci/PciBusDxe/PciBusDxe.inf
201 INF OvmfPkg/VirtioPciDeviceDxe/VirtioPciDeviceDxe.inf
202 INF OvmfPkg/Virtio10Dxe/Virtio10.inf
204 !if $(ARCH) == AARCH64
208 INF MdeModulePkg/Universal/Acpi/AcpiTableDxe/AcpiTableDxe.inf
212 !include DynamicTablesPkg/DynamicTables.fdf.inc
214 INF ArmVirtPkg/KvmtoolCfgMgrDxe/ConfigurationManagerDxe.inf
218 # TianoCore logo (splash screen)
220 INF MdeModulePkg/Logo/LogoDxe.inf
225 INF MdeModulePkg/Universal/Disk/RamDiskDxe/RamDiskDxe.inf
234 WRITE_DISABLED_CAP = TRUE
235 WRITE_ENABLED_CAP = TRUE
237 WRITE_LOCK_CAP = TRUE
238 WRITE_LOCK_STATUS = TRUE
239 READ_DISABLED_CAP = TRUE
240 READ_ENABLED_CAP = TRUE
243 READ_LOCK_STATUS = TRUE
245 INF RuleOverride = SELF_RELOC ArmVirtPkg/PrePi/ArmVirtPrePiUniCoreRelocatable.inf
247 FILE FV_IMAGE = 9E21FD93-9C72-4c15-8C4B-E77F1DB2D792 {
248 SECTION GUIDED EE4E5898-3914-4259-9D6E-DC7BD79403CF PROCESSING_REQUIRED = TRUE {
249 SECTION FV_IMAGE = FVMAIN
253 !include ArmVirtRules.fdf.inc