From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from NAM11-DM6-obe.outbound.protection.outlook.com (NAM11-DM6-obe.outbound.protection.outlook.com [40.107.223.46]) by mx.groups.io with SMTP id smtpd.web11.175716.1672203611802378512 for ; Tue, 27 Dec 2022 21:00:12 -0800 Authentication-Results: mx.groups.io; dkim=fail reason="body hash did not verify" header.i=@amd.com header.s=selector1 header.b=YyvygOfG; spf=permerror, err=parse error for token &{10 18 %{i}._ip.%{h}._ehlo.%{d}._spf.vali.email}: invalid domain name (domain: amd.com, ip: 40.107.223.46, mailfrom: abner.chang@amd.com) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=QGSoj2JUuRo3ZoluxlZVhYef2IjaQvNEpz0JD+HjiGibF8bgGJgsh6moRoDl52uv1mVZV/vHOTwG/hFuDoAHDFgn4CmGfK11H25OVZmuwpqL6ninjfSeOVaxzdBnZ7/WbUzbTfcbdJzmE+Q08npTe7YhpVCFv3NF2QyIaGaQ93ynt06D5mtlot66pPEIp3l5RmwKXmirfzoGlg1jLM6HN0JBM78T11dXH/prSHIT5NvAGEKv2319pRq/XFJrgaCJdf4hWivmgRCYRQ1Gb0w6Tf7VII7pwCQFf6qlZ76KBY1mESHlV4EQD2CckPoI/3zWNTTDV3B02vep9swD4+bMLA== 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=5+nmQ0DXlt4xt6C1zppnOTF/Ntx37SV3+wXCPFngqSs=; b=Z5VezurjurWcUfpHqI2/wmFKvUmElNT5ITjhurh+gcOpZAIq6Cys53/KEDCMLYUSUcy2zX7UzMqA2ovL0WEygOEKyaGfw3JpIROtHqSrAKKvj0RyLxENGRs+pDgwwha1TeuawouRxHjqU+MwZ7wYUtlSzIwXTUdHiNikUgRxKhpGRwpF4Y6X4r7dgBWbO8Xw/vmNw3xF5D3mYeF+2H/G7H4hX7mBrMViYmSlcbNzCgBYqJ8qyeZaJkggSXRimQTcz6NtR7n/fDHTkMXEjhjZI9S/NsDwTknHRUNNUg+05TtdFrP5BMAsY8YXbf0LqE8m6RMDJzaKF2FZxvScTvGwLQ== 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 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=amd.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=5+nmQ0DXlt4xt6C1zppnOTF/Ntx37SV3+wXCPFngqSs=; b=YyvygOfG1Llqiun7hxOZscEbBNuMoGOMel27SQjAEjcbpg1CJkkHQ1y444I+oHDVOjDTR7GB9clGJk5WXUFQrQFGuwhDirv1Gmf8hsjTi3m61/Dh1OXS0mx7zROQOA75af1NvL1gfxJWXtvDKqrwTy41a2O1Jy2RLhEKO+MVrlc= Received: from BN7PR06CA0067.namprd06.prod.outlook.com (2603:10b6:408:34::44) by LV2PR12MB5967.namprd12.prod.outlook.com (2603:10b6:408:170::14) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5944.16; Wed, 28 Dec 2022 05:00:07 +0000 Received: from BN8NAM11FT050.eop-nam11.prod.protection.outlook.com (2603:10b6:408:34:cafe::88) by BN7PR06CA0067.outlook.office365.com (2603:10b6:408:34::44) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5944.17 via Frontend Transport; Wed, 28 Dec 2022 05:00:07 +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 Received: from SATLEXMB04.amd.com (165.204.84.17) by BN8NAM11FT050.mail.protection.outlook.com (10.13.177.5) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.20.5944.17 via Frontend Transport; Wed, 28 Dec 2022 05:00:07 +0000 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, 27 Dec 2022 23:00:02 -0600 From: "Chang, Abner" To: CC: Jian J Wang , Liming Gao , Nickle Wang , Igor Kulchytskyy , Isaac Oram , Nate DeSimone Subject: [PATCH 2/3] MdeModulePkg/IpmiCommandLib: Add NULL instance library Date: Wed, 28 Dec 2022 12:59:11 +0800 Message-ID: <20221228045912.1677-3-abner.chang@amd.com> X-Mailer: git-send-email 2.37.1.windows.1 In-Reply-To: <20221228045912.1677-1-abner.chang@amd.com> References: <20221228045912.1677-1-abner.chang@amd.com> MIME-Version: 1.0 Return-Path: Abner.Chang@amd.com 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: BN8NAM11FT050:EE_|LV2PR12MB5967:EE_ X-MS-Office365-Filtering-Correlation-Id: 9e81d745-53f6-4ac3-26d5-08dae890640c X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: yLq8XMPutflSuayya0Ru0hMU+Dwsmkt69uGINEo1rKArB3PsSMV9adQR6Q/3krlKftBDTFB3t4in3aRiBIgfnG63kx3cF4Q8UL3SvnuTslwX4mro18Pj0mgjTbpfFX1btcEiLzL7D7dXml4oI0iN2jP7GNO/qOLzA3laFtGFBHNl0EFYXLJDkTK9M11jCFb12Oz8bxqyUIaNNooprsEsNBMFK6wJk3jcOCHsOrnt/X+qhUm1M+3evHDFXjy9nJQvYFtU9FgNO/ihSeyauRPsEnXsy8l6rTN8H1j4M4zFa/okVINQYWf/JGn380rR5Os+BaPdaBOQKyUm1C8hwkfY3R526U/5unmp5jNce5aDMd2waWNuQXl0i/3D0tISRPMVI58nFeJTpYC64DftH+Izl1/za822XyjV4dbu8vIs+n1oU3mHF+PlTrTL2Up3bZ1uF2oZjzf8IVxGEqjJEn44IknNwP0nKT7iobnC5Xqc9PqAJfFqu8uP9AhI29biJJ8P+0l4O0dWaX/TiwGhRzXOXuXcKfsroPh1IlIlGtlFsWz3DRXAV89mZd/k12O5cVUDvAT93K4DeoOz79GFOvLY8SW+TXUbt9t9JO8SCzeFNrY7ae0eMfWcM8gfYQrBHNLiH7+Mu2uEXKE3FsR4rY+HoMzlLwp3cOPkqtWJ30aOjfE0bMaYLzp7oBCWHKHj/Dnu/FpYxnKYs1DS7AMM4OFbdDMASjmjbIymvpWTtk1GGJ4= X-Forefront-Antispam-Report: CIP:165.204.84.17;CTRY:US;LANG:en;SCL:1;SRV:;IPV:CAL;SFV:NSPM;H:SATLEXMB04.amd.com;PTR:InfoDomainNonexistent;CAT:NONE;SFS:(13230022)(4636009)(346002)(39860400002)(396003)(136003)(376002)(451199015)(36840700001)(46966006)(40470700004)(2876002)(40460700003)(30864003)(54906003)(82310400005)(2906002)(6916009)(36756003)(316002)(1076003)(40480700001)(336012)(36860700001)(2616005)(426003)(47076005)(83380400001)(7696005)(86362001)(478600001)(82740400003)(6666004)(186003)(26005)(81166007)(16526019)(356005)(70586007)(70206006)(8936002)(8676002)(4326008)(41300700001)(5660300002)(36900700001);DIR:OUT;SFP:1101; X-OriginatorOrg: amd.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 28 Dec 2022 05:00:07.7330 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 9e81d745-53f6-4ac3-26d5-08dae890640c 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: BN8NAM11FT050.eop-nam11.prod.protection.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: LV2PR12MB5967 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain 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 --- .../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..d486539658f --- /dev/null +++ b/MdeModulePkg/Library/BaseIpmiCommandLibNull/BaseIpmiCommandLibNull.in= f @@ -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) 2022 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..4f0c49b048c --- /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) 2022 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 EFI_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 EFI_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 EFI_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 EFI_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 EFI_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 EFI_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 EFI_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 EFI_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 EFI_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 EFI_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 EFI_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 EFI_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 EFI_UNSUPPORTED; +} diff --git a/MdeModulePkg/Library/BaseIpmiCommandLibNull/IpmiCommandLibNetF= nChassis.c b/MdeModulePkg/Library/BaseIpmiCommandLibNull/IpmiCommandLibNetF= nChassis.c new file mode 100644 index 00000000000..32126b466bb --- /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) 2022 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 EFI_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 EFI_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 EFI_UNSUPPORTED; +} + +/** + This function sets power restore policy. + + @param[in] ChassisControlRequest The set power restore policy contro= l + 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 EFI_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 EFI_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 EFI_UNSUPPORTED; +} diff --git a/MdeModulePkg/Library/BaseIpmiCommandLibNull/IpmiCommandLibNetF= nStorage.c b/MdeModulePkg/Library/BaseIpmiCommandLibNull/IpmiCommandLibNetF= nStorage.c new file mode 100644 index 00000000000..c94f55fbdaf --- /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) 2022 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 EFI_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 re= sponse 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 EFI_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 EFI_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 EFI_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 re= sponse 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 EFI_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 EFI_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 EFI_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 EFI_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 EFI_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 EFI_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 EFI_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 r= esponse data. + When out, the exact size of respo= nse 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 EFI_UNSUPPORTED; +} diff --git a/MdeModulePkg/Library/BaseIpmiCommandLibNull/IpmiCommandLibNetF= nTransport.c b/MdeModulePkg/Library/BaseIpmiCommandLibNull/IpmiCommandLibNe= tFnTransport.c new file mode 100644 index 00000000000..219de5bc7da --- /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) 2022 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 EFI_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 EFI_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 EFI_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 EFI_UNSUPPORTED; +} --=20 2.37.1.windows.1