blob: 4b0e683ea0c2c65a890a8d114104670fabfd2f36 [file] [log] [blame]
andrewfish949f3882011-05-11 18:31:20 +00001## @file
2# This is Unix FDF file with UEFI HII features enabled
3#
4# Copyright (c) 2008 - 2010, Intel Corporation. All rights reserved.<BR>
5# Portions copyright (c) 2009 - 2011, Apple Inc. All rights reserved.<BR>
6#
7# This program and the accompanying materials
8# are licensed and made available under the terms and conditions of the BSD License
9# which accompanies this distribution. The full text of the license may be found at
10# http://opensource.org/licenses/bsd-license.php
11#
12# THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
13# WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
14#
15
16################################################################################
17#
18# FD Section
19# The [FD] Section is made up of the definition statements and a
20# description of what goes into the Flash Device Image. Each FD section
21# defines one flash "device" image. A flash device image may be one of
22# the following: Removable media bootable image (like a boot floppy
23# image,) an Option ROM image (that would be "flashed" into an add-in
24# card,) a System "Flash" image (that would be burned into a system's
25# flash) or an Update ("Capsule") image that will be used to update and
26# existing system flash.
27#
28################################################################################
29[FD.Fv_Recovery]
30#
31# In OS X PEIMs are really XIP, so we need to make this address match the malloced
32# buffer for the FD (0x41000000). If this address does not match the FV will get
33# relocated in place (works, but not a great idea).
34#
35BaseAddress = 0x102000000|gInOsEmuPkgTokenSpaceGuid.PcdEmuFdBaseAddress #The base address of the FLASH Device.
36Size = 0x005a0000|gInOsEmuPkgTokenSpaceGuid.PcdEmuFirmwareFdSize #The size in bytes of the FLASH Device
37ErasePolarity = 1
38BlockSize = 0x10000
39NumBlocks = 0x5a
40
41################################################################################
42#
43# Following are lists of FD Region layout which correspond to the locations of different
44# images within the flash device.
45#
46# Regions must be defined in ascending order and may not overlap.
47#
48# A Layout Region start with a eight digit hex offset (leading "0x" required) followed by
49# the pipe "|" character, followed by the size of the region, also in hex with the leading
50# "0x" characters. Like:
51# Offset|Size
52# PcdOffsetCName|PcdSizeCName
53# RegionType <FV, DATA, or FILE>
54#
55################################################################################
560x00000000|0x00580000
57gInOsEmuPkgTokenSpaceGuid.PcdEmuFlashFvRecoveryBase|gInOsEmuPkgTokenSpaceGuid.PcdEmuFlashFvRecoverySize
58FV = FvRecovery
59
600x00580000|0x0000c000
61gInOsEmuPkgTokenSpaceGuid.PcdEmuFlashNvStorageVariableBase|gEfiMdeModulePkgTokenSpaceGuid.PcdFlashNvStorageVariableSize
62#NV_VARIABLE_STORE
63DATA = {
64 ## This is the EFI_FIRMWARE_VOLUME_HEADER
65 # ZeroVector []
66 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
67 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
68 # FileSystemGuid: gEfiSystemNvDataFvGuid =
69 # { 0xFFF12B8D, 0x7696, 0x4C8B, { 0xA9, 0x85, 0x27, 0x47, 0x07, 0x5B, 0x4F, 0x50 }}
70 0x8D, 0x2B, 0xF1, 0xFF, 0x96, 0x76, 0x8B, 0x4C,
71 0xA9, 0x85, 0x27, 0x47, 0x07, 0x5B, 0x4F, 0x50,
72 # FvLength: 0x20000
73 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00,
74 # Signature "_FVH" #Attributes
75 0x5f, 0x46, 0x56, 0x48, 0xff, 0xfe, 0x04, 0x00,
76 # HeaderLength #CheckSum #ExtHeaderOffset #Reserved #Revision
77 0x48, 0x00, 0x36, 0x09, 0x00, 0x00, 0x00, 0x02,
78 # Blockmap[0]: 2 Blocks * 0x10000 Bytes / Block
79 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00,
80 # Blockmap[1]: End
81 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
82 ## This is the VARIABLE_STORE_HEADER
83 #Signature: gEfiVariableGuid =
84 # { 0xddcf3616, 0x3275, 0x4164, { 0x98, 0xb6, 0xfe, 0x85, 0x70, 0x7f, 0xfe, 0x7d }}
85 0x16, 0x36, 0xcf, 0xdd, 0x75, 0x32, 0x64, 0x41,
86 0x98, 0xb6, 0xfe, 0x85, 0x70, 0x7f, 0xfe, 0x7d,
87 #Size: 0xc000 (gEfiMdeModulePkgTokenSpaceGuid.PcdFlashNvStorageVariableSize) - 0x48 (size of EFI_FIRMWARE_VOLUME_HEADER) = 0xBFB8
88 # This can speed up the Variable Dispatch a bit.
89 0xB8, 0xBF, 0x00, 0x00,
90 #FORMATTED: 0x5A #HEALTHY: 0xFE #Reserved: UINT16 #Reserved1: UINT32
91 0x5A, 0xFE, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00
92}
93
940x0058c000|0x00002000
95#NV_EVENT_LOG
96gInOsEmuPkgTokenSpaceGuid.PcdEmuFlashNvStorageEventLogBase|gInOsEmuPkgTokenSpaceGuid.PcdEmuFlashNvStorageEventLogSize
97
980x0058e000|0x00002000
99gInOsEmuPkgTokenSpaceGuid.PcdEmuFlashNvStorageFtwWorkingBase|gEfiMdeModulePkgTokenSpaceGuid.PcdFlashNvStorageFtwWorkingSize
100#NV_FTW_WORKING
101DATA = {
102 # EFI_FAULT_TOLERANT_WORKING_BLOCK_HEADER->Signature = gEfiSystemNvDataFvGuid =
103 # { 0xFFF12B8D, 0x7696, 0x4C8B, { 0xA9, 0x85, 0x27, 0x47, 0x07, 0x5B, 0x4F, 0x50 }}
104 0x8D, 0x2B, 0xF1, 0xFF, 0x96, 0x76, 0x8B, 0x4C,
105 0xA9, 0x85, 0x27, 0x47, 0x07, 0x5B, 0x4F, 0x50,
106 # Crc:UINT32 #WorkingBlockValid:1, WorkingBlockInvalid:1, Reserved
107 0x77, 0x13, 0x9B, 0xD7, 0xFE, 0xFF, 0xFF, 0xFF,
108 # WriteQueueSize: UINT64
109 0xE0, 0x1F, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00
110}
111
1120x00590000|0x00010000
113#NV_FTW_SPARE
114gInOsEmuPkgTokenSpaceGuid.PcdEmuFlashNvStorageFtwSpareBase|gEfiMdeModulePkgTokenSpaceGuid.PcdFlashNvStorageFtwSpareSize
115
116################################################################################
117#
118# FV Section
119#
120# [FV] section is used to define what components or modules are placed within a flash
121# device file. This section also defines order the components and modules are positioned
122# within the image. The [FV] section consists of define statements, set statements and
123# module statements.
124#
125################################################################################
126[FV.FvRecovery]
127FvAlignment = 16 #FV alignment and FV attributes setting.
128ERASE_POLARITY = 1
129MEMORY_MAPPED = TRUE
130STICKY_WRITE = TRUE
131LOCK_CAP = TRUE
132LOCK_STATUS = TRUE
133WRITE_DISABLED_CAP = TRUE
134WRITE_ENABLED_CAP = TRUE
135WRITE_STATUS = TRUE
136WRITE_LOCK_CAP = TRUE
137WRITE_LOCK_STATUS = TRUE
138READ_DISABLED_CAP = TRUE
139READ_ENABLED_CAP = TRUE
140READ_STATUS = TRUE
141READ_LOCK_CAP = TRUE
142READ_LOCK_STATUS = TRUE
143
144################################################################################
145#
146# The INF statements point to EDK component and EDK II module INF files, which will be placed into this FV image.
147# Parsing tools will scan the INF file to determine the type of component or module.
148# The component or module type is used to reference the standard rules
149# defined elsewhere in the FDF file.
150#
151# The format for INF statements is:
152# INF $(PathAndInfFileName)
153#
154################################################################################
155##
156# PEI Phase modules
157##
158##
159# PEI Apriori file example, more PEIM module added later.
160##
161APRIORI PEI {
162 INF MdeModulePkg/Universal/ReportStatusCodeRouter/Pei/ReportStatusCodeRouterPei.inf
163 INF MdeModulePkg/Universal/StatusCodeHandler/Pei/StatusCodeHandlerPei.inf
164 INF MdeModulePkg/Universal/PCD/Pei/Pcd.inf
165 }
166APRIORI DXE {
167 INF MdeModulePkg/Universal/PCD/Dxe/Pcd.inf
168 INF InOsEmuPkg/MetronomeDxe/Metronome.inf
169 }
andrewfish65e3f332011-05-14 16:00:22 +0000170INF InOsEmuPkg/Sec/Sec.inf
andrewfish949f3882011-05-11 18:31:20 +0000171INF MdeModulePkg/Core/Pei/PeiMain.inf
172INF MdeModulePkg/Universal/PCD/Pei/Pcd.inf
173INF MdeModulePkg/Universal/ReportStatusCodeRouter/Pei/ReportStatusCodeRouterPei.inf
174INF MdeModulePkg/Universal/StatusCodeHandler/Pei/StatusCodeHandlerPei.inf
175INF InOsEmuPkg/BootModePei/BootModePei.inf
176INF InOsEmuPkg/AutoScanPei/AutoScanPei.inf
177INF InOsEmuPkg/FirmwareVolumePei/FirmwareVolumePei.inf
178INF InOsEmuPkg/FlashMapPei/FlashMapPei.inf
179INF InOsEmuPkg/ThunkPpiToProtocolPei/ThunkPpiToProtocolPei.inf
180INF MdeModulePkg/Universal/Variable/Pei/VariablePei.inf
181INF MdeModulePkg/Core/DxeIplPeim/DxeIpl.inf
182
183##
184# DXE Phase modules
185##
186INF MdeModulePkg/Core/Dxe/DxeMain.inf
187INF MdeModulePkg/Universal/PCD/Dxe/Pcd.inf
188INF MdeModulePkg/Universal/ReportStatusCodeRouter/RuntimeDxe/ReportStatusCodeRouterRuntimeDxe.inf
189INF MdeModulePkg/Universal/StatusCodeHandler/RuntimeDxe/StatusCodeHandlerRuntimeDxe.inf
190INF InOsEmuPkg/MetronomeDxe/Metronome.inf
191INF InOsEmuPkg/RealTimeClockRuntimeDxe/RealTimeClock.inf
192INF InOsEmuPkg/ResetRuntimeDxe/Reset.inf
193INF MdeModulePkg/Core/RuntimeDxe/RuntimeDxe.inf
194INF InOsEmuPkg/FvbServicesRuntimeDxe/FvbServicesRuntimeDxe.inf
195INF MdeModulePkg/Universal/SecurityStubDxe/SecurityStubDxe.inf
196INF MdeModulePkg/Universal/EbcDxe/EbcDxe.inf
197INF MdeModulePkg/Universal/MemoryTest/NullMemoryTestDxe/NullMemoryTestDxe.inf
198INF InOsEmuPkg/EmuThunkDxe/EmuThunk.inf
199INF InOsEmuPkg/CpuRuntimeDxe/Cpu.inf
200INF MdeModulePkg/Universal/FaultTolerantWriteDxe/FaultTolerantWriteDxe.inf
201INF InOsEmuPkg/MiscSubClassPlatformDxe/MiscSubClassDriver.inf
202INF InOsEmuPkg/TimerDxe/Timer.inf
203INF MdeModulePkg/Universal/Variable/RuntimeDxe/VariableRuntimeDxe.inf
204INF MdeModulePkg/Universal/WatchdogTimerDxe/WatchdogTimer.inf
205INF MdeModulePkg/Universal/MonotonicCounterRuntimeDxe/MonotonicCounterRuntimeDxe.inf
206INF MdeModulePkg/Universal/CapsuleRuntimeDxe/CapsuleRuntimeDxe.inf
207INF MdeModulePkg/Universal/Console/ConPlatformDxe/ConPlatformDxe.inf
208INF MdeModulePkg/Universal/Console/ConSplitterDxe/ConSplitterDxe.inf
209INF MdeModulePkg/Universal/Console/GraphicsConsoleDxe/GraphicsConsoleDxe.inf
210INF MdeModulePkg/Universal/Console/TerminalDxe/TerminalDxe.inf
211INF MdeModulePkg/Universal/DevicePathDxe/DevicePathDxe.inf
212INF MdeModulePkg/Universal/Disk/DiskIoDxe/DiskIoDxe.inf
213INF MdeModulePkg/Universal/Disk/PartitionDxe/PartitionDxe.inf
214INF MdeModulePkg/Universal/Disk/UnicodeCollation/EnglishDxe/EnglishDxe.inf
215INF MdeModulePkg/Bus/Pci/PciBusDxe/PciBusDxe.inf
216INF MdeModulePkg/Bus/Scsi/ScsiBusDxe/ScsiBusDxe.inf
217INF MdeModulePkg/Bus/Scsi/ScsiDiskDxe/ScsiDiskDxe.inf
218INF IntelFrameworkModulePkg/Bus/Pci/IdeBusDxe/IdeBusDxe.inf
219INF MdeModulePkg/Universal/SmbiosDxe/SmbiosDxe.inf
220
221INF InOsEmuPkg/EmuBusDriverDxe/EmuBusDriverDxe.inf
222INF InOsEmuPkg/EmuGopDxe/EmuGopDxe.inf
223INF InOsEmuPkg/EmuSimpleFileSystemDxe/EmuSimpleFileSystemDxe.inf
224
225#INF UnixPkg/UnixBlockIoDxe/UnixBlockIo.inf
226#INF UnixPkg/UnixSerialIoDxe/UnixSerialIo.inf
227INF MdeModulePkg/Universal/HiiDatabaseDxe/HiiDatabaseDxe.inf
228INF MdeModulePkg/Universal/SetupBrowserDxe/SetupBrowserDxe.inf
229INF MdeModulePkg/Universal/PrintDxe/PrintDxe.inf
230INF IntelFrameworkModulePkg/Universal/BdsDxe/BdsDxe.inf
231INF MdeModulePkg/Universal/DriverSampleDxe/DriverSampleDxe.inf
232INF MdeModulePkg/Application/HelloWorld/HelloWorld.inf
233
234#
235# Network stack drivers
236#
237!if $(NETWORK_SUPPORT)
238#INF UnixPkg/UnixSnpDxe/UnixSnpDxe.inf
239!endif
240INF MdeModulePkg/Universal/Network/DpcDxe/DpcDxe.inf
241INF MdeModulePkg/Universal/Network/ArpDxe/ArpDxe.inf
242INF MdeModulePkg/Universal/Network/Dhcp4Dxe/Dhcp4Dxe.inf
243INF MdeModulePkg/Universal/Network/Ip4ConfigDxe/Ip4ConfigDxe.inf
244INF MdeModulePkg/Universal/Network/Ip4Dxe/Ip4Dxe.inf
245INF MdeModulePkg/Universal/Network/MnpDxe/MnpDxe.inf
246INF MdeModulePkg/Universal/Network/VlanConfigDxe/VlanConfigDxe.inf
247INF MdeModulePkg/Universal/Network/Mtftp4Dxe/Mtftp4Dxe.inf
248INF MdeModulePkg/Universal/Network/Tcp4Dxe/Tcp4Dxe.inf
249INF MdeModulePkg/Universal/Network/Udp4Dxe/Udp4Dxe.inf
250
251
252!if $(COMPILE_BINS)
253INF FatPkg/EnhancedFatDxe/Fat.inf
254!else
255# Used checked in Visual Studio binaries
256INF RuleOverride = BINARY USE = X64 FatBinPkg/EnhancedFatDxe/Fat.inf
257!endif
258
259 FILE APPLICATION = PCD(gEfiIntelFrameworkModulePkgTokenSpaceGuid.PcdShellFile) {
260# SECTION PE32 = ShellBinPkg/UefiShell/X64/Shell.efi
261 SECTION PE32 = Build/GccShellPkg/DEBUG_XCLANG/X64/ShellFull.efi
262 SECTION UI = "Shell"
263 }
264
265FILE FREEFORM = PCD(gEfiIntelFrameworkModulePkgTokenSpaceGuid.PcdLogoFile) {
266 SECTION RAW = MdeModulePkg/Logo/Logo.bmp
267}
268
269
270################################################################################
271#
272# Rules are use with the [FV] section's module INF type to define
273# how an FFS file is created for a given INF file. The following Rule are the default
274# rules for the different module type. User can add the customized rules to define the
275# content of the FFS file.
276#
277################################################################################
278
279
280############################################################################
281# Example of a DXE_DRIVER FFS file with a Checksum encapsulation section #
282############################################################################
283#
284#[Rule.Common.DXE_DRIVER]
285# FILE DRIVER = $(NAMED_GUID) {
286# DXE_DEPEX DXE_DEPEX Optional $(INF_OUTPUT)/$(MODULE_NAME).depex
287# COMPRESS PI_STD {
288# GUIDED {
289# PE32 PE32 $(INF_OUTPUT)/$(MODULE_NAME).efi
290# UI STRING="$(MODULE_NAME)" Optional
291# VERSION STRING="$(INF_VERSION)" Optional BUILD_NUM=$(BUILD_NUMBER)
292# }
293# }
294# }
295#
296############################################################################
andrewfish65e3f332011-05-14 16:00:22 +0000297[Rule.Common.SEC]
298 FILE SEC = $(NAMED_GUID) {
299 PE32 PE32 Align=32 $(INF_OUTPUT)/$(MODULE_NAME).efi
300 UI STRING ="$(MODULE_NAME)" Optional
301 VERSION STRING ="$(INF_VERSION)" Optional BUILD_NUM=$(BUILD_NUMBER)
302 }
303
andrewfish949f3882011-05-11 18:31:20 +0000304
305[Rule.Common.PEI_CORE]
306 FILE PEI_CORE = $(NAMED_GUID) {
307 PE32 PE32 Align=32 $(INF_OUTPUT)/$(MODULE_NAME).efi
308 UI STRING ="$(MODULE_NAME)" Optional
309 VERSION STRING ="$(INF_VERSION)" Optional BUILD_NUM=$(BUILD_NUMBER)
310 }
311
312[Rule.Common.PEIM]
313 FILE PEIM = $(NAMED_GUID) {
314 PEI_DEPEX PEI_DEPEX Optional $(INF_OUTPUT)/$(MODULE_NAME).depex
315 PE32 PE32 Align=32 $(INF_OUTPUT)/$(MODULE_NAME).efi
316 UI STRING="$(MODULE_NAME)" Optional
317 VERSION STRING="$(INF_VERSION)" Optional BUILD_NUM=$(BUILD_NUMBER)
318 }
319
320[Rule.Common.DXE_CORE]
321 FILE DXE_CORE = $(NAMED_GUID) {
322 COMPRESS PI_STD {
323 PE32 PE32 $(INF_OUTPUT)/$(MODULE_NAME).efi
324 UI STRING="$(MODULE_NAME)" Optional
325 VERSION STRING="$(INF_VERSION)" Optional BUILD_NUM=$(BUILD_NUMBER)
326 }
327 }
328
329[Rule.Common.UEFI_DRIVER]
330 FILE DRIVER = $(NAMED_GUID) {
331 DXE_DEPEX DXE_DEPEX Optional $(INF_OUTPUT)/$(MODULE_NAME).depex
332 COMPRESS PI_STD {
333 GUIDED {
334 PE32 PE32 $(INF_OUTPUT)/$(MODULE_NAME).efi
335 UI STRING="$(MODULE_NAME)" Optional
336 VERSION STRING="$(INF_VERSION)" Optional BUILD_NUM=$(BUILD_NUMBER)
337 }
338 }
339 }
340
341[Rule.Common.DXE_DRIVER]
342 FILE DRIVER = $(NAMED_GUID) {
343 DXE_DEPEX DXE_DEPEX Optional $(INF_OUTPUT)/$(MODULE_NAME).depex
344 COMPRESS PI_STD {
345 GUIDED {
346 PE32 PE32 $(INF_OUTPUT)/$(MODULE_NAME).efi
347 UI STRING="$(MODULE_NAME)" Optional
348 VERSION STRING="$(INF_VERSION)" Optional BUILD_NUM=$(BUILD_NUMBER)
349 }
350 }
351 }
352
353[Rule.Common.DXE_RUNTIME_DRIVER]
354 FILE DRIVER = $(NAMED_GUID) {
355 DXE_DEPEX DXE_DEPEX Optional $(INF_OUTPUT)/$(MODULE_NAME).depex
356 COMPRESS PI_STD {
357 GUIDED {
358 PE32 PE32 $(INF_OUTPUT)/$(MODULE_NAME).efi
359 UI STRING="$(MODULE_NAME)" Optional
360 VERSION STRING="$(INF_VERSION)" Optional BUILD_NUM=$(BUILD_NUMBER)
361 }
362 }
363 }
364
365[Rule.Common.UEFI_APPLICATION]
366 FILE APPLICATION = $(NAMED_GUID) {
367 COMPRESS PI_STD {
368 GUIDED {
369 PE32 PE32 $(INF_OUTPUT)/$(MODULE_NAME).efi
370 UI STRING="$(MODULE_NAME)" Optional
371 VERSION STRING="$(INF_VERSION)" Optional BUILD_NUM=$(BUILD_NUMBER)
372 }
373 }
374 }
375
376[Rule.Common.UEFI_DRIVER.BINARY]
377 FILE DRIVER = $(NAMED_GUID) {
378 DXE_DEPEX DXE_DEPEX Optional |.depex
379 PE32 PE32 |.efi
380 UI STRING="$(MODULE_NAME)" Optional
381 VERSION STRING="$(INF_VERSION)" Optional BUILD_NUM=$(BUILD_NUMBER)
382 }
383
384[Rule.Common.UEFI_APPLICATION.BINARY]
385 FILE APPLICATION = $(NAMED_GUID) {
386 PE32 PE32 |.efi
387 UI STRING="$(MODULE_NAME)" Optional
388 VERSION STRING="$(INF_VERSION)" Optional BUILD_NUM=$(BUILD_NUMBER)
389 }
390