OVMF's SecMain is unique in the sense that it links against the following two libraries *in combination*: - IntelFrameworkModulePkg/Library/LzmaCustomDecompressLib/ LzmaCustomDecompressLib.inf - MdePkg/Library/BaseExtractGuidedSectionLib/ BaseExtractGuidedSectionLib.inf The ExtractGuidedSectionLib library class allows decompressor modules to register themselves (keyed by GUID) with it, and it allows clients to decompress file sections with a registered decompressor module that matches the section's GUID. BaseExtractGuidedSectionLib is a library instance (of type BASE) for this library class. It has no constructor function. LzmaCustomDecompressLib is a compatible decompressor module (of type BASE). Its section type GUID is gLzmaCustomDecompressGuid == EE4E5898-3914-4259-9D6E-DC7BD79403CF When OVMF's SecMain module starts, the LzmaCustomDecompressLib constructor function is executed, which registers its LZMA decompressor with the above GUID, by calling into BaseExtractGuidedSectionLib: LzmaDecompressLibConstructor() [GuidedSectionExtraction.c] ExtractGuidedSectionRegisterHandlers() [BaseExtractGuidedSectionLib.c] GetExtractGuidedSectionHandlerInfo() PcdGet64 (PcdGuidedExtractHandlerTableAddress) -- NOTE THIS Later, during a normal (non-S3) boot, SecMain utilizes this decompressor to get information about, and to decompress, sections of the OVMF firmware image: SecCoreStartupWithStack() [OvmfPkg/Sec/SecMain.c] SecStartupPhase2() FindAndReportEntryPoints() FindPeiCoreImageBase() DecompressMemFvs() ExtractGuidedSectionGetInfo() [BaseExtractGuidedSectionLib.c] ExtractGuidedSectionDecode() [BaseExtractGuidedSectionLib.c] Notably, only the extraction depends on full-config-boot; the registration of LzmaCustomDecompressLib occurs unconditionally in the SecMain EFI binary, triggered by the library constructor function. This is where the bug happens. BaseExtractGuidedSectionLib maintains the table of GUIDed decompressors (section handlers) at a fixed memory location; selected by PcdGuidedExtractHandlerTableAddress (declared in MdePkg.dec). The default value of this PCD is 0x1000000 (16 MB). This causes SecMain to corrupt guest OS memory during S3, leading to random crashes. Compare the following two memory dumps, the first taken right before suspending, the second taken right after resuming a RHEL-7 guest: crash> rd -8 -p 1000000 0x50 1000000: c0 00 08 00 02 00 00 00 00 00 00 00 00 00 00 00 ................ 1000010: d0 33 0c 00 00 c9 ff ff c0 10 00 01 00 88 ff ff .3.............. 1000020: 0a 6d 57 32 0f 00 00 00 38 00 00 01 00 88 ff ff .mW2....8....... 1000030: 00 00 00 00 00 00 00 00 73 69 67 6e 61 6c 6d 6f ........signalmo 1000040: 64 75 6c 65 2e 73 6f 00 00 00 00 00 00 00 00 00 dule.so......... vs. crash> rd -8 -p 1000000 0x50 1000000: 45 47 53 49 01 00 00 00 20 00 00 01 00 00 00 00 EGSI.... ....... 1000010: 20 01 00 01 00 00 00 00 a0 01 00 01 00 00 00 00 ............... 1000020: 98 58 4e ee 14 39 59 42 9d 6e dc 7b d7 94 03 cf .XN..9YB.n.{.... 1000030: 00 00 00 00 00 00 00 00 73 69 67 6e 61 6c 6d 6f ........signalmo 1000040: 64 75 6c 65 2e 73 6f 00 00 00 00 00 00 00 00 00 dule.so......... The "EGSI" signature corresponds to EXTRACT_HANDLER_INFO_SIGNATURE declared in MdePkg/Library/BaseExtractGuidedSectionLib/BaseExtractGuidedSectionLib.c. Additionally, the gLzmaCustomDecompressGuid (quoted above) is visible at guest-phys offset 0x1000020. Fix the problem as follows: - Carve out 4KB from the 36KB gap that we currently have between PcdOvmfLockBoxStorageBase + PcdOvmfLockBoxStorageSize == 8220 KB and PcdOvmfSecPeiTempRamBase == 8256 KB. - Point PcdGuidedExtractHandlerTableAddress to 8220 KB (0x00807000). - Cover the area with an EfiACPIMemoryNVS type memalloc HOB, if S3 is supported and we're not currently resuming. The 4KB size that we pick is an upper estimate for BaseExtractGuidedSectionLib's internal storage size. The latter is calculated as follows (see GetExtractGuidedSectionHandlerInfo()): sizeof(EXTRACT_GUIDED_SECTION_HANDLER_INFO) + // 32 PcdMaximumGuidedExtractHandler * ( sizeof(GUID) + // 16 sizeof(EXTRACT_GUIDED_SECTION_DECODE_HANDLER) + // 8 sizeof(EXTRACT_GUIDED_SECTION_GET_INFO_HANDLER) // 8 ) OVMF sets PcdMaximumGuidedExtractHandler to 16 decimal (which is the MdePkg default too), yielding 32 + 16 * (16 + 8 + 8) == 544 bytes. Regarding the lifecycle of the new area: (a) when and how it is initialized after first boot of the VM The library linked into SecMain finds that the area lacks the signature. It initializes the signature, plus the rest of the structure. This is independent of S3 support. Consumption of the area is also limited to SEC (but consumption does depend on full-config-boot). (b) how it is protected from memory allocations during DXE It is not, in the general case; and we don't need to. Nothing else links against BaseExtractGuidedSectionLib; it's OK if DXE overwrites the area. (c) how it is protected from the OS When S3 is enabled, we cover it with AcpiNVS in InitializeRamRegions(). When S3 is not supported, the range is not protected. (d) how it is accessed on the S3 resume path Examined by the library linked into SecMain. Registrations update the table in-place (based on GUID matches). (e) how it is accessed on the warm reset path If S3 is enabled, then the OS won't damage the table (due to (c)), hence see (d). If S3 is unsupported, then the OS may or may not overwrite the signature. (It likely will.) This is identical to the pre-patch status. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Laszlo Ersek <lersek@redhat.com> Reviewed-by: Jordan Justen <jordan.l.justen@intel.com> git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@15433 6f19259b-4bc3-4df7-8a09-765794883524
508 lines
18 KiB
Plaintext
508 lines
18 KiB
Plaintext
## @file
|
|
# Open Virtual Machine Firmware: FDF
|
|
#
|
|
# Copyright (c) 2006 - 2013, Intel Corporation. All rights reserved.<BR>
|
|
#
|
|
# This program and the accompanying materials
|
|
# are licensed and made available under the terms and conditions of the BSD License
|
|
# which accompanies this distribution. The full text of the license may be found at
|
|
# http://opensource.org/licenses/bsd-license.php
|
|
#
|
|
# THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
|
|
# WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
|
|
#
|
|
##
|
|
|
|
################################################################################
|
|
|
|
#
|
|
# Default flash size for DEBUG build is 2MB. For RELEASE it is 1MB.
|
|
#
|
|
# Defining FD_SIZE_1MB or FD_SIZE_2MB on the build command line can
|
|
# override this.
|
|
#
|
|
[Defines]
|
|
!if $(TARGET) == RELEASE
|
|
!ifndef $(FD_SIZE_2MB)
|
|
DEFINE FD_SIZE_1MB=
|
|
!endif
|
|
!endif
|
|
|
|
!ifdef $(FD_SIZE_1MB)
|
|
[FD.OVMF]
|
|
BaseAddress = 0xFFF00000|gUefiOvmfPkgTokenSpaceGuid.PcdOvmfFdBaseAddress
|
|
Size = 0x00100000|gUefiOvmfPkgTokenSpaceGuid.PcdOvmfFirmwareFdSize
|
|
ErasePolarity = 1
|
|
BlockSize = 0x1000|gUefiOvmfPkgTokenSpaceGuid.PcdOvmfFirmwareBlockSize
|
|
NumBlocks = 0x100
|
|
!else
|
|
[FD.OVMF]
|
|
BaseAddress = 0xFFE00000|gUefiOvmfPkgTokenSpaceGuid.PcdOvmfFdBaseAddress
|
|
Size = 0x00200000|gUefiOvmfPkgTokenSpaceGuid.PcdOvmfFirmwareFdSize
|
|
ErasePolarity = 1
|
|
BlockSize = 0x1000|gUefiOvmfPkgTokenSpaceGuid.PcdOvmfFirmwareBlockSize
|
|
NumBlocks = 0x200
|
|
!endif
|
|
|
|
0x00000000|0x0000e000
|
|
gUefiOvmfPkgTokenSpaceGuid.PcdOvmfFlashNvStorageVariableBase|gEfiMdeModulePkgTokenSpaceGuid.PcdFlashNvStorageVariableSize
|
|
#NV_VARIABLE_STORE
|
|
DATA = {
|
|
## This is the EFI_FIRMWARE_VOLUME_HEADER
|
|
# ZeroVector []
|
|
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
|
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
|
# FileSystemGuid: gEfiSystemNvDataFvGuid =
|
|
# { 0xFFF12B8D, 0x7696, 0x4C8B,
|
|
# { 0xA9, 0x85, 0x27, 0x47, 0x07, 0x5B, 0x4F, 0x50 }}
|
|
0x8D, 0x2B, 0xF1, 0xFF, 0x96, 0x76, 0x8B, 0x4C,
|
|
0xA9, 0x85, 0x27, 0x47, 0x07, 0x5B, 0x4F, 0x50,
|
|
# FvLength: 0x20000
|
|
0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00,
|
|
# Signature "_FVH" # Attributes
|
|
0x5f, 0x46, 0x56, 0x48, 0xff, 0xfe, 0x04, 0x00,
|
|
# HeaderLength # CheckSum # ExtHeaderOffset #Reserved #Revision
|
|
0x48, 0x00, 0x19, 0xF9, 0x00, 0x00, 0x00, 0x02,
|
|
# Blockmap[0]: 0x20 Blocks * 0x1000 Bytes / Block
|
|
0x20, 0x00, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00,
|
|
# Blockmap[1]: End
|
|
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
|
## This is the VARIABLE_STORE_HEADER
|
|
!if $(SECURE_BOOT_ENABLE) == TRUE
|
|
# Signature: gEfiAuthenticatedVariableGuid =
|
|
# { 0xaaf32c78, 0x947b, 0x439a,
|
|
# { 0xa1, 0x80, 0x2e, 0x14, 0x4e, 0xc3, 0x77, 0x92 }}
|
|
0x78, 0x2c, 0xf3, 0xaa, 0x7b, 0x94, 0x9a, 0x43,
|
|
0xa1, 0x80, 0x2e, 0x14, 0x4e, 0xc3, 0x77, 0x92,
|
|
!else
|
|
# Signature: gEfiVariableGuid =
|
|
# { 0xddcf3616, 0x3275, 0x4164,
|
|
# { 0x98, 0xb6, 0xfe, 0x85, 0x70, 0x7f, 0xfe, 0x7d }}
|
|
0x16, 0x36, 0xcf, 0xdd, 0x75, 0x32, 0x64, 0x41,
|
|
0x98, 0xb6, 0xfe, 0x85, 0x70, 0x7f, 0xfe, 0x7d,
|
|
!endif
|
|
# Size: 0xe000 (gEfiMdeModulePkgTokenSpaceGuid.PcdFlashNvStorageVariableSize) -
|
|
# 0x48 (size of EFI_FIRMWARE_VOLUME_HEADER) = 0xdfb8
|
|
# This can speed up the Variable Dispatch a bit.
|
|
0xB8, 0xDF, 0x00, 0x00,
|
|
# FORMATTED: 0x5A #HEALTHY: 0xFE #Reserved: UINT16 #Reserved1: UINT32
|
|
0x5A, 0xFE, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00
|
|
}
|
|
|
|
0x0000e000|0x00001000
|
|
#NV_EVENT_LOG
|
|
gUefiOvmfPkgTokenSpaceGuid.PcdOvmfFlashNvStorageEventLogBase|gUefiOvmfPkgTokenSpaceGuid.PcdOvmfFlashNvStorageEventLogSize
|
|
|
|
0x0000f000|0x00001000
|
|
gUefiOvmfPkgTokenSpaceGuid.PcdOvmfFlashNvStorageFtwWorkingBase|gEfiMdeModulePkgTokenSpaceGuid.PcdFlashNvStorageFtwWorkingSize
|
|
#NV_FTW_WORKING
|
|
DATA = {
|
|
# EFI_FAULT_TOLERANT_WORKING_BLOCK_HEADER->Signature = gEdkiiWorkingBlockSignatureGuid =
|
|
# { 0x9e58292b, 0x7c68, 0x497d, { 0xa0, 0xce, 0x65, 0x0, 0xfd, 0x9f, 0x1b, 0x95 }}
|
|
0x2b, 0x29, 0x58, 0x9e, 0x68, 0x7c, 0x7d, 0x49,
|
|
0xa0, 0xce, 0x65, 0x0, 0xfd, 0x9f, 0x1b, 0x95,
|
|
# Crc:UINT32 #WorkingBlockValid:1, WorkingBlockInvalid:1, Reserved
|
|
0x2c, 0xaf, 0x2c, 0x64, 0xFE, 0xFF, 0xFF, 0xFF,
|
|
# WriteQueueSize: UINT64
|
|
0xE0, 0x0F, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00
|
|
}
|
|
|
|
0x00010000|0x00010000
|
|
#NV_FTW_SPARE
|
|
gUefiOvmfPkgTokenSpaceGuid.PcdOvmfFlashNvStorageFtwSpareBase|gEfiMdeModulePkgTokenSpaceGuid.PcdFlashNvStorageFtwSpareSize
|
|
|
|
!ifdef $(FD_SIZE_1MB)
|
|
0x00020000|0x000CC000
|
|
FV = FVMAIN_COMPACT
|
|
|
|
0x000EC000|0x14000
|
|
FV = SECFV
|
|
|
|
!else
|
|
0x00020000|0x001AC000
|
|
FV = FVMAIN_COMPACT
|
|
|
|
0x001CC000|0x34000
|
|
FV = SECFV
|
|
!endif
|
|
|
|
################################################################################
|
|
|
|
[FD.MEMFD]
|
|
BaseAddress = 0x800000
|
|
Size = 0x900000
|
|
ErasePolarity = 1
|
|
BlockSize = 0x10000
|
|
NumBlocks = 0x90
|
|
|
|
0x000000|0x006000
|
|
gUefiOvmfPkgTokenSpaceGuid.PcdOvmfSecPageTablesBase|gUefiOvmfPkgTokenSpaceGuid.PcdOvmfSecPageTablesSize
|
|
|
|
0x006000|0x001000
|
|
gUefiOvmfPkgTokenSpaceGuid.PcdOvmfLockBoxStorageBase|gUefiOvmfPkgTokenSpaceGuid.PcdOvmfLockBoxStorageSize
|
|
|
|
0x007000|0x001000
|
|
gEfiMdePkgTokenSpaceGuid.PcdGuidedExtractHandlerTableAddress|gUefiOvmfPkgTokenSpaceGuid.PcdGuidedExtractHandlerTableSize
|
|
|
|
0x010000|0x008000
|
|
gUefiOvmfPkgTokenSpaceGuid.PcdOvmfSecPeiTempRamBase|gUefiOvmfPkgTokenSpaceGuid.PcdOvmfSecPeiTempRamSize
|
|
|
|
0x018000|0x008000
|
|
gUefiOvmfPkgTokenSpaceGuid.PcdS3AcpiReservedMemoryBase|gEfiIntelFrameworkModulePkgTokenSpaceGuid.PcdS3AcpiReservedMemorySize
|
|
|
|
0x020000|0x0E0000
|
|
gUefiOvmfPkgTokenSpaceGuid.PcdOvmfPeiMemFvBase|gUefiOvmfPkgTokenSpaceGuid.PcdOvmfPeiMemFvSize
|
|
FV = PEIFV
|
|
|
|
0x100000|0x800000
|
|
gUefiOvmfPkgTokenSpaceGuid.PcdOvmfDxeMemFvBase|gUefiOvmfPkgTokenSpaceGuid.PcdOvmfDxeMemFvSize
|
|
FV = DXEFV
|
|
|
|
################################################################################
|
|
|
|
[FV.SECFV]
|
|
BlockSize = 0x1000
|
|
FvAlignment = 16
|
|
ERASE_POLARITY = 1
|
|
MEMORY_MAPPED = TRUE
|
|
STICKY_WRITE = TRUE
|
|
LOCK_CAP = TRUE
|
|
LOCK_STATUS = TRUE
|
|
WRITE_DISABLED_CAP = TRUE
|
|
WRITE_ENABLED_CAP = TRUE
|
|
WRITE_STATUS = TRUE
|
|
WRITE_LOCK_CAP = TRUE
|
|
WRITE_LOCK_STATUS = TRUE
|
|
READ_DISABLED_CAP = TRUE
|
|
READ_ENABLED_CAP = TRUE
|
|
READ_STATUS = TRUE
|
|
READ_LOCK_CAP = TRUE
|
|
READ_LOCK_STATUS = TRUE
|
|
|
|
#
|
|
# SEC Phase modules
|
|
#
|
|
# The code in this FV handles the initial firmware startup, and
|
|
# decompresses the PEI and DXE FVs which handles the rest of the boot sequence.
|
|
#
|
|
INF OvmfPkg/Sec/SecMain.inf
|
|
|
|
INF RuleOverride=RESET_VECTOR USE = IA32 UefiCpuPkg/ResetVector/Vtf0/Bin/ResetVector.inf
|
|
|
|
################################################################################
|
|
[FV.PEIFV]
|
|
BlockSize = 0x10000
|
|
FvAlignment = 16
|
|
ERASE_POLARITY = 1
|
|
MEMORY_MAPPED = TRUE
|
|
STICKY_WRITE = TRUE
|
|
LOCK_CAP = TRUE
|
|
LOCK_STATUS = TRUE
|
|
WRITE_DISABLED_CAP = TRUE
|
|
WRITE_ENABLED_CAP = TRUE
|
|
WRITE_STATUS = TRUE
|
|
WRITE_LOCK_CAP = TRUE
|
|
WRITE_LOCK_STATUS = TRUE
|
|
READ_DISABLED_CAP = TRUE
|
|
READ_ENABLED_CAP = TRUE
|
|
READ_STATUS = TRUE
|
|
READ_LOCK_CAP = TRUE
|
|
READ_LOCK_STATUS = TRUE
|
|
|
|
APRIORI PEI {
|
|
INF MdeModulePkg/Universal/PCD/Pei/Pcd.inf
|
|
}
|
|
|
|
#
|
|
# PEI Phase modules
|
|
#
|
|
INF MdeModulePkg/Core/Pei/PeiMain.inf
|
|
INF MdeModulePkg/Universal/PCD/Pei/Pcd.inf
|
|
INF IntelFrameworkModulePkg/Universal/StatusCode/Pei/StatusCodePei.inf
|
|
INF OvmfPkg/PlatformPei/PlatformPei.inf
|
|
INF MdeModulePkg/Core/DxeIplPeim/DxeIpl.inf
|
|
INF UefiCpuPkg/Universal/Acpi/S3Resume2Pei/S3Resume2Pei.inf
|
|
|
|
################################################################################
|
|
|
|
[FV.DXEFV]
|
|
BlockSize = 0x10000
|
|
FvAlignment = 16
|
|
ERASE_POLARITY = 1
|
|
MEMORY_MAPPED = TRUE
|
|
STICKY_WRITE = TRUE
|
|
LOCK_CAP = TRUE
|
|
LOCK_STATUS = TRUE
|
|
WRITE_DISABLED_CAP = TRUE
|
|
WRITE_ENABLED_CAP = TRUE
|
|
WRITE_STATUS = TRUE
|
|
WRITE_LOCK_CAP = TRUE
|
|
WRITE_LOCK_STATUS = TRUE
|
|
READ_DISABLED_CAP = TRUE
|
|
READ_ENABLED_CAP = TRUE
|
|
READ_STATUS = TRUE
|
|
READ_LOCK_CAP = TRUE
|
|
READ_LOCK_STATUS = TRUE
|
|
|
|
APRIORI DXE {
|
|
INF MdeModulePkg/Universal/DevicePathDxe/DevicePathDxe.inf
|
|
INF MdeModulePkg/Universal/PCD/Dxe/Pcd.inf
|
|
INF OvmfPkg/QemuFlashFvbServicesRuntimeDxe/FvbServicesRuntimeDxe.inf
|
|
}
|
|
|
|
#
|
|
# DXE Phase modules
|
|
#
|
|
INF MdeModulePkg/Core/Dxe/DxeMain.inf
|
|
|
|
INF IntelFrameworkModulePkg/Universal/StatusCode/RuntimeDxe/StatusCodeRuntimeDxe.inf
|
|
INF MdeModulePkg/Universal/PCD/Dxe/Pcd.inf
|
|
|
|
INF MdeModulePkg/Core/RuntimeDxe/RuntimeDxe.inf
|
|
INF MdeModulePkg/Universal/SecurityStubDxe/SecurityStubDxe.inf
|
|
INF MdeModulePkg/Universal/EbcDxe/EbcDxe.inf
|
|
INF PcAtChipsetPkg/8259InterruptControllerDxe/8259.inf
|
|
INF UefiCpuPkg/CpuIo2Dxe/CpuIo2Dxe.inf
|
|
INF UefiCpuPkg/CpuDxe/CpuDxe.inf
|
|
INF PcAtChipsetPkg/8254TimerDxe/8254Timer.inf
|
|
INF PcAtChipsetPkg/PciHostBridgeDxe/PciHostBridgeDxe.inf
|
|
INF MdeModulePkg/Bus/Pci/PciBusDxe/PciBusDxe.inf
|
|
INF PcAtChipsetPkg/KbcResetDxe/Reset.inf
|
|
INF MdeModulePkg/Universal/Metronome/Metronome.inf
|
|
INF PcAtChipsetPkg/PcatRealTimeClockRuntimeDxe/PcatRealTimeClockRuntimeDxe.inf
|
|
|
|
INF OvmfPkg/BlockMmioToBlockIoDxe/BlockIo.inf
|
|
INF OvmfPkg/VirtioPciDeviceDxe/VirtioPciDeviceDxe.inf
|
|
INF OvmfPkg/VirtioBlkDxe/VirtioBlk.inf
|
|
INF OvmfPkg/VirtioScsiDxe/VirtioScsi.inf
|
|
INF OvmfPkg/QemuFlashFvbServicesRuntimeDxe/FvbServicesRuntimeDxe.inf
|
|
INF OvmfPkg/EmuVariableFvbRuntimeDxe/Fvb.inf
|
|
INF MdeModulePkg/Universal/FaultTolerantWriteDxe/FaultTolerantWriteDxe.inf
|
|
|
|
!if $(SECURE_BOOT_ENABLE) == TRUE
|
|
INF SecurityPkg/VariableAuthenticated/RuntimeDxe/VariableRuntimeDxe.inf
|
|
INF OvmfPkg/SecureBootConfigDxe/SecureBootConfigDxe.inf
|
|
!else
|
|
INF MdeModulePkg/Universal/Variable/RuntimeDxe/VariableRuntimeDxe.inf
|
|
!endif
|
|
|
|
INF MdeModulePkg/Universal/WatchdogTimerDxe/WatchdogTimer.inf
|
|
INF MdeModulePkg/Universal/MonotonicCounterRuntimeDxe/MonotonicCounterRuntimeDxe.inf
|
|
INF MdeModulePkg/Universal/CapsuleRuntimeDxe/CapsuleRuntimeDxe.inf
|
|
INF MdeModulePkg/Universal/Console/ConPlatformDxe/ConPlatformDxe.inf
|
|
INF MdeModulePkg/Universal/Console/ConSplitterDxe/ConSplitterDxe.inf
|
|
INF MdeModulePkg/Universal/Console/GraphicsConsoleDxe/GraphicsConsoleDxe.inf
|
|
INF MdeModulePkg/Universal/Console/TerminalDxe/TerminalDxe.inf
|
|
INF IntelFrameworkModulePkg/Universal/BdsDxe/BdsDxe.inf
|
|
INF MdeModulePkg/Universal/DevicePathDxe/DevicePathDxe.inf
|
|
INF MdeModulePkg/Universal/PrintDxe/PrintDxe.inf
|
|
INF MdeModulePkg/Universal/Disk/DiskIoDxe/DiskIoDxe.inf
|
|
INF MdeModulePkg/Universal/Disk/PartitionDxe/PartitionDxe.inf
|
|
INF MdeModulePkg/Universal/Disk/UnicodeCollation/EnglishDxe/EnglishDxe.inf
|
|
INF MdeModulePkg/Bus/Scsi/ScsiBusDxe/ScsiBusDxe.inf
|
|
INF MdeModulePkg/Bus/Scsi/ScsiDiskDxe/ScsiDiskDxe.inf
|
|
INF IntelFrameworkModulePkg/Bus/Pci/IdeBusDxe/IdeBusDxe.inf
|
|
INF PcAtChipsetPkg/Bus/Pci/IdeControllerDxe/IdeControllerDxe.inf
|
|
INF MdeModulePkg/Universal/HiiDatabaseDxe/HiiDatabaseDxe.inf
|
|
INF MdeModulePkg/Universal/SetupBrowserDxe/SetupBrowserDxe.inf
|
|
INF MdeModulePkg/Universal/DisplayEngineDxe/DisplayEngineDxe.inf
|
|
INF MdeModulePkg/Universal/MemoryTest/NullMemoryTestDxe/NullMemoryTestDxe.inf
|
|
|
|
INF PcAtChipsetPkg/IsaAcpiDxe/IsaAcpi.inf
|
|
INF IntelFrameworkModulePkg/Bus/Isa/IsaBusDxe/IsaBusDxe.inf
|
|
|
|
!ifndef $(SOURCE_DEBUG_ENABLE)
|
|
INF IntelFrameworkModulePkg/Bus/Isa/IsaSerialDxe/IsaSerialDxe.inf
|
|
!endif
|
|
|
|
INF IntelFrameworkModulePkg/Bus/Isa/Ps2KeyboardDxe/Ps2keyboardDxe.inf
|
|
INF IntelFrameworkModulePkg/Bus/Isa/IsaFloppyDxe/IsaFloppyDxe.inf
|
|
|
|
INF MdeModulePkg/Universal/SmbiosDxe/SmbiosDxe.inf
|
|
INF OvmfPkg/SmbiosPlatformDxe/SmbiosPlatformDxe.inf
|
|
|
|
INF MdeModulePkg/Universal/Acpi/AcpiTableDxe/AcpiTableDxe.inf
|
|
INF OvmfPkg/AcpiPlatformDxe/AcpiPlatformDxe.inf
|
|
INF RuleOverride=ACPITABLE OvmfPkg/AcpiTables/AcpiTables.inf
|
|
INF OvmfPkg/AcpiS3SaveDxe/AcpiS3SaveDxe.inf
|
|
INF MdeModulePkg/Universal/Acpi/S3SaveStateDxe/S3SaveStateDxe.inf
|
|
INF MdeModulePkg/Universal/Acpi/BootScriptExecutorDxe/BootScriptExecutorDxe.inf
|
|
|
|
INF RuleOverride = BINARY USE = X64 FatBinPkg/EnhancedFatDxe/Fat.inf
|
|
|
|
!ifndef $(USE_OLD_SHELL)
|
|
INF ShellPkg/Application/Shell/Shell.inf
|
|
!else
|
|
INF RuleOverride = BINARY USE = X64 EdkShellBinPkg/FullShell/FullShell.inf
|
|
!endif
|
|
|
|
FILE FREEFORM = PCD(gEfiIntelFrameworkModulePkgTokenSpaceGuid.PcdLogoFile) {
|
|
SECTION RAW = MdeModulePkg/Logo/Logo.bmp
|
|
}
|
|
|
|
#
|
|
# Network modules
|
|
#
|
|
!if $(E1000_ENABLE)
|
|
FILE DRIVER = 5D695E11-9B3F-4b83-B25F-4A8D5D69BE07 {
|
|
SECTION PE32 = Intel3.5/EFIX64/E3507X2.EFI
|
|
}
|
|
!endif
|
|
INF MdeModulePkg/Universal/Network/SnpDxe/SnpDxe.inf
|
|
INF MdeModulePkg/Universal/Network/DpcDxe/DpcDxe.inf
|
|
INF MdeModulePkg/Universal/Network/MnpDxe/MnpDxe.inf
|
|
INF MdeModulePkg/Universal/Network/VlanConfigDxe/VlanConfigDxe.inf
|
|
INF MdeModulePkg/Universal/Network/ArpDxe/ArpDxe.inf
|
|
INF MdeModulePkg/Universal/Network/Dhcp4Dxe/Dhcp4Dxe.inf
|
|
INF MdeModulePkg/Universal/Network/Ip4ConfigDxe/Ip4ConfigDxe.inf
|
|
INF MdeModulePkg/Universal/Network/Ip4Dxe/Ip4Dxe.inf
|
|
INF MdeModulePkg/Universal/Network/Mtftp4Dxe/Mtftp4Dxe.inf
|
|
INF MdeModulePkg/Universal/Network/Tcp4Dxe/Tcp4Dxe.inf
|
|
INF MdeModulePkg/Universal/Network/Udp4Dxe/Udp4Dxe.inf
|
|
INF MdeModulePkg/Universal/Network/UefiPxeBcDxe/UefiPxeBcDxe.inf
|
|
INF MdeModulePkg/Universal/Network/IScsiDxe/IScsiDxe.inf
|
|
INF OvmfPkg/VirtioNetDxe/VirtioNet.inf
|
|
|
|
#
|
|
# Usb Support
|
|
#
|
|
INF MdeModulePkg/Bus/Pci/UhciDxe/UhciDxe.inf
|
|
INF MdeModulePkg/Bus/Pci/EhciDxe/EhciDxe.inf
|
|
INF MdeModulePkg/Bus/Usb/UsbBusDxe/UsbBusDxe.inf
|
|
INF MdeModulePkg/Bus/Usb/UsbKbDxe/UsbKbDxe.inf
|
|
INF MdeModulePkg/Bus/Usb/UsbMassStorageDxe/UsbMassStorageDxe.inf
|
|
|
|
!ifdef $(CSM_ENABLE)
|
|
INF IntelFrameworkModulePkg/Csm/BiosThunk/VideoDxe/VideoDxe.inf
|
|
INF IntelFrameworkModulePkg/Csm/LegacyBiosDxe/LegacyBiosDxe.inf
|
|
INF RuleOverride=CSM OvmfPkg/Csm/Csm16/Csm16.inf
|
|
!endif
|
|
|
|
INF OvmfPkg/QemuVideoDxe/QemuVideoDxe.inf
|
|
INF OvmfPkg/PlatformDxe/Platform.inf
|
|
|
|
################################################################################
|
|
|
|
[FV.FVMAIN_COMPACT]
|
|
FvAlignment = 16
|
|
ERASE_POLARITY = 1
|
|
MEMORY_MAPPED = TRUE
|
|
STICKY_WRITE = TRUE
|
|
LOCK_CAP = TRUE
|
|
LOCK_STATUS = TRUE
|
|
WRITE_DISABLED_CAP = TRUE
|
|
WRITE_ENABLED_CAP = TRUE
|
|
WRITE_STATUS = TRUE
|
|
WRITE_LOCK_CAP = TRUE
|
|
WRITE_LOCK_STATUS = TRUE
|
|
READ_DISABLED_CAP = TRUE
|
|
READ_ENABLED_CAP = TRUE
|
|
READ_STATUS = TRUE
|
|
READ_LOCK_CAP = TRUE
|
|
READ_LOCK_STATUS = TRUE
|
|
|
|
FILE FV_IMAGE = 9E21FD93-9C72-4c15-8C4B-E77F1DB2D792 {
|
|
SECTION GUIDED EE4E5898-3914-4259-9D6E-DC7BD79403CF PROCESSING_REQUIRED = TRUE {
|
|
#
|
|
# These firmware volumes will have files placed in them uncompressed,
|
|
# and then both firmware volumes will be compressed in a single
|
|
# compression operation in order to achieve better overall compression.
|
|
#
|
|
SECTION FV_IMAGE = PEIFV
|
|
SECTION FV_IMAGE = DXEFV
|
|
}
|
|
}
|
|
|
|
################################################################################
|
|
|
|
[Rule.Common.SEC]
|
|
FILE SEC = $(NAMED_GUID) {
|
|
PE32 PE32 $(INF_OUTPUT)/$(MODULE_NAME).efi
|
|
UI STRING ="$(MODULE_NAME)" Optional
|
|
VERSION STRING ="$(INF_VERSION)" Optional BUILD_NUM=$(BUILD_NUMBER)
|
|
}
|
|
|
|
[Rule.Common.PEI_CORE]
|
|
FILE PEI_CORE = $(NAMED_GUID) {
|
|
PE32 PE32 Align=32 $(INF_OUTPUT)/$(MODULE_NAME).efi
|
|
UI STRING ="$(MODULE_NAME)" Optional
|
|
VERSION STRING ="$(INF_VERSION)" Optional BUILD_NUM=$(BUILD_NUMBER)
|
|
}
|
|
|
|
[Rule.Common.PEIM]
|
|
FILE PEIM = $(NAMED_GUID) {
|
|
PEI_DEPEX PEI_DEPEX Optional $(INF_OUTPUT)/$(MODULE_NAME).depex
|
|
PE32 PE32 Align=32 $(INF_OUTPUT)/$(MODULE_NAME).efi
|
|
UI STRING="$(MODULE_NAME)" Optional
|
|
VERSION STRING="$(INF_VERSION)" Optional BUILD_NUM=$(BUILD_NUMBER)
|
|
}
|
|
|
|
[Rule.Common.DXE_CORE]
|
|
FILE DXE_CORE = $(NAMED_GUID) {
|
|
PE32 PE32 $(INF_OUTPUT)/$(MODULE_NAME).efi
|
|
UI STRING="$(MODULE_NAME)" Optional
|
|
VERSION STRING="$(INF_VERSION)" Optional BUILD_NUM=$(BUILD_NUMBER)
|
|
}
|
|
|
|
[Rule.Common.DXE_DRIVER]
|
|
FILE DRIVER = $(NAMED_GUID) {
|
|
DXE_DEPEX DXE_DEPEX Optional $(INF_OUTPUT)/$(MODULE_NAME).depex
|
|
PE32 PE32 $(INF_OUTPUT)/$(MODULE_NAME).efi
|
|
UI STRING="$(MODULE_NAME)" Optional
|
|
VERSION STRING="$(INF_VERSION)" Optional BUILD_NUM=$(BUILD_NUMBER)
|
|
}
|
|
|
|
[Rule.Common.DXE_RUNTIME_DRIVER]
|
|
FILE DRIVER = $(NAMED_GUID) {
|
|
DXE_DEPEX DXE_DEPEX Optional $(INF_OUTPUT)/$(MODULE_NAME).depex
|
|
PE32 PE32 $(INF_OUTPUT)/$(MODULE_NAME).efi
|
|
UI STRING="$(MODULE_NAME)" Optional
|
|
VERSION STRING="$(INF_VERSION)" Optional BUILD_NUM=$(BUILD_NUMBER)
|
|
}
|
|
|
|
[Rule.Common.UEFI_DRIVER]
|
|
FILE DRIVER = $(NAMED_GUID) {
|
|
DXE_DEPEX DXE_DEPEX Optional $(INF_OUTPUT)/$(MODULE_NAME).depex
|
|
PE32 PE32 $(INF_OUTPUT)/$(MODULE_NAME).efi
|
|
UI STRING="$(MODULE_NAME)" Optional
|
|
VERSION STRING="$(INF_VERSION)" Optional BUILD_NUM=$(BUILD_NUMBER)
|
|
}
|
|
|
|
[Rule.Common.UEFI_DRIVER.BINARY]
|
|
FILE DRIVER = $(NAMED_GUID) {
|
|
DXE_DEPEX DXE_DEPEX Optional |.depex
|
|
PE32 PE32 |.efi
|
|
UI STRING="$(MODULE_NAME)" Optional
|
|
VERSION STRING="$(INF_VERSION)" Optional BUILD_NUM=$(BUILD_NUMBER)
|
|
}
|
|
|
|
[Rule.Common.UEFI_APPLICATION]
|
|
FILE APPLICATION = $(NAMED_GUID) {
|
|
PE32 PE32 $(INF_OUTPUT)/$(MODULE_NAME).efi
|
|
UI STRING="$(MODULE_NAME)" Optional
|
|
VERSION STRING="$(INF_VERSION)" Optional BUILD_NUM=$(BUILD_NUMBER)
|
|
}
|
|
|
|
[Rule.Common.UEFI_APPLICATION.BINARY]
|
|
FILE APPLICATION = $(NAMED_GUID) {
|
|
PE32 PE32 |.efi
|
|
UI STRING="$(MODULE_NAME)" Optional
|
|
VERSION STRING="$(INF_VERSION)" Optional BUILD_NUM=$(BUILD_NUMBER)
|
|
}
|
|
|
|
[Rule.Common.USER_DEFINED.ACPITABLE]
|
|
FILE FREEFORM = $(NAMED_GUID) {
|
|
RAW ACPI |.acpi
|
|
RAW ASL |.aml
|
|
}
|
|
|
|
[Rule.Common.USER_DEFINED.CSM]
|
|
FILE FREEFORM = $(NAMED_GUID) {
|
|
RAW BIN |.bin
|
|
}
|
|
|
|
[Rule.Common.SEC.RESET_VECTOR]
|
|
FILE RAW = $(NAMED_GUID) {
|
|
RAW RAW |.raw
|
|
}
|