From nobody Wed May 15 05:57:04 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of groups.io designates 66.175.222.108 as permitted sender) smtp.mailfrom=bounce+27952+98754+1787277+3901457@groups.io; arc=fail (BodyHash is different from the expected one) Received: from mail02.groups.io (mail02.groups.io [66.175.222.108]) by mx.zohomail.com with SMTPS id 1674006288775880.0396354318382; Tue, 17 Jan 2023 17:44:48 -0800 (PST) Return-Path: X-Received: by 127.0.0.2 with SMTP id tdfLYY1788612x0NmVYLs9P0; Tue, 17 Jan 2023 17:44:48 -0800 X-Received: from NAM12-MW2-obe.outbound.protection.outlook.com (NAM12-MW2-obe.outbound.protection.outlook.com [40.107.244.69]) by mx.groups.io with SMTP id smtpd.web10.5280.1674006281939546312 for ; Tue, 17 Jan 2023 17:44:48 -0800 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=GrdBbnJScAsBLvH3K498E+vNDMCMve2IjaIhYKMwlfbhHoi2rhaXOIDcRwyzi9mGwFZOCo7MygByDg/C1R4pX2C9wO045SCSFpscIKPhf1bdk+/xGXQhhOddPjw72xj67GAYH6ypc0FdVoRkjPW4ryt2HxH7fUP5YcX/0cUOuhrZ5Mq94csgYSnDhcJZOME+g8u1inO+X3Rwa03SjkRvNMSdw1VCjX788a+zMh+077xoRnQNLuEQGy55Nh8TXj5rqrr1drK6RdnK70g7MqCemzG/q0Led+a4HOQ8D+92PKt1XztIXMkR5BDBU807fWz3q6wpScrTrMKpH3WDWv7Tjw== 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=WDb1yZ7m7YYadlCo4IqTKt6t3r+a9gU6wx1hqftn7Jk=; b=UYSDWyGyhaUdd134APjeI6J7Q27mz+jFad/B0WqqVSsdDbvvVXSoImNiBRgpS1DeRtW8W0SPtingZwRZ+Bya2Debs8bpJZMTwYiIw1VL+VDJMWN89F+rCB6m9s0ZKs0mDRgRSYsYGBvGZGo9ikLJTyKQWAooqR4nLhyuaQjHx3HGbBTtXOAbOzmW4qTQTJaD+TBqxGM6fMLiOCYO0+8zIEDyuiRaAVNQnOFPIswegx9Is2vOjLpShnpth0zHxngQw3alyfqwhqvT4wJ3S+5KVTuzMY5T9+uD1uquLzKNRXV73a+Sgx9R1M1/VXj/5/FEzVdcDzPtH5hIUn2vg6p8Nw== 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 X-Received: from BL1PR13CA0081.namprd13.prod.outlook.com (2603:10b6:208:2b8::26) by DM4PR12MB7670.namprd12.prod.outlook.com (2603:10b6:8:105::16) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5986.23; Wed, 18 Jan 2023 01:44:37 +0000 X-Received: from BL02EPF000108E8.namprd05.prod.outlook.com (2603:10b6:208:2b8:cafe::34) by BL1PR13CA0081.outlook.office365.com (2603:10b6:208:2b8::26) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6023.12 via Frontend Transport; Wed, 18 Jan 2023 01:44:36 +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 (zohomail.com: domain of groups.io designates 66.175.222.108 as permitted sender) client-ip=66.175.222.108; envelope-from=bounce+27952+98754+1787277+3901457@groups.io; helo=mail02.groups.io; 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 BL02EPF000108E8.mail.protection.outlook.com (10.167.241.201) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.20.6002.11 via Frontend Transport; Wed, 18 Jan 2023 01:44:36 +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.2375.34; Tue, 17 Jan 2023 19:44:03 -0600 From: "Chang, Abner via groups.io" To: CC: Jian J Wang , Liming Gao , Nickle Wang , Igor Kulchytskyy , Isaac Oram , Nate DeSimone Subject: [edk2-devel] [PATCH V3 1/3] MdeModulePkg/Include: Add IpmiCommandLib header file Date: Wed, 18 Jan 2023 09:42:46 +0800 Message-ID: <20230118014248.426-2-abner.chang@amd.com> In-Reply-To: <20230118014248.426-1-abner.chang@amd.com> References: <20230118014248.426-1-abner.chang@amd.com> MIME-Version: 1.0 X-Originating-IP: [10.180.168.240] X-ClientProxiedBy: SATLEXMB04.amd.com (10.181.40.145) To SATLEXMB04.amd.com (10.181.40.145) X-EOPAttributedMessage: 0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: BL02EPF000108E8:EE_|DM4PR12MB7670:EE_ X-MS-Office365-Filtering-Correlation-Id: efd9852c-bf99-405f-5bf4-08daf8f58e75 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam-Message-Info: 1OvoCj+EkQ4YvhAzkEo2DtrbpHn9hKQ4WVUpZ4JS9yRKYboHJeb4NyErX2ycJe6hji3co9oOI9BTRNomVCVSNnvm07y/eASVrnpeciIPKb/kRsUy1db0xj7duCOqY8clsD6hrKtt3UzJZw/XDKHYzovOxq9Kd1bbYarIrrjjcPw8heChyiQAfaoOngS7gHhIusETbqMJda9KcVomnkEehIwnv+p4vczqPDbB5mNmzlQzdCr9s7NvbpO8/U4NzvMTs8hjd41tyndTXF+wkIeprQIIIAydRviDHPP0rgZpH3yVaMlkSb206uzxBso9cj6s7LHREgB2uY7YnegsOv7kU+EtehiDcoimunnvJfCIA4bq61nbyt9WHFox1ihpKRhHZzYMY+IQzgIUm5BgioQPbOLvSVzk4ZcYXSiRR6QxEgJQE3D4a0+7+pMNUwN8bHNkh0sYA3r3HAn8PHP801QDHbdDFnfhT/prld7v3HwrP7sHUk1e0yoAZ7VQVVodKESj5y7kmFtsfqyvYH8Z3teHPKREXTVLuEYWQTNZ9IiOzRhWJqxSwR2i5ikEbeQr/nZsBHDC67/s1pAGc18fhtQTx0/QNiOhuaebvnK3tWHKkxLJSVzY0IMs8ef+pzKoUhRAkTTqdyALQy+he5eSySBB1fVQYxdlugMwRcXR91F0SqdzqBFCfGtCxRkzoZ78skd6uB6rqi3BwV8fVvF8e2cGi5vU1xVuH43Y5sEUnt2IFTQ= X-OriginatorOrg: amd.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 18 Jan 2023 01:44:36.6610 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: efd9852c-bf99-405f-5bf4-08daf8f58e75 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: BL02EPF000108E8.namprd05.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: DM4PR12MB7670 Precedence: Bulk List-Unsubscribe: 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 X-Gm-Message-State: Mkx3HV4iAOqfnSzjWGPGcfHYx1787277AA= Content-Transfer-Encoding: quoted-printable DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=groups.io; q=dns/txt; s=20140610; t=1674006288; bh=+I60LYA3cjVbrf3O23nhbjSqhcGxAZq7BQneI6gmjr8=; h=CC:Content-Type:Date:From:Reply-To:Subject:To; b=aG+zYIXjxHKFzYY+Ewplxmuq+yN5rGfCY8LOR3C/kHHyFiXliU6je4iGiigOUCCqCga 5TYqTmMvAbhbr9R1mGk6R7+YtiS4/orc8k9hBGcqDo9gWkuJwwv593Pavb7VYPon3bKB0 xc0WKirvehSHAFlYAy30z/b+i9ibO2dmQhY= X-ZohoMail-DKIM: pass (identity @groups.io) X-ZM-MESSAGEID: 1674006290427100001 Content-Type: text/plain; charset="utf-8" From: Abner Chang Add IpmiCommandLib to MdeModulePkg. This header file is copied from edk2-platforms/Features/Intel/OutOfBandManagement/ IpmiFeaturePkg\Include\Library. Having this header file in edk2 to avoid the dependence of edk2 module with edk2-platfrom. The NULL instance of IpmiCommandLib under MdeModulePkg has to be implemented for the same reason. IpmiCommandLib.h in edk2-platforms should be removed once this patch set is merged. Expect no impacts on edk2-platforms because MdeModulePkg is referred in INF file by all edk2 modules under edk2-platforms that use IpmiCommandLib. Signed-off-by: Abner Chang Cc: Jian J Wang Cc: Liming Gao Cc: Nickle Wang Cc: Igor Kulchytskyy Cc: Isaac Oram Cc: Nate DeSimone Reviewed-by: Isaac Oram Reviewed-by: Igor Kulchytskyy Reviewed-by: Liming Gao --- MdeModulePkg/Include/Library/IpmiCommandLib.h | 683 ++++++++++++++++++ 1 file changed, 683 insertions(+) create mode 100644 MdeModulePkg/Include/Library/IpmiCommandLib.h diff --git a/MdeModulePkg/Include/Library/IpmiCommandLib.h b/MdeModulePkg/I= nclude/Library/IpmiCommandLib.h new file mode 100644 index 00000000000..7edaf36cbe5 --- /dev/null +++ b/MdeModulePkg/Include/Library/IpmiCommandLib.h @@ -0,0 +1,683 @@ +/** @file + This library abstract how to send/receive IPMI command. + +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 + +**/ + +#ifndef IPMI_COMMAND_LIB_H_ +#define IPMI_COMMAND_LIB_H_ + +#include +#include + +// +// IPMI NetFnApp +// + +/** + This function gets the IPMI Device ID. + + @param[out] DeviceId Get device ID response. + + @retval EFI_SUCCESS Command is sent successfully. + @retval EFI_NOT_AVAILABLE_YET Transport interface is not ready yet. + @retval Other Failure. + +**/ +EFI_STATUS +EFIAPI +IpmiGetDeviceId ( + OUT IPMI_GET_DEVICE_ID_RESPONSE *DeviceId + ); + +/** + This function gets the self-test result. + + @param[out] SelfTestResult Self test command response. + + @retval EFI_SUCCESS Command is sent successfully. + @retval EFI_NOT_AVAILABLE_YET Transport interface is not ready yet. + @retval Other Failure. + +**/ +EFI_STATUS +EFIAPI +IpmiGetSelfTestResult ( + OUT IPMI_SELF_TEST_RESULT_RESPONSE *SelfTestResult + ); + +/** + This function resets watchdog timer. + + @param[out] CompletionCode The command completion code. + + @retval EFI_SUCCESS Command is sent successfully. + @retval EFI_NOT_AVAILABLE_YET Transport interface is not ready yet. + @retval Other Failure. + +**/ +EFI_STATUS +EFIAPI +IpmiResetWatchdogTimer ( + OUT UINT8 *CompletionCode + ); + +/** + This function sets watchdog timer. + + @param[in] SetWatchdogTimer Set watchdog timer request. + @param[out] CompletionCode The command completion code. + + @retval EFI_SUCCESS Command is sent successfully. + @retval EFI_NOT_AVAILABLE_YET Transport interface is not ready yet. + @retval Other Failure. + + +**/ +EFI_STATUS +EFIAPI +IpmiSetWatchdogTimer ( + IN IPMI_SET_WATCHDOG_TIMER_REQUEST *SetWatchdogTimer, + OUT UINT8 *CompletionCode + ); + +/** + This function gets watchdog timer. + + @param[out] GetWatchdogTimer Get watchdog timer response. + + @retval EFI_SUCCESS Command is sent successfully. + @retval EFI_NOT_AVAILABLE_YET Transport interface is not ready yet. + @retval Other Failure. + +**/ +EFI_STATUS +EFIAPI +IpmiGetWatchdogTimer ( + OUT IPMI_GET_WATCHDOG_TIMER_RESPONSE *GetWatchdogTimer + ); + +/** + This function sets BMC global enables. + + @param[in] SetBmcGlobalEnables Set BMC global enables command reques= t. + @param[out] CompletionCode The command completion code. + + @retval EFI_SUCCESS Command is sent successfully. + @retval EFI_NOT_AVAILABLE_YET Transport interface is not ready yet. + @retval Other Failure. + +**/ +EFI_STATUS +EFIAPI +IpmiSetBmcGlobalEnables ( + IN IPMI_SET_BMC_GLOBAL_ENABLES_REQUEST *SetBmcGlobalEnables, + OUT UINT8 *CompletionCode + ); + +/** + This function gets BMC global enables. + + @param[out] GetBmcGlobalEnables Get BMC global enables command respons= e. + + @retval EFI_SUCCESS Command is sent successfully. + @retval EFI_NOT_AVAILABLE_YET Transport interface is not ready yet. + @retval Other Failure. + +**/ +EFI_STATUS +EFIAPI +IpmiGetBmcGlobalEnables ( + OUT IPMI_GET_BMC_GLOBAL_ENABLES_RESPONSE *GetBmcGlobalEnables + ); + +/** + This function clears message flag. + + @param[in] ClearMessageFlagsRequest Clear message flags command requ= est. + @param[out] CompletionCode The command completion code. + + @retval EFI_SUCCESS Command is sent successfully. + @retval EFI_NOT_AVAILABLE_YET Transport interface is not ready yet. + @retval Other Failure. + +**/ +EFI_STATUS +EFIAPI +IpmiClearMessageFlags ( + IN IPMI_CLEAR_MESSAGE_FLAGS_REQUEST *ClearMessageFlagsRequest, + OUT UINT8 *CompletionCode + ); + +/** + This function gets message flag. + + @param[out] GetMessageFlagsResponse Get message flags response. + + @retval EFI_SUCCESS Command is sent successfully. + @retval EFI_NOT_AVAILABLE_YET Transport interface is not ready yet. + @retval Other Failure. + +**/ +EFI_STATUS +EFIAPI +IpmiGetMessageFlags ( + OUT IPMI_GET_MESSAGE_FLAGS_RESPONSE *GetMessageFlagsResponse + ); + +/** + This function gets message. + + @param[out] GetMessageResponse Get message command response. + @param[in,out] GetMessageResponseSize The size of get message response. + + @retval EFI_SUCCESS Command is sent successfully. + @retval EFI_NOT_AVAILABLE_YET Transport interface is not ready yet. + @retval Other Failure. + +**/ +EFI_STATUS +EFIAPI +IpmiGetMessage ( + OUT IPMI_GET_MESSAGE_RESPONSE *GetMessageResponse, + IN OUT UINT32 *GetMessageResponseSize + ); + +/** + This function sends message. + + @param[in] SendMessageRequest The send message command reques= t. + @param[in] SendMessageRequestSize The size of the send message co= mmand request. + @param[out] SendMessageResponse The send message command respon= se. + @param[in,out] SendMessageResponseSize The size of the send message co= mmand response. + When input, the expected size o= f response. + When output, the actual size of= response. + + @retval EFI_SUCCESS Command is sent successfully. + @retval EFI_NOT_AVAILABLE_YET Transport interface is not ready yet. + @retval Other Failure. + +**/ +EFI_STATUS +EFIAPI +IpmiSendMessage ( + IN IPMI_SEND_MESSAGE_REQUEST *SendMessageRequest, + IN UINT32 SendMessageRequestSize, + OUT IPMI_SEND_MESSAGE_RESPONSE *SendMessageResponse, + IN OUT UINT32 *SendMessageResponseSize + ); + +/** + This function gets the system UUID. + + @param[out] SystemGuid The pointer to retrieve system UUID. + + @retval EFI_SUCCESS Command is sent successfully. + @retval EFI_NOT_AVAILABLE_YET Transport interface is not ready yet. + @retval Others Other errors. + +**/ +EFI_STATUS +EFIAPI +IpmiGetSystemUuid ( + OUT EFI_GUID *SystemGuid + ); + +/** + This function gets the channel information. + + @param[in] GetChannelInfoRequest The get channel information r= equest. + @param[in] GetChannelInfoResponse The get channel information r= esponse. + @param[in,out] GetChannelInfoResponseSize When input, the expected size= of response. + When output, the exact size o= f the returned + response. + + @retval EFI_SUCCESS Command is sent successfully. + @retval EFI_NOT_AVAILABLE_YET Transport interface is not ready yet. + @retval Other Failure. + +**/ +EFI_STATUS +EFIAPI +IpmiGetChannelInfo ( + IN IPMI_GET_CHANNEL_INFO_REQUEST *GetChannelInfoRequest, + OUT IPMI_GET_CHANNEL_INFO_RESPONSE *GetChannelInfoResponse, + OUT UINT32 *GetChannelInfoResponseSize + ); + +// +// IPMI NetFnTransport +// + +/** + This function activates SOL + + @param[in] SolActivatingRequest SOL activating request. + @param[out] CompletionCode The command completion code. + + @retval EFI_SUCCESS Command is sent successfully. + @retval EFI_NOT_AVAILABLE_YET Transport interface is not ready yet. + @retval Other Failure. + +**/ +EFI_STATUS +EFIAPI +IpmiSolActivating ( + IN IPMI_SOL_ACTIVATING_REQUEST *SolActivatingRequest, + OUT UINT8 *CompletionCode + ); + +/** + This function sets SOL configuration parameters. + + @param[in] SetConfigurationParametersRequest Set SOL configura= tion parameters + command request. + @param[in] SetConfigurationParametersRequestSize Size of the set S= OL configuration + parameters comman= d request. + @param[out] CompletionCode The command compl= etion code. + + @retval EFI_SUCCESS Command is sent successfully. + @retval EFI_NOT_AVAILABLE_YET Transport interface is not ready yet. + @retval Other Failure. + +**/ +EFI_STATUS +EFIAPI +IpmiSetSolConfigurationParameters ( + IN IPMI_SET_SOL_CONFIGURATION_PARAMETERS_REQUEST *SetConfigurationPara= metersRequest, + IN UINT32 SetConfigurationParam= etersRequestSize, + OUT UINT8 *CompletionCode + ); + +/** + This function gets SOL configuration parameters. + + @param[in] GetConfigurationParametersRequest Get SOL configu= ration parameters + command request. + @param[out] GetConfigurationParametersResponse Get SOL configu= ration parameters + response. + @param[in,out] GetConfigurationParametersResponseSize When input, the= size of the expected + response. + When output, th= e exact size of + expect response. + + @retval EFI_SUCCESS Command is sent successfully. + @retval EFI_NOT_AVAILABLE_YET Transport interface is not ready yet. + @retval Other Failure. + +**/ +EFI_STATUS +EFIAPI +IpmiGetSolConfigurationParameters ( + IN IPMI_GET_SOL_CONFIGURATION_PARAMETERS_REQUEST *GetConfigurationPar= ametersRequest, + OUT IPMI_GET_SOL_CONFIGURATION_PARAMETERS_RESPONSE *GetConfigurationPar= ametersResponse, + IN OUT UINT32 *GetConfigurationPar= ametersResponseSize + ); + +/** + This function gets the LAN configuration parameter. + + @param[in] GetLanConfigurationParametersRequest Get LAN configurat= ion parameters command request. + @param[in] GetLanConfigurationParametersResponse The response of th= e get LAN configuration parameters. + @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 Command is sent successfully. + @retval EFI_NOT_AVAILABLE_YET Transport interface is not ready yet. + @retval Other Failure. + +**/ + +EFI_STATUS +EFIAPI +IpmiGetLanConfigurationParameters ( + IN IPMI_GET_LAN_CONFIGURATION_PARAMETERS_REQUEST *GetLanConfiguratio= nParametersRequest, + OUT IPMI_GET_LAN_CONFIGURATION_PARAMETERS_RESPONSE *GetLanConfiguratio= nParametersResponse, + IN OUT UINT32 *GetLanConfiguratio= nParametersSize + ); + +// +// IPMI NetFnChassis +// + +/** + This function gets chassis capability. + + @param[out] GetChassisCapabilitiesResponse Gets chassis capability comm= and response. + + @retval EFI_SUCCESS Command is sent successfully. + @retval EFI_NOT_AVAILABLE_YET Transport interface is not ready yet. + @retval Other Failure. + +**/ +EFI_STATUS +EFIAPI +IpmiGetChassisCapabilities ( + OUT IPMI_GET_CHASSIS_CAPABILITIES_RESPONSE *GetChassisCapabilitiesRespo= nse + ); + +/** + This function gets chassis status. + + @param[out] GetChassisCapabilitiesResponse The get chassis status comma= nd response. + + @retval EFI_SUCCESS Command is sent successfully. + @retval EFI_NOT_AVAILABLE_YET Transport interface is not ready yet. + @retval Other Failure. + +**/ +EFI_STATUS +EFIAPI +IpmiGetChassisStatus ( + OUT IPMI_GET_CHASSIS_STATUS_RESPONSE *GetChassisStatusResponse + ); + +/** + This function sends chassis control request. + + @param[in] ChassisControlRequest The chassis control request. + @param[out] CompletionCode The command completion code. + + @retval EFI_SUCCESS Command is sent successfully. + @retval EFI_NOT_AVAILABLE_YET Transport interface is not ready yet. + @retval Other Failure. + +**/ +EFI_STATUS +EFIAPI +IpmiChassisControl ( + IN IPMI_CHASSIS_CONTROL_REQUEST *ChassisControlRequest, + OUT UINT8 *CompletionCode + ); + +/** + This function sets power restore policy. + + @param[in] SetPowerRestireRequest The set power restore policy contr= ol + command request. + @param[out] SetPowerRestireResponse The response of power restore poli= cy. + + @retval EFI_SUCCESS Command is sent successfully. + @retval EFI_NOT_AVAILABLE_YET Transport interface is not ready yet. + @retval Other Failure. + +**/ +EFI_STATUS +EFIAPI +IpmiSetPowerRestorePolicy ( + IN IPMI_SET_POWER_RESTORE_POLICY_REQUEST *SetPowerRestireRequest, + OUT IPMI_SET_POWER_RESTORE_POLICY_RESPONSE *SetPowerRestireResponse + ); + +// +// IPMI NetFnStorage +// + +/** + This function sets system boot option. + + @param[in] BootOptionsRequest Set system boot option request. + @param[out] BootOptionsResponse The response of set system boot + option request. + + @retval EFI_SUCCESS Command is sent successfully. + @retval EFI_NOT_AVAILABLE_YET Transport interface is not ready yet. + @retval Other Failure. + +**/ +EFI_STATUS +EFIAPI +IpmiSetSystemBootOptions ( + IN IPMI_SET_BOOT_OPTIONS_REQUEST *BootOptionsRequest, + OUT IPMI_SET_BOOT_OPTIONS_RESPONSE *BootOptionsResponse + ); + +/** + This function gets system boot option. + + @param[in] BootOptionsRequest Get system boot option request. + @param[out] BootOptionsResponse The response of get system boot + option request. + + @retval EFI_SUCCESS Command is sent successfully. + @retval EFI_NOT_AVAILABLE_YET Transport interface is not ready yet. + @retval Other Failure. + +**/ +EFI_STATUS +EFIAPI +IpmiGetSystemBootOptions ( + IN IPMI_GET_BOOT_OPTIONS_REQUEST *BootOptionsRequest, + OUT IPMI_GET_BOOT_OPTIONS_RESPONSE *BootOptionsResponse + ); + +/** + This function gets FRU inventory area info. + + @param[in] GetFruInventoryAreaInfoRequest Get FRU inventory area com= mand request. + @param[out] GetFruInventoryAreaInfoResponse get FRU inventory area com= mand response. + + @retval EFI_SUCCESS Command is sent successfully. + @retval EFI_NOT_AVAILABLE_YET Transport interface is not ready yet. + @retval Other Failure. + +**/ +EFI_STATUS +EFIAPI +IpmiGetFruInventoryAreaInfo ( + IN IPMI_GET_FRU_INVENTORY_AREA_INFO_REQUEST *GetFruInventoryAreaInfoR= equest, + OUT IPMI_GET_FRU_INVENTORY_AREA_INFO_RESPONSE *GetFruInventoryAreaInfoR= esponse + ); + +/** + This function reads FRU data. + + @param[in] ReadFruDataRequest Read FRU data command request. + @param[out] ReadFruDataResponse Read FRU data command response. + @param[in,out] ReadFruDataResponseSize Size of the read FRU data respo= nse. + When input, the expected size o= f response data. + When out, the exact size of res= ponse data. + + @retval EFI_SUCCESS Command is sent successfully. + @retval EFI_NOT_AVAILABLE_YET Transport interface is not ready yet. + @retval Other Failure. + +**/ +EFI_STATUS +EFIAPI +IpmiReadFruData ( + IN IPMI_READ_FRU_DATA_REQUEST *ReadFruDataRequest, + OUT IPMI_READ_FRU_DATA_RESPONSE *ReadFruDataResponse, + IN OUT UINT32 *ReadFruDataResponseSize + ); + +/** + This function gets chassis capability. + + @param[in] WriteFruDataRequest Write FRU data command request. + @param[in] WriteFruDataRequestSize Size of the write FRU data comman= d request. + @param[out] WriteFruDataResponse Write FRU data response. + + @retval EFI_SUCCESS Command is sent successfully. + @retval EFI_NOT_AVAILABLE_YET Transport interface is not ready yet. + @retval Other Failure. + +**/ +EFI_STATUS +EFIAPI +IpmiWriteFruData ( + IN IPMI_WRITE_FRU_DATA_REQUEST *WriteFruDataRequest, + IN UINT32 WriteFruDataRequestSize, + OUT IPMI_WRITE_FRU_DATA_RESPONSE *WriteFruDataResponse + ); + +/** + This function gets SEL information. + + @param[out] GetSelInfoResponse Get SEL information command respons= e. + + @retval EFI_SUCCESS Command is sent successfully. + @retval EFI_NOT_AVAILABLE_YET Transport interface is not ready yet. + @retval Other Failure. + +**/ +EFI_STATUS +EFIAPI +IpmiGetSelInfo ( + OUT IPMI_GET_SEL_INFO_RESPONSE *GetSelInfoResponse + ); + +/** + This function gets SEL entry. + + @param[in] GetSelEntryRequest Get SEL entry command request. + @param[out] GetSelEntryResponse Get SEL entry command response. + @param[in,out] GetSelEntryResponseSize Size of Get SEL entry request. + When input, the expected size o= f response data. + When out, the exact size of res= ponse data. + + @retval EFI_SUCCESS Command is sent successfully. + @retval EFI_NOT_AVAILABLE_YET Transport interface is not ready yet. + @retval Other Failure. + +**/ +EFI_STATUS +EFIAPI +IpmiGetSelEntry ( + IN IPMI_GET_SEL_ENTRY_REQUEST *GetSelEntryRequest, + OUT IPMI_GET_SEL_ENTRY_RESPONSE *GetSelEntryResponse, + IN OUT UINT32 *GetSelEntryResponseSize + ); + +/** + This function adds SEL entry. + + @param[in] AddSelEntryRequest Add SEL entry command request. + @param[out] AddSelEntryResponse Add SEL entry command response. + + @retval EFI_SUCCESS Command is sent successfully. + @retval EFI_NOT_AVAILABLE_YET Transport interface is not ready yet. + @retval Other Failure. + +**/ +EFI_STATUS +EFIAPI +IpmiAddSelEntry ( + IN IPMI_ADD_SEL_ENTRY_REQUEST *AddSelEntryRequest, + OUT IPMI_ADD_SEL_ENTRY_RESPONSE *AddSelEntryResponse + ); + +/** + This function partially adds SEL entry. + + @param[in] PartialAddSelEntryRequest Partial add SEL entry comma= nd request. + @param[in] PartialAddSelEntryRequestSize Size of partial add SEL ent= ry command request. + @param[out] PartialAddSelEntryResponse Partial add SEL entry comma= nd response. + + @retval EFI_SUCCESS Command is sent successfully. + @retval EFI_NOT_AVAILABLE_YET Transport interface is not ready yet. + @retval Other Failure. + +**/ +EFI_STATUS +EFIAPI +IpmiPartialAddSelEntry ( + IN IPMI_PARTIAL_ADD_SEL_ENTRY_REQUEST *PartialAddSelEntryRequest, + IN UINT32 PartialAddSelEntryRequestSize, + OUT IPMI_PARTIAL_ADD_SEL_ENTRY_RESPONSE *PartialAddSelEntryResponse + ); + +/** + This function clears SEL entry. + + @param[in] ClearSelRequest Clear SEL command request. + @param[out] ClearSelResponse Clear SEL command response. + + @retval EFI_SUCCESS Command is sent successfully. + @retval EFI_NOT_AVAILABLE_YET Transport interface is not ready yet. + @retval Other Failure. + +**/ +EFI_STATUS +EFIAPI +IpmiClearSel ( + IN IPMI_CLEAR_SEL_REQUEST *ClearSelRequest, + OUT IPMI_CLEAR_SEL_RESPONSE *ClearSelResponse + ); + +/** + This function gets SEL time. + + @param[out] GetSelTimeResponse Get SEL time command response. + + @retval EFI_SUCCESS Command is sent successfully. + @retval EFI_NOT_AVAILABLE_YET Transport interface is not ready yet. + @retval Other Failure. + +**/ +EFI_STATUS +EFIAPI +IpmiGetSelTime ( + OUT IPMI_GET_SEL_TIME_RESPONSE *GetSelTimeResponse + ); + +/** + This function sets SEL time. + + @param[in] SetSelTimeRequest Set SEL time command request. + @param[out] CompletionCode Command completion code. + + @retval EFI_SUCCESS Command is sent successfully. + @retval EFI_NOT_AVAILABLE_YET Transport interface is not ready yet. + @retval Other Failure. + +**/ +EFI_STATUS +EFIAPI +IpmiSetSelTime ( + IN IPMI_SET_SEL_TIME_REQUEST *SetSelTimeRequest, + OUT UINT8 *CompletionCode + ); + +/** + This function gets SDR repository information. + + @param[out] GetSdrRepositoryInfoResp Get SDR repository response. + + @retval EFI_SUCCESS Command is sent successfully. + @retval EFI_NOT_AVAILABLE_YET Transport interface is not ready yet. + @retval Other Failure. +**/ +EFI_STATUS +EFIAPI +IpmiGetSdrRepositoryInfo ( + OUT IPMI_GET_SDR_REPOSITORY_INFO_RESPONSE *GetSdrRepositoryInfoResp + ); + +/** + This function gets SDR + + @param[in] GetSdrRequest Get SDR resquest. + @param[out] GetSdrResponse Get SDR response. + @param[in,out] GetSdrResponseSize The size of get SDR response. + When input, the expected size of re= sponse data. + When out, the exact size of respons= e data. + + @retval EFI_SUCCESS Command is sent successfully. + @retval EFI_NOT_AVAILABLE_YET Transport interface is not ready yet. + @retval Other Failure. + +**/ +EFI_STATUS +EFIAPI +IpmiGetSdr ( + IN IPMI_GET_SDR_REQUEST *GetSdrRequest, + OUT IPMI_GET_SDR_RESPONSE *GetSdrResponse, + IN OUT UINT32 *GetSdrResponseSize + ); + +#endif --=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 (#98754): https://edk2.groups.io/g/devel/message/98754 Mute This Topic: https://groups.io/mt/96345731/1787277 Group Owner: devel+owner@edk2.groups.io Unsubscribe: https://edk2.groups.io/g/devel/unsub [importer@patchew.org] -=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D- From nobody Wed May 15 05:57:04 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of groups.io designates 66.175.222.108 as permitted sender) smtp.mailfrom=bounce+27952+98753+1787277+3901457@groups.io; arc=fail (BodyHash is different from the expected one) Received: from mail02.groups.io (mail02.groups.io [66.175.222.108]) by mx.zohomail.com with SMTPS id 1674006285888903.4399881896943; Tue, 17 Jan 2023 17:44:45 -0800 (PST) Return-Path: X-Received: by 127.0.0.2 with SMTP id 6Q7vYY1788612xod1G9Awe9E; Tue, 17 Jan 2023 17:44:45 -0800 X-Received: from NAM11-CO1-obe.outbound.protection.outlook.com (NAM11-CO1-obe.outbound.protection.outlook.com [40.107.220.57]) by mx.groups.io with SMTP id smtpd.web11.5472.1674006284825750725 for ; Tue, 17 Jan 2023 17:44:44 -0800 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=mwDC3J5eBkU8of+S2DG4T2OWdcJxR5BCAieHETRtxFChtRPAyC7SMb9Pr807uBI93AO53viJ+wMKwquFMkkiSm0iDCse+hv/8OolTSBr9unRUsmVC3osGsZUFQ0+LJsYWRpUJXiPSjef4QXoRYWjE8nNsj554lbaofothHRyM32lps9PhGKTsQrsaZzQt9uKgDPqX/5tKXzy3zKV3p7nI2ciWP1qn4XdWwSBJ+qyXlt82dgQruA4+8wZQzS1R46gaOTkcwQBVNWAi8BF+QPplFQPOHX1TPogIL4a8ROonp6Y4dN20HNFXsdz2Jd8+aVM+c4/aJNUnIqqVZskhghqsQ== 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=Qe1RIXcsFjvC5pGW3Dk3aJUDvyzvD81GHdA6t2+/JR0=; b=lMXauCm7zsM2zGnELol0wgG2cJHs/U2dm45PZJXZH/Fp8ZP++lNEi9byksKCXmc2cr61pL19JX4lvlr5bghLDKiCESOwVMZPgeuPKxF9glQqqDkVVU4UPxm/7kiJlK301h5kup/Js5gBpQzQT9uA11aQt+I4Spo8rYECERxieHZxmIiMaro460htAMDiZDMPJETjg6q1Aj2kKgxReIB1+apozX1V4tRTObPZoV+/bmYKpODA6eYY7vQaafnPLNzpGBddCOwaZAMtChxdr6IPYxSeFLcwKO6ni4vIQFw8GuIH/qhOIrH5V6yYlldsmemoPL/FKB+DmvcZqYysKM+/Og== 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 X-Received: from BL1PR13CA0065.namprd13.prod.outlook.com (2603:10b6:208:2b8::10) by DM6PR12MB4044.namprd12.prod.outlook.com (2603:10b6:5:21d::17) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5986.23; Wed, 18 Jan 2023 01:44:42 +0000 X-Received: from BL02EPF000108E8.namprd05.prod.outlook.com (2603:10b6:208:2b8:cafe::c8) by BL1PR13CA0065.outlook.office365.com (2603:10b6:208:2b8::10) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6023.12 via Frontend Transport; Wed, 18 Jan 2023 01:44:42 +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 (zohomail.com: domain of groups.io designates 66.175.222.108 as permitted sender) client-ip=66.175.222.108; envelope-from=bounce+27952+98753+1787277+3901457@groups.io; helo=mail02.groups.io; 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 BL02EPF000108E8.mail.protection.outlook.com (10.167.241.201) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.20.6002.11 via Frontend Transport; Wed, 18 Jan 2023 01:44:42 +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.2375.34; Tue, 17 Jan 2023 19:44:36 -0600 From: "Chang, Abner via groups.io" To: CC: Jian J Wang , Liming Gao , Nickle Wang , Igor Kulchytskyy , Isaac Oram , Nate DeSimone Subject: [edk2-devel] [PATCH V3 2/3] MdeModulePkg/IpmiCommandLib: Add NULL instance library Date: Wed, 18 Jan 2023 09:42:47 +0800 Message-ID: <20230118014248.426-3-abner.chang@amd.com> In-Reply-To: <20230118014248.426-1-abner.chang@amd.com> References: <20230118014248.426-1-abner.chang@amd.com> MIME-Version: 1.0 X-Originating-IP: [10.180.168.240] X-ClientProxiedBy: SATLEXMB04.amd.com (10.181.40.145) To SATLEXMB04.amd.com (10.181.40.145) X-EOPAttributedMessage: 0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: BL02EPF000108E8:EE_|DM6PR12MB4044:EE_ X-MS-Office365-Filtering-Correlation-Id: 25affab8-2999-4649-379f-08daf8f591ba X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam-Message-Info: sGn+LDMfz89JFveOBEr4eVMyPGFmjR9RGc+FCsAyniOXjoRZ6bndTxWcR+NUvscKEqk2ai5SdvXBssxXGIp4mDya1Q6HS+BWSQa9ohWjfbFP063s1ce8nVDD3nZ0svl9u3h0NOw67BQuJgFCjScvv1ZRe4IUEBU4wsiMr0GNeBvyJNz5Cb/UYbzIJjxmCE0ee99tLlMdRVdgx3HW/e/t5IypqV+9p5x4aMI91PZX3u5sH9iOmUYI5wh0pUdz0XqK/ulsxonb3hgtrbRl0Kk2ppLwVs+sniOVbhmLw23iwlj7Rci7GjBkBVT/huqHbQJW3c6QyqCPEUaWjWkYJNeyCd6hNeVO4IYmUTivuXIJ/YbC6DiLA9BXCBUkBHHAV5eqnQi5HZfRsZWPkQYEEsIivDxHk3dgQ2G/S7Sai06Fz+bgECsTu1dI41qbcbJfCzljdfJ/HrT1y1XkEyAq3yjrvl3HY4JzjZpkFz1Eqsqk6WPpTK+utNDa6ZUVJnT3cR1ZaH/gOaZboyc+DxXrpBQyoLGjpi1JwvXBlZWp+L5dC+awnU9BpwUDDoHI/Ti+CQun7w3uklmgkkxkCS3sehG7hg8cNKDut7inUYWey5eshBHq58ZGQgZ9CQ4HAEayS66dD2e2QMBGx+tWhddjPV0UfLLNDgdJdEjV22tuTQ9Q5H8LrTLk4TgAIi1UvXmIxs4S1/7KQNbIkeQ9IEqGcfWIw6BUPbXpFr9EPUL6AcG+0N8= X-OriginatorOrg: amd.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 18 Jan 2023 01:44:42.1454 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 25affab8-2999-4649-379f-08daf8f591ba 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: BL02EPF000108E8.namprd05.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: DM6PR12MB4044 Precedence: Bulk List-Unsubscribe: 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 X-Gm-Message-State: mvGiVSxyDA4oeoCMWEuhTRc9x1787277AA= Content-Transfer-Encoding: quoted-printable DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=groups.io; q=dns/txt; s=20140610; t=1674006285; bh=Bvy1BvOzqPLHMdehAiMEmIwL/at7zFaiud+0TEpzkjA=; h=CC:Content-Type:Date:From:Reply-To:Subject:To; b=H4q7F94IrkZbwDi2agsraXa1UuoiG8wnhg7c0U6b5OR7az45oiz9c4vVCtzkUeTGFiC sKMiEgSgieR4cD9gbwYGzoNz+F7wqcpSRcMLV7HQufVr9o7V8DckZ9PxbGtJCO9aSFVTb ks+eLgFpDFW/Xryoep5li6XUo1hVIVEQ1uw= X-ZohoMail-DKIM: pass (identity @groups.io) X-ZM-MESSAGEID: 1674006286454100001 Content-Type: text/plain; charset="utf-8" From: Abner Chang The NULL instance of IpmiCommandLib library under MdeModulePkg as the default IpmiCommandLib instance used by the modules under edk2. Signed-off-by: Abner Chang Cc: Jian J Wang Cc: Liming Gao Cc: Nickle Wang Cc: Igor Kulchytskyy Cc: Isaac Oram Cc: Nate DeSimone Reviewed-by: Isaac Oram Reviewed-by: Igor Kulchytskyy Reviewed-by: Liming Gao --- .../BaseIpmiCommandLibNull.inf | 34 +++ .../IpmiCommandLibNetFnApp.c | 252 ++++++++++++++++++ .../IpmiCommandLibNetFnChassis.c | 123 +++++++++ .../IpmiCommandLibNetFnStorage.c | 248 +++++++++++++++++ .../IpmiCommandLibNetFnTransport.c | 100 +++++++ 5 files changed, 757 insertions(+) create mode 100644 MdeModulePkg/Library/BaseIpmiCommandLibNull/BaseIpmiCom= mandLibNull.inf create mode 100644 MdeModulePkg/Library/BaseIpmiCommandLibNull/IpmiCommand= LibNetFnApp.c create mode 100644 MdeModulePkg/Library/BaseIpmiCommandLibNull/IpmiCommand= LibNetFnChassis.c create mode 100644 MdeModulePkg/Library/BaseIpmiCommandLibNull/IpmiCommand= LibNetFnStorage.c create mode 100644 MdeModulePkg/Library/BaseIpmiCommandLibNull/IpmiCommand= LibNetFnTransport.c diff --git a/MdeModulePkg/Library/BaseIpmiCommandLibNull/BaseIpmiCommandLib= Null.inf b/MdeModulePkg/Library/BaseIpmiCommandLibNull/BaseIpmiCommandLibNu= ll.inf new file mode 100644 index 00000000000..175e1ae433c --- /dev/null +++ b/MdeModulePkg/Library/BaseIpmiCommandLibNull/BaseIpmiCommandLibNull.inf @@ -0,0 +1,34 @@ +## @file +# NULL instance of IpmiCommandLib +# +# Component description file for IPMI Command Library. +# +# 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 +# +## + +[Defines] + INF_VERSION =3D 0x00010005 + BASE_NAME =3D BaseIpmiCommandLibNull + FILE_GUID =3D 63F06EF8-B78A-4E7E-823E-D11A21059669 + MODULE_TYPE =3D BASE + 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 + +[LibraryClasses] + BaseMemoryLib + DebugLib + diff --git a/MdeModulePkg/Library/BaseIpmiCommandLibNull/IpmiCommandLibNetF= nApp.c b/MdeModulePkg/Library/BaseIpmiCommandLibNull/IpmiCommandLibNetFnApp= .c new file mode 100644 index 00000000000..2312e08258d --- /dev/null +++ b/MdeModulePkg/Library/BaseIpmiCommandLibNull/IpmiCommandLibNetFnApp.c @@ -0,0 +1,252 @@ +/** @file + IPMI Command - NetFnApp NULL instance library. + + 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 + +/** + This function gets the IPMI Device ID. + + @param[out] DeviceId Get device ID response. + + @retval EFI_UNSUPPORTED Unsupported in the NULL lib. + +**/ +EFI_STATUS +EFIAPI +IpmiGetDeviceId ( + OUT IPMI_GET_DEVICE_ID_RESPONSE *DeviceId + ) +{ + return RETURN_UNSUPPORTED; +} + +/** + This function gets the self-test result. + + @param[out] SelfTestResult Self test command response. + + @retval EFI_UNSUPPORTED Unsupported in the NULL lib. + +**/ +EFI_STATUS +EFIAPI +IpmiGetSelfTestResult ( + OUT IPMI_SELF_TEST_RESULT_RESPONSE *SelfTestResult + ) +{ + return RETURN_UNSUPPORTED; +} + +/** + This function resets watchdog timer. + + @param[out] CompletionCode The command completion code. + + @retval EFI_UNSUPPORTED Unsupported in the NULL lib. + +**/ +EFI_STATUS +EFIAPI +IpmiResetWatchdogTimer ( + OUT UINT8 *CompletionCode + ) +{ + return RETURN_UNSUPPORTED; +} + +/** + This function sets watchdog timer. + + @param[in] SetWatchdogTimer Set watchdog timer request. + @param[out] CompletionCode The command completion code. + + @retval EFI_UNSUPPORTED Unsupported in the NULL lib. + +**/ +EFI_STATUS +EFIAPI +IpmiSetWatchdogTimer ( + IN IPMI_SET_WATCHDOG_TIMER_REQUEST *SetWatchdogTimer, + OUT UINT8 *CompletionCode + ) +{ + return RETURN_UNSUPPORTED; +} + +/** + This function gets watchdog timer. + + @param[out] GetWatchdogTimer Get watchdog timer response. + + @retval EFI_UNSUPPORTED Unsupported in the NULL lib. + +**/ +EFI_STATUS +EFIAPI +IpmiGetWatchdogTimer ( + OUT IPMI_GET_WATCHDOG_TIMER_RESPONSE *GetWatchdogTimer + ) +{ + return RETURN_UNSUPPORTED; +} + +/** + This function sets BMC global enables. + + @param[in] SetBmcGlobalEnables Set BMC global enables command reques= t. + @param[out] CompletionCode The command completion code. + + @retval EFI_UNSUPPORTED Unsupported in the NULL lib. + +**/ +EFI_STATUS +EFIAPI +IpmiSetBmcGlobalEnables ( + IN IPMI_SET_BMC_GLOBAL_ENABLES_REQUEST *SetBmcGlobalEnables, + OUT UINT8 *CompletionCode + ) +{ + return RETURN_UNSUPPORTED; +} + +/** + This function gets BMC global enables. + + @param[out] GetBmcGlobalEnables Get BMC global enables command respons= e. + + @retval EFI_UNSUPPORTED Unsupported in the NULL lib. + +**/ +EFI_STATUS +EFIAPI +IpmiGetBmcGlobalEnables ( + OUT IPMI_GET_BMC_GLOBAL_ENABLES_RESPONSE *GetBmcGlobalEnables + ) +{ + return RETURN_UNSUPPORTED; +} + +/** + This function clears message flag. + + @param[in] ClearMessageFlagsRequest Clear message flags command Requ= est. + @param[out] CompletionCode The command completion code. + + @retval EFI_UNSUPPORTED Unsupported in the NULL lib. + +**/ +EFI_STATUS +EFIAPI +IpmiClearMessageFlags ( + IN IPMI_CLEAR_MESSAGE_FLAGS_REQUEST *ClearMessageFlagsRequest, + OUT UINT8 *CompletionCode + ) +{ + return RETURN_UNSUPPORTED; +} + +/** + This function gets message flags. + + @param[out] GetMessageFlagsResponse Get message flags response. + + @retval EFI_UNSUPPORTED Unsupported in the NULL lib. + +**/ +EFI_STATUS +EFIAPI +IpmiGetMessageFlags ( + OUT IPMI_GET_MESSAGE_FLAGS_RESPONSE *GetMessageFlagsResponse + ) +{ + return RETURN_UNSUPPORTED; +} + +/** + This function gets message. + + @param[out] GetMessageResponse Get message command response. + @param[in,out] GetMessageResponseSize The size of get message response. + + @retval EFI_UNSUPPORTED Unsupported in the NULL lib. + +**/ +EFI_STATUS +EFIAPI +IpmiGetMessage ( + OUT IPMI_GET_MESSAGE_RESPONSE *GetMessageResponse, + IN OUT UINT32 *GetMessageResponseSize + ) +{ + return RETURN_UNSUPPORTED; +} + +/** + This function sends message. + + @param[in] SendMessageRequest The send message command reques= t. + @param[in] SendMessageRequestSize The size of the send message co= mmand request. + @param[out] SendMessageResponse The send message command respon= se. + @param[in,out] SendMessageResponseSize The size of the send message co= mmand response. + When input, the expected size o= f response. + When output, the actual size of= response. + + @retval EFI_UNSUPPORTED Unsupported in the NULL lib. + +**/ +EFI_STATUS +EFIAPI +IpmiSendMessage ( + IN IPMI_SEND_MESSAGE_REQUEST *SendMessageRequest, + IN UINT32 SendMessageRequestSize, + OUT IPMI_SEND_MESSAGE_RESPONSE *SendMessageResponse, + IN OUT UINT32 *SendMessageResponseSize + ) +{ + return RETURN_UNSUPPORTED; +} + +/** + This function gets the system UUID. + + @param[out] SystemGuid The pointer to retrieve system UUID. + + @retval EFI_UNSUPPORTED Unsupported in the NULL lib. +**/ +EFI_STATUS +EFIAPI +IpmiGetSystemUuid ( + OUT EFI_GUID *SystemGuid + ) +{ + return RETURN_UNSUPPORTED; +} + +/** + 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_UNSUPPORTED Unsupported in the NULL lib. + +**/ +EFI_STATUS +EFIAPI +IpmiGetChannelInfo ( + IN IPMI_GET_CHANNEL_INFO_REQUEST *GetChannelInfoRequest, + OUT IPMI_GET_CHANNEL_INFO_RESPONSE *GetChannelInfoResponse, + OUT UINT32 *GetChannelInfoResponseSize + ) +{ + return RETURN_UNSUPPORTED; +} diff --git a/MdeModulePkg/Library/BaseIpmiCommandLibNull/IpmiCommandLibNetF= nChassis.c b/MdeModulePkg/Library/BaseIpmiCommandLibNull/IpmiCommandLibNetF= nChassis.c new file mode 100644 index 00000000000..300a9b045f5 --- /dev/null +++ b/MdeModulePkg/Library/BaseIpmiCommandLibNull/IpmiCommandLibNetFnChassi= s.c @@ -0,0 +1,123 @@ +/** @file + IPMI Command - NetFnChassis NULL instance library. + + 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 + +/** + This function gets chassis capability. + + @param[out] GetChassisCapabilitiesResponse Gets chassis capability comm= and response. + + @retval EFI_UNSUPPORTED Unsupported in the NULL lib. + +**/ +EFI_STATUS +EFIAPI +IpmiGetChassisCapabilities ( + OUT IPMI_GET_CHASSIS_CAPABILITIES_RESPONSE *GetChassisCapabilitiesRespo= nse + ) +{ + return RETURN_UNSUPPORTED; +} + +/** + This function gets chassis status. + + @param[out] GetChassisStatusResponse The get chassis status command res= ponse. + + @retval EFI_UNSUPPORTED Unsupported in the NULL lib. + +**/ +EFI_STATUS +EFIAPI +IpmiGetChassisStatus ( + OUT IPMI_GET_CHASSIS_STATUS_RESPONSE *GetChassisStatusResponse + ) +{ + return RETURN_UNSUPPORTED; +} + +/** + This function sends chassis control request. + + @param[in] ChassisControlRequest The chassis control request. + @param[out] CompletionCode The command completion code. + + @retval EFI_UNSUPPORTED Unsupported in the NULL lib. + +**/ +EFI_STATUS +EFIAPI +IpmiChassisControl ( + IN IPMI_CHASSIS_CONTROL_REQUEST *ChassisControlRequest, + OUT UINT8 *CompletionCode + ) +{ + return RETURN_UNSUPPORTED; +} + +/** + This function sets power restore policy. + + @param[in] ChassisControlRequest The set power restore policy control + command request. + @param[out] ChassisControlResponse The response of power restore polic= y. + + @retval EFI_UNSUPPORTED Unsupported in the NULL lib. + +**/ +EFI_STATUS +EFIAPI +IpmiSetPowerRestorePolicy ( + IN IPMI_SET_POWER_RESTORE_POLICY_REQUEST *ChassisControlRequest, + OUT IPMI_SET_POWER_RESTORE_POLICY_RESPONSE *ChassisControlResponse + ) +{ + return RETURN_UNSUPPORTED; +} + +/** + This function sets system boot option. + + @param[in] BootOptionsRequest Set system boot option request. + @param[out] BootOptionsResponse The response of set system boot + option request. + + @retval EFI_UNSUPPORTED Unsupported in the NULL lib. + +**/ +EFI_STATUS +EFIAPI +IpmiSetSystemBootOptions ( + IN IPMI_SET_BOOT_OPTIONS_REQUEST *BootOptionsRequest, + OUT IPMI_SET_BOOT_OPTIONS_RESPONSE *BootOptionsResponse + ) +{ + return RETURN_UNSUPPORTED; +} + +/** + This function gets system boot option. + + @param[in] BootOptionsRequest Get system boot option request. + @param[out] BootOptionsResponse The response of get system boot + option request. + + @retval EFI_UNSUPPORTED Unsupported in the NULL lib. + +**/ +EFI_STATUS +EFIAPI +IpmiGetSystemBootOptions ( + IN IPMI_GET_BOOT_OPTIONS_REQUEST *BootOptionsRequest, + OUT IPMI_GET_BOOT_OPTIONS_RESPONSE *BootOptionsResponse + ) +{ + return RETURN_UNSUPPORTED; +} diff --git a/MdeModulePkg/Library/BaseIpmiCommandLibNull/IpmiCommandLibNetF= nStorage.c b/MdeModulePkg/Library/BaseIpmiCommandLibNull/IpmiCommandLibNetF= nStorage.c new file mode 100644 index 00000000000..9e5ac959e49 --- /dev/null +++ b/MdeModulePkg/Library/BaseIpmiCommandLibNull/IpmiCommandLibNetFnStorag= e.c @@ -0,0 +1,248 @@ +/** @file + IPMI Command - NetFnStorage NULL instance library. + + 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 + +/** + This function gets FRU inventory area info. + + @param[in] GetFruInventoryAreaInfoRequest Get FRU inventory area com= mand request. + @param[out] GetFruInventoryAreaInfoResponse get FRU inventory area com= mand response. + + @retval EFI_UNSUPPORTED Unsupported in the NULL lib. + +**/ +EFI_STATUS +EFIAPI +IpmiGetFruInventoryAreaInfo ( + IN IPMI_GET_FRU_INVENTORY_AREA_INFO_REQUEST *GetFruInventoryAreaInfoR= equest, + OUT IPMI_GET_FRU_INVENTORY_AREA_INFO_RESPONSE *GetFruInventoryAreaInfoR= esponse + ) +{ + return RETURN_UNSUPPORTED; +} + +/** + This function reads FRU data. + + @param[in] ReadFruDataRequest Read FRU data command request. + @param[out] ReadFruDataResponse Read FRU data command response. + @param[in,out] ReadFruDataResponseSize Size of the read FRU data respo= nse. + When input, the expected size o= f response data. + When out, the exact size of res= ponse data. + + @retval EFI_UNSUPPORTED Unsupported in the NULL lib. + +**/ +EFI_STATUS +EFIAPI +IpmiReadFruData ( + IN IPMI_READ_FRU_DATA_REQUEST *ReadFruDataRequest, + OUT IPMI_READ_FRU_DATA_RESPONSE *ReadFruDataResponse, + IN OUT UINT32 *ReadFruDataResponseSize + ) +{ + return RETURN_UNSUPPORTED; +} + +/** + This function gets chassis capability. + + @param[in] WriteFruDataRequest Write FRU data command request. + @param[in] WriteFruDataRequestSize Size of the write FRU data comman= d request. + @param[out] WriteFruDataResponse Write FRU data response. + + @retval EFI_UNSUPPORTED Unsupported in the NULL lib. + +**/ +EFI_STATUS +EFIAPI +IpmiWriteFruData ( + IN IPMI_WRITE_FRU_DATA_REQUEST *WriteFruDataRequest, + IN UINT32 WriteFruDataRequestSize, + OUT IPMI_WRITE_FRU_DATA_RESPONSE *WriteFruDataResponse + ) +{ + return RETURN_UNSUPPORTED; +} + +/** + This function gets SEL information. + + @param[out] GetSelInfoResponse Get SEL information command respons= e. + + @retval EFI_UNSUPPORTED Unsupported in the NULL lib. + +**/ +EFI_STATUS +EFIAPI +IpmiGetSelInfo ( + OUT IPMI_GET_SEL_INFO_RESPONSE *GetSelInfoResponse + ) +{ + return RETURN_UNSUPPORTED; +} + +/** + This function gets SEL entry. + + @param[in] GetSelEntryRequest Get SEL entry command request. + @param[out] GetSelEntryResponse Get SEL entry command response. + @param[in,out] GetSelEntryResponseSize Size of Get SEL entry request. + When input, the expected size o= f response data. + When out, the exact size of res= ponse data. + + @retval EFI_UNSUPPORTED Unsupported in the NULL lib. + +**/ +EFI_STATUS +EFIAPI +IpmiGetSelEntry ( + IN IPMI_GET_SEL_ENTRY_REQUEST *GetSelEntryRequest, + OUT IPMI_GET_SEL_ENTRY_RESPONSE *GetSelEntryResponse, + IN OUT UINT32 *GetSelEntryResponseSize + ) +{ + return RETURN_UNSUPPORTED; +} + +/** + This function adds SEL entry. + + @param[in] AddSelEntryRequest Add SEL entry command request. + @param[out] AddSelEntryResponse Add SEL entry command response. + + @retval EFI_UNSUPPORTED Unsupported in the NULL lib. + +**/ +EFI_STATUS +EFIAPI +IpmiAddSelEntry ( + IN IPMI_ADD_SEL_ENTRY_REQUEST *AddSelEntryRequest, + OUT IPMI_ADD_SEL_ENTRY_RESPONSE *AddSelEntryResponse + ) +{ + return RETURN_UNSUPPORTED; +} + +/** + This function partially adds SEL entry. + + @param[in] PartialAddSelEntryRequest Partial add SEL entry comma= nd request. + @param[in] PartialAddSelEntryRequestSize Size of partial add SEL ent= ry command request. + @param[out] PartialAddSelEntryResponse Partial add SEL entry comma= nd response. + + @retval EFI_UNSUPPORTED Unsupported in the NULL lib. + +**/ +EFI_STATUS +EFIAPI +IpmiPartialAddSelEntry ( + IN IPMI_PARTIAL_ADD_SEL_ENTRY_REQUEST *PartialAddSelEntryRequest, + IN UINT32 PartialAddSelEntryRequestSize, + OUT IPMI_PARTIAL_ADD_SEL_ENTRY_RESPONSE *PartialAddSelEntryResponse + ) +{ + return RETURN_UNSUPPORTED; +} + +/** + This function clears SEL entry. + + @param[in] ClearSelRequest Clear SEL command request. + @param[out] ClearSelResponse Clear SEL command response. + + @retval EFI_UNSUPPORTED Unsupported in the NULL lib. + +**/ +EFI_STATUS +EFIAPI +IpmiClearSel ( + IN IPMI_CLEAR_SEL_REQUEST *ClearSelRequest, + OUT IPMI_CLEAR_SEL_RESPONSE *ClearSelResponse + ) +{ + return RETURN_UNSUPPORTED; +} + +/** + This function gets SEL time. + + @param[out] GetSelTimeResponse Get SEL time command response. + + @retval EFI_UNSUPPORTED Unsupported in the NULL lib. + +**/ +EFI_STATUS +EFIAPI +IpmiGetSelTime ( + OUT IPMI_GET_SEL_TIME_RESPONSE *GetSelTimeResponse + ) +{ + return RETURN_UNSUPPORTED; +} + +/** + This function sets SEL time. + + @param[in] SetSelTimeRequest Set SEL time command request. + @param[out] CompletionCode Command completion code. + + @retval EFI_UNSUPPORTED Unsupported in the NULL lib. + +**/ +EFI_STATUS +EFIAPI +IpmiSetSelTime ( + IN IPMI_SET_SEL_TIME_REQUEST *SetSelTimeRequest, + OUT UINT8 *CompletionCode + ) +{ + return RETURN_UNSUPPORTED; +} + +/** + This function gets SDR repository information. + + @param[out] GetSdrRepositoryInfoResp Get SDR repository response. + + @retval EFI_UNSUPPORTED Unsupported in the NULL lib. + +**/ +EFI_STATUS +EFIAPI +IpmiGetSdrRepositoryInfo ( + OUT IPMI_GET_SDR_REPOSITORY_INFO_RESPONSE *GetSdrRepositoryInfoResp + ) +{ + return RETURN_UNSUPPORTED; +} + +/** + This function gets SDR + + @param[in] GetSdrRequest Get SDR resquest. + @param[out] GetSdrResponse Get SDR response. + @param[in,out] GetSdrResponseSize The size of get SDR response. + When input, the expected size of re= sponse data. + When out, the exact size of respons= e data. + + @retval EFI_UNSUPPORTED Unsupported in the NULL lib. + +**/ +EFI_STATUS +EFIAPI +IpmiGetSdr ( + IN IPMI_GET_SDR_REQUEST *GetSdrRequest, + OUT IPMI_GET_SDR_RESPONSE *GetSdrResponse, + IN OUT UINT32 *GetSdrResponseSize + ) +{ + return RETURN_UNSUPPORTED; +} diff --git a/MdeModulePkg/Library/BaseIpmiCommandLibNull/IpmiCommandLibNetF= nTransport.c b/MdeModulePkg/Library/BaseIpmiCommandLibNull/IpmiCommandLibNe= tFnTransport.c new file mode 100644 index 00000000000..b45329f2400 --- /dev/null +++ b/MdeModulePkg/Library/BaseIpmiCommandLibNull/IpmiCommandLibNetFnTransp= ort.c @@ -0,0 +1,100 @@ +/** @file + IPMI Command - NetFnTransport NULL instance library. + + 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 + +/** + This function activates SOL + + @param[in] SolActivatingRequest SOL activating request. + @param[out] CompletionCode The command completion code. + + @retval EFI_UNSUPPORTED Unsupported in the NULL lib. + +**/ +EFI_STATUS +EFIAPI +IpmiSolActivating ( + IN IPMI_SOL_ACTIVATING_REQUEST *SolActivatingRequest, + OUT UINT8 *CompletionCode + ) +{ + return RETURN_UNSUPPORTED; +} + +/** + This function sets SOL configuration parameters. + + @param[in] SetConfigurationParametersRequest Set SOL configura= tion parameters + command request. + @param[in] SetConfigurationParametersRequestSize Size of set SOL c= onfiguration + parameters comman= d request. + @param[out] CompletionCode The command compl= etion code. + + @retval EFI_UNSUPPORTED Unsupported in the NULL lib. + +**/ +EFI_STATUS +EFIAPI +IpmiSetSolConfigurationParameters ( + IN IPMI_SET_SOL_CONFIGURATION_PARAMETERS_REQUEST *SetConfigurationPara= metersRequest, + IN UINT32 SetConfigurationParam= etersRequestSize, + OUT UINT8 *CompletionCode + ) +{ + return RETURN_UNSUPPORTED; +} + +/** + This function gets SOL configuration parameters. + + @param[in] GetConfigurationParametersRequest Get SOL configu= ration parameters + command request. + @param[out] GetConfigurationParametersResponse Get SOL configu= ration parameters + response. + @param[in,out] GetConfigurationParametersResponseSize When input, the= size of expect response. + When output, th= e exact size of + expect response. + + @retval EFI_UNSUPPORTED Unsupported in the NULL lib. + +**/ +EFI_STATUS +EFIAPI +IpmiGetSolConfigurationParameters ( + IN IPMI_GET_SOL_CONFIGURATION_PARAMETERS_REQUEST *GetConfigurationPar= ametersRequest, + OUT IPMI_GET_SOL_CONFIGURATION_PARAMETERS_RESPONSE *GetConfigurationPar= ametersResponse, + IN OUT UINT32 *GetConfigurationPar= ametersResponseSize + ) +{ + return RETURN_UNSUPPORTED; +} + +/** + 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 in = the response. + @retval Others Other errors. + +**/ +EFI_STATUS +EFIAPI +IpmiGetLanConfigurationParameters ( + IN IPMI_GET_LAN_CONFIGURATION_PARAMETERS_REQUEST *GetLanConfiguratio= nParametersRequest, + OUT IPMI_GET_LAN_CONFIGURATION_PARAMETERS_RESPONSE *GetLanConfiguratio= nParametersResponse, + IN OUT UINT32 *GetLanConfiguratio= nParametersSize + ) +{ + return RETURN_UNSUPPORTED; +} --=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 (#98753): https://edk2.groups.io/g/devel/message/98753 Mute This Topic: https://groups.io/mt/96345730/1787277 Group Owner: devel+owner@edk2.groups.io Unsubscribe: https://edk2.groups.io/g/devel/unsub [importer@patchew.org] -=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D- From nobody Wed May 15 05:57:04 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of groups.io designates 66.175.222.108 as permitted sender) smtp.mailfrom=bounce+27952+98755+1787277+3901457@groups.io; arc=fail (BodyHash is different from the expected one) Received: from mail02.groups.io (mail02.groups.io [66.175.222.108]) by mx.zohomail.com with SMTPS id 1674006289345288.1323957313872; Tue, 17 Jan 2023 17:44:49 -0800 (PST) Return-Path: X-Received: by 127.0.0.2 with SMTP id idEoYY1788612xofB7hfuBPW; Tue, 17 Jan 2023 17:44:48 -0800 X-Received: from NAM12-BN8-obe.outbound.protection.outlook.com (NAM12-BN8-obe.outbound.protection.outlook.com [40.107.237.69]) by mx.groups.io with SMTP id smtpd.web11.5475.1674006288226022977 for ; Tue, 17 Jan 2023 17:44:48 -0800 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=SC32TL2LkQLhWlvvJXc50mgIdSzWP1qDKBGw1VgcAl21+jSN7FFSFLHgaAiwNSHEtoJ1W+9broEVSqXdywOnKd2uKnohqyo6ycZXIhMjN2mbgTmcxH5eA/LRfR/XL71AgEWNXSgChdhPUXOvMQXmehFyvaWLPJk9xYome6Iw64MJngYdcN6n+pUsTuaa2YH4TBYorXFQUY2zp/T/KpOrd/7Hq/6SXRG5qLyp5JypnMBgqKXpWg4dCaGES8cSLEWLiYnVkr2vi+9t7uJK0+TnTlQ1/2eQQRrLldcVyhrnq3sEpekt+kQ7ncG31czMO5Z+DLnVmOlaNut0Hh13lLr65A== 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=NRnQ+RIwXRrrYVxiXbcsdaWj/RNi9BlagQqHneEgOKg=; b=O6Y3n+aj5M33CLUOzxEh3QzJ/C2pr/LrRZM9x8cKtSM9vVy1loUaNZPtYp3nyd86SHzG+BURys64znJSdg3yPSCIaRYQvPm6vbEE7AMcuCkFxCWwAfbMxujlPgF1Ut0XlOrAhC9gHD10il1Ycppgr4H6juQXeCntpKQSO9tRCXU3t0rkAC9OjnLvhhrtykFEWALGz0yuJeDIrNWRJ1nCnqx/KomkP3cXtG6Zy6AMhQ+WCV1mVuB5by4giTtBDhUQfCHemm4XtxQZJEeT6Ot5wBtxR85tD/4F6SPWp3+x+dpB18/C41qHNqM4TA+aI3xq1C+y+j2Dm2LdFadGclNnxA== 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 X-Received: from BL1PR13CA0068.namprd13.prod.outlook.com (2603:10b6:208:2b8::13) by DS0PR12MB8528.namprd12.prod.outlook.com (2603:10b6:8:160::6) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5986.23; Wed, 18 Jan 2023 01:44:44 +0000 X-Received: from BL02EPF000108E8.namprd05.prod.outlook.com (2603:10b6:208:2b8:cafe::bf) by BL1PR13CA0068.outlook.office365.com (2603:10b6:208:2b8::13) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6023.12 via Frontend Transport; Wed, 18 Jan 2023 01:44:43 +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 (zohomail.com: domain of groups.io designates 66.175.222.108 as permitted sender) client-ip=66.175.222.108; envelope-from=bounce+27952+98755+1787277+3901457@groups.io; helo=mail02.groups.io; 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 BL02EPF000108E8.mail.protection.outlook.com (10.167.241.201) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.20.6002.11 via Frontend Transport; Wed, 18 Jan 2023 01:44:43 +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.2375.34; Tue, 17 Jan 2023 19:44:40 -0600 From: "Chang, Abner via groups.io" To: CC: Jian J Wang , Liming Gao , Nickle Wang , Igor Kulchytskyy , Isaac Oram , Nate DeSimone Subject: [edk2-devel] [PATCH V3 3/3] MdeModulePkg: Add IpmiCommandLib Date: Wed, 18 Jan 2023 09:42:48 +0800 Message-ID: <20230118014248.426-4-abner.chang@amd.com> In-Reply-To: <20230118014248.426-1-abner.chang@amd.com> References: <20230118014248.426-1-abner.chang@amd.com> MIME-Version: 1.0 X-Originating-IP: [10.180.168.240] X-ClientProxiedBy: SATLEXMB04.amd.com (10.181.40.145) To SATLEXMB04.amd.com (10.181.40.145) X-EOPAttributedMessage: 0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: BL02EPF000108E8:EE_|DS0PR12MB8528:EE_ X-MS-Office365-Filtering-Correlation-Id: f3d82f07-9eb4-45c3-f1bf-08daf8f592b6 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam-Message-Info: vkluzMKei0fernawhOPG6lVu5MhQ2EUI7SA4ocNfNkzRUyJ28FMpquoNCH1Z9vstAZvrGI0djLo7JbH9uMZPlO4KL8FOal8VlZfc53GN15epWyOs31qfi1NOhXlBVZaLfJj8Pa0M5ZIAeNlB9wRc6B0/h8Y73eAqtNHJxthQXrCbkWpV258EfsWZlzqzVeCzVnz0MTs8uAaYZa6zj0Nsbre4vMUsZgEB2g/y1v78qhTFnWZRH7/wWiXf+UXYDGG3cZo1RhbRxM/Gr56yujS48YeC1pb4bp/bVzGK7zPBLmJaePQtYz6tpgG2icDKOc+w1gXzT2N3XKZa4rZgHu1tHie4NNAx4vp2oI+KIincJeAh75V1p2/8brkn/WkXNo0Ex9wO6OZlo47JmBbDPAfl9Bx3HUFBQrMWvdhqW6MybAIQzhgbVSfauRXyppsP9zCdc6luqnMDqSrRIjqYS8E81WWfby1VM+013QnTcR43m0f0NWgp5lnsa6AS9kEAVo7qxIZcq6Ea5/MAz347xL/LMmmuF+7dupp88IXjl4RjpMs4FHiux9Xzf0jE3+HwClW0ku/R9gEBhqZgyU0i4yhD5TN3AqNZOn/P1mq9cx1La+A3LHuPnns3gvaXsh/Rf+mu+M42WLw8R55kiULtA1EoU+BvoeNZjhMxHPjxX31nUgwvpLBUu+M0DwBJJ5zAg2bcbeAaRBNNtdI563K1sLdaEK11SaiDa9n4j4wU8+a0V60= X-OriginatorOrg: amd.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 18 Jan 2023 01:44:43.8016 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: f3d82f07-9eb4-45c3-f1bf-08daf8f592b6 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: BL02EPF000108E8.namprd05.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: DS0PR12MB8528 Precedence: Bulk List-Unsubscribe: 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 X-Gm-Message-State: 0VlnvHp9Si8tHflNrreRepIlx1787277AA= Content-Transfer-Encoding: quoted-printable DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=groups.io; q=dns/txt; s=20140610; t=1674006288; bh=lnSUEkKnAW4HosrTf81RpNrnGwiXpfgCkyFAWH4oGhI=; h=CC:Content-Type:Date:From:Reply-To:Subject:To; b=Sf+SLJmuOVrzr1z1O5jpBik8RQUrAoladLaWTlymrF+6+knnfrQUHe2V7xY5LpD0WZt bomxcBuxcVsX0LjVJar6MRV4lo0NkLF7i+/Sa/Rof0sYuWMI4DuNAWOBUnS/sl8AG/u0u 0mzWPwpx2Pps2za0hrr46rRqOuJhtewwVGQ= X-ZohoMail-DKIM: pass (identity @groups.io) X-ZM-MESSAGEID: 1674006290430100003 Content-Type: text/plain; charset="utf-8" From: Abner Chang Add IpmiCommandLib to MdeModulePkg DEC/DSC files. Signed-off-by: Abner Chang Cc: Jian J Wang Cc: Liming Gao Cc: Nickle Wang Cc: Igor Kulchytskyy Cc: Isaac Oram Cc: Nate DeSimone Reviewed-by: Isaac Oram Reviewed-by: Igor Kulchytskyy Reviewed-by: Liming Gao --- MdeModulePkg/MdeModulePkg.dec | 5 +++++ MdeModulePkg/MdeModulePkg.dsc | 3 +++ 2 files changed, 8 insertions(+) diff --git a/MdeModulePkg/MdeModulePkg.dec b/MdeModulePkg/MdeModulePkg.dec index be5e829ca9c..9605c617b7a 100644 --- a/MdeModulePkg/MdeModulePkg.dec +++ b/MdeModulePkg/MdeModulePkg.dec @@ -9,6 +9,7 @@ # (C) Copyright 2016 - 2019 Hewlett Packard Enterprise Development LP
# Copyright (c) 2017, AMD Incorporated. All rights reserved.
# Copyright (c) Microsoft Corporation.
+# Copyright (C) 2023 Advanced Micro Devices, Inc. All rights reserved.
# SPDX-License-Identifier: BSD-2-Clause-Patent # ## @@ -117,6 +118,10 @@ # IpmiLib|Include/Library/IpmiLib.h =20 + ## @libraryclass Provides interfaces to send/receive IPMI command. + # + IpmiCommandLib|Include/Library/IpmiCommandLib.h + ## @libraryclass Provides interfaces for platform to return root bridge= information to PciHostBridgeDxe driver. # PciHostBridgeLib|Include/Library/PciHostBridgeLib.h diff --git a/MdeModulePkg/MdeModulePkg.dsc b/MdeModulePkg/MdeModulePkg.dsc index 659482ab737..1014598f31c 100644 --- a/MdeModulePkg/MdeModulePkg.dsc +++ b/MdeModulePkg/MdeModulePkg.dsc @@ -4,6 +4,7 @@ # (C) Copyright 2014 Hewlett-Packard Development Company, L.P.
# Copyright (c) 2007 - 2021, Intel Corporation. All rights reserved.
# Copyright (c) Microsoft Corporation. +# Copyright (C) 2023 Advanced Micro Devices, Inc. All rights reserved.
# # SPDX-License-Identifier: BSD-2-Clause-Patent # @@ -104,6 +105,7 @@ VariablePolicyHelperLib|MdeModulePkg/Library/VariablePolicyHelperLib/Var= iablePolicyHelperLib.inf MmUnblockMemoryLib|MdePkg/Library/MmUnblockMemoryLib/MmUnblockMemoryLibN= ull.inf VariableFlashInfoLib|MdeModulePkg/Library/BaseVariableFlashInfoLib/BaseV= ariableFlashInfoLib.inf + IpmiCommandLib|MdeModulePkg/Library/BaseIpmiCommandLibNull/BaseIpmiComma= ndLibNull.inf =20 [LibraryClasses.EBC.PEIM] IoLib|MdePkg/Library/PeiIoLibCpuIo/PeiIoLibCpuIo.inf @@ -333,6 +335,7 @@ MdeModulePkg/Library/DxeIpmiLibIpmiProtocol/DxeIpmiLibIpmiProtocol.inf MdeModulePkg/Library/PeiIpmiLibIpmiPpi/PeiIpmiLibIpmiPpi.inf MdeModulePkg/Library/SmmIpmiLibSmmIpmiProtocol/SmmIpmiLibSmmIpmiProtocol= .inf + MdeModulePkg/Library/BaseIpmiCommandLibNull/BaseIpmiCommandLibNull.inf MdeModulePkg/Library/FrameBufferBltLib/FrameBufferBltLib.inf MdeModulePkg/Library/NonDiscoverableDeviceRegistrationLib/NonDiscoverabl= eDeviceRegistrationLib.inf MdeModulePkg/Library/BaseBmpSupportLib/BaseBmpSupportLib.inf --=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 (#98755): https://edk2.groups.io/g/devel/message/98755 Mute This Topic: https://groups.io/mt/96345732/1787277 Group Owner: devel+owner@edk2.groups.io Unsubscribe: https://edk2.groups.io/g/devel/unsub [importer@patchew.org] -=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-