From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mga18.intel.com (mga18.intel.com [134.134.136.126]) by mx.groups.io with SMTP id smtpd.web11.8827.1592705689033875842 for ; Sat, 20 Jun 2020 19:14:49 -0700 Authentication-Results: mx.groups.io; dkim=missing; spf=pass (domain: intel.com, ip: 134.134.136.126, mailfrom: guo.dong@intel.com) IronPort-SDR: ye+ewOQew2hhCDvN8Nyn/cI/y49+912sMPzx8jYjw5LMfV7egdQnCChT+uAkJ5zS78CJQeZz4n zA516ls3G+EQ== X-IronPort-AV: E=McAfee;i="6000,8403,9658"; a="130838132" X-IronPort-AV: E=Sophos;i="5.75,261,1589266800"; d="scan'208";a="130838132" X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga005.fm.intel.com ([10.253.24.32]) by orsmga106.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 20 Jun 2020 19:14:47 -0700 IronPort-SDR: gk9zYFFYwSVAqSJrgVb7eLgdZtsrRgLVK2vKlspeerS8u+at6KrOo6N7dMX4eVt7PGRPdhOxhC 3AkBDdEFcFnA== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.75,261,1589266800"; d="scan'208";a="478057608" Received: from gdong1-mobl.amr.corp.intel.com ([10.209.22.173]) by fmsmga005.fm.intel.com with ESMTP; 20 Jun 2020 19:14:47 -0700 From: "Guo Dong" 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 Message-Id: <20200621021441.32356-1-guo.dong@intel.com> X-Mailer: git-send-email 2.16.2.windows.1 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 --- 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