From: "Guo Dong" <guo.dong@intel.com>
To: devel@edk2.groups.io
Cc: maurice.ma@intel.com, benjamin.you@intel.com, guo.dong@intel.com
Subject: [edk2-devel] [PATCH V1] UefiPayloadPkg:Fix NOOPT build failure
Date: Sat, 20 Jun 2020 19:14:41 -0700 [thread overview]
Message-ID: <20200621021441.32356-1-guo.dong@intel.com> (raw)
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>
---
UefiPayloadPkg/UefiPayloadPkg.fdf | 32 ++++++++++++++++++++++++--------
1 file changed, 24 insertions(+), 8 deletions(-)
diff --git a/UefiPayloadPkg/UefiPayloadPkg.fdf b/UefiPayloadPkg/UefiPayloadPkg.fdf
index dfbcde5668..a04fcd2ec2 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
--
2.16.2.windows.1
next reply other threads:[~2020-06-21 2:14 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-06-21 2:14 Guo Dong [this message]
2020-06-22 16:05 ` [edk2-devel] [PATCH V1] UefiPayloadPkg:Fix NOOPT build failure Ma, Maurice
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-list from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20200621021441.32356-1-guo.dong@intel.com \
--to=devel@edk2.groups.io \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox