TianoCore EDK2
master
Loading...
Searching...
No Matches
SmmIpmiLibSmmIpmiProtocol.c
Go to the documentation of this file.
1
9
#include <
PiSmm.h
>
10
#include <
Protocol/IpmiProtocol.h
>
11
#include <
Library/IpmiLib.h
>
12
#include <
Library/SmmServicesTableLib.h
>
13
#include <
Library/DebugLib.h
>
14
15
IPMI_PROTOCOL
*mIpmiProtocol =
NULL
;
16
35
EFI_STATUS
36
EFIAPI
37
IpmiSubmitCommand
(
38
IN
UINT8 NetFunction,
39
IN
UINT8 Command,
40
IN
UINT8 *RequestData,
41
IN
UINT32 RequestDataSize,
42
OUT
UINT8 *ResponseData,
43
IN
OUT
UINT32 *ResponseDataSize
44
)
45
{
46
EFI_STATUS
Status;
47
48
if
(mIpmiProtocol ==
NULL
) {
49
Status =
gSmst
->SmmLocateProtocol (
50
&gSmmIpmiProtocolGuid,
51
NULL
,
52
(VOID **)&mIpmiProtocol
53
);
54
if
(EFI_ERROR (Status)) {
55
//
56
// Smm Ipmi Protocol is not installed. So, IPMI device is not present.
57
//
58
DEBUG
((DEBUG_ERROR,
"IpmiSubmitCommand for SMM Status - %r\n"
, Status));
59
return
EFI_NOT_FOUND;
60
}
61
}
62
63
Status = mIpmiProtocol->IpmiSubmitCommand (
64
mIpmiProtocol,
65
NetFunction,
66
Command,
67
RequestData,
68
RequestDataSize,
69
ResponseData,
70
ResponseDataSize
71
);
72
if
(EFI_ERROR (Status)) {
73
return
Status;
74
}
75
76
return
EFI_SUCCESS
;
77
}
IpmiLib.h
IpmiProtocol.h
NULL
#define NULL
Definition:
Base.h:319
IN
#define IN
Definition:
Base.h:279
OUT
#define OUT
Definition:
Base.h:284
DebugLib.h
DEBUG
#define DEBUG(Expression)
Definition:
DebugLib.h:434
PiSmm.h
gSmst
EFI_SMM_SYSTEM_TABLE2 * gSmst
Definition:
PiSmmCoreSmmServicesTableLib.c:13
IpmiSubmitCommand
EFI_STATUS EFIAPI IpmiSubmitCommand(IN UINT8 NetFunction, IN UINT8 Command, IN UINT8 *RequestData, IN UINT32 RequestDataSize, OUT UINT8 *ResponseData, IN OUT UINT32 *ResponseDataSize)
Definition:
SmmIpmiLibSmmIpmiProtocol.c:37
SmmServicesTableLib.h
EFI_STATUS
RETURN_STATUS EFI_STATUS
Definition:
UefiBaseType.h:29
EFI_SUCCESS
#define EFI_SUCCESS
Definition:
UefiBaseType.h:112
_IPMI_PROTOCOL
Definition:
IpmiProtocol.h:58
MdeModulePkg
Library
SmmIpmiLibSmmIpmiProtocol
SmmIpmiLibSmmIpmiProtocol.c
Generated on Fri Nov 15 2024 18:01:12 for TianoCore EDK2 by
1.9.6