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