From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail02.groups.io (mail02.groups.io [66.175.222.108]) by spool.mail.gandi.net (Postfix) with ESMTPS id 3D894780091 for ; Thu, 30 Nov 2023 00:54:33 +0000 (UTC) DKIM-Signature: a=rsa-sha256; bh=l9tqoD+lp/J3KJQz8ozI+aFSm3n5Wcml5y/XRbOAh0g=; c=relaxed/simple; d=groups.io; h=ARC-Seal:ARC-Message-Signature:ARC-Authentication-Results:From:To:CC:Subject:Thread-Topic:Thread-Index:Date:Message-ID:References:In-Reply-To:Accept-Language:MIME-Version:Precedence:List-Subscribe:List-Help:Sender:List-Id:Mailing-List:Delivered-To:Reply-To:List-Unsubscribe-Post:List-Unsubscribe:Content-Language:Content-Type:Content-Transfer-Encoding; s=20140610; t=1701305672; v=1; b=OvkjGLBPwVM/L9jpWVRy2YVU3IWZJFLF6aKopN8MpZ3kP26gWYkI1dZghAnI3kCwESnNoUGv tQSmehgs9AR/TW4cCik0uBuT1rv3Cr0g9k9pEFVgZtvgU1qe2UFT9r5P25R9QDUfgE8KYwxy6ad BheIIESpADYYmRcv+vargkeg= X-Received: by 127.0.0.2 with SMTP id kY4mYY7687511x9RXt6QmgWZ; Wed, 29 Nov 2023 16:54:32 -0800 X-Received: from mgamail.intel.com (mgamail.intel.com [192.55.52.115]) by mx.groups.io with SMTP id smtpd.web10.60114.1701305672094181013 for ; Wed, 29 Nov 2023 16:54:32 -0800 X-IronPort-AV: E=McAfee;i="6600,9927,10909"; a="392992905" X-IronPort-AV: E=Sophos;i="6.04,237,1695711600"; d="scan'208";a="392992905" X-Received: from fmsmga004.fm.intel.com ([10.253.24.48]) by fmsmga103.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 29 Nov 2023 16:54:30 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6600,9927,10909"; a="839627365" X-IronPort-AV: E=Sophos;i="6.04,237,1695711600"; d="scan'208";a="839627365" X-Received: from orsmsx603.amr.corp.intel.com ([10.22.229.16]) by fmsmga004.fm.intel.com with ESMTP/TLS/AES256-GCM-SHA384; 29 Nov 2023 16:54:30 -0800 X-Received: from orsmsx610.amr.corp.intel.com (10.22.229.23) 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.2507.34; Wed, 29 Nov 2023 16:54:30 -0800 X-Received: from orsedg603.ED.cps.intel.com (10.7.248.4) 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.2507.34 via Frontend Transport; Wed, 29 Nov 2023 16:54:30 -0800 X-Received: from NAM11-BN8-obe.outbound.protection.outlook.com (104.47.58.169) by edgegateway.intel.com (134.134.137.100) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.1.2507.34; Wed, 29 Nov 2023 16:54:30 -0800 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=jVamlIkS3KcsMt/8ArWW7vPuRed+PXNQSpJuka/fWfT44eoyd2AAQr9SGiMmLROz3uw9RaYKTiA2841Fe6EhVX7dHdvQij0NNOeZVpGZataRxcTTccZouN2gwZKhH+xls2iydBQBdgfahsVmii5woFKYEQnt+yYM2b4iCMFN6AEm1E1iYeCLk5Dm6rP4LTg15ICuoa6PLPprFx6LQZp+xAugdpPdf3CpfTgSQi7wxvXZItZo7I1Sdd5H1+OxdwPSEkrX0qk+YPeA3lCWul0TF7mchgV5IjCpSWlck/jcC9UWepamTbIv7PaI21RIhtMS/sFn037NJQn1fdb9zddKxw== 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=Wn1fJDPReuQa5qC/Y1YIMbp14rXjAF6oE6W1XQWo/3M=; b=MbrUA9Q33cPRPORsjJRoL6sVzqPhG+DrTF21HoRU0V8fofkCxbBv+fCC/Q4Ig2fMMrAikFbG76mzMk94WSD59eWBmBrxWuNclG5NOMw3EmaidCBBNlxl2FWLGQPbr2OKQpYyY8z2fNdFuesUjCU1/emqf/9QI3BmyNE4rMDfVouE0WRsEkEemN4QCLR5XjHXXNNf+4iLKeWD5AtG0S0A8KhxdrSMHQqojIlpv69C6qmo8cJpT8Cuu54DeIaDsoUt7eKg/PRwGNZxqZwBz80daolC/bqqyIewUkc9MvMIbW3cPFvj0IkexqjvF9NCvsJi1uKg+zrjjl0HQ5KX/thbBQ== 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 X-Received: from MW4PR11MB5821.namprd11.prod.outlook.com (2603:10b6:303:184::5) by SJ0PR11MB5023.namprd11.prod.outlook.com (2603:10b6:a03:2de::24) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7025.29; Thu, 30 Nov 2023 00:54:26 +0000 X-Received: from MW4PR11MB5821.namprd11.prod.outlook.com ([fe80::ced7:2db7:4cae:ab0]) by MW4PR11MB5821.namprd11.prod.outlook.com ([fe80::ced7:2db7:4cae:ab0%7]) with mapi id 15.20.7025.022; Thu, 30 Nov 2023 00:54:26 +0000 From: "Nate DeSimone" To: "Xu, Wei6" , "devel@edk2.groups.io" CC: Abner Chang , "Gao, Liming" Subject: Re: [edk2-devel] [PATCH v2 edk2-platforms 1/1] IpmiFeaturePkg/SmmIpmiBaseLib: Support Standalone MM. Thread-Topic: [PATCH v2 edk2-platforms 1/1] IpmiFeaturePkg/SmmIpmiBaseLib: Support Standalone MM. Thread-Index: AQHaD/t2Ke8kiKcDVEa9+RP9orp2HbCSL1tA Date: Thu, 30 Nov 2023 00:54:26 +0000 Message-ID: References: <8594af88f257a5274215a8a31734c1097c4a8570.1699196971.git.wei6.xu@intel.com> In-Reply-To: <8594af88f257a5274215a8a31734c1097c4a8570.1699196971.git.wei6.xu@intel.com> Accept-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-ms-publictraffictype: Email x-ms-traffictypediagnostic: MW4PR11MB5821:EE_|SJ0PR11MB5023:EE_ x-ms-office365-filtering-correlation-id: 25fcfefb-00ed-4760-4905-08dbf13ee6d6 x-ld-processed: 46c98d88-e344-4ed4-8496-4ed7712e255d,ExtAddr x-ms-exchange-senderadcheck: 1 x-ms-exchange-antispam-relay: 0 x-microsoft-antispam-message-info: WEEIthbGPCGCOU+xED+j5JLpBwYJD6fUYb/znW943EqA8a9rbFCcol0jvooKAk+MI9lnEp2fCwPF8747RfzmDwdxyitIq0FWef8WgZpoDw9Xt7gtGxOTc05sCL7bLLWhjfy52RCFoYEPjc5srmvmBfsxI9MuIXJ082nWdPb37//NFASjRuzhYBpQ65N0uNDJmgJoG1nYsnfFNv290+m2oLLfltMCpSkbc1m8j444S5n0Rr2Kz7ulEUN4tC7/OEs9Atq4yHwVWq+2QySSpQ9+/YkiixkW4xF1JHhbASoEQzmPY32Jp3KGpn5ExF/nwW0MqL8VgAKgIY3C2d8cwcQUzg3VnrOAVs0ScOMdAy/+M/laYzsue/dsfxWdhx1q3WOd8b1u0pRkJcDZLvMEHPbNZ27lFTQvv1u+mt5nEg5E+2PYldfmnZxBwm80QfgifbBzL4FeyRHQDq48uKfl+79LyzI/CbqcQiTd0C4oDcMSYuSX8CeGYHygtNFDV3uBUuHaxrNIbIc2Eln6BZPtarMvmk+s8jiDIzKNG/+gQiN5lYUTNl3UB4++wqbf5Y3D4zJwyaeGRU/JDZZC+p4wjRD60XlTp2u47tnlZ9AcC84eb01y8O/NIMC125ShZeg5qAdTMDauLgaVTaapMMiOega/3z/3WalgiIW1lrK3f/+bbFU= x-ms-exchange-antispam-messagedata-chunkcount: 1 x-ms-exchange-antispam-messagedata-0: =?us-ascii?Q?RrphisObmVYO4H33jKv/J4PyehTl+Xo95uV5BXnXt9C1KYcMm+WC8WGfWvT1?= =?us-ascii?Q?4BsXbmXusRE5WoHSCwO+QN2eS0aYJdAavJsC+79PY9IoBC9SbjU2LlPoasLs?= =?us-ascii?Q?ewBWEG/8BfVLjKzBdv/KV4EbF+sgssu3Xztdo0A9rUiVNjRmMajSYWRqCZmc?= =?us-ascii?Q?O0zAV3a3Iny35BdMwwBAl3QuIK/c9KfTcz5IGdl5REZrGKAI/dFN9EeEvF8p?= =?us-ascii?Q?/JHY4Ugixc6XAAM6PqHHLuf5fWcKOR6PE3OoWZpDWjNdRd675Tj/5YtJj+CO?= =?us-ascii?Q?9d03MMQ20zs8DKv/r0/5/tinnEuxZ2fVbHuh+TljUkSeyqmXm7XthxIYu+0f?= =?us-ascii?Q?rvNETA0lyHoUnLs51B6XGioP7GodL5PQdVZSM8lqQmLvzofRhxQJOfyQJDe7?= =?us-ascii?Q?AxFC8XEpfcZIby33nzZFkIRbtQPfqh3MMZDAKt+6Gd741WBMjM+pANVHstfI?= =?us-ascii?Q?gYtWdStItOKOhiSUKWzhONr/b2b7EMDwaBy0hqllpwo7XVM4q9agPfLSxXms?= =?us-ascii?Q?qT3xX8O/C8iuHwzMmxngnMwYYTynwZJEfe/hgfUJvgFyq62f0CgqsF44i7vx?= =?us-ascii?Q?iB274vnMrGRVT+hTwHmNWTgYB8Q+zM9Pml9mTP8lOHaTuoDbfg27nwj9F60A?= =?us-ascii?Q?unmI9t8lLlDqDzffMtLdCrker6rjfMXDAaCGgkSqEvKtfwajCwk6Gisib7b/?= =?us-ascii?Q?PuXWJJ238rq4qqFL/k8TZYaiXcDM4Ybq41/w/dQfoez0B1JnVT88zYKsResC?= =?us-ascii?Q?zwu9sHEgGfT2hx7uZcoVpw5V4yhxau0SeEyg8Z7pgoo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uthSource: MW4PR11MB5821.namprd11.prod.outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: 25fcfefb-00ed-4760-4905-08dbf13ee6d6 X-MS-Exchange-CrossTenant-originalarrivaltime: 30 Nov 2023 00:54:26.5544 (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: C69Ke1mzcMsNXxptl06tAuxIMcqywF4JOUkVdIY2eBK+cxDF4DPXYRCXRAZ24U5OtqdcoK2UohrjPcYzu5e1Rt3saWCfiXJyf09b4xycn3s= X-MS-Exchange-Transport-CrossTenantHeadersStamped: SJ0PR11MB5023 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 Reply-To: devel@edk2.groups.io,nathaniel.l.desimone@intel.com List-Unsubscribe-Post: List-Unsubscribe=One-Click List-Unsubscribe: X-Gm-Message-State: kSCAEAg5ej4k2Hj46x4ykVdGx7686176AA= Content-Language: en-US Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable X-GND-Status: LEGIT Authentication-Results: spool.mail.gandi.net; dkim=pass header.d=groups.io header.s=20140610 header.b=OvkjGLBP; arc=reject ("signature check failed: fail, {[1] = sig:microsoft.com:reject}"); 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 66.175.222.108 as permitted sender) smtp.mailfrom=bounce@groups.io Pushed as 2466092 -----Original Message----- From: Xu, Wei6 =20 Sent: Sunday, November 5, 2023 7:19 AM To: devel@edk2.groups.io Cc: Xu, Wei6 ; Abner Chang ; Desimo= ne, Nathaniel L ; Gao, Liming Subject: [PATCH v2 edk2-platforms 1/1] IpmiFeaturePkg/SmmIpmiBaseLib: Suppo= rt Standalone MM. Add MM_STANDALONE type support for SmmIpmiBaseLib instance. Replace Smst wi= th Mmst. Remove unused UefiBootServicesTableLib reference. Cc: Abner Chang Cc: Nate DeSimone Cc: Liming Gao Signed-off-by: Wei6 Xu --- .../Library/SmmIpmiBaseLib/SmmIpmiBaseLib.c | 39 +++++-------------- .../Library/SmmIpmiBaseLib/SmmIpmiBaseLib.inf | 7 ++-- 2 files changed, 12 insertions(+), 34 deletions(-) diff --git a/Features/Intel/OutOfBandManagement/IpmiFeaturePkg/Library/SmmI= pmiBaseLib/SmmIpmiBaseLib.c b/Features/Intel/OutOfBandManagement/IpmiFeatur= ePkg/Library/SmmIpmiBaseLib/SmmIpmiBaseLib.c index 6282adc269f8..d05798d94866 100644 --- a/Features/Intel/OutOfBandManagement/IpmiFeaturePkg/Library/SmmIpmiBase= Lib/SmmIpmiBaseLib.c +++ b/Features/Intel/OutOfBandManagement/IpmiFeaturePkg/Library/SmmIpmiB +++ aseLib/SmmIpmiBaseLib.c @@ -2,15 +2,14 @@ A Library to support all BMC access via IPMI command during SMM Phase. =20 @copyright - Copyright 1999 - 2021 Intel Corporation.
+ Copyright 1999 - 2023 Intel Corporation.
SPDX-License-Identifier: BSD-2-Clause-Patent **/ =20 -#include +#include #include #include -#include -#include +#include #include =20 STATIC IPMI_TRANSPORT *mIpmiTransport =3D NULL; @@ -37,7 +36,7 @@ NotifyIpmiTransportCallback ( EFI_STATUS Status; Status =3D EFI_SUCCESS; if (mIpmiTransport =3D=3D NULL) { - Status =3D gSmst->SmmLocateProtocol ( + Status =3D gMmst->MmLocateProtocol ( &gSmmIpmiTransportProtocolGuid, NULL, (VOID **) &mIpmiTransport @@ -60,15 +59,15 @@ Initia= lizeIpmiBase ( { EFI_STATUS Status; if (mIpmiTransport =3D=3D NULL) { - Status =3D gSmst->SmmLocateProtocol ( + Status =3D gMmst->MmLocateProtocol ( &gSmmIpmiTransportProtocolGuid, NULL, (VOID **) &mIpmiTransport ); if (EFI_ERROR (Status)) { - Status =3D gSmst->SmmRegisterProtocolNotify ( + Status =3D gMmst->MmRegisterProtocolNotify ( &gSmmIpmiTransportProtocolGuid, - (EFI_SMM_NOTIFY_FN) NotifyIpmiTransportCallback, + (EFI_MM_NOTIFY_FN) NotifyIpmiTransportCallback, &mEfiIpmiProtocolNotifyReg ); } @@ -104,30 +103,10 @@ IpmiSubmitCommand ( OUT UINT8 *ResponseData, IN OUT UINT32 *ResponseDataSize ) -/*++ - -Routine Description: - - Routine to send commands to BMC - -Arguments: - - NetFunction - Net function of the command - Command - IPMI Command - CommandData - Command Data - CommandDataSize - Size of CommandData - ResponseData - Response Data - ResponseDataSize - Response Data Size - -Returns: - - EFI_NOT_AVAILABLE_YET - IpmiTransport Protocol is not installed yet - ---*/ { EFI_STATUS Status; =20 - Status =3D gSmst->SmmLocateProtocol (&gSmmIpmiTransportProtocolGuid, NUL= L, (VOID **) &mIpmiTransport); + Status =3D gMmst->MmLocateProtocol (&gSmmIpmiTransportProtocolGuid,=20 + NULL, (VOID **) &mIpmiTransport); if (EFI_ERROR (Status)) { ASSERT_EFI_ERROR (Status); return Status; @@ -164,7 +143,7 @@ GetBmcStatus ( { EFI_STATUS Status; =20 - Status =3D gSmst->SmmLocateProtocol (&gSmmIpmiTransportProtocolGuid, NUL= L, (VOID **) &mIpmiTransport); + Status =3D gMmst->MmLocateProtocol (&gSmmIpmiTransportProtocolGuid,=20 + NULL, (VOID **) &mIpmiTransport); if (EFI_ERROR (Status)) { ASSERT_EFI_ERROR (Status); return Status; diff --git a/Features/Intel/OutOfBandManagement/IpmiFeaturePkg/Library/SmmI= pmiBaseLib/SmmIpmiBaseLib.inf b/Features/Intel/OutOfBandManagement/IpmiFeat= urePkg/Library/SmmIpmiBaseLib/SmmIpmiBaseLib.inf index 7ea688fc165f..df43c81e6493 100644 --- a/Features/Intel/OutOfBandManagement/IpmiFeaturePkg/Library/SmmIpmiBase= Lib/SmmIpmiBaseLib.inf +++ b/Features/Intel/OutOfBandManagement/IpmiFeaturePkg/Library/SmmIpmiB +++ aseLib/SmmIpmiBaseLib.inf @@ -1,7 +1,7 @@ ## @file # # @copyright -# Copyright 2010 - 2021 Intel Corporation.
+# Copyright 2010 - 2023 Intel Corporation.
# SPDX-License-Identifier: BSD-2-Clause-Patent ## =20 @@ -11,7 +11,7 @@ FILE_GUID =3D 2B5AD78E-5CF8-45d2-B2AC-749A09425911 MODULE_TYPE =3D DXE_SMM_DRIVER VERSION_STRING =3D 1.0 - LIBRARY_CLASS =3D IpmiBaseLib|DXE_SMM_DRIVER SMM_CORE + LIBRARY_CLASS =3D IpmiBaseLib|DXE_SMM_DRIVER SMM_CORE M= M_STANDALONE MM_CORE_STANDALONE =20 [sources] SmmIpmiBaseLib.c @@ -21,9 +21,8 @@ IpmiFeaturePkg/IpmiFeaturePkg.dec =20 [LibraryClasses] - UefiBootServicesTableLib DebugLib - SmmServicesTableLib + MmServicesTableLib =20 [Protocols] gSmmIpmiTransportProtocolGuid -- 2.29.2.windows.2 -=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 (#111870): https://edk2.groups.io/g/devel/message/111870 Mute This Topic: https://groups.io/mt/102402215/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-