summaryrefslogtreecommitdiff
path: root/Platform/Intel/AdvancedFeaturePkg/Ipmi/Library
diff options
context:
space:
mode:
Diffstat (limited to 'Platform/Intel/AdvancedFeaturePkg/Ipmi/Library')
-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
-rw-r--r--Platform/Intel/AdvancedFeaturePkg/Ipmi/Library/IpmiLibNull/IpmiLibNull.c52
-rw-r--r--Platform/Intel/AdvancedFeaturePkg/Ipmi/Library/IpmiLibNull/IpmiLibNull.inf34
-rw-r--r--Platform/Intel/AdvancedFeaturePkg/Ipmi/Library/IpmiPlatformHookLibNull/IpmiPlatformHookLibNull.c42
-rw-r--r--Platform/Intel/AdvancedFeaturePkg/Ipmi/Library/IpmiPlatformHookLibNull/IpmiPlatformHookLibNull.inf35
9 files changed, 934 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;
+}
diff --git a/Platform/Intel/AdvancedFeaturePkg/Ipmi/Library/IpmiLibNull/IpmiLibNull.c b/Platform/Intel/AdvancedFeaturePkg/Ipmi/Library/IpmiLibNull/IpmiLibNull.c
new file mode 100644
index 0000000000..cdeac9d651
--- /dev/null
+++ b/Platform/Intel/AdvancedFeaturePkg/Ipmi/Library/IpmiLibNull/IpmiLibNull.c
@@ -0,0 +1,52 @@
+/** @file
+ IPMI 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 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/DebugLib.h>
+
+#include <IndustryStandard/Ipmi.h>
+#include <IpmiEx.h>
+
+/**
+ This service enables submitting commands via Ipmi.
+
+ @param[in] NetFunction Net function of the command.
+ @param[in] Command IPMI Command.
+ @param[in] RequestData Command Request Data.
+ @param[in] RequestDataSize Size of Command Request Data.
+ @param[out] ResponseData Command Response Data. The completion code is the first byte of response data.
+ @param[in, out] ResponseDataSize Size of Command Response Data.
+
+ @retval EFI_SUCCESS The command byte stream was successfully submit to the device and a response was successfully received.
+ @retval EFI_NOT_FOUND The command was not successfully sent to the device or a response was not successfully received from the device.
+ @retval EFI_NOT_READY Ipmi Device is not ready for Ipmi command access.
+ @retval EFI_DEVICE_ERROR Ipmi Device hardware error.
+ @retval EFI_TIMEOUT The command time out.
+ @retval EFI_UNSUPPORTED The command was not successfully sent to the device.
+ @retval EFI_OUT_OF_RESOURCES The resource allcation is out of resource or data size error.
+**/
+EFI_STATUS
+EFIAPI
+IpmiSubmitCommand (
+ IN UINT8 NetFunction,
+ IN UINT8 Command,
+ IN UINT8 *RequestData,
+ IN UINT32 RequestDataSize,
+ OUT UINT8 *ResponseData,
+ IN OUT UINT32 *ResponseDataSize
+ )
+{
+ return EFI_UNSUPPORTED;
+}
+
diff --git a/Platform/Intel/AdvancedFeaturePkg/Ipmi/Library/IpmiLibNull/IpmiLibNull.inf b/Platform/Intel/AdvancedFeaturePkg/Ipmi/Library/IpmiLibNull/IpmiLibNull.inf
new file mode 100644
index 0000000000..c1860fbcae
--- /dev/null
+++ b/Platform/Intel/AdvancedFeaturePkg/Ipmi/Library/IpmiLibNull/IpmiLibNull.inf
@@ -0,0 +1,34 @@
+### @file
+# Component description file for IPMI NULL 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 = IpmiLibNull
+ FILE_GUID = DDF0E1D9-F53F-429A-BD9C-5D12A321E625
+ MODULE_TYPE = UEFI_DRIVER
+ VERSION_STRING = 1.0
+ LIBRARY_CLASS = IpmiLib
+
+[sources]
+ IpmiLibNull.c
+
+[Packages]
+ MdePkg/MdePkg.dec
+ MdeModulePkg/MdeModulePkg.dec
+ AdvancedFeaturePkg/AdvancedFeaturePkg.dec
+
+[LibraryClasses]
+
+[Pcd]
diff --git a/Platform/Intel/AdvancedFeaturePkg/Ipmi/Library/IpmiPlatformHookLibNull/IpmiPlatformHookLibNull.c b/Platform/Intel/AdvancedFeaturePkg/Ipmi/Library/IpmiPlatformHookLibNull/IpmiPlatformHookLibNull.c
new file mode 100644
index 0000000000..4c8cb2af23
--- /dev/null
+++ b/Platform/Intel/AdvancedFeaturePkg/Ipmi/Library/IpmiPlatformHookLibNull/IpmiPlatformHookLibNull.c
@@ -0,0 +1,42 @@
+/** @file
+ IPMI platform hook 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 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 <Library/IpmiPlatformHookLib.h>
+
+//
+// Prototype definitions for IPMI Platform Update Library
+//
+EFI_STATUS
+EFIAPI
+PlatformIpmiIoRangeSet(
+ UINT16 IpmiIoBase
+ )
+/*++
+
+ Routine Description:
+
+ This function sets IPMI Io range
+
+ Arguments:
+
+ IpmiIoBase
+
+ Returns:
+
+ Status
+
+--*/
+{
+ return EFI_SUCCESS;
+}
diff --git a/Platform/Intel/AdvancedFeaturePkg/Ipmi/Library/IpmiPlatformHookLibNull/IpmiPlatformHookLibNull.inf b/Platform/Intel/AdvancedFeaturePkg/Ipmi/Library/IpmiPlatformHookLibNull/IpmiPlatformHookLibNull.inf
new file mode 100644
index 0000000000..bc4ad96690
--- /dev/null
+++ b/Platform/Intel/AdvancedFeaturePkg/Ipmi/Library/IpmiPlatformHookLibNull/IpmiPlatformHookLibNull.inf
@@ -0,0 +1,35 @@
+### @file
+# Component description file for IPMI platform 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 = IpmiPlatformHookLibNull
+ FILE_GUID = C31A5B17-81DB-4D86-B376-17711BB6E0A5
+ MODULE_TYPE = BASE
+ VERSION_STRING = 1.0
+ LIBRARY_CLASS = IpmiPlatformHookLib
+
+[sources]
+ IpmiPlatformHookLibNull.c
+
+[Packages]
+ MdePkg/MdePkg.dec
+ AdvancedFeaturePkg/AdvancedFeaturePkg.dec
+
+[LibraryClasses]
+ DebugLib
+
+[Protocols]
+ gEfiIpmiTransportProtocolGuid