1 | #
|
---|
2 | # Copyright (c) 2018 - 2022, ARM Limited. All rights reserved.
|
---|
3 | #
|
---|
4 | # SPDX-License-Identifier: BSD-2-Clause-Patent
|
---|
5 | #
|
---|
6 | #
|
---|
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 |
|
---|
22 | [FD.KVMTOOL_EFI]
|
---|
23 | BaseAddress = 0x00000000|gArmTokenSpaceGuid.PcdFdBaseAddress
|
---|
24 | # The size in bytes of the FLASH Device
|
---|
25 | Size = 0x00200000|gArmTokenSpaceGuid.PcdFdSize
|
---|
26 | ErasePolarity = 1
|
---|
27 |
|
---|
28 | # This one is tricky, it must be: BlockSize * NumBlocks = Size
|
---|
29 | BlockSize = 0x00001000
|
---|
30 | NumBlocks = 0x200
|
---|
31 |
|
---|
32 | ################################################################################
|
---|
33 | #
|
---|
34 | # Following are lists of FD Region layout which correspond to the locations of different
|
---|
35 | # images within the flash device.
|
---|
36 | #
|
---|
37 | # Regions must be defined in ascending order and may not overlap.
|
---|
38 | #
|
---|
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:
|
---|
42 | # Offset|Size
|
---|
43 | # PcdOffsetCName|PcdSizeCName
|
---|
44 | # RegionType <FV, DATA, or FILE>
|
---|
45 | #
|
---|
46 | ################################################################################
|
---|
47 |
|
---|
48 | #
|
---|
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.
|
---|
52 | #
|
---|
53 | 0x00000000|0x00008000
|
---|
54 | DATA = {
|
---|
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
|
---|
66 | !else
|
---|
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
|
---|
75 |
|
---|
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
|
---|
81 | !endif
|
---|
82 | }
|
---|
83 |
|
---|
84 | 0x00008000|0x001f8000
|
---|
85 | gArmTokenSpaceGuid.PcdFvBaseAddress|gArmTokenSpaceGuid.PcdFvSize
|
---|
86 | FV = FVMAIN_COMPACT
|
---|
87 |
|
---|
88 | ################################################################################
|
---|
89 | #
|
---|
90 | # FV Section
|
---|
91 | #
|
---|
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
|
---|
95 | # module statements.
|
---|
96 | #
|
---|
97 | ################################################################################
|
---|
98 |
|
---|
99 | [FV.FvMain]
|
---|
100 | FvNameGuid = 8A91C08E-7D9D-4933-84D6-901D26D0766E
|
---|
101 | BlockSize = 0x40
|
---|
102 | NumBlocks = 0 # This FV gets compressed so make it just big enough
|
---|
103 | FvAlignment = 16 # FV alignment and FV attributes setting.
|
---|
104 | ERASE_POLARITY = 1
|
---|
105 | MEMORY_MAPPED = TRUE
|
---|
106 | STICKY_WRITE = TRUE
|
---|
107 | LOCK_CAP = TRUE
|
---|
108 | LOCK_STATUS = TRUE
|
---|
109 | WRITE_DISABLED_CAP = TRUE
|
---|
110 | WRITE_ENABLED_CAP = TRUE
|
---|
111 | WRITE_STATUS = TRUE
|
---|
112 | WRITE_LOCK_CAP = TRUE
|
---|
113 | WRITE_LOCK_STATUS = TRUE
|
---|
114 | READ_DISABLED_CAP = TRUE
|
---|
115 | READ_ENABLED_CAP = TRUE
|
---|
116 | READ_STATUS = TRUE
|
---|
117 | READ_LOCK_CAP = TRUE
|
---|
118 | READ_LOCK_STATUS = TRUE
|
---|
119 |
|
---|
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
|
---|
126 |
|
---|
127 | #
|
---|
128 | # PI DXE Drivers producing Architectural Protocols (EFI Services)
|
---|
129 | #
|
---|
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
|
---|
136 |
|
---|
137 | INF MdeModulePkg/Universal/MonotonicCounterRuntimeDxe/MonotonicCounterRuntimeDxe.inf
|
---|
138 | INF MdeModulePkg/Universal/ResetSystemRuntimeDxe/ResetSystemRuntimeDxe.inf
|
---|
139 |
|
---|
140 | INF MdeModulePkg/Universal/Metronome/Metronome.inf
|
---|
141 | INF PcAtChipsetPkg/PcatRealTimeClockRuntimeDxe/PcatRealTimeClockRuntimeDxe.inf
|
---|
142 |
|
---|
143 | INF MdeModulePkg/Universal/HiiDatabaseDxe/HiiDatabaseDxe.inf
|
---|
144 |
|
---|
145 | #
|
---|
146 | # Multiple Console IO support
|
---|
147 | #
|
---|
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
|
---|
153 |
|
---|
154 | INF ArmPkg/Drivers/ArmGic/ArmGicDxe.inf
|
---|
155 | INF ArmPkg/Drivers/TimerDxe/TimerDxe.inf
|
---|
156 | INF MdeModulePkg/Universal/WatchdogTimerDxe/WatchdogTimer.inf
|
---|
157 | INF OvmfPkg/VirtNorFlashDxe/VirtNorFlashDxe.inf
|
---|
158 |
|
---|
159 | #
|
---|
160 | # FAT filesystem + GPT/MBR partitioning + UDF filesystem
|
---|
161 | #
|
---|
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
|
---|
167 |
|
---|
168 | #
|
---|
169 | # Platform Driver
|
---|
170 | #
|
---|
171 | INF OvmfPkg/VirtioBlkDxe/VirtioBlk.inf
|
---|
172 | INF OvmfPkg/VirtioNetDxe/VirtioNet.inf
|
---|
173 | INF OvmfPkg/VirtioScsiDxe/VirtioScsi.inf
|
---|
174 | INF OvmfPkg/VirtioRngDxe/VirtioRng.inf
|
---|
175 |
|
---|
176 | INF ShellPkg/Application/Shell/Shell.inf
|
---|
177 | INF ShellPkg/DynamicCommand/TftpDynamicCommand/TftpDynamicCommand.inf
|
---|
178 |
|
---|
179 | #
|
---|
180 | # Bds
|
---|
181 | #
|
---|
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
|
---|
188 |
|
---|
189 | #
|
---|
190 | # SCSI Bus and Disk Driver
|
---|
191 | #
|
---|
192 | INF MdeModulePkg/Bus/Scsi/ScsiBusDxe/ScsiBusDxe.inf
|
---|
193 | INF MdeModulePkg/Bus/Scsi/ScsiDiskDxe/ScsiDiskDxe.inf
|
---|
194 |
|
---|
195 | #
|
---|
196 | # PCI support
|
---|
197 | #
|
---|
198 | INF UefiCpuPkg/CpuMmio2Dxe/CpuMmio2Dxe.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
|
---|
203 |
|
---|
204 | !if $(ARCH) == AARCH64
|
---|
205 | #
|
---|
206 | # ACPI Support
|
---|
207 | #
|
---|
208 | INF MdeModulePkg/Universal/Acpi/AcpiTableDxe/AcpiTableDxe.inf
|
---|
209 | #
|
---|
210 | # Dynamic Table fdf
|
---|
211 | #
|
---|
212 | !include DynamicTablesPkg/DynamicTables.fdf.inc
|
---|
213 |
|
---|
214 | INF ArmVirtPkg/KvmtoolCfgMgrDxe/ConfigurationManagerDxe.inf
|
---|
215 | !endif
|
---|
216 |
|
---|
217 | #
|
---|
218 | # TianoCore logo (splash screen)
|
---|
219 | #
|
---|
220 | INF MdeModulePkg/Logo/LogoDxe.inf
|
---|
221 |
|
---|
222 | #
|
---|
223 | # Ramdisk support
|
---|
224 | #
|
---|
225 | INF MdeModulePkg/Universal/Disk/RamDiskDxe/RamDiskDxe.inf
|
---|
226 |
|
---|
227 | #
|
---|
228 | # Rng Support
|
---|
229 | #
|
---|
230 | INF SecurityPkg/RandomNumberGenerator/RngDxe/RngDxe.inf
|
---|
231 |
|
---|
232 | [FV.FVMAIN_COMPACT]
|
---|
233 | FvAlignment = 16
|
---|
234 | ERASE_POLARITY = 1
|
---|
235 | MEMORY_MAPPED = TRUE
|
---|
236 | STICKY_WRITE = TRUE
|
---|
237 | LOCK_CAP = TRUE
|
---|
238 | LOCK_STATUS = TRUE
|
---|
239 | WRITE_DISABLED_CAP = TRUE
|
---|
240 | WRITE_ENABLED_CAP = TRUE
|
---|
241 | WRITE_STATUS = TRUE
|
---|
242 | WRITE_LOCK_CAP = TRUE
|
---|
243 | WRITE_LOCK_STATUS = TRUE
|
---|
244 | READ_DISABLED_CAP = TRUE
|
---|
245 | READ_ENABLED_CAP = TRUE
|
---|
246 | READ_STATUS = TRUE
|
---|
247 | READ_LOCK_CAP = TRUE
|
---|
248 | READ_LOCK_STATUS = TRUE
|
---|
249 |
|
---|
250 | INF RuleOverride = SELF_RELOC ArmVirtPkg/PrePi/ArmVirtPrePiUniCoreRelocatable.inf
|
---|
251 |
|
---|
252 | FILE FV_IMAGE = 9E21FD93-9C72-4c15-8C4B-E77F1DB2D792 {
|
---|
253 | SECTION GUIDED EE4E5898-3914-4259-9D6E-DC7BD79403CF PROCESSING_REQUIRED = TRUE {
|
---|
254 | SECTION FV_IMAGE = FVMAIN
|
---|
255 | }
|
---|
256 | }
|
---|
257 |
|
---|
258 | !include ArmVirtRules.fdf.inc
|
---|