23 (
const unsigned char *) &req,
sizeof(req),
24 (
unsigned char *) &rsp,
sizeof(rsp));
28 "(ret=%d resp=0x%x), failed to initialize and start "
29 "IPMI BMC watchdog timer\n", __func__,
37 (
unsigned char *) &rsp,
sizeof(rsp));
41 "(ret=%d resp=0x%x), failed to initialize and start "
42 "IPMI BMC watchdog timer\n", __func__,
61 (
unsigned char *) &rsp,
sizeof(rsp));
63 if (ret <
sizeof(
struct ipmi_rsp) || rsp.resp.completion_code) {
65 "(ret=%d resp=0x%x), IPMI BMC watchdog timer may still "
66 "be running\n", __func__, ret,
67 rsp.resp.completion_code);
71 if (!(rsp.data.timer_use & (1 << 6))) {
76 rsp.data.timer_use &= ~(1 << 6);
77 rsp.data.initial_countdown_val = 0;
81 (
const unsigned char *) &req,
sizeof(req),
82 (
unsigned char *) &resp,
sizeof(resp));
84 if (ret <
sizeof(
struct ipmi_rsp) || resp.completion_code) {
86 "(ret=%d resp=0x%x), failed to stop IPMI "
87 "BMC watchdog timer\n", __func__, ret,
88 resp.completion_code);
109 (
unsigned char *) &rsp,
sizeof(rsp));
111 if (ret <
sizeof(
struct ipmi_rsp) || rsp.resp.completion_code) {
113 __func__, ret, rsp.resp.completion_code);
117 memcpy(uuid, rsp.data, 16);
127 printk(
BIOS_ERR,
"%s failed, system evnt log is not present.\n", __func__);
133 16, (
unsigned char *) &rsp,
sizeof(rsp));
135 if (ret <
sizeof(
struct ipmi_rsp) || rsp.resp.completion_code) {
137 __func__, ret, rsp.resp.completion_code);
void * memcpy(void *dest, const void *src, size_t n)
cb_err
coreboot error codes
@ CB_ERR
Generic error code.
@ CB_SUCCESS
Call completed successfully.
#define printk(level,...)
int ipmi_kcs_message(int port, int netfn, int lun, int cmd, const unsigned char *inmsg, int inlen, unsigned char *outmsg, int outlen)
#define IPMI_NETFN_APPLICATION
#define IPMI_NETFN_STORAGE
#define IPMI_ADD_SEL_ENTRY
enum cb_err ipmi_get_system_guid(const int port, uint8_t *uuid)
enum cb_err ipmi_add_sel(const int port, struct sel_event_record *sel)
enum cb_err ipmi_init_and_start_bmc_wdt(const int port, uint16_t countdown, uint8_t action)
enum cb_err ipmi_stop_bmc_wdt(const int port)
#define IPMI_BMC_GET_SYSTEM_GUID
#define IPMI_BMC_SET_WDG_TIMER
#define IPMI_BMC_GET_WDG_TIMER
#define IPMI_BMC_RESET_WDG_TIMER
#define BIOS_INFO
BIOS_INFO - Expected events.
#define BIOS_DEBUG
BIOS_DEBUG - Verbose output.
#define BIOS_ERR
BIOS_ERR - System in incomplete state.
uint16_t initial_countdown_val
uint8_t timer_use_expiration_flags_clr