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 104A8941060 for ; Mon, 30 Oct 2023 06:59:20 +0000 (UTC) DKIM-Signature: a=rsa-sha256; bh=3KMW8dv7YtkAfxDXRJ+1djJwUnTTaVYl8drxWlkSh3Q=; c=relaxed/simple; d=groups.io; h=ARC-Seal:ARC-Message-Signature:ARC-Authentication-Results:Received-SPF:From:To:CC:Subject:Date:Message-ID:MIME-Version:Precedence:List-Subscribe:List-Help:Sender:List-Id:Mailing-List:Delivered-To:Reply-To:List-Unsubscribe-Post:List-Unsubscribe:Content-Transfer-Encoding:Content-Type; s=20140610; t=1698649159; v=1; b=iq1MSAJXXr+puhNk+NzPDOAEIaWNwRsSGNSg1a37rXvmGZqD7x7PC7Bik74K6rOsTDfMjZGf v8FKlS9wDhtj1o/IwpQ2QDLFitpHpYNy0V/2XWxgtzIrdNGzDeNZMQdMCOynjnfWvbN1C2CC6I+ 4tDxmWTvWhYWLFOCC46tcGqY= X-Received: by 127.0.0.2 with SMTP id FWb4YY7687511xFjKmYYrcaj; Sun, 29 Oct 2023 23:59:19 -0700 X-Received: from NAM11-CO1-obe.outbound.protection.outlook.com (NAM11-CO1-obe.outbound.protection.outlook.com [40.107.220.40]) by mx.groups.io with SMTP id smtpd.web10.143424.1698649158635166882 for ; Sun, 29 Oct 2023 23:59:19 -0700 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=RZ91y9FSpPINazuhr36myX4GUZAgExhN7lnV42ELJJ1QLwx9aWOqepmxcvAze0e4kyBab3KegZArp1Kypb/Fw+ZqVyVlFiakDznxSb/yLnbn9bA1x07KRLFrD6FvHIZkJNf1S9OcBDS1Dg5YWEiiem8yv/7+a9udkNHP+2Rm//o9Sz6ePLhQOrctHGGa2wCx7hvg8KmOaRnqUwV/ZPVUIUOyhypBsnupM4FXa1DhnU3Ce6LAkGtBK7M7FaFbNZAvK7qpTcGhKXnv674lVCDNYGH2FI2LUygb2AG/QWQjy1HpThcxdImlm7uBid82fzziMXOiBviY6d2qFMsWTcWUig== 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=SNbB3u5M3txjE3xNHtCVAkY2vgjzN2dQCypzyrM88tE=; b=n9EZIeACXY2IAMHqo0DMltdlccOK+hts7Ev6Q2vJmMVY6nAvnNL+kQVHhZBmWqrDhByF4nctQwcuefvsuWzM+PLJntDULWY+ZCLaOzI/re8gNwn2rTge3aTe9DIW89MAnKW+DPm76cQoGXsd3Mnp1q6aTV/Lpxu/g4H/YPEX2rkN1qTdjPbT1tBxKGQakYY6N6VWIivCPFRLrsYZdPhLVbxtsWL+MoVpCyGIkUR9AJ2S2MMLLmNFs02YpU2PNk4kEoKAcN1Do2wlO6iB931jMLV9dKP4PrEtv4dQqeJlHela0SHwe0F4g1WhGklB5uIeQVNLRnPX+dkcvufyoNZhwg== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 165.204.84.17) smtp.rcpttodomain=edk2.groups.io smtp.mailfrom=amd.com; dmarc=pass (p=quarantine sp=quarantine pct=100) action=none header.from=amd.com; dkim=none (message not signed); arc=none (0) X-Received: from MW4PR03CA0140.namprd03.prod.outlook.com (2603:10b6:303:8c::25) by IA1PR12MB6308.namprd12.prod.outlook.com (2603:10b6:208:3e4::14) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6933.27; Mon, 30 Oct 2023 06:59:15 +0000 X-Received: from CO1PEPF000044EF.namprd05.prod.outlook.com (2603:10b6:303:8c:cafe::8e) by MW4PR03CA0140.outlook.office365.com (2603:10b6:303:8c::25) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6933.28 via Frontend Transport; Mon, 30 Oct 2023 06:59:14 +0000 X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 165.204.84.17) smtp.mailfrom=amd.com; dkim=none (message not signed) header.d=none;dmarc=pass action=none header.from=amd.com; Received-SPF: Pass (protection.outlook.com: domain of amd.com designates 165.204.84.17 as permitted sender) receiver=protection.outlook.com; client-ip=165.204.84.17; helo=SATLEXMB04.amd.com; pr=C X-Received: from SATLEXMB04.amd.com (165.204.84.17) by CO1PEPF000044EF.mail.protection.outlook.com (10.167.241.69) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.20.6933.15 via Frontend Transport; Mon, 30 Oct 2023 06:59:14 +0000 X-Received: from TPE-L1-ABNCHANG.amd.com (10.180.168.240) by SATLEXMB04.amd.com (10.181.40.145) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.32; Mon, 30 Oct 2023 01:59:07 -0500 From: "Chang, Abner via groups.io" To: CC: Nate DeSimone , Liming Gao , Chasel Chiu , Li-Xia Huang , Abdul Lateef Attar , Nickle Wang Subject: [edk2-devel] [edk2-platforms][PATCH] Features/IpmiFeaturePkg: Remove IpmiCommandLib from IpmiFeaturePkg Date: Mon, 30 Oct 2023 14:58:50 +0800 Message-ID: <20231030065850.1016-1-abner.chang@amd.com> MIME-Version: 1.0 X-Originating-IP: [10.180.168.240] X-ClientProxiedBy: SATLEXMB03.amd.com (10.181.40.144) To SATLEXMB04.amd.com (10.181.40.145) X-EOPAttributedMessage: 0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: CO1PEPF000044EF:EE_|IA1PR12MB6308:EE_ X-MS-Office365-Filtering-Correlation-Id: 7bca4137-95dd-4558-1eeb-08dbd915ba15 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam-Message-Info: oys/7rjybtPPOQkh+eWc+bafAnJlp+xusvIVL0nta/uMM/aOYJWL1HfW759Mgw+GDCbGSrxuVDKDl+u42j4KOhShExWmyBpEiUtR2eF+d+qEM3ne7MRiIGCsqb9ZyEGfLjnjrRQ2NG4eK+Meg/q8YL83CEUT4LKP7lW5v4w1GETWBb5X07Hvo934RfeKnAZO7t4M6n80JBJEW3RL9s9dKiekP71Ixo1VUdd95NwyZjtWIhCiHyVnovjlfsCham+w/WOrXHY7kioqcudNeO05kqVo+qO8WeR+xt/0wHp+xqJOODFuDLy8PurT0O5VrImEfk8Bi4VZmbuDMCSyOzYI3o43Iw1NFjaqCYxoeUc0y8ydir25zImUk+KgHC4OBujc6B2hIDmBiS0JM5uqX+izItH7C1+XXmOcw4U+Stk/OXNeeOB4lO/+YM/RE49j6rvWrdR6eWBJxvc2KYdwzOyTIPQbfJoYh0Efuh5cvtIMOzYtDtH/RRc68+E288OP18JL5k3MWctdMj3ZXKBoze5Ar2Nf/EbrEc2CN/wG34lpsqdim2NY1O1r8YRo6cLUxZ+cVOEKWmiQWXiZaNX/sXraqjiCLQgBtx9Xl3zdcunFXMbOSn4/XyLosQrH7coaZfIcRZDDpTrhjkKGMRkN/QEIdmIknBDXyB+mKId7mR8Zr0PQ7J/G07Cu5NQ2veWNCSojWGwA3RLOUdsyAxlz4HUaoavF1UwrPQ8vIfiukhJ9DOO0ChoYFUBLmN0WvYNqh0DCKWcJLMe6hTz9fTpakTvxVA== X-OriginatorOrg: amd.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 30 Oct 2023 06:59:14.0825 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 7bca4137-95dd-4558-1eeb-08dbd915ba15 X-MS-Exchange-CrossTenant-Id: 3dd8961f-e488-4e60-8e11-a82d994e183d X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=3dd8961f-e488-4e60-8e11-a82d994e183d;Ip=[165.204.84.17];Helo=[SATLEXMB04.amd.com] X-MS-Exchange-CrossTenant-AuthSource: CO1PEPF000044EF.namprd05.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: IA1PR12MB6308 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,abner.chang@amd.com List-Unsubscribe-Post: List-Unsubscribe=One-Click List-Unsubscribe: X-Gm-Message-State: hdeoNTQCTvliIfrGkd973s4sx7686176AA= Content-Transfer-Encoding: quoted-printable Content-Type: text/plain X-GND-Status: LEGIT Authentication-Results: spool.mail.gandi.net; dkim=pass header.d=groups.io header.s=20140610 header.b=iq1MSAJX; dmarc=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 From: Abner Chang Remove IpmiCommandLib from IpmiFeaturePkg as ManageabilityPkg already had one and is newer. Signed-off-by: Abner Chang Cc: Nate DeSimone Cc: Liming Gao Cc: Chasel Chiu Cc: Li-Xia Huang Cc: Abdul Lateef Attar Cc: Nickle Wang --- .../IpmiFeaturePkg/IpmiFeaturePkg.dec | 4 - .../IpmiFeaturePkg/Include/IpmiFeature.dsc | 2 +- .../Library/IpmiCommandLib/IpmiCommandLib.inf | 32 -- .../IpmiCommandLib/IpmiCommandLibNetFnApp.c | 335 ------------------ .../IpmiCommandLibNetFnChassis.c | 144 -------- .../IpmiCommandLibNetFnStorage.c | 274 -------------- .../IpmiCommandLibNetFnTransport.c | 123 ------- 7 files changed, 1 insertion(+), 913 deletions(-) delete mode 100644 Features/Intel/OutOfBandManagement/IpmiFeaturePkg/Libra= ry/IpmiCommandLib/IpmiCommandLib.inf delete mode 100644 Features/Intel/OutOfBandManagement/IpmiFeaturePkg/Libra= ry/IpmiCommandLib/IpmiCommandLibNetFnApp.c delete mode 100644 Features/Intel/OutOfBandManagement/IpmiFeaturePkg/Libra= ry/IpmiCommandLib/IpmiCommandLibNetFnChassis.c delete mode 100644 Features/Intel/OutOfBandManagement/IpmiFeaturePkg/Libra= ry/IpmiCommandLib/IpmiCommandLibNetFnStorage.c delete mode 100644 Features/Intel/OutOfBandManagement/IpmiFeaturePkg/Libra= ry/IpmiCommandLib/IpmiCommandLibNetFnTransport.c diff --git a/Features/Intel/OutOfBandManagement/IpmiFeaturePkg/IpmiFeatureP= kg.dec b/Features/Intel/OutOfBandManagement/IpmiFeaturePkg/IpmiFeaturePkg.d= ec index 5df71300cb..f26741e244 100644 --- a/Features/Intel/OutOfBandManagement/IpmiFeaturePkg/IpmiFeaturePkg.dec +++ b/Features/Intel/OutOfBandManagement/IpmiFeaturePkg/IpmiFeaturePkg.dec @@ -32,10 +32,6 @@ OsWdt =20 [LibraryClasses] - ## @libraryclass Provides services to send IPMI commands. - # - IpmiCommandLib|Include/Library/IpmiCommandLib.inf - ## @libraryclass Provides an API for platform-specific IPMI hooks. # IpmiCommandLib|Include/Library/IpmiPlatformHookLib.h diff --git a/Features/Intel/OutOfBandManagement/IpmiFeaturePkg/Include/Ipmi= Feature.dsc b/Features/Intel/OutOfBandManagement/IpmiFeaturePkg/Include/Ipm= iFeature.dsc index 0401974b82..063638ce56 100644 --- a/Features/Intel/OutOfBandManagement/IpmiFeaturePkg/Include/IpmiFeature= .dsc +++ b/Features/Intel/OutOfBandManagement/IpmiFeaturePkg/Include/IpmiFeature= .dsc @@ -37,7 +37,7 @@ [LibraryClasses] IpmiLib|MdeModulePkg/Library/BaseIpmiLibNull/BaseIpmiLibNull.inf =20 - IpmiCommandLib|IpmiFeaturePkg/Library/IpmiCommandLib/IpmiCommandLib.inf + IpmiCommandLib|ManageabilityPkg/Library/IpmiCommandLib/IpmiCommandLib.in= f IpmiPlatformHookLib|IpmiFeaturePkg/Library/IpmiPlatformHookLibNull/IpmiP= latformHookLibNull.inf =20 [LibraryClasses.common.PEI_CORE,LibraryClasses.common.PEIM] diff --git a/Features/Intel/OutOfBandManagement/IpmiFeaturePkg/Library/Ipmi= CommandLib/IpmiCommandLib.inf b/Features/Intel/OutOfBandManagement/IpmiFeat= urePkg/Library/IpmiCommandLib/IpmiCommandLib.inf deleted file mode 100644 index d5c14ff2a4..0000000000 --- a/Features/Intel/OutOfBandManagement/IpmiFeaturePkg/Library/IpmiCommand= Lib/IpmiCommandLib.inf +++ /dev/null @@ -1,32 +0,0 @@ -### @file -# Component description file for IPMI Command Library. -# -# Copyright (c) 2018 - 2021, Intel Corporation. All rights reserved.
-# -# SPDX-License-Identifier: BSD-2-Clause-Patent -# -### - -[Defines] - INF_VERSION =3D 0x00010005 - BASE_NAME =3D IpmiCommandLib - FILE_GUID =3D E599C9C7-5913-40A0-8669-67282E2BEC53 - MODULE_TYPE =3D UEFI_DRIVER - VERSION_STRING =3D 1.0 - LIBRARY_CLASS =3D IpmiCommandLib - -[sources] - IpmiCommandLibNetFnApp.c - IpmiCommandLibNetFnTransport.c - IpmiCommandLibNetFnChassis.c - IpmiCommandLibNetFnStorage.c - -[Packages] - MdePkg/MdePkg.dec - MdeModulePkg/MdeModulePkg.dec - IpmiFeaturePkg/IpmiFeaturePkg.dec - -[LibraryClasses] - BaseMemoryLib - DebugLib - IpmiBaseLib diff --git a/Features/Intel/OutOfBandManagement/IpmiFeaturePkg/Library/Ipmi= CommandLib/IpmiCommandLibNetFnApp.c b/Features/Intel/OutOfBandManagement/Ip= miFeaturePkg/Library/IpmiCommandLib/IpmiCommandLibNetFnApp.c deleted file mode 100644 index 2e34909f3e..0000000000 --- a/Features/Intel/OutOfBandManagement/IpmiFeaturePkg/Library/IpmiCommand= Lib/IpmiCommandLibNetFnApp.c +++ /dev/null @@ -1,335 +0,0 @@ -/** @file - IPMI Command - NetFnApp. - - Copyright (c) 2018 - 2021, Intel Corporation. All rights reserved.
- Copyright (C) 2023 Advanced Micro Devices, Inc. All rights reserved.
- - SPDX-License-Identifier: BSD-2-Clause-Patent -**/ - -#include -#include -#include -#include - -#include - -EFI_STATUS -EFIAPI -IpmiGetDeviceId ( - OUT IPMI_GET_DEVICE_ID_RESPONSE *DeviceId - ) -{ - EFI_STATUS Status; - UINT32 DataSize; - - DataSize =3D sizeof(*DeviceId); - Status =3D IpmiSubmitCommand ( - IPMI_NETFN_APP, - IPMI_APP_GET_DEVICE_ID, - NULL, - 0, - (VOID *)DeviceId, - &DataSize - ); - return Status; -} - -EFI_STATUS -EFIAPI -IpmiGetSelfTestResult ( - OUT IPMI_SELF_TEST_RESULT_RESPONSE *SelfTestResult - ) -{ - EFI_STATUS Status; - UINT32 DataSize; - - DataSize =3D sizeof(*SelfTestResult); - Status =3D IpmiSubmitCommand ( - IPMI_NETFN_APP, - IPMI_APP_GET_SELFTEST_RESULTS, - NULL, - 0, - (VOID *)SelfTestResult, - &DataSize - ); - return Status; -} - -EFI_STATUS -EFIAPI -IpmiResetWatchdogTimer ( - OUT UINT8 *CompletionCode - ) -{ - EFI_STATUS Status; - UINT32 DataSize; - - DataSize =3D sizeof(*CompletionCode); - Status =3D IpmiSubmitCommand ( - IPMI_NETFN_APP, - IPMI_APP_RESET_WATCHDOG_TIMER, - NULL, - 0, - (VOID *)CompletionCode, - &DataSize - ); - return Status; -} - -EFI_STATUS -EFIAPI -IpmiSetWatchdogTimer ( - IN IPMI_SET_WATCHDOG_TIMER_REQUEST *SetWatchdogTimer, - OUT UINT8 *CompletionCode - ) -{ - EFI_STATUS Status; - UINT32 DataSize; - - DataSize =3D sizeof(*CompletionCode); - Status =3D IpmiSubmitCommand ( - IPMI_NETFN_APP, - IPMI_APP_SET_WATCHDOG_TIMER, - (VOID *)SetWatchdogTimer, - sizeof(*SetWatchdogTimer), - (VOID *)CompletionCode, - &DataSize - ); - return Status; -} - -EFI_STATUS -EFIAPI -IpmiGetWatchdogTimer ( - OUT IPMI_GET_WATCHDOG_TIMER_RESPONSE *GetWatchdogTimer - ) -{ - EFI_STATUS Status; - UINT32 DataSize; - - DataSize =3D sizeof(*GetWatchdogTimer); - Status =3D IpmiSubmitCommand ( - IPMI_NETFN_APP, - IPMI_APP_GET_WATCHDOG_TIMER, - NULL, - 0, - (VOID *)GetWatchdogTimer, - &DataSize - ); - return Status; -} - -EFI_STATUS -EFIAPI -IpmiSetBmcGlobalEnables ( - IN IPMI_SET_BMC_GLOBAL_ENABLES_REQUEST *SetBmcGlobalEnables, - OUT UINT8 *CompletionCode - ) -{ - EFI_STATUS Status; - UINT32 DataSize; - - DataSize =3D sizeof(*CompletionCode); - Status =3D IpmiSubmitCommand ( - IPMI_NETFN_APP, - IPMI_APP_SET_BMC_GLOBAL_ENABLES, - (VOID *)SetBmcGlobalEnables, - sizeof(*SetBmcGlobalEnables), - (VOID *)CompletionCode, - &DataSize - ); - return Status; -} - -EFI_STATUS -EFIAPI -IpmiGetBmcGlobalEnables ( - OUT IPMI_GET_BMC_GLOBAL_ENABLES_RESPONSE *GetBmcGlobalEnables - ) -{ - EFI_STATUS Status; - UINT32 DataSize; - - DataSize =3D sizeof(*GetBmcGlobalEnables); - Status =3D IpmiSubmitCommand ( - IPMI_NETFN_APP, - IPMI_APP_GET_BMC_GLOBAL_ENABLES, - NULL, - 0, - (VOID *)GetBmcGlobalEnables, - &DataSize - ); - return Status; -} - -EFI_STATUS -EFIAPI -IpmiClearMessageFlags ( - IN IPMI_CLEAR_MESSAGE_FLAGS_REQUEST *ClearMessageFlagsRequest, - OUT UINT8 *CompletionCode - ) -{ - EFI_STATUS Status; - UINT32 DataSize; - - DataSize =3D sizeof(*CompletionCode); - Status =3D IpmiSubmitCommand ( - IPMI_NETFN_APP, - IPMI_APP_CLEAR_MESSAGE_FLAGS, - (VOID *)ClearMessageFlagsRequest, - sizeof(*ClearMessageFlagsRequest), - (VOID *)CompletionCode, - &DataSize - ); - return Status; -} - -EFI_STATUS -EFIAPI -IpmiGetMessageFlags ( - OUT IPMI_GET_MESSAGE_FLAGS_RESPONSE *GetMessageFlagsResponse - ) -{ - EFI_STATUS Status; - UINT32 DataSize; - - DataSize =3D sizeof(*GetMessageFlagsResponse); - Status =3D IpmiSubmitCommand ( - IPMI_NETFN_APP, - IPMI_APP_GET_MESSAGE_FLAGS, - NULL, - 0, - (VOID *)GetMessageFlagsResponse, - &DataSize - ); - return Status; -} - -EFI_STATUS -EFIAPI -IpmiGetMessage ( - OUT IPMI_GET_MESSAGE_RESPONSE *GetMessageResponse, - IN OUT UINT32 *GetMessageResponseSize - ) -{ - EFI_STATUS Status; - - Status =3D IpmiSubmitCommand ( - IPMI_NETFN_APP, - IPMI_APP_GET_MESSAGE, - NULL, - 0, - (VOID *)GetMessageResponse, - GetMessageResponseSize - ); - return Status; -} - -EFI_STATUS -EFIAPI -IpmiSendMessage ( - IN IPMI_SEND_MESSAGE_REQUEST *SendMessageRequest, - IN UINT32 SendMessageRequestSize, - OUT IPMI_SEND_MESSAGE_RESPONSE *SendMessageResponse, - IN OUT UINT32 *SendMessageResponseSize - ) -{ - EFI_STATUS Status; - - Status =3D IpmiSubmitCommand ( - IPMI_NETFN_APP, - IPMI_APP_SEND_MESSAGE, - (VOID *)SendMessageRequest, - SendMessageRequestSize, - (VOID *)SendMessageResponse, - SendMessageResponseSize - ); - return Status; -} - -/** - This function gets the system UUID. - - @param[out] SystemGuid The pointer to retrieve system UUID. - - @retval EFI_SUCCESS UUID is returned. - @retval EFI_INVALID_PARAMETER SystemGuid is a NULL pointer. - @retval Others Other errors. - -**/ -EFI_STATUS -EFIAPI -IpmiGetSystemUuid ( - OUT EFI_GUID *SystemGuid - ) -{ - EFI_STATUS Status; - UINT32 RequestSize; - UINT32 ResponseSize; - IPMI_GET_SYSTEM_UUID_RESPONSE GetSystemUuidResponse; - - if (SystemGuid =3D=3D NULL) { - return EFI_INVALID_PARAMETER; - } - RequestSize =3D 0; - ResponseSize =3D sizeof (IPMI_GET_SYSTEM_UUID_RESPONSE); - Status =3D IpmiSubmitCommand ( - IPMI_NETFN_APP, - IPMI_APP_GET_SYSTEM_GUID, - (VOID *)NULL, - RequestSize, - (VOID *)&GetSystemUuidResponse, - &ResponseSize - ); - if (!EFI_ERROR (Status) && GetSystemUuidResponse.CompletionCode =3D=3D I= PMI_COMP_CODE_NORMAL) { - CopyMem ( - (VOID *)SystemGuid, - (VOID *)&GetSystemUuidResponse.SystemUuid, - sizeof (EFI_GUID) - ); - } - return Status; -} - -/** - This function gets the channel information. - - @param[in] GetChannelInfoRequest The get channel information r= equest. - @param[out] GetChannelInfoResponse The get channel information r= esponse. - @param[out] GetChannelInfoResponseSize When input, the expected size= of response. - When output, the exact size o= f the returned - response. - - @retval EFI_SUCCESS Get channel information successfully. - @retval EFI_INVALID_PARAMETER One of the given input parameters is inva= lid. - @retval Others Other errors. - -**/ -EFI_STATUS -EFIAPI -IpmiGetChannelInfo ( - IN IPMI_GET_CHANNEL_INFO_REQUEST *GetChannelInfoRequest, - OUT IPMI_GET_CHANNEL_INFO_RESPONSE *GetChannelInfoResponse, - OUT UINT32 *GetChannelInfoResponseSize - ) -{ - EFI_STATUS Status; - - if (GetChannelInfoRequest =3D=3D NULL || - GetChannelInfoResponse =3D=3D NULL || - GetChannelInfoResponseSize =3D=3D NULL) { - return EFI_INVALID_PARAMETER; - } - - *GetChannelInfoResponseSize =3D sizeof (IPMI_GET_CHANNEL_INFO_RESPONSE); - Status =3D IpmiSubmitCommand ( - IPMI_NETFN_APP, - IPMI_APP_GET_CHANNEL_INFO, - (UINT8 *)GetChannelInfoRequest, - sizeof (IPMI_GET_CHANNEL_INFO_REQUEST), - (UINT8 *)GetChannelInfoResponse, - GetChannelInfoResponseSize - ); - return Status; -} diff --git a/Features/Intel/OutOfBandManagement/IpmiFeaturePkg/Library/Ipmi= CommandLib/IpmiCommandLibNetFnChassis.c b/Features/Intel/OutOfBandManagemen= t/IpmiFeaturePkg/Library/IpmiCommandLib/IpmiCommandLibNetFnChassis.c deleted file mode 100644 index 9c19f52ce4..0000000000 --- a/Features/Intel/OutOfBandManagement/IpmiFeaturePkg/Library/IpmiCommand= Lib/IpmiCommandLibNetFnChassis.c +++ /dev/null @@ -1,144 +0,0 @@ -/** @file - IPMI Command - NetFnChassis. - - Copyright (c) 2018 - 2021, Intel Corporation. All rights reserved.
- SPDX-License-Identifier: BSD-2-Clause-Patent -**/ - -#include -#include -#include -#include - -#include - - -EFI_STATUS -EFIAPI -IpmiGetChassisCapabilities ( - OUT IPMI_GET_CHASSIS_CAPABILITIES_RESPONSE *GetChassisCapabilitiesRespo= nse - ) -{ - EFI_STATUS Status; - UINT32 DataSize; - - DataSize =3D sizeof(*GetChassisCapabilitiesResponse); - Status =3D IpmiSubmitCommand ( - IPMI_NETFN_CHASSIS, - IPMI_CHASSIS_GET_CAPABILITIES, - NULL, - 0, - (VOID *)GetChassisCapabilitiesResponse, - &DataSize - ); - return Status; -} - -EFI_STATUS -EFIAPI -IpmiGetChassisStatus ( - OUT IPMI_GET_CHASSIS_STATUS_RESPONSE *GetChassisStatusResponse - ) -{ - EFI_STATUS Status; - UINT32 DataSize; - - DataSize =3D sizeof(*GetChassisStatusResponse); - Status =3D IpmiSubmitCommand ( - IPMI_NETFN_CHASSIS, - IPMI_CHASSIS_GET_STATUS, - NULL, - 0, - (VOID *)GetChassisStatusResponse, - &DataSize - ); - return Status; -} - -EFI_STATUS -EFIAPI -IpmiChassisControl ( - IN IPMI_CHASSIS_CONTROL_REQUEST *ChassisControlRequest, - OUT UINT8 *CompletionCode - ) -{ - EFI_STATUS Status; - UINT32 DataSize; - - DataSize =3D sizeof(*CompletionCode); - Status =3D IpmiSubmitCommand ( - IPMI_NETFN_CHASSIS, - IPMI_CHASSIS_CONTROL, - (VOID *)ChassisControlRequest, - sizeof(*ChassisControlRequest), - (VOID *)CompletionCode, - &DataSize - ); - return Status; -} - -EFI_STATUS -EFIAPI -IpmiSetPowerRestorePolicy ( - IN IPMI_SET_POWER_RESTORE_POLICY_REQUEST *ChassisControlRequest, - OUT IPMI_SET_POWER_RESTORE_POLICY_RESPONSE *ChassisControlResponse - ) -{ - EFI_STATUS Status; - UINT32 DataSize; - - DataSize =3D sizeof(*ChassisControlResponse); - Status =3D IpmiSubmitCommand ( - IPMI_NETFN_CHASSIS, - IPMI_CHASSIS_SET_POWER_RESTORE_POLICY, - (VOID *)ChassisControlRequest, - sizeof(*ChassisControlRequest), - (VOID *)ChassisControlResponse, - &DataSize - ); - return Status; -} - -EFI_STATUS -EFIAPI -IpmiSetSystemBootOptions ( - IN IPMI_SET_BOOT_OPTIONS_REQUEST *BootOptionsRequest, - OUT IPMI_SET_BOOT_OPTIONS_RESPONSE *BootOptionsResponse - ) -{ - EFI_STATUS Status; - UINT32 DataSize; - - DataSize =3D sizeof(*BootOptionsResponse); - Status =3D IpmiSubmitCommand ( - IPMI_NETFN_CHASSIS, - IPMI_CHASSIS_SET_SYSTEM_BOOT_OPTIONS, - (VOID *)BootOptionsRequest, - sizeof(*BootOptionsRequest), - (VOID *)BootOptionsResponse, - &DataSize - ); - return Status; -} - -EFI_STATUS -EFIAPI -IpmiGetSystemBootOptions ( - IN IPMI_GET_BOOT_OPTIONS_REQUEST *BootOptionsRequest, - OUT IPMI_GET_BOOT_OPTIONS_RESPONSE *BootOptionsResponse - ) -{ - EFI_STATUS Status; - UINT32 DataSize; - - DataSize =3D sizeof(*BootOptionsResponse); - Status =3D IpmiSubmitCommand ( - IPMI_NETFN_CHASSIS, - IPMI_CHASSIS_GET_SYSTEM_BOOT_OPTIONS, - (VOID *)BootOptionsRequest, - sizeof(*BootOptionsRequest), - (VOID *)BootOptionsResponse, - &DataSize - ); - return Status; -} diff --git a/Features/Intel/OutOfBandManagement/IpmiFeaturePkg/Library/Ipmi= CommandLib/IpmiCommandLibNetFnStorage.c b/Features/Intel/OutOfBandManagemen= t/IpmiFeaturePkg/Library/IpmiCommandLib/IpmiCommandLibNetFnStorage.c deleted file mode 100644 index 2215028089..0000000000 --- a/Features/Intel/OutOfBandManagement/IpmiFeaturePkg/Library/IpmiCommand= Lib/IpmiCommandLibNetFnStorage.c +++ /dev/null @@ -1,274 +0,0 @@ -/** @file - IPMI Command - NetFnStorage. - - Copyright (c) 2018 - 2021, Intel Corporation. All rights reserved.
- SPDX-License-Identifier: BSD-2-Clause-Patent -**/ - -#include -#include -#include -#include - -#include - - -EFI_STATUS -EFIAPI -IpmiGetFruInventoryAreaInfo ( - IN IPMI_GET_FRU_INVENTORY_AREA_INFO_REQUEST *GetFruInventoryAreaInfoR= equest, - OUT IPMI_GET_FRU_INVENTORY_AREA_INFO_RESPONSE *GetFruInventoryAreaInfoR= esponse - ) -{ - EFI_STATUS Status; - UINT32 DataSize; - - DataSize =3D sizeof(*GetFruInventoryAreaInfoResponse); - Status =3D IpmiSubmitCommand ( - IPMI_NETFN_STORAGE, - IPMI_STORAGE_GET_FRU_INVENTORY_AREAINFO, - (VOID *)GetFruInventoryAreaInfoRequest, - sizeof(*GetFruInventoryAreaInfoRequest), - (VOID *)GetFruInventoryAreaInfoResponse, - &DataSize - ); - return Status; -} - -EFI_STATUS -EFIAPI -IpmiReadFruData ( - IN IPMI_READ_FRU_DATA_REQUEST *ReadFruDataRequest, - OUT IPMI_READ_FRU_DATA_RESPONSE *ReadFruDataResponse, - IN OUT UINT32 *ReadFruDataResponseSize - ) -{ - EFI_STATUS Status; - - Status =3D IpmiSubmitCommand ( - IPMI_NETFN_STORAGE, - IPMI_STORAGE_READ_FRU_DATA, - (VOID *)ReadFruDataRequest, - sizeof(*ReadFruDataRequest), - (VOID *)ReadFruDataResponse, - ReadFruDataResponseSize - ); - return Status; -} - -EFI_STATUS -EFIAPI -IpmiWriteFruData ( - IN IPMI_WRITE_FRU_DATA_REQUEST *WriteFruDataRequest, - IN UINT32 WriteFruDataRequestSize, - OUT IPMI_WRITE_FRU_DATA_RESPONSE *WriteFruDataResponse - ) -{ - EFI_STATUS Status; - UINT32 DataSize; - - DataSize =3D sizeof(*WriteFruDataResponse); - Status =3D IpmiSubmitCommand ( - IPMI_NETFN_STORAGE, - IPMI_STORAGE_WRITE_FRU_DATA, - (VOID *)WriteFruDataRequest, - WriteFruDataRequestSize, - (VOID *)WriteFruDataResponse, - &DataSize - ); - return Status; -} - -EFI_STATUS -EFIAPI -IpmiGetSelInfo ( - OUT IPMI_GET_SEL_INFO_RESPONSE *GetSelInfoResponse - ) -{ - EFI_STATUS Status; - UINT32 DataSize; - - DataSize =3D sizeof(*GetSelInfoResponse); - Status =3D IpmiSubmitCommand ( - IPMI_NETFN_STORAGE, - IPMI_STORAGE_GET_SEL_INFO, - NULL, - 0, - (VOID *)GetSelInfoResponse, - &DataSize - ); - return Status; -} - -EFI_STATUS -EFIAPI -IpmiGetSelEntry ( - IN IPMI_GET_SEL_ENTRY_REQUEST *GetSelEntryRequest, - OUT IPMI_GET_SEL_ENTRY_RESPONSE *GetSelEntryResponse, - IN OUT UINT32 *GetSelEntryResponseSize - ) -{ - EFI_STATUS Status; - - Status =3D IpmiSubmitCommand ( - IPMI_NETFN_STORAGE, - IPMI_STORAGE_GET_SEL_ENTRY, - (VOID *)GetSelEntryRequest, - sizeof(*GetSelEntryRequest), - (VOID *)GetSelEntryResponse, - GetSelEntryResponseSize - ); - return Status; -} - -EFI_STATUS -EFIAPI -IpmiAddSelEntry ( - IN IPMI_ADD_SEL_ENTRY_REQUEST *AddSelEntryRequest, - OUT IPMI_ADD_SEL_ENTRY_RESPONSE *AddSelEntryResponse - ) -{ - EFI_STATUS Status; - UINT32 DataSize; - - DataSize =3D sizeof(*AddSelEntryResponse); - Status =3D IpmiSubmitCommand ( - IPMI_NETFN_STORAGE, - IPMI_STORAGE_ADD_SEL_ENTRY, - (VOID *)AddSelEntryRequest, - sizeof(*AddSelEntryRequest), - (VOID *)AddSelEntryResponse, - &DataSize - ); - return Status; -} - -EFI_STATUS -EFIAPI -IpmiPartialAddSelEntry ( - IN IPMI_PARTIAL_ADD_SEL_ENTRY_REQUEST *PartialAddSelEntryRequest, - IN UINT32 PartialAddSelEntryRequestSize, - OUT IPMI_PARTIAL_ADD_SEL_ENTRY_RESPONSE *PartialAddSelEntryResponse - ) -{ - EFI_STATUS Status; - UINT32 DataSize; - - DataSize =3D sizeof(*PartialAddSelEntryResponse); - Status =3D IpmiSubmitCommand ( - IPMI_NETFN_STORAGE, - IPMI_STORAGE_PARTIAL_ADD_SEL_ENTRY, - (VOID *)PartialAddSelEntryRequest, - PartialAddSelEntryRequestSize, - (VOID *)PartialAddSelEntryResponse, - &DataSize - ); - return Status; -} - -EFI_STATUS -EFIAPI -IpmiClearSel ( - IN IPMI_CLEAR_SEL_REQUEST *ClearSelRequest, - OUT IPMI_CLEAR_SEL_RESPONSE *ClearSelResponse - ) -{ - EFI_STATUS Status; - UINT32 DataSize; - - DataSize =3D sizeof(*ClearSelResponse); - Status =3D IpmiSubmitCommand ( - IPMI_NETFN_STORAGE, - IPMI_STORAGE_CLEAR_SEL, - (VOID *)ClearSelRequest, - sizeof(*ClearSelRequest), - (VOID *)ClearSelResponse, - &DataSize - ); - return Status; -} - -EFI_STATUS -EFIAPI -IpmiGetSelTime ( - OUT IPMI_GET_SEL_TIME_RESPONSE *GetSelTimeResponse - ) -{ - EFI_STATUS Status; - UINT32 DataSize; - - DataSize =3D sizeof(*GetSelTimeResponse); - Status =3D IpmiSubmitCommand ( - IPMI_NETFN_STORAGE, - IPMI_STORAGE_GET_SEL_TIME, - NULL, - 0, - (VOID *)GetSelTimeResponse, - &DataSize - ); - return Status; -} - -EFI_STATUS -EFIAPI -IpmiSetSelTime ( - IN IPMI_SET_SEL_TIME_REQUEST *SetSelTimeRequest, - OUT UINT8 *CompletionCode - ) -{ - EFI_STATUS Status; - UINT32 DataSize; - - DataSize =3D sizeof(*CompletionCode); - Status =3D IpmiSubmitCommand ( - IPMI_NETFN_STORAGE, - IPMI_STORAGE_SET_SEL_TIME, - (VOID *)SetSelTimeRequest, - sizeof(*SetSelTimeRequest), - (VOID *)CompletionCode, - &DataSize - ); - return Status; -} - -EFI_STATUS -EFIAPI -IpmiGetSdrRepositoryInfo ( - OUT IPMI_GET_SDR_REPOSITORY_INFO_RESPONSE *GetSdrRepositoryInfoResp - ) -{ - EFI_STATUS Status; - UINT32 DataSize; - - DataSize =3D sizeof(*GetSdrRepositoryInfoResp); - Status =3D IpmiSubmitCommand ( - IPMI_NETFN_STORAGE, - IPMI_STORAGE_GET_SDR_REPOSITORY_INFO, - NULL, - 0, - (VOID *)GetSdrRepositoryInfoResp, - &DataSize - ); - return Status; -} - -EFI_STATUS -EFIAPI -IpmiGetSdr ( - IN IPMI_GET_SDR_REQUEST *GetSdrRequest, - OUT IPMI_GET_SDR_RESPONSE *GetSdrResponse, - IN OUT UINT32 *GetSdrResponseSize - ) -{ - EFI_STATUS Status; - - Status =3D IpmiSubmitCommand ( - IPMI_NETFN_STORAGE, - IPMI_STORAGE_GET_SDR, - (VOID *)GetSdrRequest, - sizeof(*GetSdrRequest), - (VOID *)GetSdrResponse, - GetSdrResponseSize - ); - return Status; -} diff --git a/Features/Intel/OutOfBandManagement/IpmiFeaturePkg/Library/Ipmi= CommandLib/IpmiCommandLibNetFnTransport.c b/Features/Intel/OutOfBandManagem= ent/IpmiFeaturePkg/Library/IpmiCommandLib/IpmiCommandLibNetFnTransport.c deleted file mode 100644 index 30ea84c04b..0000000000 --- a/Features/Intel/OutOfBandManagement/IpmiFeaturePkg/Library/IpmiCommand= Lib/IpmiCommandLibNetFnTransport.c +++ /dev/null @@ -1,123 +0,0 @@ -/** @file - IPMI Command - NetFnTransport. - - Copyright (c) 2018 - 2021, Intel Corporation. All rights reserved.
- Copyright (C) 2023 Advanced Micro Devices, Inc. All rights reserved.
- - SPDX-License-Identifier: BSD-2-Clause-Patent -**/ - -#include -#include -#include -#include - -#include - - -EFI_STATUS -EFIAPI -IpmiSolActivating ( - IN IPMI_SOL_ACTIVATING_REQUEST *SolActivatingRequest, - OUT UINT8 *CompletionCode - ) -{ - EFI_STATUS Status; - UINT32 DataSize; - - DataSize =3D sizeof(*CompletionCode); - Status =3D IpmiSubmitCommand ( - IPMI_NETFN_TRANSPORT, - IPMI_TRANSPORT_SOL_ACTIVATING, - (VOID *)SolActivatingRequest, - sizeof(*SolActivatingRequest), - (VOID *)CompletionCode, - &DataSize - ); - return Status; -} - -EFI_STATUS -EFIAPI -IpmiSetSolConfigurationParameters ( - IN IPMI_SET_SOL_CONFIGURATION_PARAMETERS_REQUEST *SetConfigurationPara= metersRequest, - IN UINT32 SetConfigurationParam= etersRequestSize, - OUT UINT8 *CompletionCode - ) -{ - EFI_STATUS Status; - UINT32 DataSize; - - DataSize =3D sizeof(*CompletionCode); - Status =3D IpmiSubmitCommand ( - IPMI_NETFN_TRANSPORT, - IPMI_TRANSPORT_SET_SOL_CONFIG_PARAM, - (VOID *)SetConfigurationParametersRequest, - SetConfigurationParametersRequestSize, - (VOID *)CompletionCode, - &DataSize - ); - return Status; -} - -EFI_STATUS -EFIAPI -IpmiGetSolConfigurationParameters ( - IN IPMI_GET_SOL_CONFIGURATION_PARAMETERS_REQUEST *GetConfigurationPara= metersRequest, - OUT IPMI_GET_SOL_CONFIGURATION_PARAMETERS_RESPONSE *GetConfigurationPara= metersResponse, - IN OUT UINT32 *GetConfigurationPara= metersResponseSize - ) -{ - EFI_STATUS Status; - - Status =3D IpmiSubmitCommand ( - IPMI_NETFN_TRANSPORT, - IPMI_TRANSPORT_GET_SOL_CONFIG_PARAM, - (VOID *)GetConfigurationParametersRequest, - sizeof(*GetConfigurationParametersRequest), - (VOID *)GetConfigurationParametersResponse, - GetConfigurationParametersResponseSize - ); - return Status; -} - -/** - This function gets the LAN configuration parameter. - - @param[in] GetLanConfigurationParametersRequest Request data - @param[out] GetLanConfigurationParametersResponse Response data - @param[in,out] GetLanConfigurationParametersSize When input, the ex= pected size of response data. - When out, the exac= t size of response data. - - @retval EFI_SUCCESS Lan configuration parameter is returned i= n the response. - @retval EFI_INVALID_PARAMETER One of the given input parameters is inva= lid. - @retval Others Other errors. - -**/ - -EFI_STATUS -EFIAPI -IpmiGetLanConfigurationParameters ( - IN IPMI_GET_LAN_CONFIGURATION_PARAMETERS_REQUEST *GetLanConfigurati= onParametersRequest, - OUT IPMI_GET_LAN_CONFIGURATION_PARAMETERS_RESPONSE *GetLanConfigurati= onParametersResponse, - IN OUT UINT32 *GetLanConfigurati= onParametersSize - ) -{ - EFI_STATUS Status; - - if (GetLanConfigurationParametersRequest =3D=3D NULL || - GetLanConfigurationParametersResponse =3D=3D NULL || - GetLanConfigurationParametersSize =3D=3D NULL) { - return EFI_INVALID_PARAMETER; - } - - Status =3D IpmiSubmitCommand ( - IPMI_NETFN_TRANSPORT, - IPMI_TRANSPORT_GET_LAN_CONFIG_PARAMETERS, - (UINT8 *)GetLanConfigurationParametersRequest, - sizeof(*GetLanConfigurationParametersRequest), - (UINT8 *)GetLanConfigurationParametersResponse, - GetLanConfigurationParametersSize - ); - return Status; -} --=20 2.37.1.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 (#110292): https://edk2.groups.io/g/devel/message/110292 Mute This Topic: https://groups.io/mt/102270138/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-