summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGuo Dong <guo.dong@intel.com>2020-06-20 19:01:15 -0700
committermergify[bot] <37929162+mergify[bot]@users.noreply.github.com>2020-07-10 21:53:13 +0000
commitf7f1b33282b7dc52a0c77860d3f4523b231a750f (patch)
treeca5d656f6c6ad392db7865fee7734280bc12e3b7
parentbdafda8c457eb90c65f37026589b54258300f05c (diff)
downloadedk2-f7f1b33282b7dc52a0c77860d3f4523b231a750f.zip
edk2-f7f1b33282b7dc52a0c77860d3f4523b231a750f.tar.gz
edk2-f7f1b33282b7dc52a0c77860d3f4523b231a750f.tar.bz2
UefiPayloadPkg:Fix NOOPT build failure
When build UEFI payload using NOOPT, it would build failure since the FV size. So this patch increases FV size to support NOOPT. If not NOOPT build, there is no change to FV size. Signed-off-by: Guo Dong <guo.dong@intel.com> Reviewed-by: Maurice Ma <maurice.ma@intel.com>
-rw-r--r--UefiPayloadPkg/UefiPayloadPkg.fdf32
1 files changed, 24 insertions, 8 deletions
diff --git a/UefiPayloadPkg/UefiPayloadPkg.fdf b/UefiPayloadPkg/UefiPayloadPkg.fdf
index dfbcde5..a04fcd2 100644
--- a/UefiPayloadPkg/UefiPayloadPkg.fdf
+++ b/UefiPayloadPkg/UefiPayloadPkg.fdf
@@ -8,23 +8,39 @@
#
##
+[Defines]
+DEFINE FD_BASE = 0x00800000
+DEFINE FD_BLOCK_SIZE = 0x00001000
+
+!if $(TARGET) == "NOOPT"
+DEFINE PEI_FV_SIZE = 0x00050000
+DEFINE DXE_FV_SIZE = 0x00800000
+DEFINE FD_SIZE = 0x00850000
+DEFINE NUM_BLOCKS = 0x850
+!else
+DEFINE PEI_FV_SIZE = 0x30000
+DEFINE DXE_FV_SIZE = 0x3E0000
+DEFINE FD_SIZE = 0x00410000
+DEFINE NUM_BLOCKS = 0x410
+!endif
+
################################################################################
[FD.UefiPayload]
-BaseAddress = 0x800000|gUefiPayloadPkgTokenSpaceGuid.PcdPayloadFdMemBase
-Size = 0x410000|gUefiPayloadPkgTokenSpaceGuid.PcdPayloadFdMemSize
+BaseAddress = $(FD_BASE) | gUefiPayloadPkgTokenSpaceGuid.PcdPayloadFdMemBase
+Size = $(FD_SIZE) | gUefiPayloadPkgTokenSpaceGuid.PcdPayloadFdMemSize
ErasePolarity = 1
-BlockSize = 0x1000
-NumBlocks = 0x410
+BlockSize = $(FD_BLOCK_SIZE)
+NumBlocks = $(NUM_BLOCKS)
-0x00000000|0x030000
+0x00000000|$(PEI_FV_SIZE)
FV = PEIFV
-0x00030000|0x3E0000
+$(PEI_FV_SIZE)|$(DXE_FV_SIZE)
FV = DXEFV
################################################################################
[FV.PEIFV]
-BlockSize = 0x1000
+BlockSize = $(FD_BLOCK_SIZE)
FvAlignment = 16
ERASE_POLARITY = 1
MEMORY_MAPPED = TRUE
@@ -54,7 +70,7 @@ INF MdeModulePkg/Core/DxeIplPeim/DxeIpl.inf
################################################################################
[FV.DXEFV]
-BlockSize = 0x1000
+BlockSize = $(FD_BLOCK_SIZE)
FvForceRebase = FALSE
FvAlignment = 16
ERASE_POLARITY = 1