VirtualBox

source: vbox/trunk/src/VBox/Devices/EFI/Firmware/OvmfPkg/IntelTdx/IntelTdxX64.fdf@ 101489

Last change on this file since 101489 was 101291, checked in by vboxsync, 19 months ago

EFI/FirmwareNew: Make edk2-stable202308 build on all supported platforms (using gcc at least, msvc not tested yet), bugref:4643

  • Property svn:eol-style set to native
File size: 14.6 KB
Line 
1## @file
2# Open Virtual Machine Firmware: FDF
3#
4# Copyright (c) 2006 - 2019, Intel Corporation. All rights reserved.<BR>
5# (C) Copyright 2016 Hewlett Packard Enterprise Development LP<BR>
6#
7# SPDX-License-Identifier: BSD-2-Clause-Patent
8#
9##
10
11################################################################################
12
13[Defines]
14!include OvmfPkg/Include/Fdf/OvmfPkgDefines.fdf.inc
15
16#
17# Build the variable store and the firmware code as one unified flash device
18# image.
19#
20[FD.OVMF]
21BaseAddress = $(FW_BASE_ADDRESS)
22Size = $(FW_SIZE)
23ErasePolarity = 1
24BlockSize = $(BLOCK_SIZE)
25NumBlocks = $(FW_BLOCKS)
26
27!include OvmfPkg/Include/Fdf/VarStore.fdf.inc
28
29$(VARS_SIZE)|$(FVMAIN_SIZE)
30FV = FVMAIN_COMPACT
31
32$(SECFV_OFFSET)|$(SECFV_SIZE)
33FV = SECFV
34
35#
36# Build the variable store and the firmware code as separate flash device
37# images.
38#
39[FD.OVMF_VARS]
40BaseAddress = $(FW_BASE_ADDRESS)
41Size = $(VARS_SIZE)
42ErasePolarity = 1
43BlockSize = $(BLOCK_SIZE)
44NumBlocks = $(VARS_BLOCKS)
45
46!include OvmfPkg/Include/Fdf/VarStore.fdf.inc
47
48[FD.OVMF_CODE]
49BaseAddress = $(CODE_BASE_ADDRESS)
50Size = $(CODE_SIZE)
51ErasePolarity = 1
52BlockSize = $(BLOCK_SIZE)
53NumBlocks = $(CODE_BLOCKS)
54
550x00000000|$(FVMAIN_SIZE)
56FV = FVMAIN_COMPACT
57
58$(FVMAIN_SIZE)|$(SECFV_SIZE)
59FV = SECFV
60
61################################################################################
62
63[FD.MEMFD]
64BaseAddress = $(MEMFD_BASE_ADDRESS)
65Size = 0xD00000
66ErasePolarity = 1
67BlockSize = 0x10000
68NumBlocks = 0xD0
69
700x000000|0x006000
71gUefiOvmfPkgTokenSpaceGuid.PcdOvmfSecPageTablesBase|gUefiOvmfPkgTokenSpaceGuid.PcdOvmfSecPageTablesSize
72
730x006000|0x001000
74gUefiOvmfPkgTokenSpaceGuid.PcdOvmfLockBoxStorageBase|gUefiOvmfPkgTokenSpaceGuid.PcdOvmfLockBoxStorageSize
75
760x007000|0x001000
77gEfiMdePkgTokenSpaceGuid.PcdGuidedExtractHandlerTableAddress|gUefiOvmfPkgTokenSpaceGuid.PcdGuidedExtractHandlerTableSize
78
790x008000|0x001000
80gUefiOvmfPkgTokenSpaceGuid.PcdOvmfSecGhcbPageTableBase|gUefiOvmfPkgTokenSpaceGuid.PcdOvmfSecGhcbPageTableSize
81
820x009000|0x002000
83gUefiOvmfPkgTokenSpaceGuid.PcdOvmfSecGhcbBase|gUefiOvmfPkgTokenSpaceGuid.PcdOvmfSecGhcbSize
84
850x00B000|0x001000
86gUefiOvmfPkgTokenSpaceGuid.PcdOvmfWorkAreaBase|gUefiOvmfPkgTokenSpaceGuid.PcdOvmfWorkAreaSize
87
880x00C000|0x001000
89gUefiOvmfPkgTokenSpaceGuid.PcdOvmfSecGhcbBackupBase|gUefiOvmfPkgTokenSpaceGuid.PcdOvmfSecGhcbBackupSize
90
910x00D000|0x001000
92gUefiOvmfPkgTokenSpaceGuid.PcdOvmfSnpSecretsBase|gUefiOvmfPkgTokenSpaceGuid.PcdOvmfSnpSecretsSize
93
940x00E000|0x001000
95gUefiOvmfPkgTokenSpaceGuid.PcdOvmfCpuidBase|gUefiOvmfPkgTokenSpaceGuid.PcdOvmfCpuidSize
96
970x010000|0x010000
98gUefiOvmfPkgTokenSpaceGuid.PcdOvmfSecPeiTempRamBase|gUefiOvmfPkgTokenSpaceGuid.PcdOvmfSecPeiTempRamSize
99
1000x100000|0x700000
101gUefiOvmfPkgTokenSpaceGuid.PcdOvmfDxeMemFvBase|gUefiOvmfPkgTokenSpaceGuid.PcdOvmfDxeMemFvSize
102FV = DXEFV
103
1040x800000|0x500000
105gUefiOvmfPkgTokenSpaceGuid.PcdOvmfDxeNonCcFvBase|gUefiOvmfPkgTokenSpaceGuid.PcdOvmfDxeNonCcFvSize
106FV = NCCFV
107
108##########################################################################################
109# Set the SEV-ES specific work area PCDs
110#
111SET gUefiCpuPkgTokenSpaceGuid.PcdSevEsWorkAreaBase = $(MEMFD_BASE_ADDRESS) + gUefiOvmfPkgTokenSpaceGuid.PcdOvmfWorkAreaBase + gUefiOvmfPkgTokenSpaceGuid.PcdOvmfConfidentialComputingWorkAreaHeader
112SET gUefiCpuPkgTokenSpaceGuid.PcdSevEsWorkAreaSize = gUefiOvmfPkgTokenSpaceGuid.PcdOvmfWorkAreaSize - gUefiOvmfPkgTokenSpaceGuid.PcdOvmfConfidentialComputingWorkAreaHeader
113
114
115##########################################################################################
116
117################################################################################
118
119[FV.SECFV]
120FvNameGuid = 763BED0D-DE9F-48F5-81F1-3E90E1B1A015
121BlockSize = 0x1000
122FvAlignment = 16
123ERASE_POLARITY = 1
124MEMORY_MAPPED = TRUE
125STICKY_WRITE = TRUE
126LOCK_CAP = TRUE
127LOCK_STATUS = TRUE
128WRITE_DISABLED_CAP = TRUE
129WRITE_ENABLED_CAP = TRUE
130WRITE_STATUS = TRUE
131WRITE_LOCK_CAP = TRUE
132WRITE_LOCK_STATUS = TRUE
133READ_DISABLED_CAP = TRUE
134READ_ENABLED_CAP = TRUE
135READ_STATUS = TRUE
136READ_LOCK_CAP = TRUE
137READ_LOCK_STATUS = TRUE
138
139#
140# SEC Phase modules
141#
142# The code in this FV handles the initial firmware startup, and
143# decompresses the PEI and DXE FVs which handles the rest of the boot sequence.
144#
145INF OvmfPkg/IntelTdx/Sec/SecMain.inf
146
147INF RuleOverride=RESET_VECTOR OvmfPkg/ResetVector/ResetVector.inf
148
149################################################################################
150
151[FV.DXEFV]
152FvForceRebase = FALSE
153FvNameGuid = 7CB8BDC9-F8EB-4F34-AAEA-3EE4AF6516A1
154BlockSize = 0x10000
155FvAlignment = 16
156ERASE_POLARITY = 1
157MEMORY_MAPPED = TRUE
158STICKY_WRITE = TRUE
159LOCK_CAP = TRUE
160LOCK_STATUS = TRUE
161WRITE_DISABLED_CAP = TRUE
162WRITE_ENABLED_CAP = TRUE
163WRITE_STATUS = TRUE
164WRITE_LOCK_CAP = TRUE
165WRITE_LOCK_STATUS = TRUE
166READ_DISABLED_CAP = TRUE
167READ_ENABLED_CAP = TRUE
168READ_STATUS = TRUE
169READ_LOCK_CAP = TRUE
170READ_LOCK_STATUS = TRUE
171
172APRIORI DXE {
173 INF MdeModulePkg/Universal/DevicePathDxe/DevicePathDxe.inf
174 INF MdeModulePkg/Universal/PCD/Dxe/Pcd.inf
175 INF OvmfPkg/TdxDxe/TdxDxe.inf
176 INF OvmfPkg/QemuFlashFvbServicesRuntimeDxe/FvbServicesRuntimeDxe.inf
177}
178
179#
180# DXE Phase modules
181#
182INF MdeModulePkg/Core/Dxe/DxeMain.inf
183
184INF MdeModulePkg/Universal/ReportStatusCodeRouter/RuntimeDxe/ReportStatusCodeRouterRuntimeDxe.inf
185INF MdeModulePkg/Universal/StatusCodeHandler/RuntimeDxe/StatusCodeHandlerRuntimeDxe.inf
186INF MdeModulePkg/Universal/PCD/Dxe/Pcd.inf
187
188INF MdeModulePkg/Core/RuntimeDxe/RuntimeDxe.inf
189INF MdeModulePkg/Universal/SecurityStubDxe/SecurityStubDxe.inf
190INF UefiCpuPkg/CpuIo2Dxe/CpuIo2Dxe.inf
191
192INF UefiCpuPkg/CpuDxe/CpuDxe.inf
193INF FILE_GUID = $(UP_CPU_DXE_GUID) UefiCpuPkg/CpuDxe/CpuDxe.inf
194
195INF OvmfPkg/LocalApicTimerDxe/LocalApicTimerDxe.inf
196INF OvmfPkg/IncompatiblePciDeviceSupportDxe/IncompatiblePciDeviceSupport.inf
197INF OvmfPkg/PciHotPlugInitDxe/PciHotPlugInit.inf
198INF MdeModulePkg/Bus/Pci/PciHostBridgeDxe/PciHostBridgeDxe.inf
199INF MdeModulePkg/Bus/Pci/PciBusDxe/PciBusDxe.inf
200INF MdeModulePkg/Universal/ResetSystemRuntimeDxe/ResetSystemRuntimeDxe.inf
201INF MdeModulePkg/Universal/Metronome/Metronome.inf
202INF PcAtChipsetPkg/PcatRealTimeClockRuntimeDxe/PcatRealTimeClockRuntimeDxe.inf
203
204INF OvmfPkg/VirtioPciDeviceDxe/VirtioPciDeviceDxe.inf
205INF OvmfPkg/Virtio10Dxe/Virtio10.inf
206INF OvmfPkg/VirtioBlkDxe/VirtioBlk.inf
207
208!if $(SECURE_BOOT_ENABLE) == TRUE
209 INF SecurityPkg/VariableAuthenticated/SecureBootConfigDxe/SecureBootConfigDxe.inf
210!endif
211
212INF MdeModulePkg/Universal/WatchdogTimerDxe/WatchdogTimer.inf
213INF MdeModulePkg/Universal/MonotonicCounterRuntimeDxe/MonotonicCounterRuntimeDxe.inf
214INF MdeModulePkg/Universal/CapsuleRuntimeDxe/CapsuleRuntimeDxe.inf
215INF MdeModulePkg/Universal/Console/ConPlatformDxe/ConPlatformDxe.inf
216INF MdeModulePkg/Universal/Console/ConSplitterDxe/ConSplitterDxe.inf
217INF MdeModulePkg/Universal/Console/TerminalDxe/TerminalDxe.inf
218INF MdeModulePkg/Universal/BdsDxe/BdsDxe.inf
219INF MdeModulePkg/Application/UiApp/UiApp.inf
220INF OvmfPkg/QemuKernelLoaderFsDxe/QemuKernelLoaderFsDxe.inf
221INF MdeModulePkg/Universal/DevicePathDxe/DevicePathDxe.inf
222INF MdeModulePkg/Universal/Disk/DiskIoDxe/DiskIoDxe.inf
223INF MdeModulePkg/Universal/Disk/PartitionDxe/PartitionDxe.inf
224INF MdeModulePkg/Universal/Disk/UnicodeCollation/EnglishDxe/EnglishDxe.inf
225INF MdeModulePkg/Bus/Pci/SataControllerDxe/SataControllerDxe.inf
226INF MdeModulePkg/Bus/Ata/AtaAtapiPassThru/AtaAtapiPassThru.inf
227INF MdeModulePkg/Bus/Ata/AtaBusDxe/AtaBusDxe.inf
228INF MdeModulePkg/Bus/Pci/NvmExpressDxe/NvmExpressDxe.inf
229INF MdeModulePkg/Universal/HiiDatabaseDxe/HiiDatabaseDxe.inf
230INF MdeModulePkg/Universal/SetupBrowserDxe/SetupBrowserDxe.inf
231INF MdeModulePkg/Universal/DisplayEngineDxe/DisplayEngineDxe.inf
232
233INF OvmfPkg/SioBusDxe/SioBusDxe.inf
234INF MdeModulePkg/Bus/Pci/PciSioSerialDxe/PciSioSerialDxe.inf
235
236INF MdeModulePkg/Universal/SmbiosDxe/SmbiosDxe.inf
237INF OvmfPkg/SmbiosPlatformDxe/SmbiosPlatformDxe.inf
238
239INF MdeModulePkg/Universal/Acpi/AcpiTableDxe/AcpiTableDxe.inf
240INF OvmfPkg/AcpiPlatformDxe/AcpiPlatformDxe.inf
241
242INF FatPkg/EnhancedFatDxe/Fat.inf
243INF OvmfPkg/TdxDxe/TdxDxe.inf
244
245INF OvmfPkg/IoMmuDxe/IoMmuDxe.inf
246
247#
248# Variable driver stack (non-SMM)
249#
250INF OvmfPkg/QemuFlashFvbServicesRuntimeDxe/FvbServicesRuntimeDxe.inf
251INF OvmfPkg/EmuVariableFvbRuntimeDxe/Fvb.inf
252INF MdeModulePkg/Universal/FaultTolerantWriteDxe/FaultTolerantWriteDxe.inf
253INF MdeModulePkg/Universal/Variable/RuntimeDxe/VariableRuntimeDxe.inf
254
255#
256# EFI_CC_MEASUREMENT_PROTOCOL
257#
258INF SecurityPkg/Tcg/TdTcg2Dxe/TdTcg2Dxe.inf
259
260################################################################################
261
262[FV.NCCFV]
263FvForceRebase = FALSE
264FvNameGuid = AE047C6D-BCE9-426C-AE03-A68E3B8A0488
265BlockSize = 0x10000
266FvAlignment = 16
267ERASE_POLARITY = 1
268MEMORY_MAPPED = TRUE
269STICKY_WRITE = TRUE
270LOCK_CAP = TRUE
271LOCK_STATUS = TRUE
272WRITE_DISABLED_CAP = TRUE
273WRITE_ENABLED_CAP = TRUE
274WRITE_STATUS = TRUE
275WRITE_LOCK_CAP = TRUE
276WRITE_LOCK_STATUS = TRUE
277READ_DISABLED_CAP = TRUE
278READ_ENABLED_CAP = TRUE
279READ_STATUS = TRUE
280READ_LOCK_CAP = TRUE
281READ_LOCK_STATUS = TRUE
282
283#
284# DXE Phase modules
285#
286INF MdeModulePkg/Universal/EbcDxe/EbcDxe.inf
287INF OvmfPkg/VirtioScsiDxe/VirtioScsi.inf
288INF OvmfPkg/VirtioRngDxe/VirtioRng.inf
289!if $(PVSCSI_ENABLE) == TRUE
290INF OvmfPkg/PvScsiDxe/PvScsiDxe.inf
291!endif
292!if $(MPT_SCSI_ENABLE) == TRUE
293INF OvmfPkg/MptScsiDxe/MptScsiDxe.inf
294!endif
295!if $(LSI_SCSI_ENABLE) == TRUE
296INF OvmfPkg/LsiScsiDxe/LsiScsiDxe.inf
297!endif
298INF MdeModulePkg/Universal/Console/GraphicsConsoleDxe/GraphicsConsoleDxe.inf
299INF MdeModulePkg/Universal/DriverHealthManagerDxe/DriverHealthManagerDxe.inf
300INF MdeModulePkg/Universal/Disk/RamDiskDxe/RamDiskDxe.inf
301INF MdeModulePkg/Bus/Scsi/ScsiBusDxe/ScsiBusDxe.inf
302INF MdeModulePkg/Bus/Scsi/ScsiDiskDxe/ScsiDiskDxe.inf
303INF MdeModulePkg/Universal/MemoryTest/NullMemoryTestDxe/NullMemoryTestDxe.inf
304INF MdeModulePkg/Bus/Isa/Ps2KeyboardDxe/Ps2KeyboardDxe.inf
305INF MdeModulePkg/Universal/Acpi/S3SaveStateDxe/S3SaveStateDxe.inf
306INF MdeModulePkg/Universal/Acpi/BootScriptExecutorDxe/BootScriptExecutorDxe.inf
307INF MdeModulePkg/Universal/Acpi/BootGraphicsResourceTableDxe/BootGraphicsResourceTableDxe.inf
308INF MdeModulePkg/Universal/Disk/UdfDxe/UdfDxe.inf
309INF OvmfPkg/VirtioFsDxe/VirtioFsDxe.inf
310
311!if $(BUILD_SHELL) == TRUE && $(TOOL_CHAIN_TAG) != "XCODE5"
312INF OvmfPkg/LinuxInitrdDynamicShellCommand/LinuxInitrdDynamicShellCommand.inf
313!endif
314!if $(BUILD_SHELL) == TRUE
315INF ShellPkg/Application/Shell/Shell.inf
316!endif
317
318INF MdeModulePkg/Logo/LogoDxe.inf
319
320#
321# Usb Support
322#
323INF MdeModulePkg/Bus/Pci/UhciDxe/UhciDxe.inf
324INF MdeModulePkg/Bus/Pci/EhciDxe/EhciDxe.inf
325INF MdeModulePkg/Bus/Pci/XhciDxe/XhciDxe.inf
326INF MdeModulePkg/Bus/Usb/UsbBusDxe/UsbBusDxe.inf
327INF MdeModulePkg/Bus/Usb/UsbKbDxe/UsbKbDxe.inf
328INF MdeModulePkg/Bus/Usb/UsbMassStorageDxe/UsbMassStorageDxe.inf
329
330INF OvmfPkg/QemuVideoDxe/QemuVideoDxe.inf
331
332INF OvmfPkg/QemuRamfbDxe/QemuRamfbDxe.inf
333INF OvmfPkg/VirtioGpuDxe/VirtioGpu.inf
334INF OvmfPkg/PlatformDxe/Platform.inf
335
336################################################################################
337
338[FV.FVMAIN_COMPACT]
339FvNameGuid = 48DB5E17-707C-472D-91CD-1613E7EF51B0
340FvAlignment = 16
341ERASE_POLARITY = 1
342MEMORY_MAPPED = TRUE
343STICKY_WRITE = TRUE
344LOCK_CAP = TRUE
345LOCK_STATUS = TRUE
346WRITE_DISABLED_CAP = TRUE
347WRITE_ENABLED_CAP = TRUE
348WRITE_STATUS = TRUE
349WRITE_LOCK_CAP = TRUE
350WRITE_LOCK_STATUS = TRUE
351READ_DISABLED_CAP = TRUE
352READ_ENABLED_CAP = TRUE
353READ_STATUS = TRUE
354READ_LOCK_CAP = TRUE
355READ_LOCK_STATUS = TRUE
356
357FILE FV_IMAGE = 9E21FD93-9C72-4c15-8C4B-E77F1DB2D792 {
358 SECTION GUIDED EE4E5898-3914-4259-9D6E-DC7BD79403CF PROCESSING_REQUIRED = TRUE {
359 #
360 # These firmware volumes will have files placed in them uncompressed,
361 # and then both firmware volumes will be compressed in a single
362 # compression operation in order to achieve better overall compression.
363 #
364 SECTION FV_IMAGE = DXEFV
365 SECTION FV_IMAGE = NCCFV
366 }
367 }
368
369# !include OvmfPkg/Include/Fdf/FvmainCompactScratchEnd.fdf.inc
370
371################################################################################
372
373[Rule.Common.SEC]
374 FILE SEC = $(NAMED_GUID) {
375 PE32 PE32 $(INF_OUTPUT)/$(MODULE_NAME).efi
376 UI STRING ="$(MODULE_NAME)" Optional
377 VERSION STRING ="$(INF_VERSION)" Optional BUILD_NUM=$(BUILD_NUMBER)
378 }
379
380[Rule.Common.DXE_CORE]
381 FILE DXE_CORE = $(NAMED_GUID) {
382 PE32 PE32 $(INF_OUTPUT)/$(MODULE_NAME).efi
383 UI STRING="$(MODULE_NAME)" Optional
384 VERSION STRING="$(INF_VERSION)" Optional BUILD_NUM=$(BUILD_NUMBER)
385 }
386
387[Rule.Common.DXE_DRIVER]
388 FILE DRIVER = $(NAMED_GUID) {
389 DXE_DEPEX DXE_DEPEX Optional $(INF_OUTPUT)/$(MODULE_NAME).depex
390 PE32 PE32 $(INF_OUTPUT)/$(MODULE_NAME).efi
391 UI STRING="$(MODULE_NAME)" Optional
392 VERSION STRING="$(INF_VERSION)" Optional BUILD_NUM=$(BUILD_NUMBER)
393 RAW ACPI Optional |.acpi
394 RAW ASL Optional |.aml
395 }
396
397[Rule.Common.DXE_RUNTIME_DRIVER]
398 FILE DRIVER = $(NAMED_GUID) {
399 DXE_DEPEX DXE_DEPEX Optional $(INF_OUTPUT)/$(MODULE_NAME).depex
400 PE32 PE32 $(INF_OUTPUT)/$(MODULE_NAME).efi
401 UI STRING="$(MODULE_NAME)" Optional
402 VERSION STRING="$(INF_VERSION)" Optional BUILD_NUM=$(BUILD_NUMBER)
403 }
404
405[Rule.Common.UEFI_DRIVER]
406 FILE DRIVER = $(NAMED_GUID) {
407 DXE_DEPEX DXE_DEPEX Optional $(INF_OUTPUT)/$(MODULE_NAME).depex
408 PE32 PE32 $(INF_OUTPUT)/$(MODULE_NAME).efi
409 UI STRING="$(MODULE_NAME)" Optional
410 VERSION STRING="$(INF_VERSION)" Optional BUILD_NUM=$(BUILD_NUMBER)
411 }
412
413[Rule.Common.UEFI_DRIVER.BINARY]
414 FILE DRIVER = $(NAMED_GUID) {
415 DXE_DEPEX DXE_DEPEX Optional |.depex
416 PE32 PE32 |.efi
417 UI STRING="$(MODULE_NAME)" Optional
418 VERSION STRING="$(INF_VERSION)" Optional BUILD_NUM=$(BUILD_NUMBER)
419 }
420
421[Rule.Common.UEFI_APPLICATION]
422 FILE APPLICATION = $(NAMED_GUID) {
423 PE32 PE32 $(INF_OUTPUT)/$(MODULE_NAME).efi
424 UI STRING="$(MODULE_NAME)" Optional
425 VERSION STRING="$(INF_VERSION)" Optional BUILD_NUM=$(BUILD_NUMBER)
426 }
427
428[Rule.Common.UEFI_APPLICATION.BINARY]
429 FILE APPLICATION = $(NAMED_GUID) {
430 PE32 PE32 |.efi
431 UI STRING="$(MODULE_NAME)" Optional
432 VERSION STRING="$(INF_VERSION)" Optional BUILD_NUM=$(BUILD_NUMBER)
433 }
434
435[Rule.Common.USER_DEFINED.CSM]
436 FILE FREEFORM = $(NAMED_GUID) {
437 RAW BIN |.bin
438 }
439
440[Rule.Common.SEC.RESET_VECTOR]
441 FILE RAW = $(NAMED_GUID) {
442 RAW BIN Align = 16 |.bin
443 }
Note: See TracBrowser for help on using the repository browser.

© 2025 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette