]> git.proxmox.com Git - mirror_edk2.git/blob - MdeModulePkg/Include/Protocol/IpmiProtocol.h
MdeModulePkg: Replace BSD License with BSD+Patent License
[mirror_edk2.git] / MdeModulePkg / Include / Protocol / IpmiProtocol.h
1 /** @file
2 Protocol of Ipmi for both SMS and SMM.
3
4 Copyright (c) 2009 - 2015, Intel Corporation. All rights reserved.<BR>
5 SPDX-License-Identifier: BSD-2-Clause-Patent
6
7 **/
8
9 #ifndef _IPMI_PROTOCOL_H_
10 #define _IPMI_PROTOCOL_H_
11
12 typedef struct _IPMI_PROTOCOL IPMI_PROTOCOL;
13
14 #define IPMI_PROTOCOL_GUID \
15 { \
16 0xdbc6381f, 0x5554, 0x4d14, 0x8f, 0xfd, 0x76, 0xd7, 0x87, 0xb8, 0xac, 0xbf \
17 }
18
19 #define SMM_IPMI_PROTOCOL_GUID \
20 { \
21 0x5169af60, 0x8c5a, 0x4243, 0xb3, 0xe9, 0x56, 0xc5, 0x6d, 0x18, 0xee, 0x26 \
22 }
23
24
25 /**
26 This service enables submitting commands via Ipmi.
27
28 @param[in] This This point for IPMI_PROTOCOL structure.
29 @param[in] NetFunction Net function of the command.
30 @param[in] Command IPMI Command.
31 @param[in] RequestData Command Request Data.
32 @param[in] RequestDataSize Size of Command Request Data.
33 @param[out] ResponseData Command Response Data. The completion code is the first byte of response data.
34 @param[in, out] ResponseDataSize Size of Command Response Data.
35
36 @retval EFI_SUCCESS The command byte stream was successfully submit to the device and a response was successfully received.
37 @retval EFI_NOT_FOUND The command was not successfully sent to the device or a response was not successfully received from the device.
38 @retval EFI_NOT_READY Ipmi Device is not ready for Ipmi command access.
39 @retval EFI_DEVICE_ERROR Ipmi Device hardware error.
40 @retval EFI_TIMEOUT The command time out.
41 @retval EFI_UNSUPPORTED The command was not successfully sent to the device.
42 @retval EFI_OUT_OF_RESOURCES The resource allcation is out of resource or data size error.
43 **/
44 typedef
45 EFI_STATUS
46 (EFIAPI *IPMI_SUBMIT_COMMAND) (
47 IN IPMI_PROTOCOL *This,
48 IN UINT8 NetFunction,
49 IN UINT8 Command,
50 IN UINT8 *RequestData,
51 IN UINT32 RequestDataSize,
52 OUT UINT8 *ResponseData,
53 IN OUT UINT32 *ResponseDataSize
54 );
55
56 //
57 // IPMI COMMAND PROTOCOL
58 //
59 struct _IPMI_PROTOCOL{
60 IPMI_SUBMIT_COMMAND IpmiSubmitCommand;
61 };
62
63 extern EFI_GUID gIpmiProtocolGuid;
64 extern EFI_GUID gSmmIpmiProtocolGuid;
65
66 #endif