forked from openbmc/phosphor-host-ipmid
-
Notifications
You must be signed in to change notification settings - Fork 0
/
systemintfcmds.hpp
43 lines (38 loc) · 1.17 KB
/
systemintfcmds.hpp
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
#pragma once
#include <stdint.h>
// These are per skiboot ipmi-sel code
// OEM_SEL type with Timestamp
#define SEL_OEM_ID_0 0x55
// SEL type is OEM and -not- general SEL
#define SEL_RECORD_TYPE_OEM 0xC0
// Minor command for soft shurdown
#define SOFT_OFF 0x00
// Major command for Any kind of power ops
#define CMD_POWER 0x04
// Major command for the heartbeat operation (verify host is alive)
#define CMD_HEARTBEAT 0xFF
// IPMI commands used via System Interface functions.
enum ipmi_netfn_system_intf_cmds
{
IPMI_CMD_SET_BMC_GLOBAL_ENABLES = 0x2E,
IPMI_CMD_GET_MSG_FLAGS = 0x31,
IPMI_CMD_READ_EVENT = 0x35,
};
// A Mechanism to tell host to shtudown hosts by sending this PEM SEL. Really
// the only used fields by skiboot are:
// id[0] / id[1] for ID_0 , ID_1
// type : SEL_RECORD_TYPE_OEM as standard SELs are ignored by skiboot
// cmd : CMD_POWER for power functions
// data[0], specific commands. example Soft power off. power cycle, etc.
struct oem_sel_timestamped
{
/* SEL header */
uint8_t id[2];
uint8_t type;
uint8_t manuf_id[3];
uint8_t timestamp[4];
/* OEM SEL data (6 bytes) follows */
uint8_t netfun;
uint8_t cmd;
uint8_t data[4];
};