]> git.proxmox.com Git - mirror_edk2.git/blob - ArmVirtPkg/ArmVirtXen.fdf
Maintainers.txt: Update email address
[mirror_edk2.git] / ArmVirtPkg / ArmVirtXen.fdf
1 #
2 # Copyright (c) 2011-2015, ARM Limited. All rights reserved.
3 # Copyright (c) 2014, Linaro Limited. All rights reserved.
4 # Copyright (c) 2015 - 2019, Intel Corporation. All rights reserved.<BR>
5 #
6 # SPDX-License-Identifier: BSD-2-Clause-Patent
7 #
8
9 ################################################################################
10 #
11 # FD Section
12 # The [FD] Section is made up of the definition statements and a
13 # description of what goes into the Flash Device Image. Each FD section
14 # defines one flash "device" image. A flash device image may be one of
15 # the following: Removable media bootable image (like a boot floppy
16 # image,) an Option ROM image (that would be "flashed" into an add-in
17 # card,) a System "Flash" image (that would be burned into a system's
18 # flash) or an Update ("Capsule") image that will be used to update and
19 # existing system flash.
20 #
21 ################################################################################
22
23 [Defines]
24 !if $(FD_SIZE_IN_MB) == 2
25 DEFINE FVMAIN_COMPACT_SIZE = 0x1fe000
26 !endif
27 !if $(FD_SIZE_IN_MB) == 3
28 DEFINE FVMAIN_COMPACT_SIZE = 0x2fe000
29 !endif
30
31 [FD.XEN_EFI]
32 BaseAddress = 0x00000000|gArmTokenSpaceGuid.PcdFdBaseAddress
33 Size = $(FD_SIZE)|gArmTokenSpaceGuid.PcdFdSize
34 ErasePolarity = 1
35
36 # This one is tricky, it must be: BlockSize * NumBlocks = Size
37 BlockSize = 0x00001000
38 NumBlocks = $(FD_NUM_BLOCKS)
39
40 ################################################################################
41 #
42 # Following are lists of FD Region layout which correspond to the locations of different
43 # images within the flash device.
44 #
45 # Regions must be defined in ascending order and may not overlap.
46 #
47 # A Layout Region start with a eight digit hex offset (leading "0x" required) followed by
48 # the pipe "|" character, followed by the size of the region, also in hex with the leading
49 # "0x" characters. Like:
50 # Offset|Size
51 # PcdOffsetCName|PcdSizeCName
52 # RegionType <FV, DATA, or FILE>
53 #
54 ################################################################################
55
56 #
57 # Implement the Linux kernel header layout so that the Xen loader will identify
58 # it as something bootable, and execute it with a FDT pointer in x0 or r2.
59 # This area will be reused to store a copy of the FDT so round it up to 8 KB.
60 #
61 0x00000000|0x00002000
62 DATA = {
63 !if $(ARCH) == AARCH64
64 0x01, 0x00, 0x00, 0x10, # code0: adr x1, .
65 0xff, 0x07, 0x00, 0x14, # code1: b 0x2000
66 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, # text_offset: 512 KB
67 !if $(FD_SIZE_IN_MB) == 2
68 0x00, 0x00, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, # image_size: 2 MB
69 !endif
70 !if $(FD_SIZE_IN_MB) == 3
71 0x00, 0x00, 0x30, 0x00, 0x00, 0x00, 0x00, 0x00, # image_size: 3 MB
72 !endif
73 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, # flags
74 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, # res2
75 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, # res3
76 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, # res4
77 0x41, 0x52, 0x4d, 0x64, # magic: "ARM\x64"
78 0x00, 0x00, 0x00, 0x00 # res5
79 !else
80 0x08, 0x10, 0x4f, 0xe2, # adr r1, .
81 0x02, 0x00, 0xa0, 0xe1, # mov r0, r2 (DTB)
82 0x00, 0x00, 0xa0, 0xe1, # nop
83 0x00, 0x00, 0xa0, 0xe1, # nop
84 0x00, 0x00, 0xa0, 0xe1, # nop
85 0x00, 0x00, 0xa0, 0xe1, # nop
86 0x00, 0x00, 0xa0, 0xe1, # nop
87 0x00, 0x00, 0xa0, 0xe1, # nop
88
89 0xf6, 0x07, 0x00, 0xea, # b 0x2000
90 0x18, 0x28, 0x6f, 0x01, # magic
91 0x00, 0x00, 0x00, 0x00, # start
92 !if $(FD_SIZE_IN_MB) == 2
93 0x00, 0x00, 0x20, 0x00, # image size: 2 MB
94 !endif
95 !if $(FD_SIZE_IN_MB) == 3
96 0x00, 0x00, 0x30, 0x00, # image size: 3 MB
97 !endif
98 0x01, 0x02, 0x03, 0x04 # endiannness flag
99 !endif
100 }
101
102 0x00002000|$(FVMAIN_COMPACT_SIZE)
103 gArmTokenSpaceGuid.PcdFvBaseAddress|gArmTokenSpaceGuid.PcdFvSize
104 FV = FVMAIN_COMPACT
105
106
107 ################################################################################
108 #
109 # FV Section
110 #
111 # [FV] section is used to define what components or modules are placed within a flash
112 # device file. This section also defines order the components and modules are positioned
113 # within the image. The [FV] section consists of define statements, set statements and
114 # module statements.
115 #
116 ################################################################################
117
118 [FV.FvMain]
119 FvNameGuid = 4d2d8743-6337-4c3f-a1d9-7cc7efd283db
120 BlockSize = 0x40
121 NumBlocks = 0 # This FV gets compressed so make it just big enough
122 FvAlignment = 16 # FV alignment and FV attributes setting.
123 ERASE_POLARITY = 1
124 MEMORY_MAPPED = TRUE
125 STICKY_WRITE = TRUE
126 LOCK_CAP = TRUE
127 LOCK_STATUS = TRUE
128 WRITE_DISABLED_CAP = TRUE
129 WRITE_ENABLED_CAP = TRUE
130 WRITE_STATUS = TRUE
131 WRITE_LOCK_CAP = TRUE
132 WRITE_LOCK_STATUS = TRUE
133 READ_DISABLED_CAP = TRUE
134 READ_ENABLED_CAP = TRUE
135 READ_STATUS = TRUE
136 READ_LOCK_CAP = TRUE
137 READ_LOCK_STATUS = TRUE
138
139 INF MdeModulePkg/Core/Dxe/DxeMain.inf
140 INF MdeModulePkg/Universal/PCD/Dxe/Pcd.inf
141 INF ArmVirtPkg/XenioFdtDxe/XenioFdtDxe.inf
142 INF EmbeddedPkg/Drivers/FdtClientDxe/FdtClientDxe.inf
143
144 #
145 # PI DXE Drivers producing Architectural Protocols (EFI Services)
146 #
147 INF ArmPkg/Drivers/CpuDxe/CpuDxe.inf
148 INF MdeModulePkg/Core/RuntimeDxe/RuntimeDxe.inf
149 INF MdeModulePkg/Universal/SecurityStubDxe/SecurityStubDxe.inf
150 INF MdeModulePkg/Universal/CapsuleRuntimeDxe/CapsuleRuntimeDxe.inf
151
152 INF MdeModulePkg/Universal/Variable/RuntimeDxe/VariableRuntimeDxe.inf
153
154 INF MdeModulePkg/Universal/MonotonicCounterRuntimeDxe/MonotonicCounterRuntimeDxe.inf
155 INF MdeModulePkg/Universal/ResetSystemRuntimeDxe/ResetSystemRuntimeDxe.inf
156 INF EmbeddedPkg/RealTimeClockRuntimeDxe/RealTimeClockRuntimeDxe.inf
157 INF EmbeddedPkg/MetronomeDxe/MetronomeDxe.inf
158 INF MdeModulePkg/Universal/HiiDatabaseDxe/HiiDatabaseDxe.inf
159
160 #
161 # Multiple Console IO support
162 #
163 INF MdeModulePkg/Universal/Console/ConPlatformDxe/ConPlatformDxe.inf
164 INF MdeModulePkg/Universal/Console/TerminalDxe/TerminalDxe.inf
165 INF MdeModulePkg/Universal/SerialDxe/SerialDxe.inf
166
167 INF ArmPkg/Drivers/ArmGic/ArmGicDxe.inf
168 INF ArmPkg/Drivers/TimerDxe/TimerDxe.inf
169 INF MdeModulePkg/Universal/WatchdogTimerDxe/WatchdogTimer.inf
170
171 #
172 # FAT filesystem + GPT/MBR partitioning
173 #
174 INF MdeModulePkg/Universal/Disk/DiskIoDxe/DiskIoDxe.inf
175 INF MdeModulePkg/Universal/Disk/PartitionDxe/PartitionDxe.inf
176 INF FatPkg/EnhancedFatDxe/Fat.inf
177 INF MdeModulePkg/Universal/Disk/UnicodeCollation/EnglishDxe/EnglishDxe.inf
178 INF MdeModulePkg/Universal/Disk/UdfDxe/UdfDxe.inf
179
180 INF ShellPkg/Application/Shell/Shell.inf
181 INF ShellPkg/DynamicCommand/TftpDynamicCommand/TftpDynamicCommand.inf
182 INF ShellPkg/DynamicCommand/HttpDynamicCommand/HttpDynamicCommand.inf
183 INF OvmfPkg/LinuxInitrdDynamicShellCommand/LinuxInitrdDynamicShellCommand.inf
184
185 #
186 # Bds
187 #
188 INF MdeModulePkg/Universal/DevicePathDxe/DevicePathDxe.inf
189 INF MdeModulePkg/Universal/DisplayEngineDxe/DisplayEngineDxe.inf
190 INF MdeModulePkg/Universal/SetupBrowserDxe/SetupBrowserDxe.inf
191 INF MdeModulePkg/Universal/BdsDxe/BdsDxe.inf
192 INF MdeModulePkg/Application/UiApp/UiApp.inf
193
194 INF OvmfPkg/XenBusDxe/XenBusDxe.inf
195 INF OvmfPkg/XenPvBlkDxe/XenPvBlkDxe.inf
196
197 #
198 # ACPI support
199 #
200 INF ArmVirtPkg/XenPlatformHasAcpiDtDxe/XenPlatformHasAcpiDtDxe.inf
201 !if $(ARCH) == AARCH64
202 INF MdeModulePkg/Universal/Acpi/AcpiTableDxe/AcpiTableDxe.inf
203 INF ArmVirtPkg/XenAcpiPlatformDxe/XenAcpiPlatformDxe.inf
204
205 #
206 # EBC support
207 #
208 INF MdeModulePkg/Universal/EbcDxe/EbcDxe.inf
209 !endif
210
211 #
212 # Ramdisk support
213 #
214 INF MdeModulePkg/Universal/Disk/RamDiskDxe/RamDiskDxe.inf
215
216 [FV.FVMAIN_COMPACT]
217 FvAlignment = 16
218 ERASE_POLARITY = 1
219 MEMORY_MAPPED = TRUE
220 STICKY_WRITE = TRUE
221 LOCK_CAP = TRUE
222 LOCK_STATUS = TRUE
223 WRITE_DISABLED_CAP = TRUE
224 WRITE_ENABLED_CAP = TRUE
225 WRITE_STATUS = TRUE
226 WRITE_LOCK_CAP = TRUE
227 WRITE_LOCK_STATUS = TRUE
228 READ_DISABLED_CAP = TRUE
229 READ_ENABLED_CAP = TRUE
230 READ_STATUS = TRUE
231 READ_LOCK_CAP = TRUE
232 READ_LOCK_STATUS = TRUE
233
234 INF RuleOverride = SELF_RELOC ArmVirtPkg/PrePi/ArmVirtPrePiUniCoreRelocatable.inf
235
236 FILE FV_IMAGE = 9E21FD93-9C72-4c15-8C4B-E77F1DB2D792 {
237 SECTION GUIDED EE4E5898-3914-4259-9D6E-DC7BD79403CF PROCESSING_REQUIRED = TRUE {
238 SECTION FV_IMAGE = FVMAIN
239 }
240 }
241
242 !include ArmVirtRules.fdf.inc