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