]> git.ozlabs.org Git - petitboot/blob - discover/ipmi.h
po: Translation Updates
[petitboot] / discover / ipmi.h
1 #ifndef _IPMI_H
2 #define _IPMI_H
3
4 #include <stdbool.h>
5 #include <stdint.h>
6
7 #include <types/types.h>
8
9 enum ipmi_netfn {
10         IPMI_NETFN_CHASSIS      = 0x0,
11         IPMI_NETFN_SE           = 0x04,
12 };
13
14 enum ipmi_cmd {
15         IPMI_CMD_CHASSIS_SET_SYSTEM_BOOT_OPTIONS        = 0x08,
16         IPMI_CMD_CHASSIS_GET_SYSTEM_BOOT_OPTIONS        = 0x09,
17         IPMI_CMD_SENSOR_SET                             = 0x30,
18 };
19
20 enum ipmi_sensor_ids {
21         IPMI_SENSOR_ID_OS_BOOT          = 0x1F,
22 };
23
24 struct ipmi;
25
26 bool ipmi_present(void);
27 bool ipmi_bootdev_is_valid(int x);
28 struct ipmi *ipmi_open(void *ctx);
29
30 int ipmi_transaction(struct ipmi *ipmi, uint8_t netfn, uint8_t cmd,
31                 uint8_t *req_buf, uint16_t req_len,
32                 uint8_t *resp_buf, uint16_t *resp_len,
33                 int timeout_ms);
34
35 #endif /* _IPMI_H */