summaryrefslogtreecommitdiff
path: root/Platform/Intel/AdvancedFeaturePkg/Ipmi/Library/IpmiCommandLib
diff options
context:
space:
mode:
Diffstat (limited to 'Platform/Intel/AdvancedFeaturePkg/Ipmi/Library/IpmiCommandLib')
-rw-r--r--Platform/Intel/AdvancedFeaturePkg/Ipmi/Library/IpmiCommandLib/IpmiCommandLib.inf38
-rw-r--r--Platform/Intel/AdvancedFeaturePkg/Ipmi/Library/IpmiCommandLib/IpmiCommandLibNetFnApp.c255
-rw-r--r--Platform/Intel/AdvancedFeaturePkg/Ipmi/Library/IpmiCommandLib/IpmiCommandLibNetFnChassis.c108
-rw-r--r--Platform/Intel/AdvancedFeaturePkg/Ipmi/Library/IpmiCommandLib/IpmiCommandLibNetFnStorage.c282
-rw-r--r--Platform/Intel/AdvancedFeaturePkg/Ipmi/Library/IpmiCommandLib/IpmiCommandLibNetFnTransport.c88
5 files changed, 771 insertions, 0 deletions
diff --git a/Platform/Intel/AdvancedFeaturePkg/Ipmi/Library/IpmiCommandLib/IpmiCommandLib.inf b/Platform/Intel/AdvancedFeaturePkg/Ipmi/Library/IpmiCommandLib/IpmiCommandLib.inf
new file mode 100644
index 0000000000..5c8b19c4df
--- /dev/null
+++ b/Platform/Intel/AdvancedFeaturePkg/Ipmi/Library/IpmiCommandLib/IpmiCommandLib.inf
@@ -0,0 +1,38 @@
+### @file
+# Component description file for IPMI Command Library.
+#
+# Copyright (c) 2018, Intel Corporation. All rights reserved.<BR>
+#
+# This program and the accompanying materials are licensed and made available under
+# the terms and conditions of the BSD License which accompanies this distribution.
+# The full text of the license may be found at
+# http://opensource.org/licenses/bsd-license.php
+#
+# THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
+# WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
+#
+###
+
+[Defines]
+ INF_VERSION = 0x00010005
+ BASE_NAME = IpmiCommandLib
+ FILE_GUID = E599C9C7-5913-40A0-8669-67282E2BEC53
+ MODULE_TYPE = UEFI_DRIVER
+ VERSION_STRING = 1.0
+ LIBRARY_CLASS = IpmiCommandLib
+
+[sources]
+ IpmiCommandLibNetFnApp.c
+ IpmiCommandLibNetFnTransport.c
+ IpmiCommandLibNetFnChassis.c
+ IpmiCommandLibNetFnStorage.c
+
+[Packages]
+ MdePkg/MdePkg.dec
+ MdeModulePkg/MdeModulePkg.dec
+ AdvancedFeaturePkg/AdvancedFeaturePkg.dec
+
+[LibraryClasses]
+ BaseMemoryLib
+ DebugLib
+ IpmiLib
diff --git a/Platform/Intel/AdvancedFeaturePkg/Ipmi/Library/IpmiCommandLib/IpmiCommandLibNetFnApp.c b/Platform/Intel/AdvancedFeaturePkg/Ipmi/Library/IpmiCommandLib/IpmiCommandLibNetFnApp.c
new file mode 100644
index 0000000000..f11b23a439
--- /dev/null
+++ b/Platform/Intel/AdvancedFeaturePkg/Ipmi/Library/IpmiCommandLib/IpmiCommandLibNetFnApp.c
@@ -0,0 +1,255 @@
+/** @file
+ IPMI Command - NetFnApp.
+
+Copyright (c) 2018, Intel Corporation. All rights reserved.<BR>
+This program and the accompanying materials are licensed and made available under
+the terms and conditions of the BSD License that accompanies this distribution.
+The full text of the license may be found at
+http://opensource.org/licenses/bsd-license.php.
+
+THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
+WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
+
+**/
+
+#include <PiPei.h>
+#include <Library/BaseMemoryLib.h>
+#include <Library/DebugLib.h>
+#include <Library/IpmiLib.h>
+
+#include <IndustryStandard/Ipmi.h>
+#include <IpmiEx.h>
+
+EFI_STATUS
+EFIAPI
+IpmiGetDeviceId (
+ OUT IPMI_GET_DEVICE_ID_RESPONSE *DeviceId
+ )
+{
+ EFI_STATUS Status;
+ UINT32 DataSize;
+
+ DataSize = sizeof(*DeviceId);
+ Status = IpmiSubmitCommand (
+ IPMI_NETFN_APP,
+ IPMI_APP_GET_DEVICE_ID,
+ NULL,
+ 0,
+ (VOID *)DeviceId,
+ &DataSize
+ );
+ return Status;
+}
+
+EFI_STATUS
+EFIAPI
+IpmiGetSelfTestResult (
+ OUT IPMI_SELF_TEST_RESULT_RESPONSE *SelfTestResult
+ )
+{
+ EFI_STATUS Status;
+ UINT32 DataSize;
+
+ DataSize = sizeof(*SelfTestResult);
+ Status = IpmiSubmitCommand (
+ IPMI_NETFN_APP,
+ IPMI_APP_GET_SELFTEST_RESULTS,
+ NULL,
+ 0,
+ (VOID *)SelfTestResult,
+ &DataSize
+ );
+ return Status;
+}
+
+EFI_STATUS
+EFIAPI
+IpmiResetWatchdogTimer (
+ OUT UINT8 *CompletionCode
+ )
+{
+ EFI_STATUS Status;
+ UINT32 DataSize;
+
+ DataSize = sizeof(*CompletionCode);
+ Status = IpmiSubmitCommand (
+ IPMI_NETFN_APP,
+ IPMI_APP_RESET_WATCHDOG_TIMER,
+ NULL,
+ 0,
+ (VOID *)CompletionCode,
+ &DataSize
+ );
+ return Status;
+}
+
+EFI_STATUS
+EFIAPI
+IpmiSetWatchdogTimer (
+ IN IPMI_SET_WATCHDOG_TIMER_REQUEST *SetWatchdogTimer,
+ OUT UINT8 *CompletionCode
+ )
+{
+ EFI_STATUS Status;
+ UINT32 DataSize;
+
+ DataSize = sizeof(*CompletionCode);
+ Status = IpmiSubmitCommand (
+ IPMI_NETFN_APP,
+ IPMI_APP_SET_WATCHDOG_TIMER,
+ (VOID *)SetWatchdogTimer,
+ sizeof(*SetWatchdogTimer),
+ (VOID *)CompletionCode,
+ &DataSize
+ );
+ return Status;
+}
+
+EFI_STATUS
+EFIAPI
+IpmiGetWatchdogTimer (
+ OUT IPMI_GET_WATCHDOG_TIMER_RESPONSE *GetWatchdogTimer
+ )
+{
+ EFI_STATUS Status;
+ UINT32 DataSize;
+
+ DataSize = sizeof(*GetWatchdogTimer);
+ Status = IpmiSubmitCommand (
+ IPMI_NETFN_APP,
+ IPMI_APP_GET_WATCHDOG_TIMER,
+ NULL,
+ 0,
+ (VOID *)GetWatchdogTimer,
+ &DataSize
+ );
+ return Status;
+}
+
+EFI_STATUS
+EFIAPI
+IpmiSetBmcGlobalEnables (
+ IN IPMI_SET_BMC_GLOBAL_ENABLES_REQUEST *SetBmcGlobalEnables,
+ OUT UINT8 *CompletionCode
+ )
+{
+ EFI_STATUS Status;
+ UINT32 DataSize;
+
+ DataSize = sizeof(*CompletionCode);
+ Status = IpmiSubmitCommand (
+ IPMI_NETFN_APP,
+ IPMI_APP_SET_BMC_GLOBAL_ENABLES,
+ (VOID *)SetBmcGlobalEnables,
+ sizeof(*SetBmcGlobalEnables),
+ (VOID *)CompletionCode,
+ &DataSize
+ );
+ return Status;
+}
+
+EFI_STATUS
+EFIAPI
+IpmiGetBmcGlobalEnables (
+ OUT IPMI_GET_BMC_GLOBAL_ENABLES_RESPONSE *GetBmcGlobalEnables
+ )
+{
+ EFI_STATUS Status;
+ UINT32 DataSize;
+
+ DataSize = sizeof(*GetBmcGlobalEnables);
+ Status = IpmiSubmitCommand (
+ IPMI_NETFN_APP,
+ IPMI_APP_GET_BMC_GLOBAL_ENABLES,
+ NULL,
+ 0,
+ (VOID *)GetBmcGlobalEnables,
+ &DataSize
+ );
+ return Status;
+}
+
+EFI_STATUS
+EFIAPI
+IpmiClearMessageFlags (
+ IN IPMI_CLEAR_MESSAGE_FLAGS_REQUEST *ClearMessageFlagsRequest,
+ OUT UINT8 *CompletionCode
+ )
+{
+ EFI_STATUS Status;
+ UINT32 DataSize;
+
+ DataSize = sizeof(*CompletionCode);
+ Status = IpmiSubmitCommand (
+ IPMI_NETFN_APP,
+ IPMI_APP_CLEAR_MESSAGE_FLAGS,
+ (VOID *)ClearMessageFlagsRequest,
+ sizeof(*ClearMessageFlagsRequest),
+ (VOID *)CompletionCode,
+ &DataSize
+ );
+ return Status;
+}
+
+EFI_STATUS
+EFIAPI
+IpmiGetMessageFlags (
+ OUT IPMI_GET_MESSAGE_FLAGS_RESPONSE *GetMessageFlagsResponse
+ )
+{
+ EFI_STATUS Status;
+ UINT32 DataSize;
+
+ DataSize = sizeof(*GetMessageFlagsResponse);
+ Status = IpmiSubmitCommand (
+ IPMI_NETFN_APP,
+ IPMI_APP_GET_MESSAGE_FLAGS,
+ NULL,
+ 0,
+ (VOID *)GetMessageFlagsResponse,
+ &DataSize
+ );
+ return Status;
+}
+
+EFI_STATUS
+EFIAPI
+IpmiGetMessage (
+ OUT IPMI_GET_MESSAGE_RESPONSE *GetMessageResponse,
+ IN OUT UINT32 *GetMessageResponseSize
+ )
+{
+ EFI_STATUS Status;
+
+ Status = IpmiSubmitCommand (
+ IPMI_NETFN_APP,
+ IPMI_APP_GET_MESSAGE,
+ NULL,
+ 0,
+ (VOID *)GetMessageResponse,
+ GetMessageResponseSize
+ );
+ return Status;
+}
+
+EFI_STATUS
+EFIAPI
+IpmiSendMessage (
+ IN IPMI_SEND_MESSAGE_REQUEST *SendMessageRequest,
+ IN UINT32 SendMessageRequestSize,
+ OUT IPMI_SEND_MESSAGE_RESPONSE *SendMessageResponse,
+ IN OUT UINT32 *SendMessageResponseSize
+ )
+{
+ EFI_STATUS Status;
+
+ Status = IpmiSubmitCommand (
+ IPMI_NETFN_APP,
+ IPMI_APP_SEND_MESSAGE,
+ (VOID *)SendMessageRequest,
+ SendMessageRequestSize,
+ (VOID *)SendMessageResponse,
+ SendMessageResponseSize
+ );
+ return Status;
+}
diff --git a/Platform/Intel/AdvancedFeaturePkg/Ipmi/Library/IpmiCommandLib/IpmiCommandLibNetFnChassis.c b/Platform/Intel/AdvancedFeaturePkg/Ipmi/Library/IpmiCommandLib/IpmiCommandLibNetFnChassis.c
new file mode 100644
index 0000000000..eb699907a2
--- /dev/null
+++ b/Platform/Intel/AdvancedFeaturePkg/Ipmi/Library/IpmiCommandLib/IpmiCommandLibNetFnChassis.c
@@ -0,0 +1,108 @@
+/** @file
+ IPMI Command - NetFnChassis.
+
+Copyright (c) 2018, Intel Corporation. All rights reserved.<BR>
+This program and the accompanying materials are licensed and made available under
+the terms and conditions of the BSD License that accompanies this distribution.
+The full text of the license may be found at
+http://opensource.org/licenses/bsd-license.php.
+
+THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
+WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
+
+**/
+
+#include <PiPei.h>
+#include <Library/BaseMemoryLib.h>
+#include <Library/DebugLib.h>
+#include <Library/IpmiLib.h>
+
+#include <IndustryStandard/Ipmi.h>
+#include <IpmiEx.h>
+
+
+EFI_STATUS
+EFIAPI
+IpmiGetChassisCapabilities (
+ OUT IPMI_GET_CHASSIS_CAPABILITIES_RESPONSE *GetChassisCapabilitiesResponse
+ )
+{
+ EFI_STATUS Status;
+ UINT32 DataSize;
+
+ DataSize = sizeof(*GetChassisCapabilitiesResponse);
+ Status = IpmiSubmitCommand (
+ IPMI_NETFN_CHASSIS,
+ IPMI_CHASSIS_GET_CAPABILITIES,
+ NULL,
+ 0,
+ (VOID *)GetChassisCapabilitiesResponse,
+ &DataSize
+ );
+ return Status;
+}
+
+EFI_STATUS
+EFIAPI
+IpmiGetChassisStatus (
+ OUT IPMI_GET_CHASSIS_STATUS_RESPONSE *GetChassisStatusResponse
+ )
+{
+ EFI_STATUS Status;
+ UINT32 DataSize;
+
+ DataSize = sizeof(*GetChassisStatusResponse);
+ Status = IpmiSubmitCommand (
+ IPMI_NETFN_CHASSIS,
+ IPMI_CHASSIS_GET_STATUS,
+ NULL,
+ 0,
+ (VOID *)GetChassisStatusResponse,
+ &DataSize
+ );
+ return Status;
+}
+
+EFI_STATUS
+EFIAPI
+IpmiChassisControl (
+ IN IPMI_CHASSIS_CONTROL_REQUEST *ChassisControlRequest,
+ OUT UINT8 *CompletionCode
+ )
+{
+ EFI_STATUS Status;
+ UINT32 DataSize;
+
+ DataSize = sizeof(*CompletionCode);
+ Status = IpmiSubmitCommand (
+ IPMI_NETFN_CHASSIS,
+ IPMI_CHASSIS_CONTROL,
+ (VOID *)ChassisControlRequest,
+ sizeof(*ChassisControlRequest),
+ (VOID *)CompletionCode,
+ &DataSize
+ );
+ return Status;
+}
+
+EFI_STATUS
+EFIAPI
+IpmiSetPowerRestorePolicy (
+ IN IPMI_SET_POWER_RESTORE_POLICY_REQUEST *ChassisControlRequest,
+ OUT IPMI_SET_POWER_RESTORE_POLICY_RESPONSE *ChassisControlResponse
+ )
+{
+ EFI_STATUS Status;
+ UINT32 DataSize;
+
+ DataSize = sizeof(*ChassisControlResponse);
+ Status = IpmiSubmitCommand (
+ IPMI_NETFN_CHASSIS,
+ IPMI_CHASSIS_SET_POWER_RESTORE_POLICY,
+ (VOID *)ChassisControlRequest,
+ sizeof(*ChassisControlRequest),
+ (VOID *)ChassisControlResponse,
+ &DataSize
+ );
+ return Status;
+}
diff --git a/Platform/Intel/AdvancedFeaturePkg/Ipmi/Library/IpmiCommandLib/IpmiCommandLibNetFnStorage.c b/Platform/Intel/AdvancedFeaturePkg/Ipmi/Library/IpmiCommandLib/IpmiCommandLibNetFnStorage.c
new file mode 100644
index 0000000000..ce2b7b9eb8
--- /dev/null
+++ b/Platform/Intel/AdvancedFeaturePkg/Ipmi/Library/IpmiCommandLib/IpmiCommandLibNetFnStorage.c
@@ -0,0 +1,282 @@
+/** @file
+ IPMI Command - NetFnStorage.
+
+Copyright (c) 2018, Intel Corporation. All rights reserved.<BR>
+This program and the accompanying materials are licensed and made available under
+the terms and conditions of the BSD License that accompanies this distribution.
+The full text of the license may be found at
+http://opensource.org/licenses/bsd-license.php.
+
+THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
+WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
+
+**/
+
+#include <PiPei.h>
+#include <Library/BaseMemoryLib.h>
+#include <Library/DebugLib.h>
+#include <Library/IpmiLib.h>
+
+#include <IndustryStandard/Ipmi.h>
+#include <IpmiEx.h>
+
+
+EFI_STATUS
+EFIAPI
+IpmiGetFruInventoryAreaInfo (
+ IN IPMI_GET_FRU_INVENTORY_AREA_INFO_REQUEST *GetFruInventoryAreaInfoRequest,
+ OUT IPMI_GET_FRU_INVENTORY_AREA_INFO_RESPONSE *GetFruInventoryAreaInfoResponse
+ )
+{
+ EFI_STATUS Status;
+ UINT32 DataSize;
+
+ DataSize = sizeof(*GetFruInventoryAreaInfoResponse);
+ Status = IpmiSubmitCommand (
+ IPMI_NETFN_STORAGE,
+ IPMI_STORAGE_GET_FRU_INVENTORY_AREAINFO,
+ (VOID *)GetFruInventoryAreaInfoRequest,
+ sizeof(*GetFruInventoryAreaInfoRequest),
+ (VOID *)GetFruInventoryAreaInfoResponse,
+ &DataSize
+ );
+ return Status;
+}
+
+EFI_STATUS
+EFIAPI
+IpmiReadFruData (
+ IN IPMI_READ_FRU_DATA_REQUEST *ReadFruDataRequest,
+ OUT IPMI_READ_FRU_DATA_RESPONSE *ReadFruDataResponse,
+ IN OUT UINT32 *ReadFruDataResponseSize
+ )
+{
+ EFI_STATUS Status;
+
+ Status = IpmiSubmitCommand (
+ IPMI_NETFN_STORAGE,
+ IPMI_STORAGE_READ_FRU_DATA,
+ (VOID *)ReadFruDataRequest,
+ sizeof(*ReadFruDataRequest),
+ (VOID *)ReadFruDataResponse,
+ ReadFruDataResponseSize
+ );
+ return Status;
+}
+
+EFI_STATUS
+EFIAPI
+IpmiWriteFruData (
+ IN IPMI_WRITE_FRU_DATA_REQUEST *WriteFruDataRequest,
+ IN UINT32 WriteFruDataRequestSize,
+ OUT IPMI_WRITE_FRU_DATA_RESPONSE *WriteFruDataResponse
+ )
+{
+ EFI_STATUS Status;
+ UINT32 DataSize;
+
+ DataSize = sizeof(*WriteFruDataResponse);
+ Status = IpmiSubmitCommand (
+ IPMI_NETFN_STORAGE,
+ IPMI_STORAGE_WRITE_FRU_DATA,
+ (VOID *)WriteFruDataRequest,
+ WriteFruDataRequestSize,
+ (VOID *)WriteFruDataResponse,
+ &DataSize
+ );
+ return Status;
+}
+
+EFI_STATUS
+EFIAPI
+IpmiGetSelInfo (
+ OUT IPMI_GET_SEL_INFO_RESPONSE *GetSelInfoResponse
+ )
+{
+ EFI_STATUS Status;
+ UINT32 DataSize;
+
+ DataSize = sizeof(*GetSelInfoResponse);
+ Status = IpmiSubmitCommand (
+ IPMI_NETFN_STORAGE,
+ IPMI_STORAGE_GET_SEL_INFO,
+ NULL,
+ 0,
+ (VOID *)GetSelInfoResponse,
+ &DataSize
+ );
+ return Status;
+}
+
+EFI_STATUS
+EFIAPI
+IpmiGetSelEntry (
+ IN IPMI_GET_SEL_ENTRY_REQUEST *GetSelEntryRequest,
+ OUT IPMI_GET_SEL_ENTRY_RESPONSE *GetSelEntryResponse,
+ IN OUT UINT32 *GetSelEntryResponseSize
+ )
+{
+ EFI_STATUS Status;
+
+ Status = IpmiSubmitCommand (
+ IPMI_NETFN_STORAGE,
+ IPMI_STORAGE_GET_SEL_ENTRY,
+ (VOID *)GetSelEntryRequest,
+ sizeof(*GetSelEntryRequest),
+ (VOID *)GetSelEntryResponse,
+ GetSelEntryResponseSize
+ );
+ return Status;
+}
+
+EFI_STATUS
+EFIAPI
+IpmiAddSelEntry (
+ IN IPMI_ADD_SEL_ENTRY_REQUEST *AddSelEntryRequest,
+ OUT IPMI_ADD_SEL_ENTRY_RESPONSE *AddSelEntryResponse
+ )
+{
+ EFI_STATUS Status;
+ UINT32 DataSize;
+
+ DataSize = sizeof(*AddSelEntryResponse);
+ Status = IpmiSubmitCommand (
+ IPMI_NETFN_STORAGE,
+ IPMI_STORAGE_ADD_SEL_ENTRY,
+ (VOID *)AddSelEntryRequest,
+ sizeof(*AddSelEntryRequest),
+ (VOID *)AddSelEntryResponse,
+ &DataSize
+ );
+ return Status;
+}
+
+EFI_STATUS
+EFIAPI
+IpmiPartialAddSelEntry (
+ IN IPMI_PARTIAL_ADD_SEL_ENTRY_REQUEST *PartialAddSelEntryRequest,
+ IN UINT32 PartialAddSelEntryRequestSize,
+ OUT IPMI_PARTIAL_ADD_SEL_ENTRY_RESPONSE *PartialAddSelEntryResponse
+ )
+{
+ EFI_STATUS Status;
+ UINT32 DataSize;
+
+ DataSize = sizeof(*PartialAddSelEntryResponse);
+ Status = IpmiSubmitCommand (
+ IPMI_NETFN_STORAGE,
+ IPMI_STORAGE_PARTIAL_ADD_SEL_ENTRY,
+ (VOID *)PartialAddSelEntryRequest,
+ PartialAddSelEntryRequestSize,
+ (VOID *)PartialAddSelEntryResponse,
+ &DataSize
+ );
+ return Status;
+}
+
+EFI_STATUS
+EFIAPI
+IpmiClearSel (
+ IN IPMI_CLEAR_SEL_REQUEST *ClearSelRequest,
+ OUT IPMI_CLEAR_SEL_RESPONSE *ClearSelResponse
+ )
+{
+ EFI_STATUS Status;
+ UINT32 DataSize;
+
+ DataSize = sizeof(*ClearSelResponse);
+ Status = IpmiSubmitCommand (
+ IPMI_NETFN_STORAGE,
+ IPMI_STORAGE_CLEAR_SEL,
+ (VOID *)ClearSelRequest,
+ sizeof(*ClearSelRequest),
+ (VOID *)ClearSelResponse,
+ &DataSize
+ );
+ return Status;
+}
+
+EFI_STATUS
+EFIAPI
+IpmiGetSelTime (
+ OUT IPMI_GET_SEL_TIME_RESPONSE *GetSelTimeResponse
+ )
+{
+ EFI_STATUS Status;
+ UINT32 DataSize;
+
+ DataSize = sizeof(*GetSelTimeResponse);
+ Status = IpmiSubmitCommand (
+ IPMI_NETFN_STORAGE,
+ IPMI_STORAGE_GET_SEL_TIME,
+ NULL,
+ 0,
+ (VOID *)GetSelTimeResponse,
+ &DataSize
+ );
+ return Status;
+}
+
+EFI_STATUS
+EFIAPI
+IpmiSetSelTime (
+ IN IPMI_SET_SEL_TIME_REQUEST *SetSelTimeRequest,
+ OUT UINT8 *CompletionCode
+ )
+{
+ EFI_STATUS Status;
+ UINT32 DataSize;
+
+ DataSize = sizeof(*CompletionCode);
+ Status = IpmiSubmitCommand (
+ IPMI_NETFN_STORAGE,
+ IPMI_STORAGE_SET_SEL_TIME,
+ (VOID *)SetSelTimeRequest,
+ sizeof(*SetSelTimeRequest),
+ (VOID *)CompletionCode,
+ &DataSize
+ );
+ return Status;
+}
+
+EFI_STATUS
+EFIAPI
+IpmiGetSdrRepositoryInfo (
+ OUT IPMI_GET_SDR_REPOSITORY_INFO *GetSdrRepositoryInfo
+ )
+{
+ EFI_STATUS Status;
+ UINT32 DataSize;
+
+ DataSize = sizeof(*GetSdrRepositoryInfo);
+ Status = IpmiSubmitCommand (
+ IPMI_NETFN_STORAGE,
+ IPMI_STORAGE_GET_SDR_REPOSITORY_INFO,
+ NULL,
+ 0,
+ (VOID *)GetSdrRepositoryInfo,
+ &DataSize
+ );
+ return Status;
+}
+
+EFI_STATUS
+EFIAPI
+IpmiGetSdr (
+ IN IPMI_GET_SDR_REQUEST *GetSdrRequest,
+ OUT IPMI_GET_SDR_RESPONSE *GetSdrResponse,
+ IN OUT UINT32 *GetSdrResponseSize
+ )
+{
+ EFI_STATUS Status;
+
+ Status = IpmiSubmitCommand (
+ IPMI_NETFN_STORAGE,
+ IPMI_STORAGE_GET_SDR,
+ (VOID *)GetSdrRequest,
+ sizeof(*GetSdrRequest),
+ (VOID *)GetSdrResponse,
+ GetSdrResponseSize
+ );
+ return Status;
+}
diff --git a/Platform/Intel/AdvancedFeaturePkg/Ipmi/Library/IpmiCommandLib/IpmiCommandLibNetFnTransport.c b/Platform/Intel/AdvancedFeaturePkg/Ipmi/Library/IpmiCommandLib/IpmiCommandLibNetFnTransport.c
new file mode 100644
index 0000000000..925436e61e
--- /dev/null
+++ b/Platform/Intel/AdvancedFeaturePkg/Ipmi/Library/IpmiCommandLib/IpmiCommandLibNetFnTransport.c
@@ -0,0 +1,88 @@
+/** @file
+ IPMI Command - NetFnTransport.
+
+Copyright (c) 2018, Intel Corporation. All rights reserved.<BR>
+This program and the accompanying materials are licensed and made available under
+the terms and conditions of the BSD License that accompanies this distribution.
+The full text of the license may be found at
+http://opensource.org/licenses/bsd-license.php.
+
+THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
+WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
+
+**/
+
+#include <PiPei.h>
+#include <Library/BaseMemoryLib.h>
+#include <Library/DebugLib.h>
+#include <Library/IpmiLib.h>
+
+#include <IndustryStandard/Ipmi.h>
+#include <IpmiEx.h>
+
+
+EFI_STATUS
+EFIAPI
+IpmiSolActivating (
+ IN IPMI_SOL_ACTIVATING_REQUEST *SolActivatingRequest,
+ OUT UINT8 *CompletionCode
+ )
+{
+ EFI_STATUS Status;
+ UINT32 DataSize;
+
+ DataSize = sizeof(*CompletionCode);
+ Status = IpmiSubmitCommand (
+ IPMI_NETFN_TRANSPORT,
+ IPMI_TRANSPORT_SOL_ACTIVATING,
+ (VOID *)SolActivatingRequest,
+ sizeof(*SolActivatingRequest),
+ (VOID *)CompletionCode,
+ &DataSize
+ );
+ return Status;
+}
+
+EFI_STATUS
+EFIAPI
+IpmiSetSolConfigurationParameters (
+ IN IPMI_SET_SOL_CONFIGURATION_PARAMETERS_REQUEST *SetConfigurationParametersRequest,
+ IN UINT32 SetConfigurationParametersRequestSize,
+ OUT UINT8 *CompletionCode
+ )
+{
+ EFI_STATUS Status;
+ UINT32 DataSize;
+
+ DataSize = sizeof(*CompletionCode);
+ Status = IpmiSubmitCommand (
+ IPMI_NETFN_TRANSPORT,
+ IPMI_TRANSPORT_SET_SOL_CONFIG_PARAM,
+ (VOID *)SetConfigurationParametersRequest,
+ SetConfigurationParametersRequestSize,
+ (VOID *)CompletionCode,
+ &DataSize
+ );
+ return Status;
+}
+
+EFI_STATUS
+EFIAPI
+IpmiGetSolConfigurationParameters (
+ IN IPMI_GET_SOL_CONFIGURATION_PARAMETERS_REQUEST *GetConfigurationParametersRequest,
+ OUT IPMI_GET_SOL_CONFIGURATION_PARAMETERS_RESPONSE *GetConfigurationParametersResponse,
+ IN OUT UINT32 *GetConfigurationParametersResponseSize
+ )
+{
+ EFI_STATUS Status;
+
+ Status = IpmiSubmitCommand (
+ IPMI_NETFN_TRANSPORT,
+ IPMI_TRANSPORT_GET_SOL_CONFIG_PARAM,
+ (VOID *)GetConfigurationParametersRequest,
+ sizeof(*GetConfigurationParametersRequest),
+ (VOID *)GetConfigurationParametersResponse,
+ GetConfigurationParametersResponseSize
+ );
+ return Status;
+}