blob: 6faf3bc121721f045a30697849ee1f526a61015e [file] [log] [blame]
Michael Casadevall6f5872b2014-09-18 18:11:24 +00001#
Olivier Martin7fbd1eb2015-05-29 13:50:43 +00002# Copyright (c) 2011-2015, ARM Limited. All rights reserved.
Michael Casadevall6f5872b2014-09-18 18:11:24 +00003# Copyright (c) 2014, Linaro Limited. All rights reserved.
Star Zengd68d2ed2015-07-01 03:11:05 +00004# Copyright (c) 2015, Intel Corporation. All rights reserved.
Michael Casadevall6f5872b2014-09-18 18:11:24 +00005#
6# This program and the accompanying materials
7# are licensed and made available under the terms and conditions of the BSD License
8# which accompanies this distribution. The full text of the license may be found at
9# http://opensource.org/licenses/bsd-license.php
10#
11# THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
12# WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
13#
14
15################################################################################
16#
17# FD Section
18# The [FD] Section is made up of the definition statements and a
19# description of what goes into the Flash Device Image. Each FD section
20# defines one flash "device" image. A flash device image may be one of
21# the following: Removable media bootable image (like a boot floppy
22# image,) an Option ROM image (that would be "flashed" into an add-in
23# card,) a System "Flash" image (that would be burned into a system's
24# flash) or an Update ("Capsule") image that will be used to update and
25# existing system flash.
26#
27################################################################################
28
29[FD.QEMU_EFI]
30BaseAddress = 0x00000000|gArmTokenSpaceGuid.PcdFdBaseAddress # QEMU assigns 0 - 0x8000000 for a BootROM
31Size = 0x00200000|gArmTokenSpaceGuid.PcdFdSize # The size in bytes of the FLASH Device
32ErasePolarity = 1
33
34# This one is tricky, it must be: BlockSize * NumBlocks = Size
35BlockSize = 0x00001000
36NumBlocks = 0x200
37
38################################################################################
39#
40# Following are lists of FD Region layout which correspond to the locations of different
41# images within the flash device.
42#
43# Regions must be defined in ascending order and may not overlap.
44#
45# A Layout Region start with a eight digit hex offset (leading "0x" required) followed by
46# the pipe "|" character, followed by the size of the region, also in hex with the leading
47# "0x" characters. Like:
48# Offset|Size
49# PcdOffsetCName|PcdSizeCName
50# RegionType <FV, DATA, or FILE>
51#
52################################################################################
53
54#
55# UEFI has trouble dealing with FVs that reside at physical address 0x0.
56# So instead, put a hardcoded 'jump to 0x1000' at offset 0x0, and put the
57# real FV at offset 0x1000
58#
590x00000000|0x00001000
60DATA = {
61!if $(ARCH) == AARCH64
62 0x00, 0x04, 0x00, 0x14 # 'b 0x1000' in AArch64 ASM
63!else
64 0xfe, 0x03, 0x00, 0xea # 'b 0x1000' in AArch32 ASM
65!endif
66}
67
680x00001000|0x001ff000
69gArmTokenSpaceGuid.PcdFvBaseAddress|gArmTokenSpaceGuid.PcdFvSize
70FV = FVMAIN_COMPACT
71
72
73################################################################################
74#
75# FV Section
76#
77# [FV] section is used to define what components or modules are placed within a flash
78# device file. This section also defines order the components and modules are positioned
79# within the image. The [FV] section consists of define statements, set statements and
80# module statements.
81#
82################################################################################
83
84[FV.FvMain]
85BlockSize = 0x40
86NumBlocks = 0 # This FV gets compressed so make it just big enough
87FvAlignment = 16 # FV alignment and FV attributes setting.
88ERASE_POLARITY = 1
89MEMORY_MAPPED = TRUE
90STICKY_WRITE = TRUE
91LOCK_CAP = TRUE
92LOCK_STATUS = TRUE
93WRITE_DISABLED_CAP = TRUE
94WRITE_ENABLED_CAP = TRUE
95WRITE_STATUS = TRUE
96WRITE_LOCK_CAP = TRUE
97WRITE_LOCK_STATUS = TRUE
98READ_DISABLED_CAP = TRUE
99READ_ENABLED_CAP = TRUE
100READ_STATUS = TRUE
101READ_LOCK_CAP = TRUE
102READ_LOCK_STATUS = TRUE
103
104 APRIORI DXE {
105 INF MdeModulePkg/Universal/PCD/Dxe/Pcd.inf
Olivier Martin7fbd1eb2015-05-29 13:50:43 +0000106 INF ArmVirtPkg/VirtFdtDxe/VirtFdtDxe.inf
Laszlo Ersekd2733aa2015-07-26 08:02:50 +0000107 INF ArmVirtPkg/QemuFwCfgToPcdDxe/QemuFwCfgToPcd.inf
Michael Casadevall6f5872b2014-09-18 18:11:24 +0000108 }
109 INF MdeModulePkg/Core/Dxe/DxeMain.inf
110 INF MdeModulePkg/Universal/PCD/Dxe/Pcd.inf
Olivier Martin7fbd1eb2015-05-29 13:50:43 +0000111 INF ArmVirtPkg/VirtFdtDxe/VirtFdtDxe.inf
Laszlo Ersekd2733aa2015-07-26 08:02:50 +0000112 INF ArmVirtPkg/QemuFwCfgToPcdDxe/QemuFwCfgToPcd.inf
Michael Casadevall6f5872b2014-09-18 18:11:24 +0000113
114 #
115 # PI DXE Drivers producing Architectural Protocols (EFI Services)
116 #
117 INF ArmPkg/Drivers/CpuDxe/CpuDxe.inf
118 INF MdeModulePkg/Core/RuntimeDxe/RuntimeDxe.inf
119 INF MdeModulePkg/Universal/SecurityStubDxe/SecurityStubDxe.inf
120 INF MdeModulePkg/Universal/CapsuleRuntimeDxe/CapsuleRuntimeDxe.inf
121 INF MdeModulePkg/Universal/FaultTolerantWriteDxe/FaultTolerantWriteDxe.inf
122 INF MdeModulePkg/Universal/Variable/RuntimeDxe/VariableRuntimeDxe.inf
Star Zengd68d2ed2015-07-01 03:11:05 +0000123!if $(SECURE_BOOT_ENABLE) == TRUE
124 INF SecurityPkg/VariableAuthenticated/SecureBootConfigDxe/SecureBootConfigDxe.inf
Ard Biesheuvel80f882a2015-05-07 15:22:31 +0000125!endif
Michael Casadevall6f5872b2014-09-18 18:11:24 +0000126 INF MdeModulePkg/Universal/MonotonicCounterRuntimeDxe/MonotonicCounterRuntimeDxe.inf
127 INF EmbeddedPkg/ResetRuntimeDxe/ResetRuntimeDxe.inf
128 INF EmbeddedPkg/RealTimeClockRuntimeDxe/RealTimeClockRuntimeDxe.inf
129 INF EmbeddedPkg/MetronomeDxe/MetronomeDxe.inf
130 INF MdeModulePkg/Universal/HiiDatabaseDxe/HiiDatabaseDxe.inf
131
132 #
133 # Multiple Console IO support
134 #
135 INF MdeModulePkg/Universal/Console/ConPlatformDxe/ConPlatformDxe.inf
136 INF MdeModulePkg/Universal/Console/ConSplitterDxe/ConSplitterDxe.inf
137 INF MdeModulePkg/Universal/Console/GraphicsConsoleDxe/GraphicsConsoleDxe.inf
138 INF MdeModulePkg/Universal/Console/TerminalDxe/TerminalDxe.inf
139 INF EmbeddedPkg/SerialDxe/SerialDxe.inf
140
141 INF ArmPkg/Drivers/ArmGic/ArmGicDxe.inf
142 INF ArmPkg/Drivers/TimerDxe/TimerDxe.inf
Ard Biesheuvel80f882a2015-05-07 15:22:31 +0000143!if $(SECURE_BOOT_ENABLE) == TRUE
144 INF ArmPlatformPkg/Drivers/NorFlashDxe/NorFlashAuthenticatedDxe.inf
145!else
Michael Casadevall6f5872b2014-09-18 18:11:24 +0000146 INF ArmPlatformPkg/Drivers/NorFlashDxe/NorFlashDxe.inf
Ard Biesheuvel80f882a2015-05-07 15:22:31 +0000147!endif
Michael Casadevall6f5872b2014-09-18 18:11:24 +0000148 INF MdeModulePkg/Universal/WatchdogTimerDxe/WatchdogTimer.inf
149
150 #
151 # FAT filesystem + GPT/MBR partitioning
152 #
153 INF MdeModulePkg/Universal/Disk/DiskIoDxe/DiskIoDxe.inf
154 INF MdeModulePkg/Universal/Disk/PartitionDxe/PartitionDxe.inf
155 INF FatBinPkg/EnhancedFatDxe/Fat.inf
156 INF MdeModulePkg/Universal/Disk/UnicodeCollation/EnglishDxe/EnglishDxe.inf
157
158 #
159 # Platform Driver
160 #
161 INF OvmfPkg/VirtioBlkDxe/VirtioBlk.inf
162 INF OvmfPkg/VirtioNetDxe/VirtioNet.inf
163 INF OvmfPkg/VirtioScsiDxe/VirtioScsi.inf
164
165 #
166 # UEFI application (Shell Embedded Boot Loader)
167 #
Laszlo Ersekda1ce6f2015-03-16 19:56:54 +0000168 INF ShellPkg/Application/Shell/Shell.inf
Michael Casadevall6f5872b2014-09-18 18:11:24 +0000169
170 #
171 # Bds
172 #
173 INF MdeModulePkg/Universal/DevicePathDxe/DevicePathDxe.inf
Olivier Martin43ac1002014-10-13 10:55:38 +0000174 INF MdeModulePkg/Universal/DisplayEngineDxe/DisplayEngineDxe.inf
175 INF MdeModulePkg/Universal/SetupBrowserDxe/SetupBrowserDxe.inf
176 INF IntelFrameworkModulePkg/Universal/BdsDxe/BdsDxe.inf
Michael Casadevall6f5872b2014-09-18 18:11:24 +0000177
178 #
179 # Networking stack
180 #
181 INF MdeModulePkg/Universal/Network/DpcDxe/DpcDxe.inf
182 INF MdeModulePkg/Universal/Network/ArpDxe/ArpDxe.inf
183 INF MdeModulePkg/Universal/Network/Dhcp4Dxe/Dhcp4Dxe.inf
Michael Casadevall6f5872b2014-09-18 18:11:24 +0000184 INF MdeModulePkg/Universal/Network/Ip4Dxe/Ip4Dxe.inf
185 INF MdeModulePkg/Universal/Network/MnpDxe/MnpDxe.inf
186 INF MdeModulePkg/Universal/Network/VlanConfigDxe/VlanConfigDxe.inf
187 INF MdeModulePkg/Universal/Network/Mtftp4Dxe/Mtftp4Dxe.inf
188 INF MdeModulePkg/Universal/Network/Tcp4Dxe/Tcp4Dxe.inf
189 INF MdeModulePkg/Universal/Network/Udp4Dxe/Udp4Dxe.inf
190 INF MdeModulePkg/Universal/Network/UefiPxeBcDxe/UefiPxeBcDxe.inf
191 INF MdeModulePkg/Universal/Network/IScsiDxe/IScsiDxe.inf
192
193 #
194 # SCSI Bus and Disk Driver
195 #
196 INF MdeModulePkg/Bus/Scsi/ScsiBusDxe/ScsiBusDxe.inf
197 INF MdeModulePkg/Bus/Scsi/ScsiDiskDxe/ScsiDiskDxe.inf
198
Laszlo Ersek1c5adbe2015-02-02 19:09:07 +0000199 #
Laszlo Ersekceb05742015-07-26 08:03:00 +0000200 # SMBIOS Support
201 #
202 INF MdeModulePkg/Universal/SmbiosDxe/SmbiosDxe.inf
203 INF OvmfPkg/SmbiosPlatformDxe/SmbiosPlatformDxe.inf
204
205 #
Laszlo Ersek1c5adbe2015-02-02 19:09:07 +0000206 # ACPI Support
207 #
208 INF MdeModulePkg/Universal/Acpi/AcpiTableDxe/AcpiTableDxe.inf
209 INF OvmfPkg/AcpiPlatformDxe/QemuFwCfgAcpiPlatformDxe.inf
210
Laszlo Ersek10233c92015-02-23 16:04:11 +0000211 #
212 # PCI support
213 #
Olivier Martin7fbd1eb2015-05-29 13:50:43 +0000214 INF ArmVirtPkg/PciHostBridgeDxe/PciHostBridgeDxe.inf
Laszlo Ersek10233c92015-02-23 16:04:11 +0000215 INF MdeModulePkg/Bus/Pci/PciBusDxe/PciBusDxe.inf
216 INF OvmfPkg/VirtioPciDeviceDxe/VirtioPciDeviceDxe.inf
217
Laszlo Ersekd01c77b2015-02-23 16:04:25 +0000218 #
219 # Video support
220 #
221 INF OvmfPkg/QemuVideoDxe/QemuVideoDxe.inf
222 INF OvmfPkg/PlatformDxe/Platform.inf
223
Laszlo Erseke17b1db2015-02-23 16:04:30 +0000224 #
225 # USB Support
226 #
227 INF MdeModulePkg/Bus/Pci/UhciDxe/UhciDxe.inf
228 INF MdeModulePkg/Bus/Pci/EhciDxe/EhciDxe.inf
Laszlo Ersekeee32602015-03-16 19:57:06 +0000229 INF MdeModulePkg/Bus/Pci/XhciDxe/XhciDxe.inf
Laszlo Erseke17b1db2015-02-23 16:04:30 +0000230 INF MdeModulePkg/Bus/Usb/UsbBusDxe/UsbBusDxe.inf
231 INF MdeModulePkg/Bus/Usb/UsbKbDxe/UsbKbDxe.inf
232
Laszlo Ersek26a36372015-02-25 17:54:15 +0000233 #
234 # TianoCore logo (splash screen)
235 #
236 FILE FREEFORM = PCD(gEfiIntelFrameworkModulePkgTokenSpaceGuid.PcdLogoFile) {
237 SECTION RAW = MdeModulePkg/Logo/Logo.bmp
238 }
Laszlo Ersek26a36372015-02-25 17:54:15 +0000239
Ard Biesheuvel90385382015-08-04 18:41:45 +0000240!if $(ARCH) == ARM
241 INF MdeModulePkg/Universal/FvSimpleFileSystemDxe/FvSimpleFileSystemDxe.inf
242 INF ArmPkg/Application/LinuxLoader/LinuxLoader.inf
243!endif
244
Michael Casadevall6f5872b2014-09-18 18:11:24 +0000245[FV.FVMAIN_COMPACT]
246FvAlignment = 16
247ERASE_POLARITY = 1
248MEMORY_MAPPED = TRUE
249STICKY_WRITE = TRUE
250LOCK_CAP = TRUE
251LOCK_STATUS = TRUE
252WRITE_DISABLED_CAP = TRUE
253WRITE_ENABLED_CAP = TRUE
254WRITE_STATUS = TRUE
255WRITE_LOCK_CAP = TRUE
256WRITE_LOCK_STATUS = TRUE
257READ_DISABLED_CAP = TRUE
258READ_ENABLED_CAP = TRUE
259READ_STATUS = TRUE
260READ_LOCK_CAP = TRUE
261READ_LOCK_STATUS = TRUE
262
263 APRIORI PEI {
264 INF MdeModulePkg/Universal/PCD/Pei/Pcd.inf
265 }
266 INF ArmPlatformPkg/PrePeiCore/PrePeiCoreUniCore.inf
267 INF MdeModulePkg/Core/Pei/PeiMain.inf
268 INF ArmPlatformPkg/PlatformPei/PlatformPeim.inf
269 INF ArmPlatformPkg/MemoryInitPei/MemoryInitPeim.inf
270 INF ArmPkg/Drivers/CpuPei/CpuPei.inf
271 INF MdeModulePkg/Universal/PCD/Pei/Pcd.inf
272 INF MdeModulePkg/Universal/Variable/Pei/VariablePei.inf
Michael Casadevall6f5872b2014-09-18 18:11:24 +0000273 INF MdeModulePkg/Core/DxeIplPeim/DxeIpl.inf
274
275 FILE FV_IMAGE = 9E21FD93-9C72-4c15-8C4B-E77F1DB2D792 {
276 SECTION GUIDED EE4E5898-3914-4259-9D6E-DC7BD79403CF PROCESSING_REQUIRED = TRUE {
277 SECTION FV_IMAGE = FVMAIN
278 }
279 }
280
281
282################################################################################
283#
284# Rules are use with the [FV] section's module INF type to define
285# how an FFS file is created for a given INF file. The following Rule are the default
286# rules for the different module type. User can add the customized rules to define the
287# content of the FFS file.
288#
289################################################################################
290
291
292############################################################################
293# Example of a DXE_DRIVER FFS file with a Checksum encapsulation section #
294############################################################################
295#
296#[Rule.Common.DXE_DRIVER]
297# FILE DRIVER = $(NAMED_GUID) {
298# DXE_DEPEX DXE_DEPEX Optional $(INF_OUTPUT)/$(MODULE_NAME).depex
299# COMPRESS PI_STD {
300# GUIDED {
301# PE32 PE32 $(INF_OUTPUT)/$(MODULE_NAME).efi
302# UI STRING="$(MODULE_NAME)" Optional
303# VERSION STRING="$(INF_VERSION)" Optional BUILD_NUM=$(BUILD_NUMBER)
304# }
305# }
306# }
307#
308############################################################################
309
310[Rule.Common.SEC]
Ard Biesheuvel7669f732015-07-31 08:24:18 +0000311 FILE SEC = $(NAMED_GUID) RELOCS_STRIPPED FIXED {
312 TE TE Align = Auto $(INF_OUTPUT)/$(MODULE_NAME).efi
Michael Casadevall6f5872b2014-09-18 18:11:24 +0000313 }
314
315[Rule.Common.PEI_CORE]
Ard Biesheuvel7669f732015-07-31 08:24:18 +0000316 FILE PEI_CORE = $(NAMED_GUID) FIXED {
317 TE TE Align = Auto $(INF_OUTPUT)/$(MODULE_NAME).efi
Michael Casadevall6f5872b2014-09-18 18:11:24 +0000318 UI STRING ="$(MODULE_NAME)" Optional
319 }
320
321[Rule.Common.PEIM]
Ard Biesheuvel7669f732015-07-31 08:24:18 +0000322 FILE PEIM = $(NAMED_GUID) FIXED {
Michael Casadevall6f5872b2014-09-18 18:11:24 +0000323 PEI_DEPEX PEI_DEPEX Optional $(INF_OUTPUT)/$(MODULE_NAME).depex
Ard Biesheuvel7669f732015-07-31 08:24:18 +0000324 TE TE Align = Auto $(INF_OUTPUT)/$(MODULE_NAME).efi
Michael Casadevall6f5872b2014-09-18 18:11:24 +0000325 UI STRING="$(MODULE_NAME)" Optional
326 }
327
328[Rule.Common.PEIM.TIANOCOMPRESSED]
329 FILE PEIM = $(NAMED_GUID) DEBUG_MYTOOLS_IA32 {
330 PEI_DEPEX PEI_DEPEX Optional $(INF_OUTPUT)/$(MODULE_NAME).depex
331 GUIDED A31280AD-481E-41B6-95E8-127F4C984779 PROCESSING_REQUIRED = TRUE {
332 PE32 PE32 $(INF_OUTPUT)/$(MODULE_NAME).efi
333 UI STRING="$(MODULE_NAME)" Optional
334 }
335 }
336
337[Rule.Common.DXE_CORE]
338 FILE DXE_CORE = $(NAMED_GUID) {
339 PE32 PE32 $(INF_OUTPUT)/$(MODULE_NAME).efi
340 UI STRING="$(MODULE_NAME)" Optional
341 }
342
343[Rule.Common.UEFI_DRIVER]
344 FILE DRIVER = $(NAMED_GUID) {
345 DXE_DEPEX DXE_DEPEX Optional $(INF_OUTPUT)/$(MODULE_NAME).depex
346 PE32 PE32 $(INF_OUTPUT)/$(MODULE_NAME).efi
347 UI STRING="$(MODULE_NAME)" Optional
348 }
349
350[Rule.Common.DXE_DRIVER]
351 FILE DRIVER = $(NAMED_GUID) {
352 DXE_DEPEX DXE_DEPEX Optional $(INF_OUTPUT)/$(MODULE_NAME).depex
353 PE32 PE32 $(INF_OUTPUT)/$(MODULE_NAME).efi
354 UI STRING="$(MODULE_NAME)" Optional
355 }
356
357[Rule.Common.DXE_RUNTIME_DRIVER]
358 FILE DRIVER = $(NAMED_GUID) {
359 DXE_DEPEX DXE_DEPEX Optional $(INF_OUTPUT)/$(MODULE_NAME).depex
360 PE32 PE32 $(INF_OUTPUT)/$(MODULE_NAME).efi
361 UI STRING="$(MODULE_NAME)" Optional
362 }
363
364[Rule.Common.UEFI_APPLICATION]
365 FILE APPLICATION = $(NAMED_GUID) {
366 UI STRING ="$(MODULE_NAME)" Optional
367 PE32 PE32 $(INF_OUTPUT)/$(MODULE_NAME).efi
368 }
369
370[Rule.Common.UEFI_DRIVER.BINARY]
371 FILE DRIVER = $(NAMED_GUID) {
372 DXE_DEPEX DXE_DEPEX Optional |.depex
373 PE32 PE32 |.efi
374 UI STRING="$(MODULE_NAME)" Optional
375 VERSION STRING="$(INF_VERSION)" Optional BUILD_NUM=$(BUILD_NUMBER)
376 }
377
378[Rule.Common.UEFI_APPLICATION.BINARY]
379 FILE APPLICATION = $(NAMED_GUID) {
380 PE32 PE32 |.efi
381 UI STRING="$(MODULE_NAME)" Optional
382 VERSION STRING="$(INF_VERSION)" Optional BUILD_NUM=$(BUILD_NUMBER)
383 }
384
385[Rule.Common.USER_DEFINED.ACPITABLE]
386 FILE FREEFORM = $(NAMED_GUID) {
387 RAW ACPI |.acpi
388 RAW ASL |.aml
389 UI STRING="$(MODULE_NAME)" Optional
390 }