1 | #
|
---|
2 | # Copyright (c) 2021, ARM Limited. All rights reserved.
|
---|
3 | #
|
---|
4 | # SPDX-License-Identifier: BSD-2-Clause-Patent
|
---|
5 | #
|
---|
6 |
|
---|
7 | ################################################################################
|
---|
8 | #
|
---|
9 | # FD Section
|
---|
10 | # The [FD] Section is made up of the definition statements and a
|
---|
11 | # description of what goes into the Flash Device Image. Each FD section
|
---|
12 | # defines one flash "device" image. A flash device image may be one of
|
---|
13 | # the following: Removable media bootable image (like a boot floppy
|
---|
14 | # image,) an Option ROM image (that would be "flashed" into an add-in
|
---|
15 | # card,) a System "Flash" image (that would be burned into a system's
|
---|
16 | # flash) or an Update ("Capsule") image that will be used to update and
|
---|
17 | # existing system flash.
|
---|
18 | #
|
---|
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 |
|
---|
29 | [FD.CLOUDHV_EFI]
|
---|
30 | BaseAddress = 0x00000000|gArmTokenSpaceGuid.PcdFdBaseAddress # cloud-hypervisor assigns 0 - 0x8000000 for a BootROM
|
---|
31 | Size = $(FD_SIZE)|gArmTokenSpaceGuid.PcdFdSize # The size in bytes of the FLASH Device
|
---|
32 | ErasePolarity = 1
|
---|
33 |
|
---|
34 | # This one is tricky, it must be: BlockSize * NumBlocks = Size
|
---|
35 | BlockSize = 0x00001000
|
---|
36 | NumBlocks = $(FD_NUM_BLOCKS)
|
---|
37 |
|
---|
38 | ################################################################################
|
---|
39 | #
|
---|
40 | # Following are lists of FD Region layout which correspond to the locations of different
|
---|
41 | # images within the flash device.
|
---|
42 | #
|
---|
43 | # Regions must be defined in ascending order and may not overlap.
|
---|
44 | #
|
---|
45 | # A Layout Region start with a eight digit hex offset (leading "0x" required) followed by
|
---|
46 | # the pipe "|" character, followed by the size of the region, also in hex with the leading
|
---|
47 | # "0x" characters. Like:
|
---|
48 | # Offset|Size
|
---|
49 | # PcdOffsetCName|PcdSizeCName
|
---|
50 | # RegionType <FV, DATA, or FILE>
|
---|
51 | #
|
---|
52 | ################################################################################
|
---|
53 |
|
---|
54 | #
|
---|
55 | # UEFI has trouble dealing with FVs that reside at physical address 0x0.
|
---|
56 | # So instead, put a hardcoded 'jump to 0x1000' at offset 0x0, and put the
|
---|
57 | # real FV at offset 0x1000
|
---|
58 | #
|
---|
59 | 0x00000000|0x00001000
|
---|
60 | DATA = {
|
---|
61 | !if $(ARCH) == AARCH64
|
---|
62 | 0x00, 0x04, 0x00, 0x14 # 'b 0x1000' in AArch64 ASM
|
---|
63 | !else
|
---|
64 | 0xfe, 0x03, 0x00, 0xea # 'b 0x1000' in AArch32 ASM
|
---|
65 | !endif
|
---|
66 | }
|
---|
67 |
|
---|
68 | 0x00001000|$(FVMAIN_COMPACT_SIZE)
|
---|
69 | gArmTokenSpaceGuid.PcdFvBaseAddress|gArmTokenSpaceGuid.PcdFvSize
|
---|
70 | FV = FVMAIN_COMPACT
|
---|
71 |
|
---|
72 | !include VarStore.fdf.inc
|
---|
73 |
|
---|
74 | ################################################################################
|
---|
75 | #
|
---|
76 | # FV Section
|
---|
77 | #
|
---|
78 | # [FV] section is used to define what components or modules are placed within a flash
|
---|
79 | # device file. This section also defines order the components and modules are positioned
|
---|
80 | # within the image. The [FV] section consists of define statements, set statements and
|
---|
81 | # module statements.
|
---|
82 | #
|
---|
83 | ################################################################################
|
---|
84 |
|
---|
85 | [FV.FvMain]
|
---|
86 | FvNameGuid = 2A88A00E-E267-C8BF-0E80-AE1BD504ED90
|
---|
87 | BlockSize = 0x40
|
---|
88 | NumBlocks = 0 # This FV gets compressed so make it just big enough
|
---|
89 | FvAlignment = 16 # FV alignment and FV attributes setting.
|
---|
90 | ERASE_POLARITY = 1
|
---|
91 | MEMORY_MAPPED = TRUE
|
---|
92 | STICKY_WRITE = TRUE
|
---|
93 | LOCK_CAP = TRUE
|
---|
94 | LOCK_STATUS = TRUE
|
---|
95 | WRITE_DISABLED_CAP = TRUE
|
---|
96 | WRITE_ENABLED_CAP = TRUE
|
---|
97 | WRITE_STATUS = TRUE
|
---|
98 | WRITE_LOCK_CAP = TRUE
|
---|
99 | WRITE_LOCK_STATUS = TRUE
|
---|
100 | READ_DISABLED_CAP = TRUE
|
---|
101 | READ_ENABLED_CAP = TRUE
|
---|
102 | READ_STATUS = TRUE
|
---|
103 | READ_LOCK_CAP = TRUE
|
---|
104 | READ_LOCK_STATUS = TRUE
|
---|
105 |
|
---|
106 | INF MdeModulePkg/Core/Dxe/DxeMain.inf
|
---|
107 | INF MdeModulePkg/Universal/PCD/Dxe/Pcd.inf
|
---|
108 | INF OvmfPkg/Fdt/VirtioFdtDxe/VirtioFdtDxe.inf
|
---|
109 | INF EmbeddedPkg/Drivers/FdtClientDxe/FdtClientDxe.inf
|
---|
110 | INF OvmfPkg/Fdt/HighMemDxe/HighMemDxe.inf
|
---|
111 |
|
---|
112 | #
|
---|
113 | # PI DXE Drivers producing Architectural Protocols (EFI Services)
|
---|
114 | #
|
---|
115 | INF ArmPkg/Drivers/CpuDxe/CpuDxe.inf
|
---|
116 | INF MdeModulePkg/Core/RuntimeDxe/RuntimeDxe.inf
|
---|
117 | INF MdeModulePkg/Universal/SecurityStubDxe/SecurityStubDxe.inf
|
---|
118 | INF MdeModulePkg/Universal/CapsuleRuntimeDxe/CapsuleRuntimeDxe.inf
|
---|
119 | INF MdeModulePkg/Universal/FaultTolerantWriteDxe/FaultTolerantWriteDxe.inf
|
---|
120 | INF MdeModulePkg/Universal/Variable/RuntimeDxe/VariableRuntimeDxe.inf
|
---|
121 | !if $(SECURE_BOOT_ENABLE) == TRUE
|
---|
122 | INF SecurityPkg/VariableAuthenticated/SecureBootConfigDxe/SecureBootConfigDxe.inf
|
---|
123 | !endif
|
---|
124 | INF MdeModulePkg/Universal/MonotonicCounterRuntimeDxe/MonotonicCounterRuntimeDxe.inf
|
---|
125 | INF MdeModulePkg/Universal/ResetSystemRuntimeDxe/ResetSystemRuntimeDxe.inf
|
---|
126 | INF EmbeddedPkg/RealTimeClockRuntimeDxe/RealTimeClockRuntimeDxe.inf
|
---|
127 | INF EmbeddedPkg/MetronomeDxe/MetronomeDxe.inf
|
---|
128 | INF MdeModulePkg/Universal/HiiDatabaseDxe/HiiDatabaseDxe.inf
|
---|
129 |
|
---|
130 | #
|
---|
131 | # Multiple Console IO support
|
---|
132 | #
|
---|
133 | INF MdeModulePkg/Universal/Console/ConPlatformDxe/ConPlatformDxe.inf
|
---|
134 | INF MdeModulePkg/Universal/Console/ConSplitterDxe/ConSplitterDxe.inf
|
---|
135 | INF MdeModulePkg/Universal/Console/GraphicsConsoleDxe/GraphicsConsoleDxe.inf
|
---|
136 | INF MdeModulePkg/Universal/Console/TerminalDxe/TerminalDxe.inf
|
---|
137 | INF MdeModulePkg/Universal/SerialDxe/SerialDxe.inf
|
---|
138 |
|
---|
139 | INF ArmPkg/Drivers/ArmGic/ArmGicDxe.inf
|
---|
140 | INF ArmPkg/Drivers/TimerDxe/TimerDxe.inf
|
---|
141 | INF MdeModulePkg/Universal/WatchdogTimerDxe/WatchdogTimer.inf
|
---|
142 |
|
---|
143 | #
|
---|
144 | # FAT filesystem + GPT/MBR partitioning + UDF filesystem + virtio-fs
|
---|
145 | #
|
---|
146 | INF MdeModulePkg/Universal/Disk/DiskIoDxe/DiskIoDxe.inf
|
---|
147 | INF MdeModulePkg/Universal/Disk/PartitionDxe/PartitionDxe.inf
|
---|
148 | INF FatPkg/EnhancedFatDxe/Fat.inf
|
---|
149 | INF MdeModulePkg/Universal/Disk/UnicodeCollation/EnglishDxe/EnglishDxe.inf
|
---|
150 | INF MdeModulePkg/Universal/Disk/UdfDxe/UdfDxe.inf
|
---|
151 | INF OvmfPkg/VirtioFsDxe/VirtioFsDxe.inf
|
---|
152 |
|
---|
153 | #
|
---|
154 | # Status Code Routing
|
---|
155 | #
|
---|
156 | INF MdeModulePkg/Universal/ReportStatusCodeRouter/RuntimeDxe/ReportStatusCodeRouterRuntimeDxe.inf
|
---|
157 |
|
---|
158 | #
|
---|
159 | # Platform Driver
|
---|
160 | #
|
---|
161 | INF OvmfPkg/VirtioBlkDxe/VirtioBlk.inf
|
---|
162 | INF OvmfPkg/VirtioNetDxe/VirtioNet.inf
|
---|
163 | INF OvmfPkg/VirtioScsiDxe/VirtioScsi.inf
|
---|
164 | INF OvmfPkg/VirtioRngDxe/VirtioRng.inf
|
---|
165 |
|
---|
166 | #
|
---|
167 | # UEFI application (Shell Embedded Boot Loader)
|
---|
168 | #
|
---|
169 | INF ShellPkg/Application/Shell/Shell.inf
|
---|
170 | INF ShellPkg/DynamicCommand/TftpDynamicCommand/TftpDynamicCommand.inf
|
---|
171 | INF ShellPkg/DynamicCommand/HttpDynamicCommand/HttpDynamicCommand.inf
|
---|
172 | INF OvmfPkg/LinuxInitrdDynamicShellCommand/LinuxInitrdDynamicShellCommand.inf
|
---|
173 |
|
---|
174 | #
|
---|
175 | # Bds
|
---|
176 | #
|
---|
177 | INF MdeModulePkg/Universal/DevicePathDxe/DevicePathDxe.inf
|
---|
178 | INF MdeModulePkg/Universal/DisplayEngineDxe/DisplayEngineDxe.inf
|
---|
179 | INF MdeModulePkg/Universal/SetupBrowserDxe/SetupBrowserDxe.inf
|
---|
180 | INF MdeModulePkg/Universal/DriverHealthManagerDxe/DriverHealthManagerDxe.inf
|
---|
181 | INF MdeModulePkg/Universal/BdsDxe/BdsDxe.inf
|
---|
182 | INF MdeModulePkg/Application/UiApp/UiApp.inf
|
---|
183 |
|
---|
184 | #
|
---|
185 | # SCSI Bus and Disk Driver
|
---|
186 | #
|
---|
187 | INF MdeModulePkg/Bus/Scsi/ScsiBusDxe/ScsiBusDxe.inf
|
---|
188 | INF MdeModulePkg/Bus/Scsi/ScsiDiskDxe/ScsiDiskDxe.inf
|
---|
189 |
|
---|
190 | #
|
---|
191 | # ACPI Support
|
---|
192 | #
|
---|
193 | INF ArmVirtPkg/CloudHvPlatformHasAcpiDtDxe/CloudHvHasAcpiDtDxe.inf
|
---|
194 | !if $(ARCH) == AARCH64
|
---|
195 | INF MdeModulePkg/Universal/Acpi/AcpiTableDxe/AcpiTableDxe.inf
|
---|
196 | INF MdeModulePkg/Universal/Acpi/BootGraphicsResourceTableDxe/BootGraphicsResourceTableDxe.inf
|
---|
197 | INF ArmVirtPkg/CloudHvAcpiPlatformDxe/CloudHvAcpiPlatformDxe.inf
|
---|
198 | !endif
|
---|
199 |
|
---|
200 | #
|
---|
201 | # PCI support
|
---|
202 | #
|
---|
203 | INF ArmPkg/Drivers/ArmPciCpuIo2Dxe/ArmPciCpuIo2Dxe.inf
|
---|
204 | INF MdeModulePkg/Bus/Pci/PciHostBridgeDxe/PciHostBridgeDxe.inf
|
---|
205 | INF MdeModulePkg/Bus/Pci/PciBusDxe/PciBusDxe.inf
|
---|
206 | INF OvmfPkg/PciHotPlugInitDxe/PciHotPlugInit.inf
|
---|
207 | INF OvmfPkg/VirtioPciDeviceDxe/VirtioPciDeviceDxe.inf
|
---|
208 | INF OvmfPkg/Virtio10Dxe/Virtio10.inf
|
---|
209 |
|
---|
210 | #
|
---|
211 | # TianoCore logo (splash screen)
|
---|
212 | #
|
---|
213 | INF MdeModulePkg/Logo/LogoDxe.inf
|
---|
214 |
|
---|
215 | #
|
---|
216 | # Ramdisk support
|
---|
217 | #
|
---|
218 | INF MdeModulePkg/Universal/Disk/RamDiskDxe/RamDiskDxe.inf
|
---|
219 |
|
---|
220 | [FV.FVMAIN_COMPACT]
|
---|
221 | FvAlignment = 16
|
---|
222 | ERASE_POLARITY = 1
|
---|
223 | MEMORY_MAPPED = TRUE
|
---|
224 | STICKY_WRITE = TRUE
|
---|
225 | LOCK_CAP = TRUE
|
---|
226 | LOCK_STATUS = TRUE
|
---|
227 | WRITE_DISABLED_CAP = TRUE
|
---|
228 | WRITE_ENABLED_CAP = TRUE
|
---|
229 | WRITE_STATUS = TRUE
|
---|
230 | WRITE_LOCK_CAP = TRUE
|
---|
231 | WRITE_LOCK_STATUS = TRUE
|
---|
232 | READ_DISABLED_CAP = TRUE
|
---|
233 | READ_ENABLED_CAP = TRUE
|
---|
234 | READ_STATUS = TRUE
|
---|
235 | READ_LOCK_CAP = TRUE
|
---|
236 | READ_LOCK_STATUS = TRUE
|
---|
237 |
|
---|
238 | INF ArmPlatformPkg/PrePeiCore/PrePeiCoreUniCore.inf
|
---|
239 | INF MdeModulePkg/Core/Pei/PeiMain.inf
|
---|
240 | INF ArmPlatformPkg/PlatformPei/PlatformPeim.inf
|
---|
241 | INF ArmPlatformPkg/MemoryInitPei/MemoryInitPeim.inf
|
---|
242 | INF ArmPkg/Drivers/CpuPei/CpuPei.inf
|
---|
243 | INF MdeModulePkg/Universal/PCD/Pei/Pcd.inf
|
---|
244 | INF MdeModulePkg/Universal/Variable/Pei/VariablePei.inf
|
---|
245 | INF MdeModulePkg/Core/DxeIplPeim/DxeIpl.inf
|
---|
246 |
|
---|
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
|
---|
250 | }
|
---|
251 | }
|
---|
252 |
|
---|
253 | !include ArmVirtRules.fdf.inc
|
---|