From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from NAM11-BN8-obe.outbound.protection.outlook.com (NAM11-BN8-obe.outbound.protection.outlook.com [40.107.236.40]) by mx.groups.io with SMTP id smtpd.web11.19100.1670428651354589564 for ; Wed, 07 Dec 2022 07:57:31 -0800 Authentication-Results: mx.groups.io; dkim=pass header.i=@amd.com header.s=selector1 header.b=Ywjt4rm6; spf=permerror, err=parse error for token &{10 18 %{i}._ip.%{h}._ehlo.%{d}._spf.vali.email}: invalid domain name (domain: amd.com, ip: 40.107.236.40, mailfrom: abner.chang@amd.com) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=is+ubkAIJEUzmY2shvlBgnPyXNOSWKfUrwrhQnrBFQCvaXJ9bMRev38pOz0YOQR4fDv8wC/BqmuGCHe4UfkcVoDTTOrdekoC8HDhgq8DrL7Bn5UcS26htLCRrGxCLik+ZzRofkpiOjFumaHptmV5CQGGQSCkJAyhwvdJQHtf3GLTkM0V69L9fHZsrXVsU/HSwgd1Y5yrA8bkykTD+ZIC/gppgOly57HjMvrmNa2m4IKMhy4PslEj7oIcGr5uIgwfVcQqYvuJW/jwEmtQfywTt5RpDDalbu6D71/ZmY7w+FIUZ3AjCGKSYBBQT0m+cnj2L4UIDMh/uQXL4gETnQp7RA== 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=yob3yuYHHq0heirxqDF3Bv0Kgdqprbih7Q75quZ3TV0=; b=ErrV2XyrNgaE9Km0IW89mkygqC0uSPfxr/FrTgnJ4PooC1pVoX8JU1iuFL/rf/sBcv+XvgFK37kLYDjRNyVvzzotaX4xSrmOHmEjtuOXTkU6rKP4yTmloAlR+HI9dwT/qPX48ItR8nTL9tN6gmA4mMkr6PrEw2JMlPp1BY/S1aenGHQ28XhC55Yuzdn6pBEUytvxjL2B4fOaEC/1JG2IsQTRmx7FI5jAGjXtRkUlsYjYKjHoU06pmzkiNsgfPAzCxf8sWizg9mJc8XwMxoa+R1KYKUu+opwAymgJJwSlf0vtP+ZVbZegF2s+OuwNLyYrweCkCASwT2+5aFBstMqhEg== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=amd.com; dmarc=pass action=none header.from=amd.com; dkim=pass header.d=amd.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=amd.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=yob3yuYHHq0heirxqDF3Bv0Kgdqprbih7Q75quZ3TV0=; b=Ywjt4rm696purZ6HgQx3CYcLix7MJxmdqL1EG5mauxu9iAtUA6g3ce3GfiuZXupYk3vjPwAZqSa2Nbq7NWLkhNfBHMxFdkR1VTat81RsZ+zC+nKTP8npJkeKvaToEHe8BA/H+Po2rWnmOoYbq1eaDsRig3MmqgM4oAW1TnqF0UA= Received: from MN2PR12MB3966.namprd12.prod.outlook.com (2603:10b6:208:165::18) by SA0PR12MB4367.namprd12.prod.outlook.com (2603:10b6:806:94::13) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5880.14; Wed, 7 Dec 2022 15:57:28 +0000 Received: from MN2PR12MB3966.namprd12.prod.outlook.com ([fe80::ce0a:283e:839:34bd]) by MN2PR12MB3966.namprd12.prod.outlook.com ([fe80::ce0a:283e:839:34bd%3]) with mapi id 15.20.5880.014; Wed, 7 Dec 2022 15:57:28 +0000 From: "Chang, Abner" To: "Attar, AbdulLateef (Abdul Lateef)" , "devel@edk2.groups.io" CC: "Attar, AbdulLateef (Abdul Lateef)" , "Kirkendall, Garrett" , "Grimes, Paul" , Eric Dong , Ray Ni , Rahul Kumar Subject: Re: [PATCH v1 1/5] UefiCpuPkg/SmmCpuFeaturesLib: Restructure arch-dependent code Thread-Topic: [PATCH v1 1/5] UefiCpuPkg/SmmCpuFeaturesLib: Restructure arch-dependent code Thread-Index: AQHZCXX70XcfGbMZuU6GbUV348eYc65ilh5A Date: Wed, 7 Dec 2022 15:57:28 +0000 Message-ID: References: <4c6e06ace12701059f409fc146c227cc28c5ca6b.1670332633.git.abdattar@amd.com> In-Reply-To: <4c6e06ace12701059f409fc146c227cc28c5ca6b.1670332633.git.abdattar@amd.com> Accept-Language: zh-CN, en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: msip_labels: MSIP_Label_4342314e-0df4-4b58-84bf-38bed6170a0f_Enabled=true; MSIP_Label_4342314e-0df4-4b58-84bf-38bed6170a0f_SetDate=2022-12-07T15:57:23Z; MSIP_Label_4342314e-0df4-4b58-84bf-38bed6170a0f_Method=Standard; MSIP_Label_4342314e-0df4-4b58-84bf-38bed6170a0f_Name=General; MSIP_Label_4342314e-0df4-4b58-84bf-38bed6170a0f_SiteId=3dd8961f-e488-4e60-8e11-a82d994e183d; MSIP_Label_4342314e-0df4-4b58-84bf-38bed6170a0f_ActionId=f1147cba-0579-4ed6-8cd7-39c32f39c0aa; MSIP_Label_4342314e-0df4-4b58-84bf-38bed6170a0f_ContentBits=1 authentication-results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=amd.com; x-ms-publictraffictype: Email x-ms-traffictypediagnostic: MN2PR12MB3966:EE_|SA0PR12MB4367:EE_ x-ms-office365-filtering-correlation-id: 20b2588d-d7b1-43a8-905e-08dad86bbe09 x-ms-exchange-senderadcheck: 1 x-ms-exchange-antispam-relay: 0 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: e8rtF6Kn9JUB1DfZUYNGtY9v6nepLb9hWU38UpRz6yV4BH4YN2OePfOBYd/O2fgJfc8JTTic2rAu/mXt1sNZl9MPbmiiVq6v/R++8tMdT/zmSIEnoRQBBi5YKDVxj1ywpPzeqSHDxyTLHl+c5kMxK+p9TuLGGfXLYvnJCo/N0kQYPgAB0a1957FILFaakwkfyAItmR2aCdQnfBvsXTyz+h9poYtHFQP+3hqdoypX6wj0I9IHT5AqXL0yF4GxkkPeiurH6muZ8DKSuTlwundh62Jtvny5fwCEPgvifyUhGpGcRpUes8PjdCJBuNcB+/izqhdt8hyA07Z7X9hOs96hQOB6MhhBDo+rYDOE9221xxObcZsaIS7NUpb/suXPWgkfiAAuScPa2oMQpvA0ciEHmB7wAlMGMk3IpaSaoMzEwh2fSgFmx7fUnQgF9u3Fap4HXJ1oqbiWPZ2KcyOxBMfriRUxfzOSpNPDi9/190rYMLbj+zFH7MPrRh3JzsrXdl62xBYktMySP4JLF6UHwujKUyu4KZ9Q0VFlp8E+jLtk/jgMPx+5vMW+mIhvqz+9G6T0DXNAUxlwY6ItThLNPGNCOul0H0v9ebMgtu9f9YwVF0ja64fPc/liaXjw5AOKGBpKkTa3sXbAXZehrY6DmnomkhLQHU8ddYOypDRm75B1lkpZfDq5y4F9nREbU/Ik2twY1NRdt7lODqeY2HQn8LNVRCLc71POkeoxqz/Q/t7d3K8= x-forefront-antispam-report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:MN2PR12MB3966.namprd12.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230022)(4636009)(39860400002)(346002)(136003)(396003)(376002)(366004)(451199015)(83380400001)(8936002)(52536014)(38100700002)(55016003)(53546011)(33656002)(5660300002)(30864003)(2906002)(41300700001)(966005)(478600001)(186003)(71200400001)(7696005)(4326008)(66446008)(66946007)(6506007)(66556008)(64756008)(66476007)(122000001)(8676002)(110136005)(9686003)(76116006)(38070700005)(316002)(26005)(54906003)(19627235002)(86362001);DIR:OUT;SFP:1101; x-ms-exchange-antispam-messagedata-chunkcount: 1 x-ms-exchange-antispam-messagedata-0: =?us-ascii?Q?HzmeGx/pIj0yA0Jxo92GI0lKgeIgRB4kbZEoHW2Hs4lKT9Qa2mbSEfv5Ljru?= =?us-ascii?Q?J7gca9FXb2NTFoXOovfwZmFlpdessfrcLAIC1AtTbDKlz5yBbSa4f6DtkBfM?= =?us-ascii?Q?cSp4ts9+OkoDz57O/LVC6ZAuDvoKObmfw3+CBJ823I6DxvfuNDuOeb+AGVV/?= =?us-ascii?Q?LTpNI7X0lvat4EYbS0iMgzYib/loBHOpbKzaXEuen6D1fYtPcjrTUA2JLEjB?= =?us-ascii?Q?GKcDqdQalR0ElJWKDdFRX5WlWbdsCbmbudLr4gkAkZ6V/WFqEP+Pvlmnv2oZ?= =?us-ascii?Q?vChyfClCFR/wfrfrKgFYGbg394g+egUuRRHOwgYKknJPrRMQSObT6HRScHo0?= =?us-ascii?Q?Jj08XujZrR7iqiuucTxmL9Y0n6DFg7w1s488TGnoucKV/aBKNII/tt3kA1iP?= =?us-ascii?Q?JYkQyTWBmV83WW9zIr9aN7rfQbum33jDjx6wSwsL+k2EGAGs0tYUyT6j9Ua/?= =?us-ascii?Q?65misOmB+qDnHcinEAvYfB6ofrI4xp3vDJ0nZeAUZjr91x4MPR9sKJ50k0Tw?= =?us-ascii?Q?3Q2x81jsl70gsXAPpGxR/Qug5GkIehWrNYg5wV2O15WEqvds/k9slLU7HxHg?= =?us-ascii?Q?IWq6fuB32OAF3KAg5+E76Zrvj0LXVjU7+kYeWEF9mSEvmeMl/uJ/vbZSsR/L?= =?us-ascii?Q?ufKgyGCiNbDsxonANt5J5noE0JmDz7y0kDsGZYjATarzpU64c+NMZDeOICQZ?= =?us-ascii?Q?kZOca8lQOjYMQby+LcWDA159L44GrbCkkuLg/k9oJJfniaejCG3yR1kGFf6V?= =?us-ascii?Q?9M5SkTQVCVl/iv3whJKxzqD81Ary99q2152B0/bYLkS75pcpFvXNtx7vx8TT?= =?us-ascii?Q?pWcHokAIhp6+yHE/R131dth7qZpoWW2fuM+v0cxDQhP8/Qh9CIv8S9GIrVse?= =?us-ascii?Q?vzfHcYry9wFdWnGNPt4thiOqTfsnYSd9zyOUj/vkOWyWwoM8ZRC9glcXBl9Y?= =?us-ascii?Q?/gAUqmZEmvxNYUZopDKNzTzjzSMKH6qvFiBP//B9t+BvF4izUCvccMz1NivE?= =?us-ascii?Q?pdyXVozLUdBYuyl8UKYPSviWPytDUcOkCqOXtGKLsRsyjpvr28zb+Bjzzt/Q?= =?us-ascii?Q?bimw93eIHPrMVWvdru7UuxyNCUo5JwChiMlMHhdZjsf03IXJz/S//BNJJVkc?= =?us-ascii?Q?kPK+A5FZGkd9cMqm0nuIWPh0DBS0wKes6cPc5cGUVqmY4P1RHuXrvaIuZKuK?= =?us-ascii?Q?jQEUFkVqDICLGLyvcAZIOMGZ8rDiIbH6XFobp5Y4AUoNmqEZIuYXa5x6y/Jv?= =?us-ascii?Q?NgfWKGliqOwOGDWIUvoWen+QuPOjVwx2/iq37JkL1xQzPFCBjme7wlWQujkz?= =?us-ascii?Q?b7GkaQxWoYP9YvdYRsEWOK33s/ANPnxalixwuvMEChU8i94IozrpBnEd+jby?= =?us-ascii?Q?HEm0qqdkekWC5E5XE4tyF7LYVEx6nLIJpyabePgmb3Zc+5WwMLI5L/MnCsrB?= =?us-ascii?Q?KJN8dcv8Oirki1BVyT9A5ifbqKbDjbCbDjqo3+p8LWjr5SBVklhYbojiWit7?= =?us-ascii?Q?WuorhCVrUYw50MihcNnFGJ3vsaHs45e3iII4F2fIOeEErQNBMZC4I05GpmgN?= =?us-ascii?Q?ogJBz3nEzL1+G2XexWc=3D?= MIME-Version: 1.0 X-OriginatorOrg: amd.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-AuthSource: MN2PR12MB3966.namprd12.prod.outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: 20b2588d-d7b1-43a8-905e-08dad86bbe09 X-MS-Exchange-CrossTenant-originalarrivaltime: 07 Dec 2022 15:57:28.7432 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 3dd8961f-e488-4e60-8e11-a82d994e183d X-MS-Exchange-CrossTenant-mailboxtype: HOSTED X-MS-Exchange-CrossTenant-userprincipalname: OP9Y1x8SJTTrdS2domIcDihMKt7iBqZjbx/Fx2JmpyGuiMTzQ3A1Cipktoz2DTHyacChDMYz+LnaaS/ZCru+VA== X-MS-Exchange-Transport-CrossTenantHeadersStamped: SA0PR12MB4367 Content-Language: en-US Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable [AMD Official Use Only - General] Reviewed-by: Abner Chang > -----Original Message----- > From: Abdul Lateef Attar > Sent: Tuesday, December 6, 2022 9:23 PM > To: devel@edk2.groups.io > Cc: Attar, AbdulLateef (Abdul Lateef) ; Chang, > Abner ; Kirkendall, Garrett > ; Grimes, Paul ; Eric > Dong ; Ray Ni ; Rahul Kumar > > Subject: [PATCH v1 1/5] UefiCpuPkg/SmmCpuFeaturesLib: Restructure arch- > dependent code >=20 > From: Abdul Lateef Attar >=20 > BZ: https://bugzilla.tianocore.org/show_bug.cgi?id=3D4182 >=20 > moves Intel-specific code to the arch-dependent file. > Other processor families might have different implementation of these > functions. > Hence, moving out of the common file. >=20 > Cc: Abner Chang > Cc: Garrett Kirkendall > Cc: Paul Grimes > Cc: Eric Dong > Cc: Ray Ni > Cc: Rahul Kumar > Signed-off-by: Abdul Lateef Attar > --- > .../IntelSmmCpuFeaturesLib.c | 140 ++++++++++++++++++ > .../SmmCpuFeaturesLibCommon.c | 140 ------------------ > 2 files changed, 140 insertions(+), 140 deletions(-) >=20 > diff --git > a/UefiCpuPkg/Library/SmmCpuFeaturesLib/IntelSmmCpuFeaturesLib.c > b/UefiCpuPkg/Library/SmmCpuFeaturesLib/IntelSmmCpuFeaturesLib.c > index d5eaaa7a991e..994267f393b3 100644 > --- a/UefiCpuPkg/Library/SmmCpuFeaturesLib/IntelSmmCpuFeaturesLib.c > +++ b/UefiCpuPkg/Library/SmmCpuFeaturesLib/IntelSmmCpuFeaturesLib.c > @@ -400,3 +400,143 @@ SmmCpuFeaturesSetSmmRegister ( > AsmWriteMsr64 (SMM_FEATURES_LIB_SMM_FEATURE_CONTROL, > Value); } }++/**+ This function updates the SMRAM save state on the > currently executing CPU+ to resume execution at a specific address after= an > RSM instruction. This+ function must evaluate the SMRAM save state to > determine the execution mode+ the RSM instruction resumes and update > the resume execution address with+ either NewInstructionPointer32 or > NewInstructionPoint. The auto HALT restart+ flag in the SMRAM save stat= e > must always be cleared. This function returns+ the value of the instruc= tion > pointer from the SMRAM save state that was+ replaced. If this function > returns 0, then the SMRAM save state was not+ modified.++ This function= is > called during the very first SMI on each CPU after+ > SmmCpuFeaturesInitializeProcessor() to set a flag in normal execution > mode+ to signal that the SMBASE of each CPU has been updated before the > default+ SMBASE address is used for the first SMI to the next CPU.++ > @param[in] CpuIndex The index of the CPU to hook. The va= lue+ > must be between 0 and the NumberOfCpus+ = field in the > System Management System Table+ (SMS= T).+ @param[in] > CpuState Pointer to SMRAM Save State Map for the+ > currently executing CPU.+ @param[in] NewInstructionPointer32 Instructio= n > pointer to use if resuming to+ 32-bi= t execution mode from > 64-bit SMM.+ @param[in] NewInstructionPointer Instruction pointer to > use if resuming to+ same execution m= ode as SMM.++ > @retval 0 This function did modify the SMRAM save state.+ @retval > 0 > The original instruction pointer value from the SMRAM save state+ > before it was > replaced.+**/+UINT64+EFIAPI+SmmCpuFeaturesHookReturnFromSmm (+ > IN UINTN CpuIndex,+ IN SMRAM_SAVE_STATE_MAP *CpuState,+ > IN UINT64 NewInstructionPointer32,+ IN UINT64 > NewInstructionPointer+ )+{+ return 0;+}++/**+ Read an SMM Save State > register on the target processor. If this function+ returns > EFI_UNSUPPORTED, then the caller is responsible for reading the+ SMM > Save Sate register.++ @param[in] CpuIndex The index of the CPU to read > the SMM Save State. The+ value must be between 0 = and the > NumberOfCpus field in+ the System Management Syste= m Table > (SMST).+ @param[in] Register The SMM Save State register to read.+ > @param[in] Width The number of bytes to read from the CPU save state= .+ > @param[out] Buffer Upon return, this holds the CPU register value read= + > from the save state.++ @retval EFI_SUCCESS The register was re= ad > from Save State.+ @retval EFI_INVALID_PARAMETER Buffer is NULL.+ > @retval EFI_UNSUPPORTED This function does not support reading > Register.++**/+EFI_STATUS+EFIAPI+SmmCpuFeaturesReadSaveStateRegist > er (+ IN UINTN CpuIndex,+ IN > EFI_SMM_SAVE_STATE_REGISTER Register,+ IN UINTN = Width,+ > OUT VOID *Buffer+ )+{+ return EFI_UNSUPPORTED;+= }++/**+ > Writes an SMM Save State register on the target processor. If this funct= ion+ > returns EFI_UNSUPPORTED, then the caller is responsible for writing the+ > SMM Save Sate register.++ @param[in] CpuIndex The index of the CPU to > write the SMM Save State. The+ value must be betwe= en 0 and > the NumberOfCpus field in+ the System Management Sy= stem > Table (SMST).+ @param[in] Register The SMM Save State register to write= .+ > @param[in] Width The number of bytes to write to the CPU save state.+ > @param[in] Buffer Upon entry, this holds the new CPU register value.++ > @retval EFI_SUCCESS The register was written to Save State.+ @= retval > EFI_INVALID_PARAMETER Buffer is NULL.+ @retval EFI_UNSUPPORTED > This function does not support writing > Register.+**/+EFI_STATUS+EFIAPI+SmmCpuFeaturesWriteSaveStateRegiste > r (+ IN UINTN CpuIndex,+ IN EFI_SMM_SAVE_STATE_R= EGISTER > Register,+ IN UINTN Width,+ IN CONST VOID > *Buffer+ )+{+ return EFI_UNSUPPORTED;+}++/**+ Check to see if an SMM > register is supported by a specified CPU.++ @param[in] CpuIndex The ind= ex > of the CPU to check for SMM register support.+ The = value must > be between 0 and the NumberOfCpus field+ in the Sys= tem > Management System Table (SMST).+ @param[in] RegName Identifies the > SMM register to check for support.++ @retval TRUE The SMM register > specified by RegName is supported by the CPU+ specified b= y > CpuIndex.+ @retval FALSE The SMM register specified by RegName is not > supported by the+ CPU specified by > CpuIndex.+**/+BOOLEAN+EFIAPI+SmmCpuFeaturesIsSmmRegisterSupport > ed (+ IN UINTN CpuIndex,+ IN SMM_REG_NAME RegName+ )+{+ if > (FeaturePcdGet (PcdSmmFeatureControlEnable) && (RegName =3D=3D > SmmRegFeatureControl)) {+ return TRUE;+ }++ return FALSE;+}++/**+ > This function is hook point called after the > gEfiSmmReadyToLockProtocolGuid+ notification is completely > processed.+**/+VOID+EFIAPI+SmmCpuFeaturesCompleteSmmReadyToLoc > k (+ VOID+ )+{+}diff --git > a/UefiCpuPkg/Library/SmmCpuFeaturesLib/SmmCpuFeaturesLibCommon.c > b/UefiCpuPkg/Library/SmmCpuFeaturesLib/SmmCpuFeaturesLibCommon.c > index 7777e52740eb..2f8841bbbf77 100644 > --- > a/UefiCpuPkg/Library/SmmCpuFeaturesLib/SmmCpuFeaturesLibCommon.c > +++ > b/UefiCpuPkg/Library/SmmCpuFeaturesLib/SmmCpuFeaturesLibCommon.c > @@ -17,49 +17,6 @@ SPDX-License-Identifier: BSD-2-Clause-Patent > #include "CpuFeaturesLib.h" -/**- This function updates the SMRAM save > state on the currently executing CPU- to resume execution at a specific > address after an RSM instruction. This- function must evaluate the SMRA= M > save state to determine the execution mode- the RSM instruction resumes > and update the resume execution address with- either > NewInstructionPointer32 or NewInstructionPoint. The auto HALT restart- > flag in the SMRAM save state must always be cleared. This function retur= ns- > the value of the instruction pointer from the SMRAM save state that was- > replaced. If this function returns 0, then the SMRAM save state was not- > modified.-- This function is called during the very first SMI on each CP= U > after- SmmCpuFeaturesInitializeProcessor() to set a flag in normal execu= tion > mode- to signal that the SMBASE of each CPU has been updated before the > default- SMBASE address is used for the first SMI to the next CPU.-- > @param[in] CpuIndex The index of the CPU to hook. The va= lue- > must be between 0 and the NumberOfCpus- = field in the > System Management System Table- (SMS= T).- @param[in] > CpuState Pointer to SMRAM Save State Map for the- > currently executing CPU.- @param[in] NewInstructionPointer32 Instructio= n > pointer to use if resuming to- 32-bi= t execution mode from > 64-bit SMM.- @param[in] NewInstructionPointer Instruction pointer to = use > if resuming to- same execution mode = as SMM.-- @retval 0 > This function did modify the SMRAM save state.- @retval > 0 The origina= l > instruction pointer value from the SMRAM save state- before= it was > replaced.-**/-UINT64-EFIAPI-SmmCpuFeaturesHookReturnFromSmm (- IN > UINTN CpuIndex,- IN SMRAM_SAVE_STATE_MAP *CpuState,- I= N > UINT64 NewInstructionPointer32,- IN UINT64 > NewInstructionPointer- )-{- return 0;-}- /** Hook point in normal exe= cution > mode that allows the one CPU that was elected as monarch during System > Management Mode initialization to perform additional@@ -90,103 +47,6 @@ > SmmCpuFeaturesRendezvousExit ( > { } -/**- Check to see if an SMM register is supported by a specified C= PU.-- > @param[in] CpuIndex The index of the CPU to check for SMM register > support.- The value must be between 0 and the Numbe= rOfCpus > field- in the System Management System Table (SMST)= .- > @param[in] RegName Identifies the SMM register to check for support.-- > @retval TRUE The SMM register specified by RegName is supported by the > CPU- specified by CpuIndex.- @retval FALSE The SMM regi= ster > specified by RegName is not supported by the- CPU specifi= ed by > CpuIndex.-**/-BOOLEAN-EFIAPI-SmmCpuFeaturesIsSmmRegisterSupported > (- IN UINTN CpuIndex,- IN SMM_REG_NAME RegName- )-{- if > (FeaturePcdGet (PcdSmmFeatureControlEnable) && (RegName =3D=3D > SmmRegFeatureControl)) {- return TRUE;- }-- return FALSE;-}--/**- R= ead > an SMM Save State register on the target processor. If this function- r= eturns > EFI_UNSUPPORTED, then the caller is responsible for reading the- SMM > Save Sate register.-- @param[in] CpuIndex The index of the CPU to read > the SMM Save State. The- value must be between 0 = and the > NumberOfCpus field in- the System Management Syste= m Table > (SMST).- @param[in] Register The SMM Save State register to read.- > @param[in] Width The number of bytes to read from the CPU save state= .- > @param[out] Buffer Upon return, this holds the CPU register value read= - > from the save state.-- @retval EFI_SUCCESS The register was re= ad from > Save State.- @retval EFI_INVALID_PARAMETER Buffer is NULL.- @retval > EFI_UNSUPPORTED This function does not support reading Register.--*= */- > EFI_STATUS-EFIAPI-SmmCpuFeaturesReadSaveStateRegister (- IN UINTN > CpuIndex,- IN EFI_SMM_SAVE_STATE_REGISTER Register,- IN UINTN > Width,- OUT VOID *Buffer- )-{- return EFI_UNSU= PPORTED;-}-- > /**- Writes an SMM Save State register on the target processor. If this > function- returns EFI_UNSUPPORTED, then the caller is responsible for > writing the- SMM Save Sate register.-- @param[in] CpuIndex The index o= f > the CPU to write the SMM Save State. The- value mu= st be > between 0 and the NumberOfCpus field in- the System > Management System Table (SMST).- @param[in] Register The SMM Save > State register to write.- @param[in] Width The number of bytes to wr= ite > to the CPU save state.- @param[in] Buffer Upon entry, this holds the = new > CPU register value.-- @retval EFI_SUCCESS The register was wri= tten to > Save State.- @retval EFI_INVALID_PARAMETER Buffer is NULL.- @retval > EFI_UNSUPPORTED This function does not support writing Register.-**= /- > EFI_STATUS-EFIAPI-SmmCpuFeaturesWriteSaveStateRegister (- IN UINTN > CpuIndex,- IN EFI_SMM_SAVE_STATE_REGISTER Register,- IN UINTN > Width,- IN CONST VOID *Buffer- )-{- return EFI_UNSUP= PORTED;-}- > -/**- This function is hook point called after the > gEfiSmmReadyToLockProtocolGuid- notification is completely processed.- > **/-VOID-EFIAPI-SmmCpuFeaturesCompleteSmmReadyToLock (- VOID- )-{- > }- /** This API provides a method for a CPU to allocate a specific regi= on for > storing page tables. -- > 2.25.1