]> git.proxmox.com Git - mirror_edk2.git/blob - ArmVirtPkg/ArmVirtKvmTool.fdf
ebc82c5bd53cf98bc829c57dc0946b7a5854ca6c
[mirror_edk2.git] / ArmVirtPkg / ArmVirtKvmTool.fdf
1 #
2 # Copyright (c) 2018 - 2020, 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 ArmVirtPkg/VirtioFdtDxe/VirtioFdtDxe.inf
123 INF ArmVirtPkg/FdtClientDxe/FdtClientDxe.inf
124 INF ArmVirtPkg/KvmtoolPlatformDxe/KvmtoolPlatformDxe.inf
125 INF ArmVirtPkg/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 ArmPlatformPkg/Drivers/NorFlashDxe/NorFlashDxe.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 #
177 # UEFI application (Shell Embedded Boot Loader)
178 #
179 INF ShellPkg/Application/Shell/Shell.inf
180 INF ShellPkg/DynamicCommand/TftpDynamicCommand/TftpDynamicCommand.inf
181
182 #
183 # Bds
184 #
185 INF MdeModulePkg/Universal/DevicePathDxe/DevicePathDxe.inf
186 INF MdeModulePkg/Universal/DisplayEngineDxe/DisplayEngineDxe.inf
187 INF MdeModulePkg/Universal/SetupBrowserDxe/SetupBrowserDxe.inf
188 INF MdeModulePkg/Universal/DriverHealthManagerDxe/DriverHealthManagerDxe.inf
189 INF MdeModulePkg/Universal/BdsDxe/BdsDxe.inf
190 INF MdeModulePkg/Application/UiApp/UiApp.inf
191
192 #
193 # SCSI Bus and Disk Driver
194 #
195 INF MdeModulePkg/Bus/Scsi/ScsiBusDxe/ScsiBusDxe.inf
196 INF MdeModulePkg/Bus/Scsi/ScsiDiskDxe/ScsiDiskDxe.inf
197
198 #
199 # TianoCore logo (splash screen)
200 #
201 INF MdeModulePkg/Logo/LogoDxe.inf
202
203 #
204 # Ramdisk support
205 #
206 INF MdeModulePkg/Universal/Disk/RamDiskDxe/RamDiskDxe.inf
207
208 [FV.FVMAIN_COMPACT]
209 FvAlignment = 16
210 ERASE_POLARITY = 1
211 MEMORY_MAPPED = TRUE
212 STICKY_WRITE = TRUE
213 LOCK_CAP = TRUE
214 LOCK_STATUS = TRUE
215 WRITE_DISABLED_CAP = TRUE
216 WRITE_ENABLED_CAP = TRUE
217 WRITE_STATUS = TRUE
218 WRITE_LOCK_CAP = TRUE
219 WRITE_LOCK_STATUS = TRUE
220 READ_DISABLED_CAP = TRUE
221 READ_ENABLED_CAP = TRUE
222 READ_STATUS = TRUE
223 READ_LOCK_CAP = TRUE
224 READ_LOCK_STATUS = TRUE
225
226 INF RuleOverride = SELF_RELOC ArmVirtPkg/PrePi/ArmVirtPrePiUniCoreRelocatable.inf
227
228 FILE FV_IMAGE = 9E21FD93-9C72-4c15-8C4B-E77F1DB2D792 {
229 SECTION GUIDED EE4E5898-3914-4259-9D6E-DC7BD79403CF PROCESSING_REQUIRED = TRUE {
230 SECTION FV_IMAGE = FVMAIN
231 }
232 }
233
234 !include ArmVirtRules.fdf.inc