summaryrefslogtreecommitdiffstats
path: root/OvmfPkg/OvmfPkgIa32X64.fdf
diff options
context:
space:
mode:
authorjljusten <jljusten@6f19259b-4bc3-4df7-8a09-765794883524>2010-01-04 16:17:59 +0000
committerjljusten <jljusten@6f19259b-4bc3-4df7-8a09-765794883524>2010-01-04 16:17:59 +0000
commitc1c2669c6bb3ed4e23c06a93e60450a4fc3eccf2 (patch)
tree844feddcd621f20d1d6e27eb3efc0bc437367112 /OvmfPkg/OvmfPkgIa32X64.fdf
parent8cf01cae78c1e7b823587aac1b672a8c5adccaa9 (diff)
downloadedk2-c1c2669c6bb3ed4e23c06a93e60450a4fc3eccf2.tar.gz
edk2-c1c2669c6bb3ed4e23c06a93e60450a4fc3eccf2.tar.bz2
edk2-c1c2669c6bb3ed4e23c06a93e60450a4fc3eccf2.zip
OVMF: Update OVMF FD/FV build to minimize ROM size
* Only SEC is uncompressed now * The MAIN FV with PEI & DXE can easily shrink and grow as needed * The final output will now be OVMF.Fv rather than OVMF.fd * The final output size will be a multiple of 64kb git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@9672 6f19259b-4bc3-4df7-8a09-765794883524
Diffstat (limited to 'OvmfPkg/OvmfPkgIa32X64.fdf')
-rw-r--r--OvmfPkg/OvmfPkgIa32X64.fdf159
1 files changed, 77 insertions, 82 deletions
diff --git a/OvmfPkg/OvmfPkgIa32X64.fdf b/OvmfPkg/OvmfPkgIa32X64.fdf
index d734175e6e..dd238cfe04 100644
--- a/OvmfPkg/OvmfPkgIa32X64.fdf
+++ b/OvmfPkg/OvmfPkgIa32X64.fdf
@@ -1,7 +1,7 @@
#/** @file
# Open Virtual Machine Firmware: FDF
#
-# Copyright (c) 2006 - 2009, Intel Corporation
+# Copyright (c) 2006 - 2010, Intel Corporation
#
# All rights reserved. This program and the accompanying materials
# are licensed and made available under the terms and conditions of the BSD License
@@ -14,57 +14,65 @@
#**/
################################################################################
-#
-# FD Section
-# The [FD] Section is made up of the definition statements and a
-# description of what goes into the Flash Device Image. Each FD section
-# defines one flash "device" image. A flash device image may be one of
-# the following: Removable media bootable image (like a boot floppy
-# image,) an Option ROM image (that would be "flashed" into an add-in
-# card,) a System "Flash" image (that would be burned into a system's
-# flash) or an Update ("Capsule") image that will be used to update and
-# existing system flash.
-#
+[FD.SEC]
+BaseAddress = 0xFFFEE000
+Size = 0x00012000
+ErasePolarity = 1
+BlockSize = 0x1000
+NumBlocks = 0x12
+
+0x0|0x12000
+FV = SECFV
+
################################################################################
-[FD.OVMF]
-BaseAddress = 0xFFE00000 # The base address of the FLASH Device.
-Size = 0x00200000 # The size in bytes of the FLASH Device
+
+[FD.MEMFD]
+BaseAddress = 0x800000|gUefiOvmfPkgTokenSpaceGuid.PcdOvmfMemFvBase
+Size = 0x400000|gUefiOvmfPkgTokenSpaceGuid.PcdOvmfMemFvSize
ErasePolarity = 1
BlockSize = 0x10000
-NumBlocks = 0x20
+NumBlocks = 0x40
-################################################################################
-#
-# Following are lists of FD Region layout which correspond to the locations of different
-# images within the flash device.
-#
-# Regions must be defined in ascending order and may not overlap.
-#
-# A Layout Region start with a eight digit hex offset (leading "0x" required) followed by
-# the pipe "|" character, followed by the size of the region, also in hex with the leading
-# "0x" characters. Like:
-# Offset|Size
-# PcdOffsetCName|PcdSizeCName
-# RegionType <FV, DATA, or FILE>
-#
-################################################################################
-0x0|0x200000
-gEfiUnixPkgTokenSpaceGuid.PcdUnixFlashFvRecoveryBase|gEfiUnixPkgTokenSpaceGuid.PcdUnixFlashFvRecoverySize
+0x0|0x400000
FV = MAINFV
################################################################################
+
+[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
+
#
-# FV Section
+# SEC Phase modules
#
-# [FV] section is used to define what components or modules are placed within a flash
-# device file. This section also defines order the components and modules are positioned
-# within the image. The [FV] section consists of define statements, set statements and
-# module statements.
+# The code in this FV handles the initial firmware startup, and
+# decompresses the MAINFV which handles the majority of the boot sequence.
#
+INF OvmfPkg/Sec/SecMain.inf
+
+FILE RAW = 1BA0062E-C779-4582-8566-336AE8F78F09 {
+ SECTION RAW = OvmfPkg/ResetVector/Bin/ResetVector.ia32.raw
+ }
+
################################################################################
-[FV.DXEFV]
-BlockSize = 0x1000
-FvAlignment = 16 #FV alignment and FV attributes setting.
+[FV.MAINFV]
+BlockSize = 0x10000
+FvAlignment = 16
ERASE_POLARITY = 1
MEMORY_MAPPED = TRUE
STICKY_WRITE = TRUE
@@ -82,7 +90,7 @@ READ_LOCK_CAP = TRUE
READ_LOCK_STATUS = TRUE
#
-# Files to be placed in DXEFV
+# Files to be placed in MAIN FV
#
# This firmware volume will have files placed in it uncompressed,
# and then then entire firmware volume will be compressed in a
@@ -90,12 +98,25 @@ READ_LOCK_STATUS = TRUE
# overall compression.
#
+APRIORI PEI {
+ INF MdeModulePkg/Universal/PCD/Pei/Pcd.inf
+}
+
APRIORI DXE {
INF MdeModulePkg/Universal/PCD/Dxe/Pcd.inf
INF IntelFrameworkModulePkg/Universal/DataHubDxe/DataHubDxe.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
+
+#
# DXE Phase modules
#
INF MdeModulePkg/Core/Dxe/DxeMain.inf
@@ -106,7 +127,7 @@ INF MdeModulePkg/Universal/PCD/Dxe/Pcd.inf
INF MdeModulePkg/Core/RuntimeDxe/RuntimeDxe.inf
INF MdeModulePkg/Universal/SecurityStubDxe/SecurityStubDxe.inf
INF IntelFrameworkModulePkg/Universal/DataHubDxe/DataHubDxe.inf
-INF MdeModulePkg/Universal/EbcDxe/EbcDxe.inf
+INF MdeModulePkg/Universal/EbcDxe/EbcDxe.inf
INF MdeModulePkg/Universal/SmbiosDxe/SmbiosDxe.inf
INF PcAtChipsetPkg/8259InterruptControllerDxe/8259.inf
INF UefiCpuPkg/CpuIo2Dxe/CpuIo2Dxe.inf
@@ -167,7 +188,8 @@ FILE FREEFORM = PCD(gEfiIntelFrameworkModulePkgTokenSpaceGuid.PcdLogoFile) {
################################################################################
-[FV.MAINFV]
+[FV.OVMF]
+BlockSize = 0x10000
FvAlignment = 16
ERASE_POLARITY = 1
MEMORY_MAPPED = TRUE
@@ -186,54 +208,27 @@ READ_LOCK_CAP = TRUE
READ_LOCK_STATUS = TRUE
#
-# Files to be placed in MAINFV
-#
-# This firmware volume will have all the files placed in it which
-# must not be compressed at the initial boot phase. The only
-# exception to this is the compressed 'DXEFV'.
-#
-
-APRIORI PEI {
- INF MdeModulePkg/Universal/PCD/Pei/Pcd.inf
-}
-
-#
-# SEC Phase modules
-#
-INF OvmfPkg/Sec/SecMain.inf
-
-#
-# PEI Phase modules
-#
-INF MdeModulePkg/Core/Pei/PeiMain.inf
-INF RuleOverride=NORELOC MdeModulePkg/Universal/PCD/Pei/Pcd.inf
-INF RuleOverride=NORELOC IntelFrameworkModulePkg/Universal/StatusCode/Pei/StatusCodePei.inf
-INF RuleOverride=NORELOC OvmfPkg/PlatformPei/PlatformPei.inf
-INF MdeModulePkg/Core/DxeIplPeim/DxeIpl.inf
-
-#
-# This file contains the compressed 'DXEFV', which is compressed
+# This file contains the compressed MAINFV, which is compressed
# in a single compression operation in order to achieve better
# overall compression.
#
FILE FV_IMAGE = 20bc8ac9-94d1-4208-ab28-5d673fd73486 {
SECTION GUIDED EE4E5898-3914-4259-9D6E-DC7BD79403CF PROCESSING_REQUIRED = TRUE { # LzmaCompress
- SECTION FV_IMAGE = DXEFV
+ SECTION FV_IMAGE = MAINFV
}
}
-FILE RAW = 1BA0062E-C779-4582-8566-336AE8F78F09 {
- SECTION RAW = OvmfPkg/ResetVector/Bin/ResetVector.ia32.raw
- }
-
-
-################################################################################
#
-# Rules are use with the [FV] section's module INF type to define
-# how an FFS file is created for a given INF file. The following Rule are the default
-# rules for the different module type. User can add the customized rules to define the
-# content of the FFS file.
+# This file contains the uncompressed SECFV, which contains the initial
+# boot code. The code in this FV decompresses the MAINFV.
+#
+# It uses the Volume Top File (VTF) GUID so it will be placed at the
+# end of the FV.
#
+FILE FREEFORM = 1BA0062E-C779-4582-8566-336AE8F78F09 {
+ SECTION Align=16 FV_IMAGE = SECFV
+}
+
################################################################################
[Rule.Common.PEI_CORE]