1## @file 2# This is Emulator FDF file with UEFI HII features enabled 3# 4# Copyright (c) 2008 - 2015, 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[FD.Fv_Recovery] 17# 18# In OS X PEIMs are really XIP, so we need to make this address match the malloced 19# buffer for the FD (0x41000000). If this address does not match the FV will get 20# relocated in place (works, but not a great idea). 21# 22BaseAddress = 0x102000000|gEmulatorPkgTokenSpaceGuid.PcdEmuFdBaseAddress #The base address of the FLASH Device. 23Size = 0x005a0000|gEmulatorPkgTokenSpaceGuid.PcdEmuFirmwareFdSize #The size in bytes of the FLASH Device 24ErasePolarity = 1 25BlockSize = 0x10000 26NumBlocks = 0x5a 27 280x00000000|0x00580000 29gEmulatorPkgTokenSpaceGuid.PcdEmuFlashFvRecoveryBase|gEmulatorPkgTokenSpaceGuid.PcdEmuFlashFvRecoverySize 30FV = FvRecovery 31 320x00580000|0x0000c000 33gEmulatorPkgTokenSpaceGuid.PcdEmuFlashNvStorageVariableBase|gEfiMdeModulePkgTokenSpaceGuid.PcdFlashNvStorageVariableSize 34#NV_VARIABLE_STORE 35DATA = { 36 ## This is the EFI_FIRMWARE_VOLUME_HEADER 37 # ZeroVector [] 38 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 39 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 40 # FileSystemGuid: gEfiSystemNvDataFvGuid = 41 # { 0xFFF12B8D, 0x7696, 0x4C8B, { 0xA9, 0x85, 0x27, 0x47, 0x07, 0x5B, 0x4F, 0x50 }} 42 0x8D, 0x2B, 0xF1, 0xFF, 0x96, 0x76, 0x8B, 0x4C, 43 0xA9, 0x85, 0x27, 0x47, 0x07, 0x5B, 0x4F, 0x50, 44 # FvLength: 0x20000 45 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 46 # Signature "_FVH" #Attributes 47 0x5f, 0x46, 0x56, 0x48, 0xff, 0xfe, 0x04, 0x00, 48 # HeaderLength #CheckSum #ExtHeaderOffset #Reserved #Revision 49 0x48, 0x00, 0x36, 0x09, 0x00, 0x00, 0x00, 0x02, 50 # Blockmap[0]: 2 Blocks * 0x10000 Bytes / Block 51 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 52 # Blockmap[1]: End 53 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 54 ## This is the VARIABLE_STORE_HEADER 55 #Signature: gEfiVariableGuid = 56 # { 0xddcf3616, 0x3275, 0x4164, { 0x98, 0xb6, 0xfe, 0x85, 0x70, 0x7f, 0xfe, 0x7d }} 57 0x16, 0x36, 0xcf, 0xdd, 0x75, 0x32, 0x64, 0x41, 58 0x98, 0xb6, 0xfe, 0x85, 0x70, 0x7f, 0xfe, 0x7d, 59 #Size: 0xc000 (gEfiMdeModulePkgTokenSpaceGuid.PcdFlashNvStorageVariableSize) - 0x48 (size of EFI_FIRMWARE_VOLUME_HEADER) = 0xBFB8 60 # This can speed up the Variable Dispatch a bit. 61 0xB8, 0xBF, 0x00, 0x00, 62 #FORMATTED: 0x5A #HEALTHY: 0xFE #Reserved: UINT16 #Reserved1: UINT32 63 0x5A, 0xFE, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 64} 65 660x0058c000|0x00002000 67#NV_EVENT_LOG 68gEmulatorPkgTokenSpaceGuid.PcdEmuFlashNvStorageEventLogBase|gEmulatorPkgTokenSpaceGuid.PcdEmuFlashNvStorageEventLogSize 69 700x0058e000|0x00002000 71gEmulatorPkgTokenSpaceGuid.PcdEmuFlashNvStorageFtwWorkingBase|gEfiMdeModulePkgTokenSpaceGuid.PcdFlashNvStorageFtwWorkingSize 72#NV_FTW_WORKING 73DATA = { 74 # EFI_FAULT_TOLERANT_WORKING_BLOCK_HEADER->Signature = gEdkiiWorkingBlockSignatureGuid = 75 # { 0x9e58292b, 0x7c68, 0x497d, { 0xa0, 0xce, 0x65, 0x0, 0xfd, 0x9f, 0x1b, 0x95 }} 76 0x2b, 0x29, 0x58, 0x9e, 0x68, 0x7c, 0x7d, 0x49, 77 0xa0, 0xce, 0x65, 0x0, 0xfd, 0x9f, 0x1b, 0x95, 78 # Crc:UINT32 #WorkingBlockValid:1, WorkingBlockInvalid:1, Reserved 79 0xE2, 0x33, 0xF2, 0x03, 0xFE, 0xFF, 0xFF, 0xFF, 80 # WriteQueueSize: UINT64 81 0xE0, 0x1F, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 82} 83 840x00590000|0x00010000 85#NV_FTW_SPARE 86gEmulatorPkgTokenSpaceGuid.PcdEmuFlashNvStorageFtwSpareBase|gEfiMdeModulePkgTokenSpaceGuid.PcdFlashNvStorageFtwSpareSize 87 88[FV.FvRecovery] 89FvAlignment = 16 #FV alignment and FV attributes setting. 90ERASE_POLARITY = 1 91MEMORY_MAPPED = TRUE 92STICKY_WRITE = TRUE 93LOCK_CAP = TRUE 94LOCK_STATUS = TRUE 95WRITE_DISABLED_CAP = TRUE 96WRITE_ENABLED_CAP = TRUE 97WRITE_STATUS = TRUE 98WRITE_LOCK_CAP = TRUE 99WRITE_LOCK_STATUS = TRUE 100READ_DISABLED_CAP = TRUE 101READ_ENABLED_CAP = TRUE 102READ_STATUS = TRUE 103READ_LOCK_CAP = TRUE 104READ_LOCK_STATUS = TRUE 105 106# 107# PEI Phase modules 108# 109 110# 111# PEI Apriori file example, more PEIM module added later. 112# 113APRIORI PEI { 114 INF MdeModulePkg/Universal/ReportStatusCodeRouter/Pei/ReportStatusCodeRouterPei.inf 115 INF MdeModulePkg/Universal/StatusCodeHandler/Pei/StatusCodeHandlerPei.inf 116 INF MdeModulePkg/Universal/PCD/Pei/Pcd.inf 117 } 118APRIORI DXE { 119 INF MdeModulePkg/Universal/PCD/Dxe/Pcd.inf 120 INF MdeModulePkg/Universal/Metronome/Metronome.inf 121 } 122INF EmulatorPkg/Sec/Sec.inf 123INF MdeModulePkg/Core/Pei/PeiMain.inf 124INF MdeModulePkg/Universal/PCD/Pei/Pcd.inf 125INF MdeModulePkg/Universal/ReportStatusCodeRouter/Pei/ReportStatusCodeRouterPei.inf 126INF MdeModulePkg/Universal/StatusCodeHandler/Pei/StatusCodeHandlerPei.inf 127INF EmulatorPkg/BootModePei/BootModePei.inf 128INF EmulatorPkg/AutoScanPei/AutoScanPei.inf 129INF EmulatorPkg/FirmwareVolumePei/FirmwareVolumePei.inf 130INF EmulatorPkg/FlashMapPei/FlashMapPei.inf 131INF EmulatorPkg/ThunkPpiToProtocolPei/ThunkPpiToProtocolPei.inf 132INF MdeModulePkg/Universal/FaultTolerantWritePei/FaultTolerantWritePei.inf 133INF MdeModulePkg/Universal/Variable/Pei/VariablePei.inf 134INF MdeModulePkg/Core/DxeIplPeim/DxeIpl.inf 135 136# 137# DXE Phase modules 138# 139INF MdeModulePkg/Core/Dxe/DxeMain.inf 140INF MdeModulePkg/Universal/PCD/Dxe/Pcd.inf 141INF MdeModulePkg/Universal/ReportStatusCodeRouter/RuntimeDxe/ReportStatusCodeRouterRuntimeDxe.inf 142INF MdeModulePkg/Universal/StatusCodeHandler/RuntimeDxe/StatusCodeHandlerRuntimeDxe.inf 143INF MdeModulePkg/Universal/Metronome/Metronome.inf 144INF EmulatorPkg/RealTimeClockRuntimeDxe/RealTimeClock.inf 145INF EmulatorPkg/ResetRuntimeDxe/Reset.inf 146INF MdeModulePkg/Core/RuntimeDxe/RuntimeDxe.inf 147INF EmulatorPkg/FvbServicesRuntimeDxe/FvbServicesRuntimeDxe.inf 148INF MdeModulePkg/Universal/SecurityStubDxe/SecurityStubDxe.inf 149INF MdeModulePkg/Universal/EbcDxe/EbcDxe.inf 150INF MdeModulePkg/Universal/MemoryTest/NullMemoryTestDxe/NullMemoryTestDxe.inf 151INF EmulatorPkg/EmuThunkDxe/EmuThunk.inf 152INF EmulatorPkg/CpuRuntimeDxe/Cpu.inf 153INF MdeModulePkg/Universal/FaultTolerantWriteDxe/FaultTolerantWriteDxe.inf 154INF EmulatorPkg/PlatformSmbiosDxe/PlatformSmbiosDxe.inf 155INF EmulatorPkg/TimerDxe/Timer.inf 156INF MdeModulePkg/Universal/Variable/RuntimeDxe/VariableRuntimeDxe.inf 157INF MdeModulePkg/Universal/WatchdogTimerDxe/WatchdogTimer.inf 158INF MdeModulePkg/Universal/MonotonicCounterRuntimeDxe/MonotonicCounterRuntimeDxe.inf 159INF MdeModulePkg/Universal/CapsuleRuntimeDxe/CapsuleRuntimeDxe.inf 160INF MdeModulePkg/Universal/Console/ConPlatformDxe/ConPlatformDxe.inf 161INF MdeModulePkg/Universal/Console/ConSplitterDxe/ConSplitterDxe.inf 162INF MdeModulePkg/Universal/Console/GraphicsConsoleDxe/GraphicsConsoleDxe.inf 163 164INF MdeModulePkg/Universal/SerialDxe/SerialDxe.inf 165INF MdeModulePkg/Universal/Console/TerminalDxe/TerminalDxe.inf 166INF MdeModulePkg/Universal/DevicePathDxe/DevicePathDxe.inf 167INF MdeModulePkg/Universal/Disk/DiskIoDxe/DiskIoDxe.inf 168INF MdeModulePkg/Universal/Disk/PartitionDxe/PartitionDxe.inf 169INF MdeModulePkg/Universal/Disk/UnicodeCollation/EnglishDxe/EnglishDxe.inf 170INF MdeModulePkg/Bus/Pci/PciBusDxe/PciBusDxe.inf 171INF MdeModulePkg/Bus/Scsi/ScsiBusDxe/ScsiBusDxe.inf 172INF MdeModulePkg/Bus/Scsi/ScsiDiskDxe/ScsiDiskDxe.inf 173INF IntelFrameworkModulePkg/Bus/Pci/IdeBusDxe/IdeBusDxe.inf 174INF MdeModulePkg/Universal/SmbiosDxe/SmbiosDxe.inf 175 176INF EmulatorPkg/EmuBusDriverDxe/EmuBusDriverDxe.inf 177INF EmulatorPkg/EmuGopDxe/EmuGopDxe.inf 178INF EmulatorPkg/EmuSimpleFileSystemDxe/EmuSimpleFileSystemDxe.inf 179INF EmulatorPkg/EmuBlockIoDxe/EmuBlockIoDxe.inf 180INF EmulatorPkg/EmuSnpDxe/EmuSnpDxe.inf 181 182INF MdeModulePkg/Universal/HiiDatabaseDxe/HiiDatabaseDxe.inf 183INF MdeModulePkg/Universal/DisplayEngineDxe/DisplayEngineDxe.inf 184INF MdeModulePkg/Universal/SetupBrowserDxe/SetupBrowserDxe.inf 185INF MdeModulePkg/Universal/PrintDxe/PrintDxe.inf 186INF IntelFrameworkModulePkg/Universal/BdsDxe/BdsDxe.inf 187INF MdeModulePkg/Universal/DriverSampleDxe/DriverSampleDxe.inf 188INF MdeModulePkg/Application/HelloWorld/HelloWorld.inf 189 190# 191# Network stack drivers 192# 193!if $(NETWORK_SUPPORT) 194INF EmulatorPkg/EmuSnpDxe/EmuSnpDxe.inf 195!endif 196INF MdeModulePkg/Universal/Network/DpcDxe/DpcDxe.inf 197INF MdeModulePkg/Universal/Network/ArpDxe/ArpDxe.inf 198INF MdeModulePkg/Universal/Network/Dhcp4Dxe/Dhcp4Dxe.inf 199INF MdeModulePkg/Universal/Network/Ip4Dxe/Ip4Dxe.inf 200INF MdeModulePkg/Universal/Network/MnpDxe/MnpDxe.inf 201INF MdeModulePkg/Universal/Network/VlanConfigDxe/VlanConfigDxe.inf 202INF MdeModulePkg/Universal/Network/Mtftp4Dxe/Mtftp4Dxe.inf 203INF MdeModulePkg/Universal/Network/Tcp4Dxe/Tcp4Dxe.inf 204INF MdeModulePkg/Universal/Network/Udp4Dxe/Udp4Dxe.inf 205 206INF FatPkg/EnhancedFatDxe/Fat.inf 207 208!ifndef $(USE_OLD_SHELL) 209INF ShellPkg/Application/Shell/Shell.inf 210!else 211INF RuleOverride = BINARY EdkShellBinPkg/FullShell/FullShell.inf 212!endif 213 214FILE FREEFORM = PCD(gEfiIntelFrameworkModulePkgTokenSpaceGuid.PcdLogoFile) { 215 SECTION RAW = MdeModulePkg/Logo/Logo.bmp 216} 217 218 219[Rule.Common.SEC] 220 FILE SEC = $(NAMED_GUID) { 221 PE32 PE32 Align=Auto $(INF_OUTPUT)/$(MODULE_NAME).efi 222 UI STRING ="$(MODULE_NAME)" Optional 223 VERSION STRING ="$(INF_VERSION)" Optional BUILD_NUM=$(BUILD_NUMBER) 224 } 225 226 227[Rule.Common.PEI_CORE] 228 FILE PEI_CORE = $(NAMED_GUID) { 229 PE32 PE32 Align=Auto $(INF_OUTPUT)/$(MODULE_NAME).efi 230 UI STRING ="$(MODULE_NAME)" Optional 231 VERSION STRING ="$(INF_VERSION)" Optional BUILD_NUM=$(BUILD_NUMBER) 232 } 233 234[Rule.Common.PEIM] 235 FILE PEIM = $(NAMED_GUID) { 236 PEI_DEPEX PEI_DEPEX Optional $(INF_OUTPUT)/$(MODULE_NAME).depex 237 PE32 PE32 Align=Auto $(INF_OUTPUT)/$(MODULE_NAME).efi 238 UI STRING="$(MODULE_NAME)" Optional 239 VERSION STRING="$(INF_VERSION)" Optional BUILD_NUM=$(BUILD_NUMBER) 240 } 241 242[Rule.Common.DXE_CORE] 243 FILE DXE_CORE = $(NAMED_GUID) { 244 COMPRESS PI_STD { 245 PE32 PE32 $(INF_OUTPUT)/$(MODULE_NAME).efi 246 UI STRING="$(MODULE_NAME)" Optional 247 VERSION STRING="$(INF_VERSION)" Optional BUILD_NUM=$(BUILD_NUMBER) 248 } 249 } 250 251[Rule.Common.UEFI_DRIVER] 252 FILE DRIVER = $(NAMED_GUID) { 253 DXE_DEPEX DXE_DEPEX Optional $(INF_OUTPUT)/$(MODULE_NAME).depex 254 COMPRESS PI_STD { 255 GUIDED { 256 PE32 PE32 $(INF_OUTPUT)/$(MODULE_NAME).efi 257 UI STRING="$(MODULE_NAME)" Optional 258 VERSION STRING="$(INF_VERSION)" Optional BUILD_NUM=$(BUILD_NUMBER) 259 } 260 } 261 } 262 263[Rule.Common.DXE_DRIVER] 264 FILE DRIVER = $(NAMED_GUID) { 265 DXE_DEPEX DXE_DEPEX Optional $(INF_OUTPUT)/$(MODULE_NAME).depex 266 COMPRESS PI_STD { 267 GUIDED { 268 PE32 PE32 $(INF_OUTPUT)/$(MODULE_NAME).efi 269 UI STRING="$(MODULE_NAME)" Optional 270 VERSION STRING="$(INF_VERSION)" Optional BUILD_NUM=$(BUILD_NUMBER) 271 } 272 } 273 } 274 275[Rule.Common.DXE_RUNTIME_DRIVER] 276 FILE DRIVER = $(NAMED_GUID) { 277 DXE_DEPEX DXE_DEPEX Optional $(INF_OUTPUT)/$(MODULE_NAME).depex 278 COMPRESS PI_STD { 279 GUIDED { 280 PE32 PE32 $(INF_OUTPUT)/$(MODULE_NAME).efi 281 UI STRING="$(MODULE_NAME)" Optional 282 VERSION STRING="$(INF_VERSION)" Optional BUILD_NUM=$(BUILD_NUMBER) 283 } 284 } 285 } 286 287[Rule.Common.UEFI_APPLICATION] 288 FILE APPLICATION = $(NAMED_GUID) { 289 COMPRESS PI_STD { 290 GUIDED { 291 PE32 PE32 $(INF_OUTPUT)/$(MODULE_NAME).efi 292 UI STRING="$(MODULE_NAME)" Optional 293 VERSION STRING="$(INF_VERSION)" Optional BUILD_NUM=$(BUILD_NUMBER) 294 } 295 } 296 } 297 298[Rule.Common.UEFI_DRIVER.BINARY] 299 FILE DRIVER = $(NAMED_GUID) { 300 DXE_DEPEX DXE_DEPEX Optional |.depex 301 PE32 PE32 |.efi 302 UI STRING="$(MODULE_NAME)" Optional 303 VERSION STRING="$(INF_VERSION)" Optional BUILD_NUM=$(BUILD_NUMBER) 304 } 305 306[Rule.Common.UEFI_APPLICATION.BINARY] 307 FILE APPLICATION = $(NAMED_GUID) { 308 PE32 PE32 |.efi 309 UI STRING="$(MODULE_NAME)" Optional 310 VERSION STRING="$(INF_VERSION)" Optional BUILD_NUM=$(BUILD_NUMBER) 311 } 312 313