TianoCore EDK2
master
Loading...
Searching...
No Matches
PeiIpmiLibIpmiPpi.c
Go to the documentation of this file.
1
9
#include <
PiPei.h
>
10
#include <
Ppi/IpmiPpi.h
>
11
#include <
Library/IpmiLib.h
>
12
#include <
Library/PeiServicesLib.h
>
13
#include <
Library/DebugLib.h
>
14
33
EFI_STATUS
34
EFIAPI
35
IpmiSubmitCommand
(
36
IN
UINT8 NetFunction,
37
IN
UINT8 Command,
38
IN
UINT8 *RequestData,
39
IN
UINT32 RequestDataSize,
40
OUT
UINT8 *ResponseData,
41
IN
OUT
UINT32 *ResponseDataSize
42
)
43
{
44
EFI_STATUS
Status;
45
PEI_IPMI_PPI
*IpmiPpi;
46
47
Status =
PeiServicesLocatePpi
(
48
&gPeiIpmiPpiGuid,
49
0,
50
NULL
,
51
(VOID **)&IpmiPpi
52
);
53
if
(EFI_ERROR (Status)) {
54
//
55
// Ipmi Ppi is not installed. So, IPMI device is not present.
56
//
57
DEBUG
((DEBUG_ERROR,
"IpmiSubmitCommand in Pei Phase under SMS Status - %r\n"
, Status));
58
return
EFI_NOT_FOUND;
59
}
60
61
Status = IpmiPpi->IpmiSubmitCommand (
62
IpmiPpi,
63
NetFunction,
64
Command,
65
RequestData,
66
RequestDataSize,
67
ResponseData,
68
ResponseDataSize
69
);
70
if
(EFI_ERROR (Status)) {
71
return
Status;
72
}
73
74
return
EFI_SUCCESS
;
75
}
PeiServicesLocatePpi
EFI_STATUS EFIAPI PeiServicesLocatePpi(IN CONST EFI_GUID *Guid, IN UINTN Instance, IN OUT EFI_PEI_PPI_DESCRIPTOR **PpiDescriptor, IN OUT VOID **Ppi)
Definition:
PeiServicesLib.c:95
IpmiLib.h
IpmiPpi.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
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:
PeiIpmiLibIpmiPpi.c:35
PeiServicesLib.h
PiPei.h
EFI_STATUS
RETURN_STATUS EFI_STATUS
Definition:
UefiBaseType.h:29
EFI_SUCCESS
#define EFI_SUCCESS
Definition:
UefiBaseType.h:112
_PEI_IPMI_PPI
Definition:
IpmiPpi.h:53
MdeModulePkg
Library
PeiIpmiLibIpmiPpi
PeiIpmiLibIpmiPpi.c
Generated on Fri Nov 15 2024 18:01:12 for TianoCore EDK2 by
1.9.6