From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mga17.intel.com (mga17.intel.com [192.55.52.151]) by mx.groups.io with SMTP id smtpd.web10.12996.1671420045946980869 for ; Sun, 18 Dec 2022 19:20:46 -0800 Authentication-Results: mx.groups.io; dkim=fail reason="unable to parse pub key" header.i=@intel.com header.s=intel header.b=blIjSjlM; spf=pass (domain: intel.com, ip: 192.55.52.151, mailfrom: marsx.lin@intel.com) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1671420045; x=1702956045; h=from:to:cc:subject:date:message-id:mime-version: content-transfer-encoding; bh=aFOT87vyq+c6Rxf3WnpT5mjIQTyXWI/zjumXNC60bKE=; b=blIjSjlMwL2648AB/FXjme4YMAsdcAikvdzZU35nXOQWEj38fiwr+Ja+ MfDABzfJFA0ELbneMF9Sm4R8upQeToxYqAZpdiasJToa1xOlkNYlRZitQ fk1p21rfuADRbjZw+m2VVhdpPwMbo6JhE2iQpcObLg5eTBtKhk2tlnzWL Nwy8NEmwyFZk6zO4ycNiVxphOPruj0oixzXjFZztIOYBIV4LnrHiPFLIm NfPR178ljoVpyhtT2CY4M5voMTQSD7O/wNE7m3Rf6Mv8lTRBQYYngVAxN 932I88TBlpRqV0d66fakOysBDUUes1OGh2bohNtyybORxoQbuP00AGO93 w==; X-IronPort-AV: E=McAfee;i="6500,9779,10565"; a="299593098" X-IronPort-AV: E=Sophos;i="5.96,254,1665471600"; d="scan'208";a="299593098" Received: from fmsmga005.fm.intel.com ([10.253.24.32]) by fmsmga107.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 18 Dec 2022 19:20:45 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6500,9779,10565"; a="979251813" X-IronPort-AV: E=Sophos;i="5.96,254,1665471600"; d="scan'208";a="979251813" Received: from marslinx-desk1.gar.corp.intel.com ([10.5.215.146]) by fmsmga005.fm.intel.com with ESMTP; 18 Dec 2022 19:20:43 -0800 From: marsx.lin@intel.com To: devel@edk2.groups.io Cc: MarsX Lin , Guo Dong , Ray Ni , Sean Rhodes , James Lu , Gua Guo Subject: [PATCH v2] UefiPayloadPkg: Move bdsdxe.inf from DXEFV to BDSFV Date: Mon, 19 Dec 2022 11:20:33 +0800 Message-Id: <20221219032033.532-1-marsx.lin@intel.com> X-Mailer: git-send-email 2.33.0.windows.2 MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable From: MarsX Lin REF: https://bugzilla.tianocore.org/show_bug.cgi?id=3D4196 Since UefiPayload had supported multiple fv, move bdsdxe.inf to new firmware volume and modify the script of UniversalPayloadPkgBuild.py to support bdsdxe fv in elf file Cc: Guo Dong Cc: Ray Ni Cc: Sean Rhodes Cc: James Lu Cc: Gua Guo Signed-off-by: MarsX Lin --- UefiPayloadPkg/UefiPayloadPkg.fdf | 27 +++++++++++++++++++- UefiPayloadPkg/UniversalPayloadBuild.py | 12 +++++---- 2 files changed, 33 insertions(+), 6 deletions(-) diff --git a/UefiPayloadPkg/UefiPayloadPkg.fdf b/UefiPayloadPkg/UefiPayload= Pkg.fdf index 9c9e2f2741..94ba922244 100644 --- a/UefiPayloadPkg/UefiPayloadPkg.fdf +++ b/UefiPayloadPkg/UefiPayloadPkg.fdf @@ -59,8 +59,33 @@ INF UefiPayloadPkg/UefiPayloadEntry/UefiPayloadEntry.inf FILE FV_IMAGE =3D 4E35FD93-9C72-4c15-8C4B-E77F1DB2D793 {=0D SECTION FV_IMAGE =3D DXEFV=0D }=0D +FILE FV_IMAGE =3D FBE6C1E3-2F80-4770-88B0-494186E3346F {=0D + SECTION FV_IMAGE =3D BDSFV=0D +}=0D =0D ##########################################################################= ######=0D +[FV.BDSFV]=0D +FvNameGuid =3D CA5590AF-9558-4822-B5EA-BE2E876CD3EC=0D +BlockSize =3D $(FD_BLOCK_SIZE)=0D +FvForceRebase =3D FALSE=0D +FvAlignment =3D 16=0D +ERASE_POLARITY =3D 1=0D +MEMORY_MAPPED =3D TRUE=0D +STICKY_WRITE =3D TRUE=0D +LOCK_CAP =3D TRUE=0D +LOCK_STATUS =3D TRUE=0D +WRITE_DISABLED_CAP =3D TRUE=0D +WRITE_ENABLED_CAP =3D TRUE=0D +WRITE_STATUS =3D TRUE=0D +WRITE_LOCK_CAP =3D TRUE=0D +WRITE_LOCK_STATUS =3D TRUE=0D +READ_DISABLED_CAP =3D TRUE=0D +READ_ENABLED_CAP =3D TRUE=0D +READ_STATUS =3D TRUE=0D +READ_LOCK_CAP =3D TRUE=0D +READ_LOCK_STATUS =3D TRUE=0D +=0D +INF MdeModulePkg/Universal/BdsDxe/BdsDxe.inf=0D =0D [FV.DXEFV]=0D FvNameGuid =3D 8063C21A-8E58-4576-95CE-089E87975D23=0D @@ -106,7 +131,7 @@ INF CryptoPkg/Driver/CryptoDxe.inf INF MdeModulePkg/Universal/SecurityStubDxe/SecurityStubDxe.inf=0D !endif=0D INF UefiCpuPkg/CpuDxe/CpuDxe.inf=0D -INF MdeModulePkg/Universal/BdsDxe/BdsDxe.inf=0D +=0D INF RuleOverride =3D UI MdeModulePkg/Application/UiApp/UiApp.inf=0D INF MdeModulePkg/Application/BootManagerMenuApp/BootManagerMenuApp.inf=0D INF PcAtChipsetPkg/HpetTimerDxe/HpetTimerDxe.inf=0D diff --git a/UefiPayloadPkg/UniversalPayloadBuild.py b/UefiPayloadPkg/Unive= rsalPayloadBuild.py index 50a5950e7c..6d62b8b20f 100644 --- a/UefiPayloadPkg/UniversalPayloadBuild.py +++ b/UefiPayloadPkg/UniversalPayloadBuild.py @@ -67,7 +67,8 @@ def BuildUniversalPayload(Args, MacroList): =0D EntryModuleInf =3D os.path.normpath("UefiPayloadPkg/UefiPayloadEntry/U= niversalPayloadEntry.inf")=0D DscPath =3D os.path.normpath("UefiPayloadPkg/UefiPayloadPkg.dsc")=0D - FvOutputDir =3D os.path.join(BuildDir, "{}_{}".format (BuildTarget, To= olChain), os.path.normpath("FV/DXEFV.Fv"))=0D + DxeFvOutputDir =3D os.path.join(BuildDir, "{}_{}".format (BuildTarget,= ToolChain), os.path.normpath("FV/DXEFV.Fv"))=0D + BdsFvOutputDir =3D os.path.join(BuildDir, "{}_{}".format (BuildTarget,= ToolChain), os.path.normpath("FV/BDSFV.Fv"))=0D PayloadReportPath =3D os.path.join(BuildDir, "UefiUniversalPayload.txt= ")=0D ModuleReportPath =3D os.path.join(BuildDir, "UefiUniversalPayloadEntry= .txt")=0D UpldInfoFile =3D os.path.join(BuildDir, "UniversalPayloadInfo.bin")=0D @@ -119,21 +120,22 @@ def BuildUniversalPayload(Args, MacroList): #=0D # Copy the DXEFV as a section in elf format Universal Payload entry.=0D #=0D - remove_section =3D '"{}" -I {} -O {} --remove-section .upld_info --rem= ove-section .upld.uefi_fv {}'.format (=0D + remove_section =3D '"{}" -I {} -O {} --remove-section .upld_info --rem= ove-section .upld.uefi_fv --remove-section .upld.bds_fv {}'.format (=0D LlvmObjcopyPath,=0D ObjCopyFlag,=0D ObjCopyFlag,=0D EntryOutputDir=0D )=0D - add_section =3D '"{}" -I {} -O {} --add-section .upld_info=3D{} --a= dd-section .upld.uefi_fv=3D{} {}'.format (=0D + add_section =3D '"{}" -I {} -O {} --add-section .upld_info=3D{} --a= dd-section .upld.uefi_fv=3D{} --add-section .upld.bds_fv=3D{} {}'.format (= =0D LlvmObjcopyPath,=0D ObjCopyFlag,=0D ObjCopyFlag,=0D UpldInfoFile,=0D - FvOutputDir,=0D + DxeFvOutputDir,=0D + BdsFvOutputDir,=0D EntryOutputDir=0D )=0D - set_section =3D '"{}" -I {} -O {} --set-section-alignment .upld_inf= o=3D4 --set-section-alignment .upld.uefi_fv=3D16 {}'.format (=0D + set_section =3D '"{}" -I {} -O {} --set-section-alignment .upld_inf= o=3D16 --set-section-alignment .upld.uefi_fv=3D16 --set-section-alignment .= upld.bds_fv=3D16 {}'.format (=0D LlvmObjcopyPath,=0D ObjCopyFlag,=0D ObjCopyFlag,=0D --=20 2.33.0.windows.2