From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail03.groups.io (mail03.groups.io [45.79.227.220]) by spool.mail.gandi.net (Postfix) with ESMTPS id EE2B0740035 for ; Thu, 11 Apr 2024 08:22:53 +0000 (UTC) DKIM-Signature: a=rsa-sha256; bh=F+DrWnzM3IRJ+e9vcfkKHB5bk1GTz2xdzAo/PCnzL3s=; c=relaxed/simple; d=groups.io; h=From:To:CC:Subject:Thread-Topic:Thread-Index:Date:Message-ID:References:In-Reply-To:Accept-Language:msip_labels:MIME-Version:Precedence:List-Subscribe:List-Help:Sender:List-Id:Mailing-List:Delivered-To:Resent-Date:Resent-From:Reply-To:List-Unsubscribe-Post:List-Unsubscribe:Content-Language:Content-Type; s=20240206; t=1712823772; v=1; b=PumTrVuQjIGpOBNtPOd2e86MZ/meV6zCCfpkITXSI/iWRelLFJDh706lQGbHR3u/C0Gmd/GQ 8WqOAvPBJ29kG3id4aSBfB7hgwY9XDzTriLWeIfvPBGnqaFy9xpmIzYepNffM2g6QDZ7ZHii+0r 3PBmZYU8SkqYWNw3NEg7uJpJ9uvMGtew7VMrrt25cxaymg7j755+a4rec0l6yWr7KS3a/vCwvhp Y8h9aCKzRh/ghN2OliwmPGrCJIcjajQtAFbZFTqR87b+xnh/OfJtPkT2mqmJnTZVNtr8hM/sOkR 1ywWNHrLhFN35azMtuFrGWeijU2Y3+7yvWcqMcTGaVMLg== X-Received: by 127.0.0.2 with SMTP id ppsOYY7687511xD6w6JLxS32; Thu, 11 Apr 2024 01:22:52 -0700 X-Received: from mgamail.intel.com (mgamail.intel.com [198.175.65.11]) by mx.groups.io with SMTP id smtpd.web11.12487.1712823772122789790 for ; Thu, 11 Apr 2024 01:22:52 -0700 X-CSE-ConnectionGUID: IjtiwPCUS/CxQWMprLsaeA== X-CSE-MsgGUID: FiLUAK3LQ8aDwoKC+K3hTg== X-IronPort-AV: E=McAfee;i="6600,9927,11039"; a="18782376" X-IronPort-AV: E=Sophos;i="6.07,192,1708416000"; d="scan'208,217";a="18782376" X-Received: from fmviesa002.fm.intel.com ([10.60.135.142]) by orvoesa103.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 11 Apr 2024 01:22:51 -0700 X-CSE-ConnectionGUID: XpAHUvoTR5+34A40LWO2pw== X-CSE-MsgGUID: 3MjAco/lTgC+Cbop2D9jYA== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.07,192,1708416000"; d="scan'208,217";a="44125624" X-Received: from fmsmsx602.amr.corp.intel.com ([10.18.126.82]) by fmviesa002.fm.intel.com with ESMTP/TLS/AES256-GCM-SHA384; 11 Apr 2024 01:22:51 -0700 X-Received: from fmsmsx612.amr.corp.intel.com (10.18.126.92) by fmsmsx602.amr.corp.intel.com (10.18.126.82) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.35; Thu, 11 Apr 2024 01:22:51 -0700 X-Received: from fmsmsx610.amr.corp.intel.com (10.18.126.90) by fmsmsx612.amr.corp.intel.com (10.18.126.92) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.35; Thu, 11 Apr 2024 01:22:50 -0700 X-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.35 via Frontend Transport; Thu, 11 Apr 2024 01:22:50 -0700 X-Received: from NAM04-DM6-obe.outbound.protection.outlook.com (104.47.73.41) 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.35; Thu, 11 Apr 2024 01:22:50 -0700 X-Received: from MN6PR11MB8244.namprd11.prod.outlook.com (2603:10b6:208:470::14) by CH0PR11MB8166.namprd11.prod.outlook.com (2603:10b6:610:182::8) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7430.46; Thu, 11 Apr 2024 08:22:48 +0000 X-Received: from MN6PR11MB8244.namprd11.prod.outlook.com ([fe80::2c31:82b7:9f26:5817]) by MN6PR11MB8244.namprd11.prod.outlook.com ([fe80::2c31:82b7:9f26:5817%5]) with mapi id 15.20.7430.045; Thu, 11 Apr 2024 08:22:48 +0000 From: "Ni, Ray" To: "Wu, Jiaxin" , "devel@edk2.groups.io" CC: Ard Biesheuvel , "Yao, Jiewen" , Gerd Hoffmann Subject: Re: [edk2-devel] [PATCH v1 11/13] OvmfPkg/SmmCpuFeaturesLib: Check Smbase Relocation is done or not Thread-Topic: [PATCH v1 11/13] OvmfPkg/SmmCpuFeaturesLib: Check Smbase Relocation is done or not Thread-Index: AQHai08bYz6HwsUcIkOY03CR7fPbNbFivCvd Date: Thu, 11 Apr 2024 08:22:48 +0000 Message-ID: References: <20240410135724.15344-1-jiaxin.wu@intel.com> <20240410135724.15344-12-jiaxin.wu@intel.com> In-Reply-To: <20240410135724.15344-12-jiaxin.wu@intel.com> Accept-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: msip_labels: x-ms-publictraffictype: Email x-ms-traffictypediagnostic: MN6PR11MB8244:EE_|CH0PR11MB8166:EE_ x-ms-office365-filtering-correlation-id: 265ca9d4-0de6-4c1a-4b36-08dc5a00929d x-ms-exchange-senderadcheck: 1 x-ms-exchange-antispam-relay: 0 x-microsoft-antispam-message-info: sw2XKLuGMOkmoE+/UE06/OB2D+t2WfhwicBRC4UkgVlaXsx91Cv10tOQfdUNIu+igc9cXnDcGn4rFnyzgtQa8q0Fp/x56R1ekCwg+tpkKE5fYZlU6aGdKCDuXtZcpnyTWqtuj8rKC4TBoO6hxZvN7quCNuZEE31Vsymu3h0DBBqvU5+JHPWlRu9tyWhSXmMG8U567G0Vl5dTB9GxonYYgamIKwS9Qg0fAKO9NuBsMe0g2kwzKffJPaSOIB0yioh9009vwYFPyc6nBAyjzubPRLm3JR2LhD/orsFlvQ4rDS/yhX8c9ExxB2Km3liIKrNla0qCa2EdDrKd9LUWqLNd5xXUvSkKo17/Sc5O1ZOsKTD4jKJcj2xYoeU++bnCSX3m43HeDBLQxle2GPZ3ZTT/KXNtB5CVbwSUYMfClBybiIl5MU4gHlk4P/lwNa1l95H+rrNbGLW7PDKCn2GaR+wlMlYTRvXw74SCiZITrs1chV0kvCDTXiN6Zxjr2+lOSf3jYah0b3tbFTyFDM5RKyQ982ZYBRBsRJyK9AZx2USNALpNCQLNfEgKrr7eso/Y0VXOjrMOCffRe7Ojz2VDX3beVyDJowi9LBmN8hFB1B2fk65lPIgEkhB+JgxQnNzcD5EbrYmI5bm9MURfazVsSOq1eW9JBvCPUOttItFX8yVkwQ6qGpa5Zw/r8akg799wdDyxlk2J2BwcS6Lz3lrfc0bVMidQfSOjp5+xKMxKNBJv6tI= x-ms-exchange-antispam-messagedata-chunkcount: 1 x-ms-exchange-antispam-messagedata-0: =?us-ascii?Q?N6X4K3hmV/vY/LkCnQt3C8OEW436F1I+kQXmupxWtlhk8Vt5JlsKP7ojvJa8?= =?us-ascii?Q?27rFxLP7tumwwoJQPEi5f/MJE+klzJyYt9EINeLbpkFDrdITTXfV9AdnvMxh?= =?us-ascii?Q?2fqM3wxG/7TYfNmpWiqtM7iTCIR7GG7bTq8HZXPbYjTiXzHdiXGa2S068LAt?= =?us-ascii?Q?qVs8K3TaMNUR2SY3VfmfFRY55T85CZLFZk4Jz/uBo+LmncCqiBp9fBMmT9pZ?= =?us-ascii?Q?SFd7iDYdY76bsVzE2gzqw0aOz9aDwtQpDaeSXYiK1ubxJwjyig0wBq7BlOsC?= =?us-ascii?Q?4HgvGopYejkZni7yrI1t14vyolX6OIZi2jqQgtBD1pBxz2cmLwEwgfiMHWKB?= =?us-ascii?Q?zFRt7bRWAATTourXDSouXeGcGgfUm8oudRno/+8VPZP8QgwC4b/yTi+HrwA/?= =?us-ascii?Q?b/zUeJdGPIJYRvTZsYQTs9fzTTDvzMsZ8T2mxnLB6hWQtqvuNEQaVvH4uZEw?= =?us-ascii?Q?X1xy4S1keET90ybg4qKwOtOhy6OItSn1J/FI2BFlMlkGxYHnXLzHg0YqcFxP?= =?us-ascii?Q?R356zoavUiQvd1XCj5MM83altUK22zkPEgEMmC3KJxAMWuHpBFH3OdYjuVoe?= =?us-ascii?Q?xQ77RlSDK71iTYigX3Wkw9YvuTFzmAZjlkM7I128Vh0nmWVrVuO9XAZBVHTi?= =?us-ascii?Q?6B+BC7Nymuhe7qaapvUPMN1Kubf16pDwSPX2eLTmZmPx6t88tp9pjkrSZVYH?= =?us-ascii?Q?Ug4DCgty00Pmp5sNgClW3ENNxjKetpoYg/utTm7uP03N/r+omQkg+90JkFT1?= =?us-ascii?Q?GYPO+S4hlodkW3ONKfJ9c6X/UKCXIbnOWPwMHMAPMx4MFkSvs69LgitGU2Jo?= =?us-ascii?Q?QNYZoOgAgBzz+zR3OKIc18i5nf5Is0UrBQ2SVuw2P0a48xBiMsMgXw1RHcWH?= =?us-ascii?Q?c8FE3TrrZirZj5aDF8hWBG7YR4WhhAy9+ue5473pBrvS7kjrnsaIfCeCOkhz?= =?us-ascii?Q?DdAal+h+i5GpQWwEgIBfR7/cw+YSsJx2kh7CdXXGLd3G+ok6mMzTvgGMmjcS?= =?us-ascii?Q?A60ijBCFy3Fh/BnwWmGISwdwWFKshifvs1F/OCNWrw6+lF28xPzcPeB5aZsb?= =?us-ascii?Q?nbDWZVSksXHM9FdxHi2B91pLJv8Tn/J3iYgP1OnRUSQhLZG6Y1rNDa18IQW7?= =?us-ascii?Q?u6MAl+MkSW/S8qPiD+TfNxec0ZzdXZXnLTOdCpMP07fY+cvFA9ncIQfFaR0S?= =?us-ascii?Q?uZX6Ub+nb7oRxtpl8oZYDRV1P0vK2alYSbNRcFcAM35vgXNFSzYc/Ak+lp0R?= =?us-ascii?Q?lWP4ETzRmC6qhJxQqOF1t1QXQbr0gxh4oygndY5vrQ2JDgRLNazOOo4eZQeh?= =?us-ascii?Q?rPjMerV9ot6jhCaJ7ASppTYmAKGoQ48hc3+XVAUSltmFDRqz+DEZRBVEJ6ov?= =?us-ascii?Q?ng3kxpRtjoasP9fjy2LlOHt31rhgKUecn3jvifob4L+efU98zs4cIu7AlaZw?= =?us-ascii?Q?h0GXI8xdyA4ezAsjOuIUw5fsyETG2kfgoZjoeOvLuEOlMrmBKVZyeccCuJvb?= =?us-ascii?Q?HXJJFVfLrCrYyndNRId4BvIELKHYNzz0zu08jYv9YUSN6gMWnJEmEEfNTK7U?= =?us-ascii?Q?TXNmP0rwZ4bloDNdgV8=3D?= MIME-Version: 1.0 X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-AuthSource: MN6PR11MB8244.namprd11.prod.outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: 265ca9d4-0de6-4c1a-4b36-08dc5a00929d X-MS-Exchange-CrossTenant-originalarrivaltime: 11 Apr 2024 08:22:48.5933 (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: Kf70f1oXBbFz5Eolhh/EvGQc+eolHH9o+zLmdN3LHbLhqI+8WrwTi6dKhx2OC/cYVosvQpon4EeRov6GSn7W9w== X-MS-Exchange-Transport-CrossTenantHeadersStamped: CH0PR11MB8166 X-OriginatorOrg: intel.com Precedence: Bulk List-Subscribe: List-Help: Sender: devel@edk2.groups.io List-Id: Mailing-List: list devel@edk2.groups.io; contact devel+owner@edk2.groups.io Resent-Date: Thu, 11 Apr 2024 01:22:52 -0700 Resent-From: ray.ni@intel.com Reply-To: devel@edk2.groups.io,ray.ni@intel.com List-Unsubscribe-Post: List-Unsubscribe=One-Click List-Unsubscribe: X-Gm-Message-State: w46ulwdo88agfwuNasnQnBQzx7686176AA= Content-Language: en-US Content-Type: multipart/alternative; boundary="_000_MN6PR11MB8244FB05097F8075F4B233098C052MN6PR11MB8244namp_" X-GND-Status: LEGIT Authentication-Results: spool.mail.gandi.net; dkim=pass header.d=groups.io header.s=20240206 header.b=PumTrVuQ; dmarc=fail reason="SPF not aligned (relaxed), DKIM not aligned (relaxed)" header.from=intel.com (policy=none); spf=pass (spool.mail.gandi.net: domain of bounce@groups.io designates 45.79.227.220 as permitted sender) smtp.mailfrom=bounce@groups.io --_000_MN6PR11MB8244FB05097F8075F4B233098C052MN6PR11MB8244namp_ Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable Reviewed-by: Ray Ni Thanks, Ray ________________________________ From: Wu, Jiaxin Sent: Wednesday, April 10, 2024 21:57 To: devel@edk2.groups.io Cc: Ard Biesheuvel ; Yao, Jiewen ; Gerd Hoffmann ; Ni, Ray Subject: [PATCH v1 11/13] OvmfPkg/SmmCpuFeaturesLib: Check Smbase Relocatio= n is done or not Based on gSmmBaseHobGuid: If gSmmBaseHobGuid found, means SmBase info has been relocated and recorded in the SmBase array. So, this patch check smbase relocation is done or not in SmmCpuFeaturesInitializeProcessor(). With SmmRelocationLib, gSmmBaseHobGuid will be always created. Here this patch just makes the function/logic correct. The SMM Relocation logic can be totally cleaned from the SmmCpuFeaturesLib. But it will happen in the future patch set, this patch does not target to the cleanup work. Cc: Ard Biesheuvel Cc: Jiewen Yao Cc: Gerd Hoffmann Cc: Ray Ni Signed-off-by: Jiaxin Wu --- .../Library/SmmCpuFeaturesLib/SmmCpuFeaturesLib.c | 33 ++++++++++++++----= ---- 1 file changed, 22 insertions(+), 11 deletions(-) diff --git a/OvmfPkg/Library/SmmCpuFeaturesLib/SmmCpuFeaturesLib.c b/OvmfPk= g/Library/SmmCpuFeaturesLib/SmmCpuFeaturesLib.c index 63822b126e..0a6f33c2b1 100644 --- a/OvmfPkg/Library/SmmCpuFeaturesLib/SmmCpuFeaturesLib.c +++ b/OvmfPkg/Library/SmmCpuFeaturesLib/SmmCpuFeaturesLib.c @@ -26,10 +26,16 @@ // // EFER register LMA bit // #define LMA BIT10 +// +// Indicate SmBase for each Processors has been relocated or not. If TRUE, +// means no need to do the relocation in SmmCpuFeaturesInitializeProcessor= (). +// +BOOLEAN mSmmCpuFeaturesSmmRelocated; + /** The constructor function @param[in] ImageHandle The firmware allocated handle for the EFI image= . @param[in] SystemTable A pointer to the EFI System Table. @@ -44,13 +50,13 @@ SmmCpuFeaturesLibConstructor ( IN EFI_SYSTEM_TABLE *SystemTable ) { // // If gSmmBaseHobGuid found, means SmBase info has been relocated and re= corded - // in the SmBase array. ASSERT it's not supported in OVMF. + // in the SmBase array. // - ASSERT (GetFirstGuidHob (&gSmmBaseHobGuid) =3D=3D NULL); + mSmmCpuFeaturesSmmRelocated =3D (BOOLEAN)(GetFirstGuidHob (&gSmmBaseHobG= uid) !=3D NULL); // // No need to program SMRRs on our virtual platform. // return EFI_SUCCESS; @@ -90,20 +96,25 @@ SmmCpuFeaturesInitializeProcessor ( ) { AMD_SMRAM_SAVE_STATE_MAP *CpuState; // - // Configure SMBASE. + // No need to configure SMBASE if SmBase relocation has been done. // - CpuState =3D (AMD_SMRAM_SAVE_STATE_MAP *)(UINTN)( - SMM_DEFAULT_SMBASE + - SMRAM_SAVE_STATE_MAP_OFFS= ET - ); - if ((CpuState->x86.SMMRevId & 0xFFFF) =3D=3D 0) { - CpuState->x86.SMBASE =3D (UINT32)CpuHotPlugData->SmBase[CpuIndex]; - } else { - CpuState->x64.SMBASE =3D (UINT32)CpuHotPlugData->SmBase[CpuIndex]; + if (!mSmmCpuFeaturesSmmRelocated) { + // + // Configure SMBASE. + // + CpuState =3D (AMD_SMRAM_SAVE_STATE_MAP *)(UINTN)( + SMM_DEFAULT_SMBASE + + SMRAM_SAVE_STATE_MAP_OF= FSET + ); + if ((CpuState->x86.SMMRevId & 0xFFFF) =3D=3D 0) { + CpuState->x86.SMBASE =3D (UINT32)CpuHotPlugData->SmBase[CpuIndex]; + } else { + CpuState->x64.SMBASE =3D (UINT32)CpuHotPlugData->SmBase[CpuIndex]; + } } // // No need to program SMRRs on our virtual platform. // -- 2.16.2.windows.1 -=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D- Groups.io Links: You receive all messages sent to this group. View/Reply Online (#117624): https://edk2.groups.io/g/devel/message/117624 Mute This Topic: https://groups.io/mt/105442004/7686176 Group Owner: devel+owner@edk2.groups.io Unsubscribe: https://edk2.groups.io/g/devel/unsub [rebecca@openfw.io] -=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D- --_000_MN6PR11MB8244FB05097F8075F4B233098C052MN6PR11MB8244namp_ Content-Type: text/html; charset="us-ascii" Content-Transfer-Encoding: quoted-printable
Reviewed-by: Ray Ni <ray.ni@intel.com>

Thanks,
Ray

From: Wu, Jiaxin <jiaxin= .wu@intel.com>
Sent: Wednesday, April 10, 2024 21:57
To: devel@edk2.groups.io <devel@edk2.groups.io>
Cc: Ard Biesheuvel <ardb+tianocore@kernel.org>; Yao, Jiewen &l= t;jiewen.yao@intel.com>; Gerd Hoffmann <kraxel@redhat.com>; Ni, Ra= y <ray.ni@intel.com>
Subject: [PATCH v1 11/13] OvmfPkg/SmmCpuFeaturesLib: Check Smbase Re= location is done or not
 
Based on gSmmBaseHobGuid:
If gSmmBaseHobGuid found, means SmBase info has been relocated
and recorded in the SmBase array.
So, this patch check smbase relocation is done or not in
SmmCpuFeaturesInitializeProcessor().

With SmmRelocationLib, gSmmBaseHobGuid will be always created.
Here this patch just makes the function/logic correct. The SMM
Relocation logic can be totally cleaned from the
SmmCpuFeaturesLib. But it will happen in the future patch set,
this patch does not target to the cleanup work.

Cc: Ard Biesheuvel <ardb+tianocore@kernel.org>
Cc: Jiewen Yao <jiewen.yao@intel.com>
Cc: Gerd Hoffmann <kraxel@redhat.com>
Cc: Ray Ni <ray.ni@intel.com>
Signed-off-by: Jiaxin Wu <jiaxin.wu@intel.com>
---
 .../Library/SmmCpuFeaturesLib/SmmCpuFeaturesLib.c  | 33 ++++++++= ++++++--------
 1 file changed, 22 insertions(+), 11 deletions(-)

diff --git a/OvmfPkg/Library/SmmCpuFeaturesLib/SmmCpuFeaturesLib.c b/OvmfPk= g/Library/SmmCpuFeaturesLib/SmmCpuFeaturesLib.c
index 63822b126e..0a6f33c2b1 100644
--- a/OvmfPkg/Library/SmmCpuFeaturesLib/SmmCpuFeaturesLib.c
+++ b/OvmfPkg/Library/SmmCpuFeaturesLib/SmmCpuFeaturesLib.c
@@ -26,10 +26,16 @@
 //
 // EFER register LMA bit
 //
 #define LMA  BIT10
 
+//
+// Indicate SmBase for each Processors has been relocated or not. If TRUE,=
+// means no need to do the relocation in SmmCpuFeaturesInitializeProcessor= ().
+//
+BOOLEAN  mSmmCpuFeaturesSmmRelocated;
+
 /**
   The constructor function
 
   @param[in]  ImageHandle  The firmware allocated hand= le for the EFI image.
   @param[in]  SystemTable  A pointer to the EFI System= Table.
@@ -44,13 +50,13 @@ SmmCpuFeaturesLibConstructor (
   IN EFI_SYSTEM_TABLE  *SystemTable
   )
 {
   //
   // If gSmmBaseHobGuid found, means SmBase info has been reloca= ted and recorded
-  // in the SmBase array. ASSERT it's not supported in OVMF.
+  // in the SmBase array.
   //
-  ASSERT (GetFirstGuidHob (&gSmmBaseHobGuid) =3D=3D NULL);
+  mSmmCpuFeaturesSmmRelocated =3D (BOOLEAN)(GetFirstGuidHob (&gSm= mBaseHobGuid) !=3D NULL);
 
   //
   // No need to program SMRRs on our virtual platform.
   //
   return EFI_SUCCESS;
@@ -90,20 +96,25 @@ SmmCpuFeaturesInitializeProcessor (
   )
 {
   AMD_SMRAM_SAVE_STATE_MAP  *CpuState;
 
   //
-  // Configure SMBASE.
+  // No need to configure SMBASE if SmBase relocation has been done.<= br>    //
-  CpuState =3D (AMD_SMRAM_SAVE_STATE_MAP *)(UINTN)(
-            &n= bsp;            = ;            &n= bsp;           SMM_DEFAUL= T_SMBASE +
-            &n= bsp;            = ;            &n= bsp;           SMRAM_SAVE= _STATE_MAP_OFFSET
-            &n= bsp;            = ;            &n= bsp;           );
-  if ((CpuState->x86.SMMRevId & 0xFFFF) =3D=3D 0) {
-    CpuState->x86.SMBASE =3D (UINT32)CpuHotPlugData->= SmBase[CpuIndex];
-  } else {
-    CpuState->x64.SMBASE =3D (UINT32)CpuHotPlugData->= SmBase[CpuIndex];
+  if (!mSmmCpuFeaturesSmmRelocated) {
+    //
+    // Configure SMBASE.
+    //
+    CpuState =3D (AMD_SMRAM_SAVE_STATE_MAP *)(UINTN)(
+            &n= bsp;            = ;            &n= bsp;            = ; SMM_DEFAULT_SMBASE +
+            &n= bsp;            = ;            &n= bsp;            = ; SMRAM_SAVE_STATE_MAP_OFFSET
+            &n= bsp;            = ;            &n= bsp;            = ; );
+    if ((CpuState->x86.SMMRevId & 0xFFFF) =3D=3D 0) = {
+      CpuState->x86.SMBASE =3D (UINT32)CpuHotP= lugData->SmBase[CpuIndex];
+    } else {
+      CpuState->x64.SMBASE =3D (UINT32)CpuHotP= lugData->SmBase[CpuIndex];
+    }
   }
 
   //
   // No need to program SMRRs on our virtual platform.
   //
--
2.16.2.windows.1

_._,_._,_

Groups.io Links:

=20 You receive all messages sent to this group. =20 =20

View/Reply Online (#117624) | =20 | Mute= This Topic | New Topic
Your Subscriptio= n | Contact Group Owner | Unsubscribe [rebecca@openfw.io]

_._,_._,_
--_000_MN6PR11MB8244FB05097F8075F4B233098C052MN6PR11MB8244namp_--