From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mga03.intel.com (mga03.intel.com [134.134.136.65]) by mx.groups.io with SMTP id smtpd.web10.340.1668127642858777137 for ; Thu, 10 Nov 2022 16:47:23 -0800 Authentication-Results: mx.groups.io; dkim=fail reason="unable to parse pub key" header.i=@intel.com header.s=intel header.b=PWIHA579; spf=pass (domain: intel.com, ip: 134.134.136.65, mailfrom: chasel.chiu@intel.com) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1668127642; x=1699663642; h=from:to:cc:subject:date:message-id:references: in-reply-to:content-transfer-encoding:mime-version; bh=+p+T5quYWe1XEWr1xn59SeYrSZsDVl6QxqGWVWnJEa4=; b=PWIHA579gswKBcxKR8X6ryjaiPJv01znlP2ufXrhlCa2Cscyl2ULNRil l8jjP9nlFcLAY5hvN1I4pf30R8ell3SvN466zqQpclnFw8v6ceFYT1YBJ o/5G8s3IvM75bjXIRUs0Kq3t/4U7ofgH19Hka6ygNSFvUL17x+vDz8tgQ tVsEtSH/bybpv+2gQMWsE8gDfzOGFcBVsI9/WSGJobXFEjVedV14y5Z41 LEpJdk0i0V9Ubczh2ZnJ10IIx0sxwTiHLl9xj3jJ1/eflycY+xvzzqaks EGbl20QUj2ah3mpwuxH5HNXkRrJ2BV4Nqv0J0hMycFbQnpGz36YpYedNR A==; X-IronPort-AV: E=McAfee;i="6500,9779,10527"; a="313268367" X-IronPort-AV: E=Sophos;i="5.96,155,1665471600"; d="scan'208";a="313268367" Received: from fmsmga005.fm.intel.com ([10.253.24.32]) by orsmga103.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 10 Nov 2022 16:47:21 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6500,9779,10527"; a="966637258" X-IronPort-AV: E=Sophos;i="5.96,155,1665471600"; d="scan'208";a="966637258" Received: from orsmsx601.amr.corp.intel.com ([10.22.229.14]) by fmsmga005.fm.intel.com with ESMTP; 10 Nov 2022 16:47:21 -0800 Received: from orsmsx612.amr.corp.intel.com (10.22.229.25) by ORSMSX601.amr.corp.intel.com (10.22.229.14) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2375.31; Thu, 10 Nov 2022 16:47:21 -0800 Received: from orsmsx603.amr.corp.intel.com (10.22.229.16) by ORSMSX612.amr.corp.intel.com (10.22.229.25) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2375.31; Thu, 10 Nov 2022 16:47:20 -0800 Received: from ORSEDG601.ED.cps.intel.com (10.7.248.6) by orsmsx603.amr.corp.intel.com (10.22.229.16) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2375.31 via Frontend Transport; Thu, 10 Nov 2022 16:47:20 -0800 Received: from NAM04-BN8-obe.outbound.protection.outlook.com (104.47.74.40) by edgegateway.intel.com (134.134.137.102) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.1.2375.31; Thu, 10 Nov 2022 16:47:20 -0800 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=KShFn7oR6VqpCdry+DizKAzuzpdzhAc9pg82HIg5WRIZsZx/atvgvsq3a2JXhx+y2VN9tBpnrjHpCr4QKEZo8lSg9xS/rlgrHMsoSQW4HcBTFrrdxawvCcJb3U8ismJ/7eSEMP17muHQj9WNpWwDjs1uVeMVsY/tyDUcNo1nJz6LAHMH65/JfclQf0YMQsmwmQGXc8wg8/eJ08rS7rTWBLzUG5Nijzxig19oB8wtXmkIsLxKqD0chSyy2ls8lUqTO/L4XREw+MFVuIvFI7Kv5eBVIZ9hrggg8FtScIqTVNW7+f4biSOTFHpijCTgyz340muaoynXr0/Jc+xhKe7izw== 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=Za64v7l39y3dRY7i/NiTz3UX9d1gf2ExTlhoIhUpYfU=; b=mv045brKGCGq0ss7UOLou4WdvaQ7bjip0pPsAYhSwrCzfpXVzXlQO+sNnJZdaAVjPVudCze81IOJ4AqN8ewRD7t9DrHSr1brDY+N98hye0hcjuDADqyMDXdvTWbNMBCCA3TKdJRw9UT8+NPwWRpzCwTVSZHVpJ7SS66vanQNX06wxFdy8G/ruM5xZCLi6JkbuYT2Ff+oGcchK593H2ALCdwmMFVuyKB3yEFJyGMROpeS+h1bFjzsOt9l4/JH4S3KUs2GqjvpCgNYWqooir7py5Gq0O/3PMtD1/dvkm/UF1Ji0A2w2PA8F9gSKjmk/v7MZxk+xzKbQHWlCm4j8nFqog== 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 BN9PR11MB5483.namprd11.prod.outlook.com (2603:10b6:408:104::10) by BL1PR11MB5223.namprd11.prod.outlook.com (2603:10b6:208:31a::13) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5813.12; Fri, 11 Nov 2022 00:47:17 +0000 Received: from BN9PR11MB5483.namprd11.prod.outlook.com ([fe80::3f62:3295:adf5:aaae]) by BN9PR11MB5483.namprd11.prod.outlook.com ([fe80::3f62:3295:adf5:aaae%5]) with mapi id 15.20.5813.012; Fri, 11 Nov 2022 00:47:17 +0000 From: "Chiu, Chasel" To: "Gao, Liming" , "Kinney, Michael D" CC: "Desimone, Nathaniel L" , "Zeng, Star" , "S, Ashraf Ali" , "Duggapu, Chinni B" , "devel@edk2.groups.io" , "Kuo, Ted" Subject: Re: [edk2-devel][PATCH v1] IntelFsp2Pkg: Improvement of supporting null UPD pointer in FSP-T Thread-Topic: [edk2-devel][PATCH v1] IntelFsp2Pkg: Improvement of supporting null UPD pointer in FSP-T Thread-Index: AQHY9C7OzjCCbqr3fEixaOy4y/b826445RfA Date: Fri, 11 Nov 2022 00:47:17 +0000 Message-ID: References: <982993884529155a9bba1fa0a09a33301a0ded35.1667982515.git.ted.kuo@intel.com> In-Reply-To: <982993884529155a9bba1fa0a09a33301a0ded35.1667982515.git.ted.kuo@intel.com> Accept-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: dlp-product: dlpe-windows dlp-reaction: no-action dlp-version: 11.6.500.17 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: BN9PR11MB5483:EE_|BL1PR11MB5223:EE_ x-ms-office365-filtering-correlation-id: b9a261c4-e2c2-4346-1084-08dac37e4877 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: MUhX0abJRA2UmIh2lzBUJ4Pyf1vejibBJ2khrrif5QZiMOeM6a2ogkWlRmw5cGvfvwtTHu2RTBQ64KepbEIi0GcrAvx1IgHL5dFJHmD3dh/zFblfY5X1Vno4q/p+Uctnx0bwe41nqlLHgyIZ2EbW5qqfZV5cUMwoYIHY86knuVzkcCit6Ld+Ksdmb/q2vVBICJkTSPj2N6pR20RkylEV1vDSbQkdzX7nHiQFOXF7FmfgV86jPTVPt6xEWRuwVwpx6Z7xZI3jfzQW1r1gW1Q89YkJgbHKsuHE1Yt+2MJ7fuZlUKUFYguC4z7qXawz8kjQXBRFifmcLynh42S+cH6hZ3HhjZvKu3a+/3hXhJmJ0c8zmibOxon19XOdp32Aa4uMwawl6TlfSSj3AcCAqltRpRE1YS9CUED5N+ZpdYUf/bq9w/ShZ4ys1Iu4f9ZAIzTi9Xi286jwplH4WL382XTH08Ijfdx7MgeiMU5JjlEGAbrbuBymIS2nI4R5TKCAcvMl9P/NSydOBA90NqN9OyZszNCmlbhU+/IdOlxzJr0q0DuzBK4Lphr8FmdpjijzYGA9IX9MRUoDEpBj8vT4BKV2O9k+8PbDdR1R6+5IT81ls/QIDMWITPNLygByYXtTvIOUiPSUzdZWiiOU4fEmo2nPHp9L75jN+GAb/yRlilW2ADZVK7KizRnkrdNi4byYIJSTK4TNhIRkrBIgGTpK8T4cosMVKexxZa1PecSGq4/dj9QLBhq6fH+Z7HjgGDBytvtEuP82vJvorok5NRQoO/WVIdFx64BuwHxyNbe1KnHeOG/Z9OiPdHaSWyaK3v+NZS3PA9Zy9FDJvnv5HGkdRYrJ2Q== x-forefront-antispam-report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:BN9PR11MB5483.namprd11.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230022)(136003)(346002)(366004)(376002)(396003)(39860400002)(451199015)(64756008)(66946007)(82960400001)(66446008)(66476007)(33656002)(8676002)(66556008)(76116006)(316002)(53546011)(19627235002)(7696005)(4326008)(38100700002)(55016003)(5660300002)(83380400001)(2906002)(41300700001)(9686003)(86362001)(26005)(122000001)(186003)(8936002)(52536014)(6506007)(66899015)(966005)(478600001)(71200400001)(6636002)(54906003)(107886003)(38070700005)(110136005);DIR:OUT;SFP:1102; x-ms-exchange-antispam-messagedata-chunkcount: 1 x-ms-exchange-antispam-messagedata-0: =?us-ascii?Q?lbX+/VB4is80jQYaTCxzWUb8B45+KfQ0RUZP0rZSuV4pih5zQMrCdvM7QpsZ?= =?us-ascii?Q?kqN75eioRNhgS/EBeZCgR9yX2KVVWMtsaMWBcJ8t1XcEkDCU9y3EwVbUkIbh?= =?us-ascii?Q?v7J+4aUTX8CbW+w/NUq4h/85E/mMf+5AIgVeJtQWpQUGiWq/jQIXAcDKuUUh?= =?us-ascii?Q?Q+DBgG/IH+YUpJ2FnZMDq049zUteBCvQE1h0L2EyF4U8Ey951KYH/fF1jdLH?= =?us-ascii?Q?bz7F1uos3lhyfQE7RPFzVDIqbBBI6dZlMTPDGdkbL9wJZhbmLZaL6kIvdGQ6?= =?us-ascii?Q?qkeoCuj8h6CAl0KM8p6tMrXeUBwj1cOyoW87wmj6HpSNDUbvEKdzlrYZYPwk?= =?us-ascii?Q?IRdh/x0KI30gdIVbo23QHOHMUehRDTgspJ5KGm/nwSZgXu2y5TLIJWdtoQDd?= =?us-ascii?Q?1OKAIh8fM/fhrbSQIFz/QwTS7fstaKrOImvT9ZbMsL/CMoQ3ydo9j/oXCNoi?= =?us-ascii?Q?S0aIeLezNmU1GL1qJIaSLhwB0hEOvvVIdJdjuV5Zps/WDQtCdzhlY6wp+awO?= =?us-ascii?Q?xDt+wlNgFD8iYaz/Sp+SPweukEFCaB7rWoUfUlC4xVHJbTmIMQenxUpc83mP?= =?us-ascii?Q?6UVN+TNyD68DptCzvsp/xk9plG7ERjeO3++JNP9EKjMxIT5AHt/bSH/xvfh4?= =?us-ascii?Q?im4PXP4uRn76RWGsRpJfgnVmM6z1QaCgRTv0a7AZlecjqBgX9D6DJgyRnNyC?= =?us-ascii?Q?XEVSQ14ICeeZsxEBWK+x93opTRsKE2vfjJAt14x21vEaXSeEeOo2zC0tsxQ0?= =?us-ascii?Q?CsDVCJS1WTpdD7FnP2bpSyY1uxsH8ZheTCfGVNd76bhJKcT5dmv2TYjbqZiX?= =?us-ascii?Q?QufzKoGJkUsY+FCRwJVjMIHljldJPhz23f00u2Ne9DL3R1p8Zt8313QBXzs2?= =?us-ascii?Q?h+XN5Usmk12/MncrbndteSJ/dqkpmsAEhB+MncHq9wxCJ/lqtnmnIUkX21oH?= =?us-ascii?Q?GcfIftK9eyqRahU0OplV7nUrhRxWV3xmP40CmqsixA4pwAiTnGZ80bxmUHsx?= =?us-ascii?Q?0u77rQRGe3bvIM9s+RGWg5cM9BgeXHKWfT3ZgVbuOcoxo+12cu+qH8+qi/BM?= =?us-ascii?Q?IcQ3goQJknIfkIS2S0K/2Z+V4r/IiS7YtMEHlUwsggDGov93AXBDQVL4cRxN?= =?us-ascii?Q?dKF96uep6MF58Ccl88vBGJhOE40IkeLlrffSN+78XvJQ0fL7Sgb2YsSqnnvn?= =?us-ascii?Q?e09cBVmVYYGbxC/T4YFG5LzJAKnrl9DoNKDzKKmjXo/2eJ0SHHzhbOJcTsyn?= =?us-ascii?Q?BJo8Q0azStUepJk/asvcUNH9V3AosbyRpPS9Vfqsd85gfLTznWdVfwIy1C/D?= =?us-ascii?Q?AkNPl5CblqvtDpfXn2P/B/5b8RM06n5xQsmbsgeqXQf5WqFlROC6sm1ymmFd?= =?us-ascii?Q?5CH1sabw95Hnu/flhlU37sB4atK/BF3xSDRFKTgw9l7DcSZ92WeWCQk9gz5o?= =?us-ascii?Q?/tY8L7fBLkQrK5UUklNW5ZmEs8TfmcSKqLzN4J6FuSuCLzI0u3Pwxi/EZRX7?= =?us-ascii?Q?r3hlR2VKYbETJVEe71skSAWXrTc4gALYqC5edbFveqjtRD0M1Fd/6YBmL1In?= =?us-ascii?Q?tYvdXLx7Uj9XJck+VKeiySFdgLvzVKO56Jup/Aya?= MIME-Version: 1.0 X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-AuthSource: BN9PR11MB5483.namprd11.prod.outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: b9a261c4-e2c2-4346-1084-08dac37e4877 X-MS-Exchange-CrossTenant-originalarrivaltime: 11 Nov 2022 00:47:17.4780 (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: VLZSTnNNIX75r9cwGjeqlzL2ovmvJJNPQ7TNFBGTtLpWlGD1yWtApChPpmf50YdBQfBurXVs9rVXKPfWkjJXzQ== X-MS-Exchange-Transport-CrossTenantHeadersStamped: BL1PR11MB5223 Return-Path: chasel.chiu@intel.com X-OriginatorOrg: intel.com Content-Language: en-US Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable Hi Liming, Michael, May I know why we cannot merge this PR https://github.com/tianocore/edk2/pu= ll/3624 ? Was it due to Hard Feature Freeze? But I thought we still have time right? Thanks, Chasel > -----Original Message----- > From: devel@edk2.groups.io On Behalf Of Kuo, > Ted > Sent: Wednesday, November 9, 2022 3:31 AM > To: devel@edk2.groups.io > Cc: Chiu, Chasel ; Desimone, Nathaniel L > ; Zeng, Star ; S, > Ashraf Ali ; Duggapu, Chinni B > > Subject: [edk2-devel][PATCH v1] IntelFsp2Pkg: Improvement of supporting > null UPD pointer in FSP-T >=20 > REF:https://bugzilla.tianocore.org/show_bug.cgi?id=3D4114 >=20 > 1.Use xmm5 slot 1 and xmm6 slot 3 to save ucode status and UPD pointer > respectively in TempRamInitApi in IA32 FspSecCoreT. > 2.Correct inappropriate description in the return value of > AsmGetFspInfoHeader. > 3.Replace hardcoded offset value 0x1C with > FSP_HEADER_IMGBASE_OFFSET in > FspHeler.nasm. >=20 > Cc: Chasel Chiu > Cc: Nate DeSimone > Cc: Star Zeng > Cc: Ashraf Ali S > Cc: Chinni B Duggapu > Signed-off-by: Ted Kuo > --- > .../FspSecCore/Ia32/FspApiEntryT.nasm | 17 +++-- > IntelFsp2Pkg/FspSecCore/Ia32/FspHelper.nasm | 4 +- > .../FspSecCore/Ia32/SaveRestoreSseNasm.inc | 74 ++++++++++--------- > IntelFsp2Pkg/FspSecCore/SecFsp.h | 2 +- > IntelFsp2Pkg/FspSecCore/X64/FspHelper.nasm | 4 +- > 5 files changed, 55 insertions(+), 46 deletions(-) >=20 > diff --git a/IntelFsp2Pkg/FspSecCore/Ia32/FspApiEntryT.nasm > b/IntelFsp2Pkg/FspSecCore/Ia32/FspApiEntryT.nasm > index 73821ad22a..2cff8b3643 100644 > --- a/IntelFsp2Pkg/FspSecCore/Ia32/FspApiEntryT.nasm > +++ b/IntelFsp2Pkg/FspSecCore/Ia32/FspApiEntryT.nasm > @@ -594,37 +594,38 @@ ASM_PFX(TempRamInitApi): > SAVE_EAX SAVE_EDX + CALL_EBP ASM_PFX(LoadUpdPointerToECX) ; > ECX for UPD param+ SAVE_ECX ; save UPD par= am to slot > 3 in xmm6+ ; ; Sec Platform Init ;- CALL_EBP > ASM_PFX(LoadUpdPointerToECX) ; ECX for UPD param CALL_MMX > ASM_PFX(SecPlatformInit) cmp eax, 0 jnz TempRamInitExit = ; > Load microcode LOAD_ESP- CALL_EBP ASM_PFX(LoadUpdPointerToECX) ; > ECX for UPD param+ LOAD_ECX CALL_MMX > ASM_PFX(LoadMicrocodeDefault)- SXMMN xmm6, 3, eax ;Save > microcode return status in ECX-SLOT 3 in xmm6.+ > SAVE_UCODE_STATUS ; Save microcode return status in slot = 1 in > xmm5. ;@note If return value eax is not 0, microcode did not load, but > continue and attempt to boot. ; Call Sec CAR Init LOAD_ESP- CALL_EB= P > ASM_PFX(LoadUpdPointerToECX) ; ECX for UPD param+ LOAD_ECX > CALL_MMX ASM_PFX(SecCarInit) cmp eax, 0 jnz TempRamInitE= xit > LOAD_ESP- CALL_EBP ASM_PFX(LoadUpdPointerToECX) ; ECX for UPD > param- mov edi, ecx ; Save UPD param to EDI fo= r later code > use+ LOAD_ECX+ mov edi, ecx ; Save UPD param to ED= I for > later code use CALL_MMX ASM_PFX(EstablishStackFsp) cmp eax, 0 > jnz TempRamInitExit - LXMMN xmm6, eax, 3 ;Restore microcode > status if no CAR init error from ECX-SLOT 3 in xmm6.- SXMMN xmm6, 3, > edi ;Save FSP-T UPD parameter pointer in ECX-SLOT 3 in xmm6.+ > LOAD_UCODE_STATUS ; Restore microcode status if no CAR in= it > error from slot 1 in xmm5. TempRamInitExit: mov bl, al = ; > save al data in bldiff --git a/IntelFsp2Pkg/FspSecCore/Ia32/FspHelper.nas= m > b/IntelFsp2Pkg/FspSecCore/Ia32/FspHelper.nasm > index e3e1945473..3c63f6eea5 100644 > --- a/IntelFsp2Pkg/FspSecCore/Ia32/FspHelper.nasm > +++ b/IntelFsp2Pkg/FspSecCore/Ia32/FspHelper.nasm > @@ -7,6 +7,8 @@ > SECTION .text +FSP_HEADER_IMGBASE_OFFSET EQU 1Ch+ global > ASM_PFX(FspInfoHeaderRelativeOff) ASM_PFX(FspInfoHeaderRelativeOff): > DD 0x12345678 ; This value must be patched by the build > script@@ -14,7 +16,7 @@ ASM_PFX(FspInfoHeaderRelativeOff): > global ASM_PFX(AsmGetFspBaseAddress) > ASM_PFX(AsmGetFspBaseAddress): call > ASM_PFX(AsmGetFspInfoHeader)- add eax, 0x1C+ add eax, > FSP_HEADER_IMGBASE_OFFSET mov eax, dword [eax] ret diff --git > a/IntelFsp2Pkg/FspSecCore/Ia32/SaveRestoreSseNasm.inc > b/IntelFsp2Pkg/FspSecCore/Ia32/SaveRestoreSseNasm.inc > index 4c321cbece..a222f2e376 100644 > --- a/IntelFsp2Pkg/FspSecCore/Ia32/SaveRestoreSseNasm.inc > +++ b/IntelFsp2Pkg/FspSecCore/Ia32/SaveRestoreSseNasm.inc > @@ -1,6 +1,6 @@ > ;-----------------------------------------------------------------------= ------- ;-; Copyright (c) > 2015 - 2019, Intel Corporation. All rights reserved.
+; Copyright (c) > 2015 - 2022, Intel Corporation. All rights reserved.
; SPDX-License- > Identifier: BSD-2-Clause-Patent ; ; Abstract:@@ -16,21 +16,21 @@ > ; ; Define SSE macros using SSE 4.1 instructions ; args 1:XMM, 2:IDX, > 3:REG-%macro SXMMN 3+%macro SXMMN 3 pinsrd %1,= %3, > (%2 & 3) %endmacro ; ;args 1:XMM, 2:REG, 3:IDX ;-%macro > LXMMN 3+%macro LXMMN 3 pextrd %2, %1, (%3 & 3) > %endmacro %else ; ; Define SSE macros using SSE 2 instructions ; args > 1:XMM, 2:IDX, 3:REG-%macro SXMMN 3+%macro SXMMN 3 > pinsrw %1, %3, (%2 & 3) * 2 ror %3, 16 pin= srw %1, %3, > (%2 & 3) * 2 + 1@@ -38,19 +38,19 @@ > %endmacro ;-;args 1:XMM, 2:REG, 3:IDX+;args 1:XMM, 2:REG, > 3:IDX ; %macro LXMMN 3- pshufd %1, %1, ((0E4E4E4h >> (%3= * 2)) > & 0FFh)+ pshufd %1, %1, ((0E4E4E4h >> (%3 * 2)) & 0FFh) > movd %2, %1- pshufd %1, %1, ((0E4E4E4h >> (%3 * 2 + (%3 = & 1) * > 4)) & 0FFh)+ pshufd %1, %1, ((0E4E4E4h >> (%3 * 2 + (%3 & 1)= * 4)) > & 0FFh) %endmacro %endif ;-; XMM7 to save/restore EBP, EBX,= ESI, > EDI+; XMM7 to save/restore EBP - slot 0, EBX - slot 1, ESI - slot 2, EDI = - slot > 3 ;-%macro SAVE_REGS 0+%macro SAVE_REGS 0 SXMMN xmm7, 0, > ebp SXMMN xmm7, 1, ebx SXMMN xmm7, 2, esi@@ -67,63 +67,67 > @@ > %endmacro ;-; XMM6 to save/restore EAX, EDX, ECX, ESP+; XM= M6 > to save/restore ESP - slot 0, EAX - slot 1, EDX - slot 2, ECX - slot 3 ;-= %macro > LOAD_EAX 0+%macro LOAD_ESP 0+ movd esp, xmm6+ > %endmacro++%macro SAVE_ESP 0+ SXMMN xmm6, 0, esp+ > %endmacro++%macro LOAD_EAX 0 LXMMN xmm6, eax, 1 > %endmacro -%macro SAVE_EAX 0+%macro SAVE_EAX 0 SXMMN > xmm6, 1, eax %endmacro -%macro LOAD_EDX 0+%macro > LOAD_EDX 0 LXMMN xmm6, edx, 2 %endmacro -%macro > SAVE_EDX 0+%macro SAVE_EDX 0 SXMMN xmm6, 2, edx > %endmacro -%macro SAVE_ECX 0- SXMMN xmm6, 3, ecx- > %endmacro--%macro LOAD_ECX 0+%macro LOAD_ECX 0 LXMMN > xmm6, ecx, 3 %endmacro -%macro SAVE_ESP 0- SXMMN > xmm6, 0, esp+%macro SAVE_ECX 0+ SXMMN xmm6, 3, ecx > %endmacro -%macro LOAD_ESP 0- movd esp, xmm6- > %endmacro ;-; XMM5 for calling stack+; XMM5 slot 0 for calling stack ; ar= g > 1:Entry %macro CALL_XMM 1 mov esi, %%ReturnAddress= - > pslldq xmm5, 4-%ifdef USE_SSE41_FLAG- pinsrd xmm5, esi, 0- > %else- pinsrw xmm5, esi, 0- ror esi, 16- = pinsrw > xmm5, esi, 1-%endif+ SXMMN xmm5, 0, esi mov = esi, %1 > jmp esi %%ReturnAddress: %endmacro %macro RET_XMM = 0- > movd esi, xmm5- psrldq xmm5, 4+ LXMMN xmm5,= esi, 0 > jmp esi %endmacro +;+; XMM5 slot 1 for uCode status+;+%m= acro > LOAD_UCODE_STATUS 0+ LXMMN xmm5, eax, 1+ > %endmacro++%macro SAVE_UCODE_STATUS 0+ SXMMN xmm5, 1, > eax+ %endmacro+ %macro ENABLE_SSE 0 ; = ; Initialize > floating point unitsdiff --git a/IntelFsp2Pkg/FspSecCore/SecFsp.h > b/IntelFsp2Pkg/FspSecCore/SecFsp.h > index d7a5976c12..693af29f20 100644 > --- a/IntelFsp2Pkg/FspSecCore/SecFsp.h > +++ b/IntelFsp2Pkg/FspSecCore/SecFsp.h > @@ -79,7 +79,7 @@ AsmGetFspBaseAddress ( > /** This interface gets FspInfoHeader pointer - @return FSP binary = base > address.+ @return FSP info header. **/ UINTNdiff --git > a/IntelFsp2Pkg/FspSecCore/X64/FspHelper.nasm > b/IntelFsp2Pkg/FspSecCore/X64/FspHelper.nasm > index 122fa1d174..71624a3aad 100644 > --- a/IntelFsp2Pkg/FspSecCore/X64/FspHelper.nasm > +++ b/IntelFsp2Pkg/FspSecCore/X64/FspHelper.nasm > @@ -7,10 +7,12 @@ > DEFAULT REL SECTION .text +FSP_HEADER_IMGBASE_OFFSET EQU > 1Ch+ global ASM_PFX(AsmGetFspBaseAddress) > ASM_PFX(AsmGetFspBaseAddress): call > ASM_PFX(AsmGetFspInfoHeader)- add rax, 0x1C+ add rax, > FSP_HEADER_IMGBASE_OFFSET mov eax, [rax] ret -- > 2.35.3.windows.1 >=20 >=20 >=20 > -=3D-=3D-=3D-=3D-=3D-=3D > Groups.io Links: You receive all messages sent to this group. > View/Reply Online (#96131): > https://edk2.groups.io/g/devel/message/96131 > Mute This Topic: https://groups.io/mt/94910671/1777047 > Group Owner: devel+owner@edk2.groups.io > Unsubscribe: https://edk2.groups.io/g/devel/unsub [chasel.chiu@intel.com] > -=3D-=3D-=3D-=3D-=3D-=3D >=20