From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mga04.intel.com (mga04.intel.com [192.55.52.120]) by mx.groups.io with SMTP id smtpd.web08.65.1650337008978221124 for ; Mon, 18 Apr 2022 19:56:49 -0700 Authentication-Results: mx.groups.io; dkim=fail reason="unable to parse pub key" header.i=@intel.com header.s=intel header.b=GB9XMBWh; spf=pass (domain: intel.com, ip: 192.55.52.120, mailfrom: ray.ni@intel.com) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1650337009; x=1681873009; h=from:to:cc:subject:date:message-id:references: in-reply-to:content-transfer-encoding:mime-version; bh=+EwrCXP7T65+UxPwvS19rblvgwqDqYYa0CyI9II0oEo=; b=GB9XMBWhXJSVeKX52SNN9ZmgMgvLPhphRh2gMq9bFkOQKTPbuznJ2d2i cT0x8IehyuqGR3f5egEHpXW8pJLq2nVjFqnkJfktKErybb78SfmRYcmt3 AnsbOyrHDW0kMRJAaoK//L6XrdAYoHkIv+QAp458qCOlkMQLC9o4IqPar XJHOfhGGIWCyW2jqPWcqM3GjW6yXLixX2JMdjZdP2EVsshApQ4ANXSGef Hy69KpD1wZEjkBhCCc6kLzcrmuYbr/FR2glNCZ1b+Rg3E/uRtExA0b/Yj EotFyK0Vd292HdVFXhpP7QyZVJOursXSvIQ//JghXlzbE+ANGNFCNuCsn A==; X-IronPort-AV: E=McAfee;i="6400,9594,10321"; a="262520380" X-IronPort-AV: E=Sophos;i="5.90,271,1643702400"; d="scan'208";a="262520380" Received: from orsmga002.jf.intel.com ([10.7.209.21]) by fmsmga104.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 18 Apr 2022 19:56:48 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.90,271,1643702400"; d="scan'208";a="529855736" Received: from fmsmsx601.amr.corp.intel.com ([10.18.126.81]) by orsmga002.jf.intel.com with ESMTP; 18 Apr 2022 19:56:48 -0700 Received: from fmsmsx601.amr.corp.intel.com (10.18.126.81) by fmsmsx601.amr.corp.intel.com (10.18.126.81) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2308.27; Mon, 18 Apr 2022 19:56:48 -0700 Received: from fmsedg602.ED.cps.intel.com (10.1.192.136) by fmsmsx601.amr.corp.intel.com (10.18.126.81) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2308.27 via Frontend Transport; Mon, 18 Apr 2022 19:56:48 -0700 Received: from NAM10-BN7-obe.outbound.protection.outlook.com (104.47.70.107) by edgegateway.intel.com (192.55.55.71) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.1.2308.27; Mon, 18 Apr 2022 19:56:47 -0700 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=GcrWHFMUz+kctkfRWtF5jlj8frT9rvGMLGT0trpYuirtUq9qVSWLCgHsu1a0Zs8GgCJ3lr0w88iOwcLuIsCGnzzqS6S4q8WVSyiYMY2QfDibK4P2C91CbwgzXZCH8QMOEGy3qJOTERGHomY/8wKFg4NO+Pyv+os6vF/pUWqnNzyva0F4KkXuFZf+WUotc5jKKhQ7sSgs85u+PKQuLm4VHPzDr+qd1IMyMhLJJNFP0jZWAUwVrLucuWzccG19Z8drPphrJuYDEFXZtK9tVQFa9X/CtYzx732+XYC+IXu1zMeu9pPE5DmWMIF2feBCdCNVxr5W/8UkTlrQn/FXM+BYgg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=WD68e0y8obO69+OCVIlCAiY16M6wUA12S3rilThIgfs=; b=dth+MilB9FkzO7S8QhV/PuItbFi6J7GQmyTYMMWTC16wOiWN1U0JVrxgsWIGpxPpHqvTSUzzcPScn3YsjwiBfkhMMbbrqWhVtparx8z+Eu++ac58MemfhuWh/BhQCFPG0mlTUu4xCNtjMmbf6dKK0tzzwqmttFV+yY+ON1+38y+pSPHHFA7bpXEtDwAOoRm574hjsRUvY+X8tDUg1bJeXSOCYoey7l3Aenz7gSegrsBqSaEqhpOBpgOsq+DBAuAxqRWLzCVKJPnU/IQ7igNnan9Wj2kirXbAJDrLBBVDzZaeYpbwyL0NWaMBSV31/UuWapDWdxcoaP9m/zmWjWGt1w== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=intel.com; dmarc=pass action=none header.from=intel.com; dkim=pass header.d=intel.com; arc=none Received: from MWHPR11MB1631.namprd11.prod.outlook.com (2603:10b6:301:10::10) by BYAPR11MB3576.namprd11.prod.outlook.com (2603:10b6:a03:b4::10) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5164.18; Tue, 19 Apr 2022 02:56:45 +0000 Received: from MWHPR11MB1631.namprd11.prod.outlook.com ([fe80::a88a:3f13:4d9:3127]) by MWHPR11MB1631.namprd11.prod.outlook.com ([fe80::a88a:3f13:4d9:3127%11]) with mapi id 15.20.5164.025; Tue, 19 Apr 2022 02:56:44 +0000 From: "Ni, Ray" To: "Tan, Dun" , "devel@edk2.groups.io" CC: "Dong, Guo" , "You, Benjamin" , "Liu, Zhiguang" Subject: Re: [PATCH] UefiPayloadPkg: Fix IA32 entry build failure Thread-Topic: [PATCH] UefiPayloadPkg: Fix IA32 entry build failure Thread-Index: AQHYU4ekDLCd6LKNNkObd+4xlY78vqz2ixrg Date: Tue, 19 Apr 2022 02:56:44 +0000 Message-ID: References: <20220419005110.369-1-dun.tan@intel.com> In-Reply-To: <20220419005110.369-1-dun.tan@intel.com> Accept-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: authentication-results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=intel.com; x-ms-publictraffictype: Email x-ms-office365-filtering-correlation-id: 1d200aea-bcc3-43c3-7e4c-08da21b03d15 x-ms-traffictypediagnostic: BYAPR11MB3576:EE_ x-microsoft-antispam-prvs: x-ms-exchange-senderadcheck: 1 x-ms-exchange-antispam-relay: 0 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: apFOo/KpxiQ8fvqd+I5BeARxrdHLiCNyzaU2fYMZL/nm5AQgrvHK4wY8zuXaRn61ECJkzMbvHNWwSd0oLl0m62D3YWgV0SvFPCNWXz5BTxaRZmp0/oWix2p1eFZDIBV/NDRfYLO5gFGJK0sbe83gvuOOVMd+kMXMsOcNX84VW25xZWddnpnH3T3uZkEZ32go8Lfe/xLbqU39WOKDzZGNpQG41kuj+/wMgXrq4JRs2Kqwzi54CXyQ8+uOAHFLSSEMNkmYYc++swKfFt5A3dDcjp4YdiGKI40UaT5nVYSlyFRFqUu8v1PErpfhYYM5oQqOsSpUr2eABz2mX9O2o+urQULPhTniXnj0IoLYgybBY5zPqA0Z9GwQfLii13pAuSX4M+6D84kMSjtAONTTdamZEwU4ZJzlqXw7rn9YuVXvjaLBWVyl0yBK/vCc48ZlmCbhMWQqcRqDGoqlPc3JH0OHpWFADL6OSIKDbK+JgrEHbOAN/+l9PHkLaiXKm6bnACMtTSHzo04SkGG9eXT97TpUHXG4abKcbBWqBn20/AFQmkNghQnkKqPKtlv8WdUFRvQ8KPRzEBQbUsOSZ4unnSBWoaY/6ArjJ6KdaYnQrJM+lD5zB0pVFfD4W0xT/ytUtS9NijNz+ydCQNTVk50j5P4D2brmqTS56kW7/frNWOng4lWANpHQagEDI9guG1yW2AcqvC04agmwvsZSHqf0zSLZmQ== x-forefront-antispam-report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:MWHPR11MB1631.namprd11.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230001)(366004)(54906003)(316002)(110136005)(53546011)(66446008)(4326008)(26005)(186003)(9686003)(7696005)(6506007)(33656002)(55016003)(508600001)(122000001)(107886003)(83380400001)(38100700002)(38070700005)(71200400001)(86362001)(82960400001)(8676002)(66476007)(64756008)(66946007)(66556008)(76116006)(5660300002)(8936002)(52536014)(2906002);DIR:OUT;SFP:1102; x-ms-exchange-antispam-messagedata-chunkcount: 1 x-ms-exchange-antispam-messagedata-0: =?us-ascii?Q?ytJrt1KgX4FpVG264tcen7vER0gaEsYsWPerKCBJeVQuIezcEmv0e1ovq2Gm?= =?us-ascii?Q?4swHSIOM/6B+XMMiZ/Jt72jH5NGxvT16qQvclr8dLDrZcyzkYbdZYq1tUzNd?= =?us-ascii?Q?ZvGMI5WGMSByHx5XsIsgeqax90A2GqM6OqMk8pEmjgsNe1ErYMTgVATzyrcy?= =?us-ascii?Q?N3GRDa6JcP1mnDlr3/Lg50TVz/EriYZzb/dIj3eQB0Mjb0JW3lB6shE+hqj0?= =?us-ascii?Q?NBRj7Qy2ssV2RkKmnKhkC0tZnT7kjv6fxMsnikbsAiMivED5AmYTuhTdPy1f?= =?us-ascii?Q?Xp1G/W9+wV+Sxz03Ju3zz/j75piD9DhKcpv+CFNL85p+dzpc6qi47NmXeec5?= =?us-ascii?Q?NOt4/aGRsXnVxi8o774gMt68L5DDITZAbiC0PE9Z4RZKfFvj6BxVsmU5/TXr?= =?us-ascii?Q?GdcO8kDo+bRXEUn46q8B+LXJgy2f1SPP7c+wkXKrifw+4L/T2IPNv6ZtrMXo?= =?us-ascii?Q?xE3faAC7XgAz7ZQXB6dDoDJnQG8Obn2INkjxYytMyfIfhHNLibNO83//Zk/b?= =?us-ascii?Q?w3rp2b+wTRTG6NydIGntTyGvivOHKgMtIsk/G6399QTEOmQ9S2VomGUhVQ2A?= =?us-ascii?Q?dNxmJ6GoJ3S9Y+v8mrB4hERk5kP8RWQ2nQSaoW3OE9u7eUebjyxq3mbR38c0?=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cPUZulnS9eu975FtViBQ?= =?us-ascii?Q?jBx9bWpiromEtponhY0esosZiIEUIwuYVrgt2CdtYfJc7iEFLdbi3J4jAF+B?= =?us-ascii?Q?Pu+omwBU7fl86Ti8yawKQ/kPC3+MxCdZF+RZaxNq3idxHP2C1qInSLUwXphq?= =?us-ascii?Q?zgK8PfChbZRpeXyC76Nfm7nmYwccc5abakFxjtV9KZRnXKvT?= MIME-Version: 1.0 X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-AuthSource: MWHPR11MB1631.namprd11.prod.outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: 1d200aea-bcc3-43c3-7e4c-08da21b03d15 X-MS-Exchange-CrossTenant-originalarrivaltime: 19 Apr 2022 02:56:44.6626 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 46c98d88-e344-4ed4-8496-4ed7712e255d X-MS-Exchange-CrossTenant-mailboxtype: HOSTED X-MS-Exchange-CrossTenant-userprincipalname: 3RRqDd+vCsIZQJczxBEOP5Xh8FBxyg4MO/x3P/wagFDAEOSs+fmBy1pouANSy3f3nygK4G6x0ZcDvikqoLwTrw== X-MS-Exchange-Transport-CrossTenantHeadersStamped: BYAPR11MB3576 Return-Path: ray.ni@intel.com X-OriginatorOrg: intel.com Content-Language: en-US Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable Reviewed-by: Ray Ni > -----Original Message----- > From: Tan, Dun > Sent: Tuesday, April 19, 2022 8:51 AM > To: devel@edk2.groups.io > Cc: Ni, Ray ; Dong, Guo ; You, Benj= amin ; Liu, > Zhiguang > Subject: [PATCH] UefiPayloadPkg: Fix IA32 entry build failure >=20 > The ObjCopyFlag and EntryOutputDir need to be modified when > building IA32 UniversalPayload Entry >=20 > Signed-off-by: Dun Tan > Cc: Ray Ni > Cc: Guo Dong > Cc: Benjamin You > Cc: Zhiguang Liu > --- > UefiPayloadPkg/UniversalPayloadBuild.py | 18 ++++++++++++------ > 1 file changed, 12 insertions(+), 6 deletions(-) >=20 > diff --git a/UefiPayloadPkg/UniversalPayloadBuild.py b/UefiPayloadPkg/Uni= versalPayloadBuild.py > index 99410d244d..8af381336d 100644 > --- a/UefiPayloadPkg/UniversalPayloadBuild.py > +++ b/UefiPayloadPkg/UniversalPayloadBuild.py > @@ -54,14 +54,20 @@ def BuildUniversalPayload(Args, MacroList): > BuildTarget =3D Args.Target > ToolChain =3D Args.ToolChain > Quiet =3D "--quiet" if Args.Quiet else "" > - BuildArch =3D "X64" if Args.Arch =3D=3D 'X64' else "IA32 -a X64" > ElfToolChain =3D 'CLANGDWARF' > + BuildDir =3D os.path.join(os.environ['WORKSPACE'], os.path.normp= ath("Build/UefiPayloadPkgX64")) > + if Args.Arch =3D=3D 'X64': > + BuildArch =3D "X64" > + ObjCopyFlag =3D "elf64-x86-64" > + EntryOutputDir =3D os.path.join(BuildDir, f"{BuildTarget}_{ElfTo= olChain}", > os.path.normpath("X64/UefiPayloadPkg/UefiPayloadEntry/UniversalPayloadEnt= ry/DEBUG/UniversalPayloadEntry.dll")) > + else: > + BuildArch =3D "IA32 -a X64" > + ObjCopyFlag =3D "elf32-i386" > + EntryOutputDir =3D os.path.join(BuildDir, f"{BuildTarget}_{ElfTo= olChain}", > os.path.normpath("IA32/UefiPayloadPkg/UefiPayloadEntry/UniversalPayloadEn= try/DEBUG/UniversalPayloadEntry.dll")) >=20 > EntryModuleInf =3D os.path.normpath("UefiPayloadPkg/UefiPayloadEntry= /UniversalPayloadEntry.inf") > DscPath =3D os.path.normpath("UefiPayloadPkg/UefiPayloadPkg.dsc") > - BuildDir =3D os.path.join(os.environ['WORKSPACE'], os.path.normpath(= "Build/UefiPayloadPkgX64")) > FvOutputDir =3D os.path.join(BuildDir, f"{BuildTarget}_{ToolChain}",= os.path.normpath("FV/DXEFV.Fv")) > - EntryOutputDir =3D os.path.join(BuildDir, f"{BuildTarget}_{ElfToolCh= ain}", > os.path.normpath("X64/UefiPayloadPkg/UefiPayloadEntry/UniversalPayloadEnt= ry/DEBUG/UniversalPayloadEntry.dll")) > PayloadReportPath =3D os.path.join(BuildDir, "UefiUniversalPayload.t= xt") > ModuleReportPath =3D os.path.join(BuildDir, "UefiUniversalPayloadEnt= ry.txt") > UpldInfoFile =3D os.path.join(BuildDir, "UniversalPayloadInfo.bin") > @@ -105,9 +111,9 @@ def BuildUniversalPayload(Args, MacroList): > # > # Copy the DXEFV as a section in elf format Universal Payload entry. > # > - remove_section =3D '"%s" -I elf64-x86-64 -O elf64-x86-64 --remove-se= ction .upld_info --remove- > section .upld.uefi_fv %s'%(LlvmObjcopyPath, EntryOutputDir) > - add_section =3D '"%s" -I elf64-x86-64 -O elf64-x86-64 --add-secti= on .upld_info=3D%s --add- > section .upld.uefi_fv=3D%s %s'%(LlvmObjcopyPath, UpldInfoFile, FvOutputDi= r, EntryOutputDir) > - set_section =3D '"%s" -I elf64-x86-64 -O elf64-x86-64 --set-secti= on-alignment .upld.upld_info=3D16 --set-section- > alignment .upld.uefi_fv=3D16 %s'%(LlvmObjcopyPath, EntryOutputDir) > + remove_section =3D f"{LlvmObjcopyPath} -I {ObjCopyFlag} -O {ObjCopyF= lag} --remove-section .upld_info --remove- > section .upld.uefi_fv {EntryOutputDir}" > + add_section =3D f"{LlvmObjcopyPath} -I {ObjCopyFlag} -O {ObjCopyF= lag} --add-section .upld_info=3D{UpldInfoFile} --add- > section .upld.uefi_fv=3D{FvOutputDir} {EntryOutputDir}" > + set_section =3D f"{LlvmObjcopyPath} -I {ObjCopyFlag} -O {ObjCopyF= lag} --set-section-alignment .upld.upld_info=3D16 -- > set-section-alignment .upld.uefi_fv=3D16 {EntryOutputDir}" > RunCommand(remove_section) > RunCommand(add_section) > RunCommand(set_section) > -- > 2.31.1.windows.1