blob: 80acb9508f092f2f2f7a639322a22ca1e65a3fe5 [file] [log] [blame]
Vishal Bhoj82c80712015-12-15 21:13:33 +05301#
2# Copyright (c) 2011 - 2014, ARM Limited. All rights reserved.
3#
4# This program and the accompanying materials
5# are licensed and made available under the terms and conditions of the BSD License
6# which accompanies this distribution. The full text of the license may be found at
7# http://opensource.org/licenses/bsd-license.php
8#
9# THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
10# WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
11#
12
13################################################################################
14#
15# FD Section
16# The [FD] Section is made up of the definition statements and a
17# description of what goes into the Flash Device Image. Each FD section
18# defines one flash "device" image. A flash device image may be one of
19# the following: Removable media bootable image (like a boot floppy
20# image,) an Option ROM image (that would be "flashed" into an add-in
21# card,) a System "Flash" image (that would be burned into a system's
22# flash) or an Update ("Capsule") image that will be used to update and
23# existing system flash.
24#
25################################################################################
26
27[FD.FVP_AARCH64_EFI_SEC]
28BaseAddress = 0x00000000|gArmTokenSpaceGuid.PcdFdBaseAddress # The base address of the Firmware in SecureROM.
29Size = 0x04000000|gArmTokenSpaceGuid.PcdFdSize # The size in bytes of the device (64MiB).
30ErasePolarity = 1
31
32# This one is tricky, it must be: BlockSize * NumBlocks = Size
33BlockSize = 0x00001000
34NumBlocks = 0x4000
35
36################################################################################
37#
38# Following are lists of FD Region layout which correspond to the locations of different
39# images within the flash device.
40#
41# Regions must be defined in ascending order and may not overlap.
42#
43# A Layout Region start with a eight digit hex offset (leading "0x" required) followed by
44# the pipe "|" character, followed by the size of the region, also in hex with the leading
45# "0x" characters. Like:
46# Offset|Size
47# PcdOffsetCName|PcdSizeCName
48# RegionType <FV, DATA, or FILE>
49#
50################################################################################
51
520x00000000|0x00080000
53gArmTokenSpaceGuid.PcdSecureFvBaseAddress|gArmTokenSpaceGuid.PcdSecureFvSize
54FV = FVMAIN_SEC
55
56[FD.FVP_AARCH64_EFI]
57!ifdef ARM_FVP_RUN_NORFLASH
58BaseAddress = 0x08000000|gArmTokenSpaceGuid.PcdFdBaseAddress # The base address of the Firmware in Flash0.
59!else
60BaseAddress = 0x88000000|gArmTokenSpaceGuid.PcdFdBaseAddress # UEFI in DRAM + 128MB.
61!endif
62Size = 0x04000000|gArmTokenSpaceGuid.PcdFdSize # The size in bytes of the device (64MiB).
63ErasePolarity = 1
64
65# This one is tricky, it must be: BlockSize * NumBlocks = Size
66BlockSize = 0x00001000
67NumBlocks = 0x4000
68
690x00000000|0x00280000
70gArmTokenSpaceGuid.PcdFvBaseAddress|gArmTokenSpaceGuid.PcdFvSize
71FV = FVMAIN_COMPACT
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_SEC]
85FvBaseAddress = 0x0 # Secure ROM
86FvForceRebase = TRUE
87FvAlignment = 16
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 INF ArmPlatformPkg/Sec/Sec.inf
105
106
107[FV.FvMain]
108BlockSize = 0x40
109NumBlocks = 0 # This FV gets compressed so make it just big enough
110FvAlignment = 16 # FV alignment and FV attributes setting.
111ERASE_POLARITY = 1
112MEMORY_MAPPED = TRUE
113STICKY_WRITE = TRUE
114LOCK_CAP = TRUE
115LOCK_STATUS = TRUE
116WRITE_DISABLED_CAP = TRUE
117WRITE_ENABLED_CAP = TRUE
118WRITE_STATUS = TRUE
119WRITE_LOCK_CAP = TRUE
120WRITE_LOCK_STATUS = TRUE
121READ_DISABLED_CAP = TRUE
122READ_ENABLED_CAP = TRUE
123READ_STATUS = TRUE
124READ_LOCK_CAP = TRUE
125READ_LOCK_STATUS = TRUE
126
127 INF MdeModulePkg/Core/Dxe/DxeMain.inf
128
129 #
130 # PI DXE Drivers producing Architectural Protocols (EFI Services)
131 #
132 INF ArmPkg/Drivers/CpuDxe/CpuDxe.inf
133 INF MdeModulePkg/Core/RuntimeDxe/RuntimeDxe.inf
134 INF MdeModulePkg/Universal/SecurityStubDxe/SecurityStubDxe.inf
135 INF MdeModulePkg/Universal/CapsuleRuntimeDxe/CapsuleRuntimeDxe.inf
136 INF MdeModulePkg/Universal/Variable/RuntimeDxe/VariableRuntimeDxe.inf
137 INF MdeModulePkg/Universal/FaultTolerantWriteDxe/FaultTolerantWriteDxe.inf
138 INF MdeModulePkg/Universal/MonotonicCounterRuntimeDxe/MonotonicCounterRuntimeDxe.inf
139 INF EmbeddedPkg/ResetRuntimeDxe/ResetRuntimeDxe.inf
140 INF EmbeddedPkg/RealTimeClockRuntimeDxe/RealTimeClockRuntimeDxe.inf
141 INF EmbeddedPkg/MetronomeDxe/MetronomeDxe.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 EmbeddedPkg/SerialDxe/SerialDxe.inf
153
154 INF ArmPkg/Drivers/ArmGic/ArmGicDxe.inf
155 INF ArmPkg/Drivers/TimerDxe/TimerDxe.inf
156 INF ArmPlatformPkg/Drivers/NorFlashDxe/NorFlashDxe.inf
157!ifndef ARM_FOUNDATION_FVP
158 INF ArmPlatformPkg/Drivers/LcdGraphicsOutputDxe/PL111LcdGraphicsOutputDxe.inf
159!endif
160 INF ArmPlatformPkg/Drivers/SP805WatchdogDxe/SP805WatchdogDxe.inf
161
162 #
163 # Semi-hosting filesystem
164 #
165 INF ArmPkg/Filesystem/SemihostFs/SemihostFs.inf
166
167 #
168 # FAT filesystem + GPT/MBR partitioning
169 #
170 INF MdeModulePkg/Universal/Disk/DiskIoDxe/DiskIoDxe.inf
171 INF MdeModulePkg/Universal/Disk/PartitionDxe/PartitionDxe.inf
172 INF FatBinPkg/EnhancedFatDxe/Fat.inf
173 INF MdeModulePkg/Universal/Disk/UnicodeCollation/EnglishDxe/EnglishDxe.inf
174
175!ifndef ARM_FOUNDATION_FVP
176 #
177 # Multimedia Card Interface
178 #
179 INF EmbeddedPkg/Universal/MmcDxe/MmcDxe.inf
180 INF ArmPlatformPkg/Drivers/PL180MciDxe/PL180MciDxe.inf
181!endif
182
183 #
184 # Platform Driver
185 #
186 INF ArmPlatformPkg/ArmVExpressPkg/ArmVExpressDxe/ArmFvpDxe.inf
187 INF OvmfPkg/VirtioBlkDxe/VirtioBlk.inf
188
189 #
190 # UEFI application (Shell Embedded Boot Loader)
191 #
192 INF ShellBinPkg/UefiShell/UefiShell.inf
193
194 #
195 # Bds
196 #
197 INF MdeModulePkg/Universal/DevicePathDxe/DevicePathDxe.inf
198 INF ArmPlatformPkg/Bds/Bds.inf
199
200 # FV Filesystem
201 INF MdeModulePkg/Universal/FvSimpleFileSystemDxe/FvSimpleFileSystemDxe.inf
202
203[FV.FVMAIN_COMPACT]
204FvAlignment = 16
205ERASE_POLARITY = 1
206MEMORY_MAPPED = TRUE
207STICKY_WRITE = TRUE
208LOCK_CAP = TRUE
209LOCK_STATUS = TRUE
210WRITE_DISABLED_CAP = TRUE
211WRITE_ENABLED_CAP = TRUE
212WRITE_STATUS = TRUE
213WRITE_LOCK_CAP = TRUE
214WRITE_LOCK_STATUS = TRUE
215READ_DISABLED_CAP = TRUE
216READ_ENABLED_CAP = TRUE
217READ_STATUS = TRUE
218READ_LOCK_CAP = TRUE
219READ_LOCK_STATUS = TRUE
220
221!if $(EDK2_SKIP_PEICORE) == 1
222 INF ArmPlatformPkg/PrePi/PeiMPCore.inf
223!else
224 INF ArmPlatformPkg/PrePeiCore/PrePeiCoreMPCore.inf
225 INF MdeModulePkg/Core/Pei/PeiMain.inf
226 INF ArmPlatformPkg/PlatformPei/PlatformPeim.inf
227 INF ArmPlatformPkg/MemoryInitPei/MemoryInitPeim.inf
228 INF ArmPkg/Drivers/CpuPei/CpuPei.inf
229 INF MdeModulePkg/Universal/PCD/Pei/Pcd.inf
230 INF IntelFrameworkModulePkg/Universal/StatusCode/Pei/StatusCodePei.inf
231 INF MdeModulePkg/Universal/Variable/Pei/VariablePei.inf
232 INF MdeModulePkg/Core/DxeIplPeim/DxeIpl.inf
233!endif
234
235 FILE FV_IMAGE = 9E21FD93-9C72-4c15-8C4B-E77F1DB2D792 {
236 SECTION GUIDED EE4E5898-3914-4259-9D6E-DC7BD79403CF PROCESSING_REQUIRED = TRUE {
237 SECTION FV_IMAGE = FVMAIN
238 }
239 }
240
241
242################################################################################
243#
244# Rules are use with the [FV] section's module INF type to define
245# how an FFS file is created for a given INF file. The following Rule are the default
246# rules for the different module type. User can add the customized rules to define the
247# content of the FFS file.
248#
249################################################################################
250
251
252############################################################################
253# Example of a DXE_DRIVER FFS file with a Checksum encapsulation section #
254############################################################################
255#
256#[Rule.Common.DXE_DRIVER]
257# FILE DRIVER = $(NAMED_GUID) {
258# DXE_DEPEX DXE_DEPEX Optional $(INF_OUTPUT)/$(MODULE_NAME).depex
259# COMPRESS PI_STD {
260# GUIDED {
261# PE32 PE32 $(INF_OUTPUT)/$(MODULE_NAME).efi
262# UI STRING="$(MODULE_NAME)" Optional
263# VERSION STRING="$(INF_VERSION)" Optional BUILD_NUM=$(BUILD_NUMBER)
264# }
265# }
266# }
267#
268############################################################################
269
270[Rule.Common.SEC]
271 FILE SEC = $(NAMED_GUID) RELOCS_STRIPPED {
272 TE TE Align = 4K $(INF_OUTPUT)/$(MODULE_NAME).efi
273 }
274
275[Rule.Common.PEI_CORE]
276 FILE PEI_CORE = $(NAMED_GUID) {
277 TE TE Align = 8 $(INF_OUTPUT)/$(MODULE_NAME).efi
278 UI STRING ="$(MODULE_NAME)" Optional
279 }
280
281[Rule.Common.PEIM]
282 FILE PEIM = $(NAMED_GUID) {
283 PEI_DEPEX PEI_DEPEX Optional $(INF_OUTPUT)/$(MODULE_NAME).depex
284 TE TE Align = 8 $(INF_OUTPUT)/$(MODULE_NAME).efi
285 UI STRING="$(MODULE_NAME)" Optional
286 }
287
288[Rule.Common.PEIM.TIANOCOMPRESSED]
289 FILE PEIM = $(NAMED_GUID) DEBUG_MYTOOLS_IA32 {
290 PEI_DEPEX PEI_DEPEX Optional $(INF_OUTPUT)/$(MODULE_NAME).depex
291 GUIDED A31280AD-481E-41B6-95E8-127F4C984779 PROCESSING_REQUIRED = TRUE {
292 PE32 PE32 $(INF_OUTPUT)/$(MODULE_NAME).efi
293 UI STRING="$(MODULE_NAME)" Optional
294 }
295 }
296
297[Rule.Common.DXE_CORE]
298 FILE DXE_CORE = $(NAMED_GUID) {
299 PE32 PE32 $(INF_OUTPUT)/$(MODULE_NAME).efi
300 UI STRING="$(MODULE_NAME)" Optional
301 }
302
303[Rule.Common.UEFI_DRIVER]
304 FILE DRIVER = $(NAMED_GUID) {
305 DXE_DEPEX DXE_DEPEX Optional $(INF_OUTPUT)/$(MODULE_NAME).depex
306 PE32 PE32 $(INF_OUTPUT)/$(MODULE_NAME).efi
307 UI STRING="$(MODULE_NAME)" Optional
308 }
309
310[Rule.Common.DXE_DRIVER]
311 FILE DRIVER = $(NAMED_GUID) {
312 DXE_DEPEX DXE_DEPEX Optional $(INF_OUTPUT)/$(MODULE_NAME).depex
313 PE32 PE32 $(INF_OUTPUT)/$(MODULE_NAME).efi
314 UI STRING="$(MODULE_NAME)" Optional
315 }
316
317[Rule.Common.DXE_RUNTIME_DRIVER]
318 FILE DRIVER = $(NAMED_GUID) {
319 DXE_DEPEX DXE_DEPEX Optional $(INF_OUTPUT)/$(MODULE_NAME).depex
320 PE32 PE32 $(INF_OUTPUT)/$(MODULE_NAME).efi
321 UI STRING="$(MODULE_NAME)" Optional
322 }
323
324[Rule.Common.UEFI_APPLICATION]
325 FILE APPLICATION = $(NAMED_GUID) {
326 UI STRING ="$(MODULE_NAME)" Optional
327 PE32 PE32 $(INF_OUTPUT)/$(MODULE_NAME).efi
328 }
329
330[Rule.Common.UEFI_DRIVER.BINARY]
331 FILE DRIVER = $(NAMED_GUID) {
332 DXE_DEPEX DXE_DEPEX Optional |.depex
333 PE32 PE32 |.efi
334 UI STRING="$(MODULE_NAME)" Optional
335 VERSION STRING="$(INF_VERSION)" Optional BUILD_NUM=$(BUILD_NUMBER)
336 }
337
338[Rule.Common.UEFI_APPLICATION.BINARY]
339 FILE APPLICATION = $(NAMED_GUID) {
340 PE32 PE32 |.efi
341 UI STRING="$(MODULE_NAME)" Optional
342 VERSION STRING="$(INF_VERSION)" Optional BUILD_NUM=$(BUILD_NUMBER)
343 }