blob: 8d8ec6344129275f1b543e046a87196bc26dae58 [file] [log] [blame]
Michael Casadevall6f5872b2014-09-18 18:11:24 +00001#
2# Copyright (c) 2011, 2013, ARM Limited. All rights reserved.
3# Copyright (c) 2014, Linaro Limited. All rights reserved.
4#
5# This program and the accompanying materials
6# are licensed and made available under the terms and conditions of the BSD License
7# which accompanies this distribution. The full text of the license may be found at
8# http://opensource.org/licenses/bsd-license.php
9#
10# THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
11# WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
12#
13
14################################################################################
15#
16# FD Section
17# The [FD] Section is made up of the definition statements and a
18# description of what goes into the Flash Device Image. Each FD section
19# defines one flash "device" image. A flash device image may be one of
20# the following: Removable media bootable image (like a boot floppy
21# image,) an Option ROM image (that would be "flashed" into an add-in
22# card,) a System "Flash" image (that would be burned into a system's
23# flash) or an Update ("Capsule") image that will be used to update and
24# existing system flash.
25#
26################################################################################
27
28[FD.QEMU_EFI]
29BaseAddress = 0x00000000|gArmTokenSpaceGuid.PcdFdBaseAddress # QEMU assigns 0 - 0x8000000 for a BootROM
30Size = 0x00200000|gArmTokenSpaceGuid.PcdFdSize # The size in bytes of the FLASH Device
31ErasePolarity = 1
32
33# This one is tricky, it must be: BlockSize * NumBlocks = Size
34BlockSize = 0x00001000
35NumBlocks = 0x200
36
37################################################################################
38#
39# Following are lists of FD Region layout which correspond to the locations of different
40# images within the flash device.
41#
42# Regions must be defined in ascending order and may not overlap.
43#
44# A Layout Region start with a eight digit hex offset (leading "0x" required) followed by
45# the pipe "|" character, followed by the size of the region, also in hex with the leading
46# "0x" characters. Like:
47# Offset|Size
48# PcdOffsetCName|PcdSizeCName
49# RegionType <FV, DATA, or FILE>
50#
51################################################################################
52
53#
54# UEFI has trouble dealing with FVs that reside at physical address 0x0.
55# So instead, put a hardcoded 'jump to 0x1000' at offset 0x0, and put the
56# real FV at offset 0x1000
57#
580x00000000|0x00001000
59DATA = {
60!if $(ARCH) == AARCH64
61 0x00, 0x04, 0x00, 0x14 # 'b 0x1000' in AArch64 ASM
62!else
63 0xfe, 0x03, 0x00, 0xea # 'b 0x1000' in AArch32 ASM
64!endif
65}
66
670x00001000|0x001ff000
68gArmTokenSpaceGuid.PcdFvBaseAddress|gArmTokenSpaceGuid.PcdFvSize
69FV = FVMAIN_COMPACT
70
71
72################################################################################
73#
74# FV Section
75#
76# [FV] section is used to define what components or modules are placed within a flash
77# device file. This section also defines order the components and modules are positioned
78# within the image. The [FV] section consists of define statements, set statements and
79# module statements.
80#
81################################################################################
82
83[FV.FvMain]
84BlockSize = 0x40
85NumBlocks = 0 # This FV gets compressed so make it just big enough
86FvAlignment = 16 # FV alignment and FV attributes setting.
87ERASE_POLARITY = 1
88MEMORY_MAPPED = TRUE
89STICKY_WRITE = TRUE
90LOCK_CAP = TRUE
91LOCK_STATUS = TRUE
92WRITE_DISABLED_CAP = TRUE
93WRITE_ENABLED_CAP = TRUE
94WRITE_STATUS = TRUE
95WRITE_LOCK_CAP = TRUE
96WRITE_LOCK_STATUS = TRUE
97READ_DISABLED_CAP = TRUE
98READ_ENABLED_CAP = TRUE
99READ_STATUS = TRUE
100READ_LOCK_CAP = TRUE
101READ_LOCK_STATUS = TRUE
102
103 APRIORI DXE {
104 INF MdeModulePkg/Universal/PCD/Dxe/Pcd.inf
105 INF ArmPlatformPkg/ArmVirtualizationPkg/VirtFdtDxe/VirtFdtDxe.inf
106 }
107 INF MdeModulePkg/Core/Dxe/DxeMain.inf
108 INF MdeModulePkg/Universal/PCD/Dxe/Pcd.inf
109 INF ArmPlatformPkg/ArmVirtualizationPkg/VirtFdtDxe/VirtFdtDxe.inf
110
111 #
112 # PI DXE Drivers producing Architectural Protocols (EFI Services)
113 #
114 INF ArmPkg/Drivers/CpuDxe/CpuDxe.inf
115 INF MdeModulePkg/Core/RuntimeDxe/RuntimeDxe.inf
116 INF MdeModulePkg/Universal/SecurityStubDxe/SecurityStubDxe.inf
117 INF MdeModulePkg/Universal/CapsuleRuntimeDxe/CapsuleRuntimeDxe.inf
118 INF MdeModulePkg/Universal/FaultTolerantWriteDxe/FaultTolerantWriteDxe.inf
119 INF MdeModulePkg/Universal/Variable/RuntimeDxe/VariableRuntimeDxe.inf
120 INF MdeModulePkg/Universal/MonotonicCounterRuntimeDxe/MonotonicCounterRuntimeDxe.inf
121 INF EmbeddedPkg/ResetRuntimeDxe/ResetRuntimeDxe.inf
122 INF EmbeddedPkg/RealTimeClockRuntimeDxe/RealTimeClockRuntimeDxe.inf
123 INF EmbeddedPkg/MetronomeDxe/MetronomeDxe.inf
124 INF MdeModulePkg/Universal/HiiDatabaseDxe/HiiDatabaseDxe.inf
125
126 #
127 # Multiple Console IO support
128 #
129 INF MdeModulePkg/Universal/Console/ConPlatformDxe/ConPlatformDxe.inf
130 INF MdeModulePkg/Universal/Console/ConSplitterDxe/ConSplitterDxe.inf
131 INF MdeModulePkg/Universal/Console/GraphicsConsoleDxe/GraphicsConsoleDxe.inf
132 INF MdeModulePkg/Universal/Console/TerminalDxe/TerminalDxe.inf
133 INF EmbeddedPkg/SerialDxe/SerialDxe.inf
134
135 INF ArmPkg/Drivers/ArmGic/ArmGicDxe.inf
136 INF ArmPkg/Drivers/TimerDxe/TimerDxe.inf
137 INF ArmPlatformPkg/Drivers/NorFlashDxe/NorFlashDxe.inf
138 INF MdeModulePkg/Universal/WatchdogTimerDxe/WatchdogTimer.inf
139
140 #
141 # FAT filesystem + GPT/MBR partitioning
142 #
143 INF MdeModulePkg/Universal/Disk/DiskIoDxe/DiskIoDxe.inf
144 INF MdeModulePkg/Universal/Disk/PartitionDxe/PartitionDxe.inf
145 INF FatBinPkg/EnhancedFatDxe/Fat.inf
146 INF MdeModulePkg/Universal/Disk/UnicodeCollation/EnglishDxe/EnglishDxe.inf
147
148 #
149 # Platform Driver
150 #
151 INF OvmfPkg/VirtioBlkDxe/VirtioBlk.inf
152 INF OvmfPkg/VirtioNetDxe/VirtioNet.inf
153 INF OvmfPkg/VirtioScsiDxe/VirtioScsi.inf
154
155 #
156 # UEFI application (Shell Embedded Boot Loader)
157 #
158 INF ShellBinPkg/UefiShell/UefiShell.inf
159
160 #
161 # Bds
162 #
163 INF MdeModulePkg/Universal/DevicePathDxe/DevicePathDxe.inf
Olivier Martin43ac1002014-10-13 10:55:38 +0000164!ifdef INTEL_BDS
165 INF MdeModulePkg/Universal/DisplayEngineDxe/DisplayEngineDxe.inf
166 INF MdeModulePkg/Universal/SetupBrowserDxe/SetupBrowserDxe.inf
167 INF IntelFrameworkModulePkg/Universal/BdsDxe/BdsDxe.inf
168!else
Michael Casadevall6f5872b2014-09-18 18:11:24 +0000169 INF ArmPlatformPkg/Bds/Bds.inf
Olivier Martin43ac1002014-10-13 10:55:38 +0000170!endif
Michael Casadevall6f5872b2014-09-18 18:11:24 +0000171
172 #
173 # Networking stack
174 #
175 INF MdeModulePkg/Universal/Network/DpcDxe/DpcDxe.inf
176 INF MdeModulePkg/Universal/Network/ArpDxe/ArpDxe.inf
177 INF MdeModulePkg/Universal/Network/Dhcp4Dxe/Dhcp4Dxe.inf
178 INF MdeModulePkg/Universal/Network/Ip4ConfigDxe/Ip4ConfigDxe.inf
179 INF MdeModulePkg/Universal/Network/Ip4Dxe/Ip4Dxe.inf
180 INF MdeModulePkg/Universal/Network/MnpDxe/MnpDxe.inf
181 INF MdeModulePkg/Universal/Network/VlanConfigDxe/VlanConfigDxe.inf
182 INF MdeModulePkg/Universal/Network/Mtftp4Dxe/Mtftp4Dxe.inf
183 INF MdeModulePkg/Universal/Network/Tcp4Dxe/Tcp4Dxe.inf
184 INF MdeModulePkg/Universal/Network/Udp4Dxe/Udp4Dxe.inf
185 INF MdeModulePkg/Universal/Network/UefiPxeBcDxe/UefiPxeBcDxe.inf
186 INF MdeModulePkg/Universal/Network/IScsiDxe/IScsiDxe.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
Laszlo Ersek1c5adbe2015-02-02 19:09:07 +0000194 #
195 # ACPI Support
196 #
197 INF MdeModulePkg/Universal/Acpi/AcpiTableDxe/AcpiTableDxe.inf
198 INF OvmfPkg/AcpiPlatformDxe/QemuFwCfgAcpiPlatformDxe.inf
199
Laszlo Ersek10233c92015-02-23 16:04:11 +0000200 #
201 # PCI support
202 #
203 INF ArmPlatformPkg/ArmVirtualizationPkg/PciHostBridgeDxe/PciHostBridgeDxe.inf
204 INF MdeModulePkg/Bus/Pci/PciBusDxe/PciBusDxe.inf
205 INF OvmfPkg/VirtioPciDeviceDxe/VirtioPciDeviceDxe.inf
206
Michael Casadevall6f5872b2014-09-18 18:11:24 +0000207[FV.FVMAIN_COMPACT]
208FvAlignment = 16
209ERASE_POLARITY = 1
210MEMORY_MAPPED = TRUE
211STICKY_WRITE = TRUE
212LOCK_CAP = TRUE
213LOCK_STATUS = TRUE
214WRITE_DISABLED_CAP = TRUE
215WRITE_ENABLED_CAP = TRUE
216WRITE_STATUS = TRUE
217WRITE_LOCK_CAP = TRUE
218WRITE_LOCK_STATUS = TRUE
219READ_DISABLED_CAP = TRUE
220READ_ENABLED_CAP = TRUE
221READ_STATUS = TRUE
222READ_LOCK_CAP = TRUE
223READ_LOCK_STATUS = TRUE
224
225 APRIORI PEI {
226 INF MdeModulePkg/Universal/PCD/Pei/Pcd.inf
227 }
228 INF ArmPlatformPkg/PrePeiCore/PrePeiCoreUniCore.inf
229 INF MdeModulePkg/Core/Pei/PeiMain.inf
230 INF ArmPlatformPkg/PlatformPei/PlatformPeim.inf
231 INF ArmPlatformPkg/MemoryInitPei/MemoryInitPeim.inf
232 INF ArmPkg/Drivers/CpuPei/CpuPei.inf
233 INF MdeModulePkg/Universal/PCD/Pei/Pcd.inf
234 INF MdeModulePkg/Universal/Variable/Pei/VariablePei.inf
235 INF MdeModulePkg/Core/DxeIplPeim/DxeIpl.inf
236
237 FILE FV_IMAGE = 9E21FD93-9C72-4c15-8C4B-E77F1DB2D792 {
238 SECTION GUIDED EE4E5898-3914-4259-9D6E-DC7BD79403CF PROCESSING_REQUIRED = TRUE {
239 SECTION FV_IMAGE = FVMAIN
240 }
241 }
242
243
244################################################################################
245#
246# Rules are use with the [FV] section's module INF type to define
247# how an FFS file is created for a given INF file. The following Rule are the default
248# rules for the different module type. User can add the customized rules to define the
249# content of the FFS file.
250#
251################################################################################
252
253
254############################################################################
255# Example of a DXE_DRIVER FFS file with a Checksum encapsulation section #
256############################################################################
257#
258#[Rule.Common.DXE_DRIVER]
259# FILE DRIVER = $(NAMED_GUID) {
260# DXE_DEPEX DXE_DEPEX Optional $(INF_OUTPUT)/$(MODULE_NAME).depex
261# COMPRESS PI_STD {
262# GUIDED {
263# PE32 PE32 $(INF_OUTPUT)/$(MODULE_NAME).efi
264# UI STRING="$(MODULE_NAME)" Optional
265# VERSION STRING="$(INF_VERSION)" Optional BUILD_NUM=$(BUILD_NUMBER)
266# }
267# }
268# }
269#
270############################################################################
271
272[Rule.Common.SEC]
273 FILE SEC = $(NAMED_GUID) RELOCS_STRIPPED {
274 TE TE Align = 128 $(INF_OUTPUT)/$(MODULE_NAME).efi
275 }
276
277[Rule.Common.PEI_CORE]
278 FILE PEI_CORE = $(NAMED_GUID) {
279 TE TE Align = 8 $(INF_OUTPUT)/$(MODULE_NAME).efi
280 UI STRING ="$(MODULE_NAME)" Optional
281 }
282
283[Rule.Common.PEIM]
284 FILE PEIM = $(NAMED_GUID) {
285 PEI_DEPEX PEI_DEPEX Optional $(INF_OUTPUT)/$(MODULE_NAME).depex
286 TE TE Align = 8 $(INF_OUTPUT)/$(MODULE_NAME).efi
287 UI STRING="$(MODULE_NAME)" Optional
288 }
289
290[Rule.Common.PEIM.TIANOCOMPRESSED]
291 FILE PEIM = $(NAMED_GUID) DEBUG_MYTOOLS_IA32 {
292 PEI_DEPEX PEI_DEPEX Optional $(INF_OUTPUT)/$(MODULE_NAME).depex
293 GUIDED A31280AD-481E-41B6-95E8-127F4C984779 PROCESSING_REQUIRED = TRUE {
294 PE32 PE32 $(INF_OUTPUT)/$(MODULE_NAME).efi
295 UI STRING="$(MODULE_NAME)" Optional
296 }
297 }
298
299[Rule.Common.DXE_CORE]
300 FILE DXE_CORE = $(NAMED_GUID) {
301 PE32 PE32 $(INF_OUTPUT)/$(MODULE_NAME).efi
302 UI STRING="$(MODULE_NAME)" Optional
303 }
304
305[Rule.Common.UEFI_DRIVER]
306 FILE DRIVER = $(NAMED_GUID) {
307 DXE_DEPEX DXE_DEPEX Optional $(INF_OUTPUT)/$(MODULE_NAME).depex
308 PE32 PE32 $(INF_OUTPUT)/$(MODULE_NAME).efi
309 UI STRING="$(MODULE_NAME)" Optional
310 }
311
312[Rule.Common.DXE_DRIVER]
313 FILE DRIVER = $(NAMED_GUID) {
314 DXE_DEPEX DXE_DEPEX Optional $(INF_OUTPUT)/$(MODULE_NAME).depex
315 PE32 PE32 $(INF_OUTPUT)/$(MODULE_NAME).efi
316 UI STRING="$(MODULE_NAME)" Optional
317 }
318
319[Rule.Common.DXE_RUNTIME_DRIVER]
320 FILE DRIVER = $(NAMED_GUID) {
321 DXE_DEPEX DXE_DEPEX Optional $(INF_OUTPUT)/$(MODULE_NAME).depex
322 PE32 PE32 $(INF_OUTPUT)/$(MODULE_NAME).efi
323 UI STRING="$(MODULE_NAME)" Optional
324 }
325
326[Rule.Common.UEFI_APPLICATION]
327 FILE APPLICATION = $(NAMED_GUID) {
328 UI STRING ="$(MODULE_NAME)" Optional
329 PE32 PE32 $(INF_OUTPUT)/$(MODULE_NAME).efi
330 }
331
332[Rule.Common.UEFI_DRIVER.BINARY]
333 FILE DRIVER = $(NAMED_GUID) {
334 DXE_DEPEX DXE_DEPEX Optional |.depex
335 PE32 PE32 |.efi
336 UI STRING="$(MODULE_NAME)" Optional
337 VERSION STRING="$(INF_VERSION)" Optional BUILD_NUM=$(BUILD_NUMBER)
338 }
339
340[Rule.Common.UEFI_APPLICATION.BINARY]
341 FILE APPLICATION = $(NAMED_GUID) {
342 PE32 PE32 |.efi
343 UI STRING="$(MODULE_NAME)" Optional
344 VERSION STRING="$(INF_VERSION)" Optional BUILD_NUM=$(BUILD_NUMBER)
345 }
346
347[Rule.Common.USER_DEFINED.ACPITABLE]
348 FILE FREEFORM = $(NAMED_GUID) {
349 RAW ACPI |.acpi
350 RAW ASL |.aml
351 UI STRING="$(MODULE_NAME)" Optional
352 }