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.4008.1668062669510473884 for ; Wed, 09 Nov 2022 22:44:29 -0800 Authentication-Results: mx.groups.io; dkim=fail reason="unable to parse pub key" header.i=@intel.com header.s=intel header.b=GNXwgEJR; spf=pass (domain: intel.com, ip: 192.55.52.120, 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=1668062669; x=1699598669; h=from:to:cc:subject:date:message-id:references: in-reply-to:content-transfer-encoding:mime-version; bh=j51jrOEF4XJekbpgDUhyrIeD3/tA/t2AbxClD414IY0=; b=GNXwgEJRPJmUo2yTCjASdESaWop/iM9U8LoBIBWlOB+nihjgUrhYAfBF hsAU7TE7RgcO4aSVAvpygx7xmGfNEYHENzytXkMPO+djzt1opmVT4MOdB jjv9swOYBPLYvCVxK6WTjMDh9Ocx3wssn5jORs+deVmd/6CBODLLPNCCM N3BParVJBRoVlcIQGXOHLyzPe4VBfVJIkArzQV6XRFjeY2VTPmXhEUieG 62UfTkqbjUSm8HOn74tYhyX+kXoJYsHNcc1UwbdvDd+GH/It0vlu6bKsW CoJ4RNvpZYEVeobh8CvI5zvak3A/3/kcwQDDcUEzmPyT+2LT+9oUls+wV w==; X-IronPort-AV: E=McAfee;i="6500,9779,10526"; a="309944148" X-IronPort-AV: E=Sophos;i="5.96,153,1665471600"; d="scan'208";a="309944148" Received: from orsmga004.jf.intel.com ([10.7.209.38]) by fmsmga104.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 09 Nov 2022 22:44:20 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6500,9779,10526"; a="762168662" X-IronPort-AV: E=Sophos;i="5.96,153,1665471600"; d="scan'208";a="762168662" Received: from orsmsx602.amr.corp.intel.com ([10.22.229.15]) by orsmga004.jf.intel.com with ESMTP; 09 Nov 2022 22:44:18 -0800 Received: from orsmsx610.amr.corp.intel.com (10.22.229.23) by ORSMSX602.amr.corp.intel.com (10.22.229.15) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2375.31; Wed, 9 Nov 2022 22:44:17 -0800 Received: from ORSEDG602.ED.cps.intel.com (10.7.248.7) by orsmsx610.amr.corp.intel.com (10.22.229.23) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2375.31 via Frontend Transport; Wed, 9 Nov 2022 22:44:17 -0800 Received: from NAM12-DM6-obe.outbound.protection.outlook.com (104.47.59.174) by edgegateway.intel.com (134.134.137.103) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.1.2375.31; Wed, 9 Nov 2022 22:44:16 -0800 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=GfkvSkAzNwTESsnP0nP/amQbPTqZVvR7PzlrAP3dzPw3SYs8xo2YxB4WUCdPEhfKfQQ79Bg8LarvRScp/KCOaIEtTAMBL0QX7Fp+66c9yyoJMbUUGA3QsPwZgaaNH8fA4sVceNXz0uuZZCL07IZuAzOkyVvRyHvRcTs82cbXmjgvajmLX7g9VibPu0KpqsgqTIoGesRUOPA9c1ePhLWsSLDTDu++I5ldYlWIv4ewE8wB/TicwZ11Jh3Z8rh5EPlFB06zTRy/BJy+c0ZscSfMwVyMQ9g/nc7WgFldt+VqQeZJZLOq1KtQUFWCm4ZLH4WXA3Q7qW3RMxQVpASmVDcSAQ== 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=DDVFSXpTYzwFP6lDlhwSb7BjTarGhk+57YymJg5vOvs=; b=PjSF1NFafWsbJhQJJWzAjbRVILTWJf+XuZhKT10Ep7MlaTHA8h7HUdP4G4snuUnLTrqeOy6dugXacvA3HMqSki+cv3RTDs5AroV+lut4tU/3crj1KMlUhYdwVlJWUoSLUJSKfgOmWL/FTqIfxaM/n1lpASt9XkE+QgbTxW4gXb9KgGdJX3gUWLsmub+BEacGUoip/dWnz42fVdLb0oeD0ykTM3VuUG7hXF0LZNPXx0fLr5kqmOzMEE8+8mwn7NMQdThT26A2SdBZ59J3s3Cyf0wudEWs9ACl6ASMrVkBXMujLRpa73TnUrEwKIiVJDqjgUCbcdW8ntFL6Mim7JaoNQ== 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 CO1PR11MB4931.namprd11.prod.outlook.com (2603:10b6:303:9d::23) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5813.12; Thu, 10 Nov 2022 06:44:14 +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; Thu, 10 Nov 2022 06:44:14 +0000 From: "Chiu, Chasel" To: "devel@edk2.groups.io" , "Kuo, Ted" CC: "Desimone, Nathaniel L" , "Zeng, Star" , "S, Ashraf Ali" , "Duggapu, Chinni B" 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/b82643txQA Date: Thu, 10 Nov 2022 06:44:14 +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_|CO1PR11MB4931:EE_ x-ms-office365-filtering-correlation-id: 884356af-8727-4e79-11f7-08dac2e6fb4f x-ms-exchange-senderadcheck: 1 x-ms-exchange-antispam-relay: 0 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: BzOdrT3Q7pPdcAzfalMG+nh4pH0ah7rsTuEAuYpPWS6lRIpctlTY+hCWcgQ15jKfe1YtA41o30VxX+5ZraF++FV26nGLxr+LgNaCOYmDAFN8QO5A2HAeR8tQ2Aj+bff/NJdcH9E01Hxzk7d/GBndvr4t1t2ted1/K+OqLo+MCLDAvofJSK6V93D5IFgWf7L+ltqaRnryqlJJlFMgKwiigxKp2DYu0wpmHgUX0zOcKyJ2U5Wc2kSaKB/6WmKRdUILKAuIjoLytJ0uiplsHw2GoGwbcqJpSo7qFPKSpbDBzzIVId0YViSrbN5aNg+qK2RNCxakdJR2hQiSfo5YRzEJgzV7lgBchpcBPR0IAvGlbdj7EDqGZCwVcKaPMkkf9IhY56osuIogAN1bexuqLvJsLypEJqU6y5085ctaISQmu6FQysQwoVsbsg+KxiPlwZT2sjrtaGN3xaHYcjZt/RCQHRR2wwoY4+Pb2T7B5atQ5cmDx5V8ekRgjcHnhvd2/iEEAy6lbaknCogPKMzklhcNRalLrsv2qva0puFJCxw5kmJke1lMD+23NvFyKUBiDJe4bqNdDVDTiN1axKJwRD0ztixo27eLvvC978cimOt4aqQM/xNDnQ3Ti6geIQdmk79BJP4WSABA9cBtXNAcU+vfWCCTNB4moj+T7xsZnSG2F7WKE2+Bo0gZS80oFng2JmZfRZcG+sGwujEUYvUyBOYiuCgwQeBsUPva6qMIpSmc0XAl6hlc31embXXr6AUXgYdCRIQxt6IMri3wd5BNowREW5Szf9Kd3c24OhrayyO4vusfa2+iCFTvjyGWTwTtzDGIX9T0lN9I2EfW33WS1IzbFQ== 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)(346002)(136003)(366004)(396003)(39860400002)(376002)(451199015)(33656002)(71200400001)(66899015)(82960400001)(7696005)(55016003)(122000001)(186003)(107886003)(6506007)(38070700005)(38100700002)(2906002)(478600001)(110136005)(5660300002)(52536014)(8936002)(6636002)(54906003)(19627235002)(83380400001)(53546011)(41300700001)(316002)(66556008)(86362001)(966005)(64756008)(76116006)(66946007)(9686003)(66476007)(66446008)(8676002)(26005)(4326008);DIR:OUT;SFP:1102; x-ms-exchange-antispam-messagedata-chunkcount: 1 x-ms-exchange-antispam-messagedata-0: =?us-ascii?Q?BB89Mrcv+M/OfArtCS6pywr+Q67QNhZ3cR95w/iUe4L6TkN+zYB/4sFV0LCx?= =?us-ascii?Q?HrzHtvRvU5Qc3rbAUXcSK8wAVn/aM37a9t94ISqxsg4jrp4ftCugWJ1vLqeZ?= =?us-ascii?Q?fDa3v37UnTX/yPqCeWTCqqMo4a4TZe7RijC7I5t41m0HphrS+7lB7YSzpqSQ?= =?us-ascii?Q?8c2XdC6KW9oe7S4/tSDWFx5h7wX1uOU1qUlztXpORrol6RYG/3G8ko/mMmOj?= =?us-ascii?Q?CG123B+LLRfX1NFEIEyjSOQ1gmQ5kSgMupcG4MriEU2nHDacDr8kZoZHrf/K?= =?us-ascii?Q?KCnsV4VeRxRfAlL5SuYPlwUqXnqzVem9K5FbHtlBukzCtl8w2mCJAaYoQr6h?= =?us-ascii?Q?AGOXdjgLIYWPNP7Nb7oMCOkiNvWx+GKy+SnGoG0FD+5IAEkc+pWqqimePcIt?= =?us-ascii?Q?CXMJvtK/ZdiSwqZqWfmzzz9dv7ZG2WL3ba4QgNrLHOrBdcuT9Lt+hZEvgTMH?= =?us-ascii?Q?UmppdRbqSUMFAd+62PUKaX+UZIKLwWxhJEvuj9e01cBzASTSSMHRG3CB/aOF?= =?us-ascii?Q?MlTITToOGf9+D0OprRhowz/xssfA5z1kJ+uswTpyx/u9GkFCJCUmVZWLJzpZ?= =?us-ascii?Q?n+BXSOFvz8K/IF7Ia3YYqkpeU6/HOEKYcelIIwZvunq7POInDnEkFhpIYNVy?= =?us-ascii?Q?5LSQepmWpBDt4FJAQW0h1ABTSpJ7UQGa542JzwqF4PTSZszeYqLVDMnI3pNm?= =?us-ascii?Q?yuH8UkahgtPRs7+qul+ZJ3DCGz+jmvPG+Bim+KRQXUmlA4nJZsKL67N6Gzwm?= =?us-ascii?Q?4AiMncr2uxfWEcIDiL6weX4wBaDrfdWw5+mbCIM4c5wrKOPunUagZ+IrvuaG?= =?us-ascii?Q?/WmKcwb/WA3NS6wD7mNizetNcamQaToGvo2ZzgV8j3Y9yH3aVCe9o5tMxqNC?= =?us-ascii?Q?2CEyTyCayDrU5w2iKPAdqad+QtCMAAqjoTweDO7MvU7iJ8VZOki0f3li9bnh?= =?us-ascii?Q?eLJuLLVkYE0rsIczwVcLoubtB3B9SWeh+CB8u3P8tFKddT7lAVbWhiF45QOf?= =?us-ascii?Q?QS2Re+UC/WvxWchLC8TZg0MqiiHLHgMkay9VuZh4NpHe+MQ8cORgZv8vmwUf?= =?us-ascii?Q?b5Msi0R8xyCEYNweVjwyi3etj4heacddapdJd6VeS9pkMYN+R5Dz9hsls52n?= =?us-ascii?Q?teYNzNHqvwGjk5uYG5mrbR5DT1+hSqBLtygid5h8c0i8+uvciRlceZU3npwe?= =?us-ascii?Q?vR+ZiziPzA/qNGquBTEpSAnYNocTlOH8RzI8jwvWhHHSrQIDHjcKbwYaCIY2?= =?us-ascii?Q?WsDt+PvxCL9Wpvijwdfe/K+xI5vekLB68hJFzF0sH+CK0tHTCKpy4geh2bkl?= =?us-ascii?Q?XUyHBpVW7i4etGyxAnhU5rn4SzfNY4C0P1xgyz1si/0vxVXsbWY8TH4q/Ryb?= =?us-ascii?Q?Bm2ycUtsOHS/mEOcAKXZUp9tX73IPNmklyKMQahI32YjNdYFYp3o1uTiPZH2?= =?us-ascii?Q?B923hXYeiUQfqRFoK5ASvzlsBwIqiEsEvmKzENsmK/naUY97PyqnCwz2q2qX?= =?us-ascii?Q?qdeY3hJtXLzsbDUMSbUSkVQNyYvEzB+18lo3cOQ/4n0kpNYFQjQdgtFp7ndX?= =?us-ascii?Q?cIg8b84CigoglwejCTAbmQ1Yw+0ddcC9jVptbxnp?= 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: 884356af-8727-4e79-11f7-08dac2e6fb4f X-MS-Exchange-CrossTenant-originalarrivaltime: 10 Nov 2022 06:44:14.0407 (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: 7l4pVSF9X4JGxeMm0itsf+I7zUqBlVBRQNPBENHrDZbkbbM3UWy7/ceImvkcWr1s3NQ85hGtVSKsyvjeMRSnTg== X-MS-Exchange-Transport-CrossTenantHeadersStamped: CO1PR11MB4931 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 Thanks for cleaner implementation Ted! Reviewed-by: Chasel Chiu > -----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