2 # Open Virtual Machine Firmware: FDF
4 # Copyright (c) 2006 - 2019, Intel Corporation. All rights reserved.<BR>
5 # (C) Copyright 2016 Hewlett Packard Enterprise Development LP<BR>
7 # SPDX-License-Identifier: BSD-2-Clause-Patent
11 ################################################################################
14 !include OvmfPkg/Include/Fdf/OvmfPkgDefines.fdf.inc
17 # Build the variable store and the firmware code as one unified flash device
21 BaseAddress = $(FW_BASE_ADDRESS)
24 BlockSize = $(BLOCK_SIZE)
25 NumBlocks = $(FW_BLOCKS)
27 !include OvmfPkg/Include/Fdf/VarStore.fdf.inc
29 $(VARS_SIZE)|$(FVMAIN_SIZE)
32 $(SECFV_OFFSET)|$(SECFV_SIZE)
36 # Build the variable store and the firmware code as separate flash device
40 BaseAddress = $(FW_BASE_ADDRESS)
43 BlockSize = $(BLOCK_SIZE)
44 NumBlocks = $(VARS_BLOCKS)
46 !include OvmfPkg/Include/Fdf/VarStore.fdf.inc
49 BaseAddress = $(CODE_BASE_ADDRESS)
52 BlockSize = $(BLOCK_SIZE)
53 NumBlocks = $(CODE_BLOCKS)
55 0x00000000|$(FVMAIN_SIZE)
58 $(FVMAIN_SIZE)|$(SECFV_SIZE)
61 ################################################################################
64 BaseAddress = $(MEMFD_BASE_ADDRESS)
71 gUefiOvmfPkgTokenSpaceGuid.PcdOvmfSecPageTablesBase|gUefiOvmfPkgTokenSpaceGuid.PcdOvmfSecPageTablesSize
74 gUefiOvmfPkgTokenSpaceGuid.PcdOvmfLockBoxStorageBase|gUefiOvmfPkgTokenSpaceGuid.PcdOvmfLockBoxStorageSize
77 gEfiMdePkgTokenSpaceGuid.PcdGuidedExtractHandlerTableAddress|gUefiOvmfPkgTokenSpaceGuid.PcdGuidedExtractHandlerTableSize
80 gUefiOvmfPkgTokenSpaceGuid.PcdOvmfWorkAreaBase|gUefiOvmfPkgTokenSpaceGuid.PcdOvmfWorkAreaSize
83 gUefiOvmfPkgTokenSpaceGuid.PcdOvmfSecPeiTempRamBase|gUefiOvmfPkgTokenSpaceGuid.PcdOvmfSecPeiTempRamSize
86 gUefiOvmfPkgTokenSpaceGuid.PcdOvmfPeiMemFvBase|gUefiOvmfPkgTokenSpaceGuid.PcdOvmfPeiMemFvSize
90 gUefiOvmfPkgTokenSpaceGuid.PcdOvmfDxeMemFvBase|gUefiOvmfPkgTokenSpaceGuid.PcdOvmfDxeMemFvSize
93 ##########################################################################################
94 # Set the SEV-ES specific work area PCDs (used for all forms of SEV since the
95 # the SEV STATUS MSR is now saved in the work area)
97 SET gUefiCpuPkgTokenSpaceGuid.PcdSevEsWorkAreaBase = $(MEMFD_BASE_ADDRESS) + gUefiOvmfPkgTokenSpaceGuid.PcdOvmfWorkAreaBase + gUefiOvmfPkgTokenSpaceGuid.PcdOvmfConfidentialComputingWorkAreaHeader
98 SET gUefiCpuPkgTokenSpaceGuid.PcdSevEsWorkAreaSize = gUefiOvmfPkgTokenSpaceGuid.PcdOvmfWorkAreaSize - gUefiOvmfPkgTokenSpaceGuid.PcdOvmfConfidentialComputingWorkAreaHeader
99 ##########################################################################################
101 ################################################################################
104 FvNameGuid = 763BED0D-DE9F-48F5-81F1-3E90E1B1A015
112 WRITE_DISABLED_CAP = TRUE
113 WRITE_ENABLED_CAP = TRUE
115 WRITE_LOCK_CAP = TRUE
116 WRITE_LOCK_STATUS = TRUE
117 READ_DISABLED_CAP = TRUE
118 READ_ENABLED_CAP = TRUE
121 READ_LOCK_STATUS = TRUE
126 # The code in this FV handles the initial firmware startup, and
127 # decompresses the PEI and DXE FVs which handles the rest of the boot sequence.
129 INF OvmfPkg/Sec/SecMain.inf
131 INF RuleOverride=RESET_VECTOR OvmfPkg/ResetVector/ResetVector.inf
133 ################################################################################
135 FvNameGuid = 6938079B-B503-4E3D-9D24-B28337A25806
143 WRITE_DISABLED_CAP = TRUE
144 WRITE_ENABLED_CAP = TRUE
146 WRITE_LOCK_CAP = TRUE
147 WRITE_LOCK_STATUS = TRUE
148 READ_DISABLED_CAP = TRUE
149 READ_ENABLED_CAP = TRUE
152 READ_LOCK_STATUS = TRUE
155 INF MdeModulePkg/Universal/PCD/Pei/Pcd.inf
161 INF MdeModulePkg/Core/Pei/PeiMain.inf
162 INF MdeModulePkg/Universal/PCD/Pei/Pcd.inf
163 INF MdeModulePkg/Universal/ReportStatusCodeRouter/Pei/ReportStatusCodeRouterPei.inf
164 INF MdeModulePkg/Universal/StatusCodeHandler/Pei/StatusCodeHandlerPei.inf
165 INF OvmfPkg/PlatformPei/PlatformPei.inf
166 INF MdeModulePkg/Core/DxeIplPeim/DxeIpl.inf
167 INF UefiCpuPkg/Universal/Acpi/S3Resume2Pei/S3Resume2Pei.inf
168 !if $(SMM_REQUIRE) == TRUE
169 INF MdeModulePkg/Universal/FaultTolerantWritePei/FaultTolerantWritePei.inf
170 INF MdeModulePkg/Universal/Variable/Pei/VariablePei.inf
171 INF OvmfPkg/SmmAccess/SmmAccessPei.inf
173 INF UefiCpuPkg/CpuMpPei/CpuMpPei.inf
175 !include OvmfPkg/OvmfTpmPei.fdf.inc
177 ################################################################################
180 FvForceRebase = FALSE
181 FvNameGuid = 7CB8BDC9-F8EB-4F34-AAEA-3EE4AF6516A1
189 WRITE_DISABLED_CAP = TRUE
190 WRITE_ENABLED_CAP = TRUE
192 WRITE_LOCK_CAP = TRUE
193 WRITE_LOCK_STATUS = TRUE
194 READ_DISABLED_CAP = TRUE
195 READ_ENABLED_CAP = TRUE
198 READ_LOCK_STATUS = TRUE
201 INF MdeModulePkg/Universal/DevicePathDxe/DevicePathDxe.inf
202 INF MdeModulePkg/Universal/PCD/Dxe/Pcd.inf
203 !if $(SMM_REQUIRE) == FALSE
204 INF OvmfPkg/QemuFlashFvbServicesRuntimeDxe/FvbServicesRuntimeDxe.inf
211 INF MdeModulePkg/Core/Dxe/DxeMain.inf
213 INF MdeModulePkg/Universal/ReportStatusCodeRouter/RuntimeDxe/ReportStatusCodeRouterRuntimeDxe.inf
214 INF MdeModulePkg/Universal/StatusCodeHandler/RuntimeDxe/StatusCodeHandlerRuntimeDxe.inf
215 INF MdeModulePkg/Universal/PCD/Dxe/Pcd.inf
217 INF MdeModulePkg/Core/RuntimeDxe/RuntimeDxe.inf
218 INF MdeModulePkg/Universal/SecurityStubDxe/SecurityStubDxe.inf
219 INF MdeModulePkg/Universal/EbcDxe/EbcDxe.inf
220 INF UefiCpuPkg/CpuIo2Dxe/CpuIo2Dxe.inf
221 INF UefiCpuPkg/CpuDxe/CpuDxe.inf
223 INF OvmfPkg/8259InterruptControllerDxe/8259.inf
224 INF OvmfPkg/8254TimerDxe/8254Timer.inf
226 INF OvmfPkg/LocalApicTimerDxe/LocalApicTimerDxe.inf
228 INF OvmfPkg/IncompatiblePciDeviceSupportDxe/IncompatiblePciDeviceSupport.inf
229 INF OvmfPkg/PciHotPlugInitDxe/PciHotPlugInit.inf
230 INF MdeModulePkg/Bus/Pci/PciHostBridgeDxe/PciHostBridgeDxe.inf
231 INF MdeModulePkg/Bus/Pci/PciBusDxe/PciBusDxe.inf
232 INF MdeModulePkg/Universal/ResetSystemRuntimeDxe/ResetSystemRuntimeDxe.inf
233 INF MdeModulePkg/Universal/Metronome/Metronome.inf
234 INF PcAtChipsetPkg/PcatRealTimeClockRuntimeDxe/PcatRealTimeClockRuntimeDxe.inf
236 INF OvmfPkg/VirtioPciDeviceDxe/VirtioPciDeviceDxe.inf
237 INF OvmfPkg/Virtio10Dxe/Virtio10.inf
238 INF OvmfPkg/VirtioBlkDxe/VirtioBlk.inf
239 INF OvmfPkg/VirtioScsiDxe/VirtioScsi.inf
240 INF OvmfPkg/VirtioRngDxe/VirtioRng.inf
241 !if $(PVSCSI_ENABLE) == TRUE
242 INF OvmfPkg/PvScsiDxe/PvScsiDxe.inf
244 !if $(MPT_SCSI_ENABLE) == TRUE
245 INF OvmfPkg/MptScsiDxe/MptScsiDxe.inf
247 !if $(LSI_SCSI_ENABLE) == TRUE
248 INF OvmfPkg/LsiScsiDxe/LsiScsiDxe.inf
251 !if $(SECURE_BOOT_ENABLE) == TRUE
252 INF SecurityPkg/VariableAuthenticated/SecureBootConfigDxe/SecureBootConfigDxe.inf
255 INF MdeModulePkg/Universal/WatchdogTimerDxe/WatchdogTimer.inf
256 INF MdeModulePkg/Universal/MonotonicCounterRuntimeDxe/MonotonicCounterRuntimeDxe.inf
257 INF MdeModulePkg/Universal/CapsuleRuntimeDxe/CapsuleRuntimeDxe.inf
258 INF MdeModulePkg/Universal/Console/ConPlatformDxe/ConPlatformDxe.inf
259 INF MdeModulePkg/Universal/Console/ConSplitterDxe/ConSplitterDxe.inf
260 INF MdeModulePkg/Universal/Console/GraphicsConsoleDxe/GraphicsConsoleDxe.inf
261 INF MdeModulePkg/Universal/Console/TerminalDxe/TerminalDxe.inf
262 INF MdeModulePkg/Universal/DriverHealthManagerDxe/DriverHealthManagerDxe.inf
263 INF MdeModulePkg/Universal/BdsDxe/BdsDxe.inf
264 INF MdeModulePkg/Application/UiApp/UiApp.inf
265 INF OvmfPkg/QemuKernelLoaderFsDxe/QemuKernelLoaderFsDxe.inf
266 INF MdeModulePkg/Universal/DevicePathDxe/DevicePathDxe.inf
267 INF MdeModulePkg/Universal/Disk/DiskIoDxe/DiskIoDxe.inf
268 INF MdeModulePkg/Universal/Disk/PartitionDxe/PartitionDxe.inf
269 INF MdeModulePkg/Universal/Disk/RamDiskDxe/RamDiskDxe.inf
270 INF MdeModulePkg/Universal/Disk/UnicodeCollation/EnglishDxe/EnglishDxe.inf
271 INF MdeModulePkg/Bus/Scsi/ScsiBusDxe/ScsiBusDxe.inf
272 INF MdeModulePkg/Bus/Scsi/ScsiDiskDxe/ScsiDiskDxe.inf
273 INF OvmfPkg/SataControllerDxe/SataControllerDxe.inf
274 INF MdeModulePkg/Bus/Ata/AtaAtapiPassThru/AtaAtapiPassThru.inf
275 INF MdeModulePkg/Bus/Ata/AtaBusDxe/AtaBusDxe.inf
276 INF MdeModulePkg/Bus/Pci/NvmExpressDxe/NvmExpressDxe.inf
277 INF MdeModulePkg/Universal/HiiDatabaseDxe/HiiDatabaseDxe.inf
278 INF MdeModulePkg/Universal/SetupBrowserDxe/SetupBrowserDxe.inf
279 INF MdeModulePkg/Universal/DisplayEngineDxe/DisplayEngineDxe.inf
280 INF MdeModulePkg/Universal/MemoryTest/NullMemoryTestDxe/NullMemoryTestDxe.inf
282 INF OvmfPkg/SioBusDxe/SioBusDxe.inf
283 !if $(SOURCE_DEBUG_ENABLE) == FALSE
284 INF MdeModulePkg/Bus/Pci/PciSioSerialDxe/PciSioSerialDxe.inf
286 INF MdeModulePkg/Bus/Isa/Ps2KeyboardDxe/Ps2KeyboardDxe.inf
288 INF MdeModulePkg/Universal/SmbiosDxe/SmbiosDxe.inf
289 INF OvmfPkg/SmbiosPlatformDxe/SmbiosPlatformDxe.inf
291 INF MdeModulePkg/Universal/Acpi/AcpiTableDxe/AcpiTableDxe.inf
292 INF OvmfPkg/AcpiPlatformDxe/AcpiPlatformDxe.inf
293 INF MdeModulePkg/Universal/Acpi/S3SaveStateDxe/S3SaveStateDxe.inf
294 INF MdeModulePkg/Universal/Acpi/BootScriptExecutorDxe/BootScriptExecutorDxe.inf
295 INF MdeModulePkg/Universal/Acpi/BootGraphicsResourceTableDxe/BootGraphicsResourceTableDxe.inf
297 INF FatPkg/EnhancedFatDxe/Fat.inf
298 INF MdeModulePkg/Universal/Disk/UdfDxe/UdfDxe.inf
299 INF OvmfPkg/VirtioFsDxe/VirtioFsDxe.inf
301 !if $(BUILD_SHELL) == TRUE && $(TOOL_CHAIN_TAG) != "XCODE5"
302 INF ShellPkg/DynamicCommand/TftpDynamicCommand/TftpDynamicCommand.inf
303 INF ShellPkg/DynamicCommand/HttpDynamicCommand/HttpDynamicCommand.inf
304 INF OvmfPkg/LinuxInitrdDynamicShellCommand/LinuxInitrdDynamicShellCommand.inf
306 !if $(BUILD_SHELL) == TRUE
307 INF ShellPkg/Application/Shell/Shell.inf
310 INF MdeModulePkg/Logo/LogoDxe.inf
315 !include NetworkPkg/Network.fdf.inc
316 INF OvmfPkg/VirtioNetDxe/VirtioNet.inf
321 INF MdeModulePkg/Bus/Pci/UhciDxe/UhciDxe.inf
322 INF MdeModulePkg/Bus/Pci/EhciDxe/EhciDxe.inf
323 INF MdeModulePkg/Bus/Pci/XhciDxe/XhciDxe.inf
324 INF MdeModulePkg/Bus/Usb/UsbBusDxe/UsbBusDxe.inf
325 INF MdeModulePkg/Bus/Usb/UsbKbDxe/UsbKbDxe.inf
326 INF MdeModulePkg/Bus/Usb/UsbMassStorageDxe/UsbMassStorageDxe.inf
329 INF OvmfPkg/Csm/BiosThunk/VideoDxe/VideoDxe.inf
330 INF OvmfPkg/Csm/LegacyBiosDxe/LegacyBiosDxe.inf
331 INF RuleOverride=CSM OvmfPkg/Csm/Csm16/Csm16.inf
333 INF OvmfPkg/QemuVideoDxe/QemuVideoDxe.inf
336 INF OvmfPkg/QemuRamfbDxe/QemuRamfbDxe.inf
337 INF OvmfPkg/VirtioGpuDxe/VirtioGpu.inf
338 INF OvmfPkg/PlatformDxe/Platform.inf
339 INF OvmfPkg/IoMmuDxe/IoMmuDxe.inf
341 !if $(SMM_REQUIRE) == TRUE
342 INF OvmfPkg/SmmAccess/SmmAccess2Dxe.inf
343 INF OvmfPkg/SmmControl2Dxe/SmmControl2Dxe.inf
344 INF OvmfPkg/CpuS3DataDxe/CpuS3DataDxe.inf
345 INF MdeModulePkg/Core/PiSmmCore/PiSmmIpl.inf
346 INF MdeModulePkg/Core/PiSmmCore/PiSmmCore.inf
347 INF OvmfPkg/CpuHotplugSmm/CpuHotplugSmm.inf
348 INF UefiCpuPkg/CpuIo2Smm/CpuIo2Smm.inf
349 INF MdeModulePkg/Universal/LockBox/SmmLockBox/SmmLockBox.inf
350 INF UefiCpuPkg/PiSmmCpuDxeSmm/PiSmmCpuDxeSmm.inf
353 # Variable driver stack (SMM)
355 INF OvmfPkg/QemuFlashFvbServicesRuntimeDxe/FvbServicesSmm.inf
356 INF MdeModulePkg/Universal/FaultTolerantWriteDxe/FaultTolerantWriteSmm.inf
357 INF MdeModulePkg/Universal/Variable/RuntimeDxe/VariableSmm.inf
358 INF MdeModulePkg/Universal/Variable/RuntimeDxe/VariableSmmRuntimeDxe.inf
363 # Variable driver stack (non-SMM)
365 INF OvmfPkg/QemuFlashFvbServicesRuntimeDxe/FvbServicesRuntimeDxe.inf
366 INF OvmfPkg/EmuVariableFvbRuntimeDxe/Fvb.inf
367 INF MdeModulePkg/Universal/FaultTolerantWriteDxe/FaultTolerantWriteDxe.inf
368 INF MdeModulePkg/Universal/Variable/RuntimeDxe/VariableRuntimeDxe.inf
374 !include OvmfPkg/OvmfTpmDxe.fdf.inc
376 !if $(LOAD_X64_ON_IA32_ENABLE) == TRUE
377 INF OvmfPkg/CompatImageLoaderDxe/CompatImageLoaderDxe.inf
380 ################################################################################
383 FvNameGuid = 48DB5E17-707C-472D-91CD-1613E7EF51B0
390 WRITE_DISABLED_CAP = TRUE
391 WRITE_ENABLED_CAP = TRUE
393 WRITE_LOCK_CAP = TRUE
394 WRITE_LOCK_STATUS = TRUE
395 READ_DISABLED_CAP = TRUE
396 READ_ENABLED_CAP = TRUE
399 READ_LOCK_STATUS = TRUE
401 FILE FV_IMAGE = 9E21FD93-9C72-4c15-8C4B-E77F1DB2D792 {
402 SECTION GUIDED EE4E5898-3914-4259-9D6E-DC7BD79403CF PROCESSING_REQUIRED = TRUE {
404 # These firmware volumes will have files placed in them uncompressed,
405 # and then both firmware volumes will be compressed in a single
406 # compression operation in order to achieve better overall compression.
408 SECTION FV_IMAGE = PEIFV
409 SECTION FV_IMAGE = DXEFV
413 !include OvmfPkg/Include/Fdf/FvmainCompactScratchEnd.fdf.inc
415 ################################################################################
418 FILE SEC = $(NAMED_GUID) {
419 PE32 PE32 $(INF_OUTPUT)/$(MODULE_NAME).efi
420 UI STRING ="$(MODULE_NAME)" Optional
421 VERSION STRING ="$(INF_VERSION)" Optional BUILD_NUM=$(BUILD_NUMBER)
424 [Rule.Common.PEI_CORE]
425 FILE PEI_CORE = $(NAMED_GUID) {
426 PE32 PE32 Align=Auto $(INF_OUTPUT)/$(MODULE_NAME).efi
427 UI STRING ="$(MODULE_NAME)" Optional
428 VERSION STRING ="$(INF_VERSION)" Optional BUILD_NUM=$(BUILD_NUMBER)
432 FILE PEIM = $(NAMED_GUID) {
433 PEI_DEPEX PEI_DEPEX Optional $(INF_OUTPUT)/$(MODULE_NAME).depex
434 PE32 PE32 Align=Auto $(INF_OUTPUT)/$(MODULE_NAME).efi
435 UI STRING="$(MODULE_NAME)" Optional
436 VERSION STRING="$(INF_VERSION)" Optional BUILD_NUM=$(BUILD_NUMBER)
439 [Rule.Common.DXE_CORE]
440 FILE DXE_CORE = $(NAMED_GUID) {
441 PE32 PE32 $(INF_OUTPUT)/$(MODULE_NAME).efi
442 UI STRING="$(MODULE_NAME)" Optional
443 VERSION STRING="$(INF_VERSION)" Optional BUILD_NUM=$(BUILD_NUMBER)
446 [Rule.Common.DXE_DRIVER]
447 FILE DRIVER = $(NAMED_GUID) {
448 DXE_DEPEX DXE_DEPEX Optional $(INF_OUTPUT)/$(MODULE_NAME).depex
449 PE32 PE32 $(INF_OUTPUT)/$(MODULE_NAME).efi
450 UI STRING="$(MODULE_NAME)" Optional
451 VERSION STRING="$(INF_VERSION)" Optional BUILD_NUM=$(BUILD_NUMBER)
452 RAW ACPI Optional |.acpi
453 RAW ASL Optional |.aml
456 [Rule.Common.DXE_RUNTIME_DRIVER]
457 FILE DRIVER = $(NAMED_GUID) {
458 DXE_DEPEX DXE_DEPEX Optional $(INF_OUTPUT)/$(MODULE_NAME).depex
459 PE32 PE32 $(INF_OUTPUT)/$(MODULE_NAME).efi
460 UI STRING="$(MODULE_NAME)" Optional
461 VERSION STRING="$(INF_VERSION)" Optional BUILD_NUM=$(BUILD_NUMBER)
464 [Rule.Common.UEFI_DRIVER]
465 FILE DRIVER = $(NAMED_GUID) {
466 DXE_DEPEX DXE_DEPEX Optional $(INF_OUTPUT)/$(MODULE_NAME).depex
467 PE32 PE32 $(INF_OUTPUT)/$(MODULE_NAME).efi
468 UI STRING="$(MODULE_NAME)" Optional
469 VERSION STRING="$(INF_VERSION)" Optional BUILD_NUM=$(BUILD_NUMBER)
472 [Rule.Common.UEFI_DRIVER.BINARY]
473 FILE DRIVER = $(NAMED_GUID) {
474 DXE_DEPEX DXE_DEPEX Optional |.depex
476 UI STRING="$(MODULE_NAME)" Optional
477 VERSION STRING="$(INF_VERSION)" Optional BUILD_NUM=$(BUILD_NUMBER)
480 [Rule.Common.UEFI_APPLICATION]
481 FILE APPLICATION = $(NAMED_GUID) {
482 PE32 PE32 $(INF_OUTPUT)/$(MODULE_NAME).efi
483 UI STRING="$(MODULE_NAME)" Optional
484 VERSION STRING="$(INF_VERSION)" Optional BUILD_NUM=$(BUILD_NUMBER)
487 [Rule.Common.UEFI_APPLICATION.BINARY]
488 FILE APPLICATION = $(NAMED_GUID) {
490 UI STRING="$(MODULE_NAME)" Optional
491 VERSION STRING="$(INF_VERSION)" Optional BUILD_NUM=$(BUILD_NUMBER)
494 [Rule.Common.USER_DEFINED.CSM]
495 FILE FREEFORM = $(NAMED_GUID) {
499 [Rule.Common.SEC.RESET_VECTOR]
500 FILE RAW = $(NAMED_GUID) {
501 RAW BIN Align = 16 |.bin
504 [Rule.Common.SMM_CORE]
505 FILE SMM_CORE = $(NAMED_GUID) {
506 PE32 PE32 $(INF_OUTPUT)/$(MODULE_NAME).efi
507 UI STRING="$(MODULE_NAME)" Optional
508 VERSION STRING="$(INF_VERSION)" Optional BUILD_NUM=$(BUILD_NUMBER)
511 [Rule.Common.DXE_SMM_DRIVER]
512 FILE SMM = $(NAMED_GUID) {
513 SMM_DEPEX SMM_DEPEX Optional $(INF_OUTPUT)/$(MODULE_NAME).depex
514 PE32 PE32 $(INF_OUTPUT)/$(MODULE_NAME).efi
515 UI STRING="$(MODULE_NAME)" Optional
516 VERSION STRING="$(INF_VERSION)" Optional BUILD_NUM=$(BUILD_NUMBER)