VirtualBox

source: vbox/trunk/src/VBox/Devices/EFI/FirmwareNew/ArmVirtPkg/ArmVirtKvmTool.fdf@ 108794

Last change on this file since 108794 was 108794, checked in by vboxsync, 10 days ago

Devices/EFI/FirmwareNew: Merge edk2-stable202502 from the vendor branch and make it build for the important platforms, bugref:4643

  • Property svn:eol-style set to native
File size: 8.5 KB
Line 
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]
23BaseAddress = 0x00000000|gArmTokenSpaceGuid.PcdFdBaseAddress
24# The size in bytes of the FLASH Device
25Size = 0x00200000|gArmTokenSpaceGuid.PcdFdSize
26ErasePolarity = 1
27
28# This one is tricky, it must be: BlockSize * NumBlocks = Size
29BlockSize = 0x00001000
30NumBlocks = 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#
530x00000000|0x00008000
54DATA = {
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
840x00008000|0x001f8000
85gArmTokenSpaceGuid.PcdFvBaseAddress|gArmTokenSpaceGuid.PcdFvSize
86FV = 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]
100FvNameGuid = 8A91C08E-7D9D-4933-84D6-901D26D0766E
101BlockSize = 0x40
102NumBlocks = 0 # This FV gets compressed so make it just big enough
103FvAlignment = 16 # FV alignment and FV attributes setting.
104ERASE_POLARITY = 1
105MEMORY_MAPPED = TRUE
106STICKY_WRITE = TRUE
107LOCK_CAP = TRUE
108LOCK_STATUS = TRUE
109WRITE_DISABLED_CAP = TRUE
110WRITE_ENABLED_CAP = TRUE
111WRITE_STATUS = TRUE
112WRITE_LOCK_CAP = TRUE
113WRITE_LOCK_STATUS = TRUE
114READ_DISABLED_CAP = TRUE
115READ_ENABLED_CAP = TRUE
116READ_STATUS = TRUE
117READ_LOCK_CAP = TRUE
118READ_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/ArmGicDxe/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!include OvmfPkg/Include/Fdf/ShellDxe.fdf.inc
177
178 #
179 # Bds
180 #
181 INF MdeModulePkg/Universal/DevicePathDxe/DevicePathDxe.inf
182 INF MdeModulePkg/Universal/DisplayEngineDxe/DisplayEngineDxe.inf
183 INF MdeModulePkg/Universal/SetupBrowserDxe/SetupBrowserDxe.inf
184 INF MdeModulePkg/Universal/DriverHealthManagerDxe/DriverHealthManagerDxe.inf
185 INF MdeModulePkg/Universal/BdsDxe/BdsDxe.inf
186 INF MdeModulePkg/Application/UiApp/UiApp.inf
187
188 #
189 # SCSI Bus and Disk Driver
190 #
191 INF MdeModulePkg/Bus/Scsi/ScsiBusDxe/ScsiBusDxe.inf
192 INF MdeModulePkg/Bus/Scsi/ScsiDiskDxe/ScsiDiskDxe.inf
193
194 #
195 # PCI support
196 #
197 INF UefiCpuPkg/CpuMmio2Dxe/CpuMmio2Dxe.inf
198 INF MdeModulePkg/Bus/Pci/PciHostBridgeDxe/PciHostBridgeDxe.inf
199 INF MdeModulePkg/Bus/Pci/PciBusDxe/PciBusDxe.inf
200 INF OvmfPkg/VirtioPciDeviceDxe/VirtioPciDeviceDxe.inf
201 INF OvmfPkg/Virtio10Dxe/Virtio10.inf
202
203!if $(ARCH) == AARCH64
204 #
205 # ACPI Support
206 #
207 INF MdeModulePkg/Universal/Acpi/AcpiTableDxe/AcpiTableDxe.inf
208 #
209 # Dynamic Table fdf
210 #
211 !include DynamicTablesPkg/DynamicTables.fdf.inc
212
213 INF ArmVirtPkg/KvmtoolCfgMgrDxe/ConfigurationManagerDxe.inf
214!endif
215
216 #
217 # TianoCore logo (splash screen)
218 #
219 INF MdeModulePkg/Logo/LogoDxe.inf
220
221 #
222 # Ramdisk support
223 #
224 INF MdeModulePkg/Universal/Disk/RamDiskDxe/RamDiskDxe.inf
225
226 #
227 # Rng Support
228 #
229 INF SecurityPkg/RandomNumberGenerator/RngDxe/RngDxe.inf
230
231[FV.FVMAIN_COMPACT]
232FvAlignment = 16
233ERASE_POLARITY = 1
234MEMORY_MAPPED = TRUE
235STICKY_WRITE = TRUE
236LOCK_CAP = TRUE
237LOCK_STATUS = TRUE
238WRITE_DISABLED_CAP = TRUE
239WRITE_ENABLED_CAP = TRUE
240WRITE_STATUS = TRUE
241WRITE_LOCK_CAP = TRUE
242WRITE_LOCK_STATUS = TRUE
243READ_DISABLED_CAP = TRUE
244READ_ENABLED_CAP = TRUE
245READ_STATUS = TRUE
246READ_LOCK_CAP = TRUE
247READ_LOCK_STATUS = TRUE
248
249 INF RuleOverride = SELF_RELOC ArmVirtPkg/PrePi/ArmVirtPrePiUniCoreRelocatable.inf
250
251 FILE FV_IMAGE = 9E21FD93-9C72-4c15-8C4B-E77F1DB2D792 {
252 SECTION GUIDED EE4E5898-3914-4259-9D6E-DC7BD79403CF PROCESSING_REQUIRED = TRUE {
253 SECTION FV_IMAGE = FVMAIN
254 }
255 }
256
257!include ArmVirtRules.fdf.inc
Note: See TracBrowser for help on using the repository browser.

© 2025 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette