[edk2-devel] [PATCH V1] UefiPayloadPkg:Fix NOOPT build failure

Guo Dong posted 1 patch 3 weeks ago
Failed in applying to current master (apply log)
UefiPayloadPkg/UefiPayloadPkg.fdf | 32 ++++++++++++++++++++++++--------
1 file changed, 24 insertions(+), 8 deletions(-)

[edk2-devel] [PATCH V1] UefiPayloadPkg:Fix NOOPT build failure

Posted by Guo Dong 3 weeks ago
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


-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.

View/Reply Online (#61547): https://edk2.groups.io/g/devel/message/61547
Mute This Topic: https://groups.io/mt/75013473/1787277
Group Owner: devel+owner@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub  [importer@patchew.org]
-=-=-=-=-=-=-=-=-=-=-=-

Re: [edk2-devel] [PATCH V1] UefiPayloadPkg:Fix NOOPT build failure

Posted by Ma, Maurice 2 weeks ago
Reviewed-by: Maurice Ma <maurice.ma@intel.com>


> -----Original Message-----
> From: Dong, Guo <guo.dong@intel.com>
> Sent: Saturday, June 20, 2020 19:15
> To: devel@edk2.groups.io
> Cc: Ma, Maurice <maurice.ma@intel.com>; You, Benjamin
> <benjamin.you@intel.com>; Dong, Guo <guo.dong@intel.com>
> Subject: [edk2-devel] [PATCH V1] 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>
> ---
>  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


-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.

View/Reply Online (#61564): https://edk2.groups.io/g/devel/message/61564
Mute This Topic: https://groups.io/mt/75013473/1787277
Group Owner: devel+owner@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub  [importer@patchew.org]
-=-=-=-=-=-=-=-=-=-=-=-