From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mga07.intel.com (mga07.intel.com [134.134.136.100]) by mx.groups.io with SMTP id smtpd.web10.54861.1683796818695369374 for ; Thu, 11 May 2023 02:20:18 -0700 Authentication-Results: mx.groups.io; dkim=fail reason="unable to parse pub key" header.i=@intel.com header.s=intel header.b=Iy41PpRs; spf=pass (domain: intel.com, ip: 134.134.136.100, mailfrom: gua.guo@intel.com) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1683796818; x=1715332818; h=from:to:cc:subject:date:message-id:references: in-reply-to:content-transfer-encoding:mime-version; bh=r6WH/Z/JHMimSZjoxttc+u9w8pS/2U/ALU2BrKoebuE=; b=Iy41PpRsk6xkTkw+KptwzMqduLCPf7Y/lc91NXBZIZ+6fIJkYEEf/rO8 8fVsg4pry8dPBIPtXcturMqgt8vsTpV0F4xE+HT/i0bAQyFOz8RLprN7A wDiLtrLQaCOikoR/r489sltWwCPYrIO58EWB87W7wsLOGDXPI0OXPNdOM 083hUroeNnLebMEQHPKeyWwopXFh2bwxDzjnfBy27uQtFt2RZZ0wRnKax iCuogVPeIK77dpzJdHalZhXLIAdMjb3jPaO02d3lIM3I0/w1g6E/0ycsg 83ud8JaZHFAkBh/zVz7/zwuN9eEM+jDKJb/Z+SEVyHkWFRWis8gcPNdFU w==; X-IronPort-AV: E=McAfee;i="6600,9927,10706"; a="416041036" X-IronPort-AV: E=Sophos;i="5.99,266,1677571200"; d="scan'208";a="416041036" Received: from fmsmga003.fm.intel.com ([10.253.24.29]) by orsmga105.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 11 May 2023 02:19:45 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6600,9927,10706"; a="789317639" X-IronPort-AV: E=Sophos;i="5.99,266,1677571200"; d="scan'208";a="789317639" Received: from fmsmsx601.amr.corp.intel.com ([10.18.126.81]) by FMSMGA003.fm.intel.com with ESMTP; 11 May 2023 02:19:44 -0700 Received: from fmsmsx610.amr.corp.intel.com (10.18.126.90) 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.2507.23; Thu, 11 May 2023 02:19:44 -0700 Received: from fmsmsx610.amr.corp.intel.com (10.18.126.90) by fmsmsx610.amr.corp.intel.com (10.18.126.90) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.23; Thu, 11 May 2023 02:19:43 -0700 Received: from FMSEDG603.ED.cps.intel.com (10.1.192.133) by fmsmsx610.amr.corp.intel.com (10.18.126.90) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.23 via Frontend Transport; Thu, 11 May 2023 02:19:43 -0700 Received: from NAM12-BN8-obe.outbound.protection.outlook.com (104.47.55.168) by edgegateway.intel.com (192.55.55.68) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.1.2507.23; Thu, 11 May 2023 02:19:43 -0700 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=nPpSY80pSpihCAvVXMZxRSSOpL35ws7GOb4+4eOTRthvu/8QvT8lMcuTL5fgncO0hcEzg2DqNwjyGi1Ie2YG25TRyt7v1EUYJWJwwHo4PvLjkYB5IuBrykW3Kf/2FBcikNIxLSX6q14VgUsR65iOgPBruT40cN6LstOk3+PXWuu7E/BVeFNRMZQERqnMzMPCEqYKpPzMzQiDJjH5NW2rSuR++x11OrYIYf3qYj9gqQr7+BVUieGfJgAwTkxgdhfVF3lWXpLrbZ5ZRmMjwDuRa9KsIQ3bdN2cNgUkJSGEsDo7p4e/8o+seEczcp9qU0Xkj29N9lwYhL4R0fTZUdlLoQ== 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=mHfY1WNR8ZOuIFrOEYOaTaXu014QLL4hG8KK04/Ahgs=; b=Eu7YXMCM9TxOR+fi/nttc/Y1b2yuxizMsCyyarrxT17FcTPjRmrYrInlrlIbcZ6opRZsQz+/295C+/SXY7KATg1y6IbJ5ZToT4uijMtb49EWyd0Rd68rqdIrE1VWN4s0QpJOUCApMNfy/H03vXHN6ju2M3DTbSwfwLAOkCZPopgZcC097iQKvU71pb0dctUjC65EdTmyDubfUsXijIZuQoE9crVGOT+CNbPX8KcW3UWlps1TCRNy3eQ15dLExIy+fqX+pugT1MkuEcXYtrj9XMVVfiXol55J923VnKnBDGJZZGsDvQGdKfQQnVbwqtNTcEQ10DXLmo+/aEWXNoo1fA== 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 BL1PR11MB5478.namprd11.prod.outlook.com (2603:10b6:208:31d::12) by SJ2PR11MB8421.namprd11.prod.outlook.com (2603:10b6:a03:549::9) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6387.20; Thu, 11 May 2023 09:19:22 +0000 Received: from BL1PR11MB5478.namprd11.prod.outlook.com ([fe80::f50b:35fe:b26f:ec5d]) by BL1PR11MB5478.namprd11.prod.outlook.com ([fe80::f50b:35fe:b26f:ec5d%6]) with mapi id 15.20.6387.018; Thu, 11 May 2023 09:19:22 +0000 From: "Guo, Gua" To: Dhaval Sharma , "devel@edk2.groups.io" CC: "Dong, Guo" , "Ni, Ray" , "Rhodes, Sean" , "Lu, James" Subject: Re: [PATCH v1 1/8] UefiPayloadPkg: Remove FP Init from UPL entry Thread-Topic: [PATCH v1 1/8] UefiPayloadPkg: Remove FP Init from UPL entry Thread-Index: AQHZg9eblbPfSVrsT0u/N0LPnsgHyK9UyxQA Date: Thu, 11 May 2023 09:19:22 +0000 Message-ID: References: <20230511070855.19329-1-dhaval@rivosinc.com> <20230511070855.19329-2-dhaval@rivosinc.com> In-Reply-To: <20230511070855.19329-2-dhaval@rivosinc.com> Accept-Language: en-US X-Mentions: dhaval@rivosinc.com 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-traffictypediagnostic: BL1PR11MB5478:EE_|SJ2PR11MB8421:EE_ x-ms-office365-filtering-correlation-id: dedebaaf-047a-4776-0b3a-08db5200cebb x-ld-processed: 46c98d88-e344-4ed4-8496-4ed7712e255d,ExtAddr x-ms-exchange-senderadcheck: 1 x-ms-exchange-antispam-relay: 0 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: s/sq37RTi6z74Wn2x+4YHxaC7ueakZWSCJ+ZQB5tfoMuSSNkU/zvSQ1omsndzJr2GDqsepqL/45JYeyt64/DI/SoAnxGhg8Z0joxWVAr6t4sG7zTsYdD5udt2LR0U3fQ3FGChRvf1kxo8iNUoJVbiJg/e0lf84gU1HBAwU7osgmhU0063Vtfjxew5iJf77xQn6TZf7t0ngXfERDWy548Y6rN9liy/BMcLCugdkyBiQqRcap3odkLYX2R8eNRm7OxhQ+mvK0wIxN6DtKqcLSe6TxdwAJbEwPtROO9XxDuBHYQqgpU59Jy9ltbjyCmZ96K0sQ2zeLXGb+unzDJCjHt46wp0w+9FEXJDerQsmM3VjefXA78GHWQeL4ssGBvF4l/53srR0hUqxNE/vdy7rTPQAx+BnQA8eqnQGgNPQ1YvLuPpXSRhVgUfFSaLm0JbsJCBF6xxeVTmrHDY5pZlj4apC18Hx6ubhChKMP6x98Jp/fTSauJlHbqObImCCZvcYZSBF/eGzmIBgtgDrBeObOKZiJDNM3VPBxMwa0+8xjob/4xz7LkTd5LLkZFfah7W2BDv4BeVCCt+mwnVJBlsElmR8xIkFt8rP0B5PFnMDV/sak= x-forefront-antispam-report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:BL1PR11MB5478.namprd11.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230028)(376002)(346002)(136003)(366004)(39860400002)(396003)(451199021)(110136005)(83380400001)(66446008)(66946007)(66556008)(966005)(76116006)(64756008)(19627235002)(26005)(66476007)(6506007)(9686003)(7696005)(54906003)(71200400001)(55016003)(2906002)(186003)(5660300002)(52536014)(478600001)(107886003)(86362001)(33656002)(82960400001)(41300700001)(4326008)(122000001)(38070700005)(8936002)(316002)(53546011)(38100700002)(8676002);DIR:OUT;SFP:1102; x-ms-exchange-antispam-messagedata-chunkcount: 1 x-ms-exchange-antispam-messagedata-0: =?us-ascii?Q?VX7LTiw5HZTJQyetg3yEws8ENqBv8PavDQZfrA+IjQ6u6Wf8bs+oULm6rns4?= =?us-ascii?Q?HsXLFmwGMVg0B9hA940H81FZ/rtzbKIA+NdOecVGRo/pjWfvhccPBnPZlHYs?= =?us-ascii?Q?Ht7RrTIuyPD98kwJnadsFKU5lebjDsmeBZ3CTr8MgIL68MJDUtPO1IgnPpZc?= =?us-ascii?Q?IJ/JRp/JLBJDq2n2eli67gES5FxwNkiYx9eaL0GDPwEx4+PqaTz6G1Xm+4em?= =?us-ascii?Q?XuOw9j+GM3H7c2qZy6AWuVMChi9APMCi/KxWZl9NTaeyJi425t3ZgE7JEfg5?= =?us-ascii?Q?IA4JivvUmhN9/IWBwb7i+2E12keZRWuatAo3O0Tbur9exETWYP4TokGmULY+?= =?us-ascii?Q?n/ouNPGexKSAPJa64pyM/e0QsjVIXuFmdPWll2EWdw31L3LPGdvkEWpvAjOB?= =?us-ascii?Q?/pRH/OAH9w3oET4AEkMf9g2LNVh4ImG5p7EIy6r27VQkc+tbuwSq/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KrfMXxeaNDJDbJixCSgbUCeWaXLea/bkB0wtT+?= =?us-ascii?Q?XKprBuiCascx7q4KDwgMXG2eqWmE5Y9VTBRbgGURhybvjb2l3ix5V+j49ywk?= =?us-ascii?Q?/8hVpL4JL6UetxoRjsekNN9HPuWR6Z6oOpQgClyqXbbPaiQJdxTdQQROoIvO?= =?us-ascii?Q?jJEToqkMQW85ZqF3gCG6F+1V8u0HD8o+8qmuLy6TiFnMZF5jAMvBF2dSv3J9?= =?us-ascii?Q?ps/sNfo7SPmmuGXXgRw=3D?= MIME-Version: 1.0 X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-AuthSource: BL1PR11MB5478.namprd11.prod.outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: dedebaaf-047a-4776-0b3a-08db5200cebb X-MS-Exchange-CrossTenant-originalarrivaltime: 11 May 2023 09:19:22.4398 (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: Kl1Q1P0MtId1BE0ahTXHNGb7vs1zimyhjUjJRnuPrYtP+ZXNWryXGHzun4JhwEEtrjbdX2zQKMBD4U8QH3Rz/A== X-MS-Exchange-Transport-CrossTenantHeadersStamped: SJ2PR11MB8421 Return-Path: gua.guo@intel.com X-OriginatorOrg: intel.com Content-Language: en-US Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable @Dhaval Sharma I give some feedbacks on the PR. URL: https://github.com/tianocore/edk2/pull/4367 I think we can discuss it on the PR. And currently Edk2 code freeze so the = change need to hold on until UPL spec 1.0 publish and Edk2 code freeze unlo= ck (2023/05/26). Thanks, Gua -----Original Message----- From: Dhaval Sharma =20 Sent: Thursday, May 11, 2023 3:09 PM To: devel@edk2.groups.io Cc: Dong, Guo ; Ni, Ray ; Rhodes, Sea= n ; Lu, James ; Guo, Gua Subject: [PATCH v1 1/8] UefiPayloadPkg: Remove FP Init from UPL entry According to UPL spec BL should initialize FP init meaning UPL does not nee= d to initialize it. Besides this is arch specific init and needs to be move= d out of UPL common flow. In order to not break current BL implementations,= for now just moving the init to later point of time but for both x32 and x= 64 eventually this should be removed once BL impelement this logic. Test: Verified booting UEFI shell on coreboot on qemu. Cc: Guo Dong Cc: Ray Ni Cc: Sean Rhodes Cc: James Lu Cc: Gua Guo Signed-off-by: Dhaval Sharma Reviewed-by: Gua Guo Reviewed-by: James Lu --- Notes: v3: - Added FP initialization to X64 path as well v4: - Updated reviewed-by tag UefiPayloadPkg/UefiPayloadEntry/Ia32/DxeLoadFunc.c | 3 +++ UefiPayloadPkg/UefiPayloadEntry/UniversalPayloadEntry.c | 3 --- UefiPayloadPkg/UefiPayloadEntry/X64/DxeLoadFunc.c | 3 +++ 3 files changed, 6 insertions(+), 3 deletions(-) diff --git a/UefiPayloadPkg/UefiPayloadEntry/Ia32/DxeLoadFunc.c b/UefiPaylo= adPkg/UefiPayloadEntry/Ia32/DxeLoadFunc.c index 61a9f01ec9e7..921a38555e21 100644 --- a/UefiPayloadPkg/UefiPayloadEntry/Ia32/DxeLoadFunc.c +++ b/UefiPayloadPkg/UefiPayloadEntry/Ia32/DxeLoadFunc.c @@ -268,6 +268,9 @@ HandOffToDxeCore ( UINT32 Index; X64_IDT_TABLE *IdtTableForX= 64; + // Initialize floating point operating environment to be compliant w= ith UEFI spec.+ InitializeFloatingPointUnits ();+ // // Clear page 0 a= nd mark it as allocated if NULL pointer detection is enabled. //diff --gi= t a/UefiPayloadPkg/UefiPayloadEntry/UniversalPayloadEntry.c b/UefiPayloadPk= g/UefiPayloadEntry/UniversalPayloadEntry.c index f8939efe70db..8aff00142971 100644 --- a/UefiPayloadPkg/UefiPayloadEntry/UniversalPayloadEntry.c +++ b/UefiPayloadPkg/UefiPayloadEntry/UniversalPayloadEntry.c @@ -473,9 +473,6 @@ _ModuleEntryPoint ( PrintHob (mHobList); ); - // Initialize floating point operating = environment to be compliant with UEFI spec.- InitializeFloatingPointUnits = ();- // Build HOB based on information from Bootloader Status =3D Build= Hobs (BootloaderParameter, &DxeFv); ASSERT_EFI_ERROR (Status);diff --git = a/UefiPayloadPkg/UefiPayloadEntry/X64/DxeLoadFunc.c b/UefiPayloadPkg/UefiPa= yloadEntry/X64/DxeLoadFunc.c index 346e3feb0459..84a6112ce64a 100644 --- a/UefiPayloadPkg/UefiPayloadEntry/X64/DxeLoadFunc.c +++ b/UefiPayloadPkg/UefiPayloadEntry/X64/DxeLoadFunc.c @@ -40,6 +40,9 @@ HandOffToDxeCore ( VOID *GhcbBase; UINTN GhcbSize; + // Initialize floating point ope= rating environment to be compliant with UEFI spec.+ InitializeFloatingPoin= tUnits ();+ // // Clear page 0 and mark it as allocated if NULL pointer= detection is enabled. //--=20 2.34.1