blob: f9952a5201bfa2c814d6a818cc6d6aa45eb8593b [file] [log] [blame]
Ben Pai44cee312020-03-16 15:24:46 +08001#pragma once
2
3#include <ipmid/api.h>
4#include <stdint.h>
5
6#include <map>
7#include <string>
8
9// IPMI commands for net functions.
10enum ipmi_netfn_oem_cmds
11{
12 IPMI_CMD_DETECT_RISERF = 0x01,
Ben Paiba89a1e2020-11-06 17:00:33 +080013 IPMI_CMD_SWITCH_BITTWARE_IMAGE = 0x02,
Ben Pai44cee312020-03-16 15:24:46 +080014};
15
16constexpr int initError = -1; /* The parameter of definition error */
17constexpr unsigned char command = 0; /* The parameter of smbus command */
18constexpr unsigned char a[] = {
19 0x00, 0x00}; /* The response data : CPU0 & CPU1 are not present */
20constexpr unsigned char b[] = {
21 0x00, 0x01}; /* The response data : CPU1 is present but CPU0 isn't */
22constexpr unsigned char c[] = {
23 0x01, 0x00}; /* The response data : CPU0 is present but CPU1 isn't */
24constexpr unsigned char d[] = {
25 0x01, 0x01}; /* The response data : CPU0 & CPU1 are present */
26
27ipmi_ret_t ipmi_wistron_detect_riserf(ipmi_netfn_t netfn, ipmi_cmd_t cmd,
28 ipmi_request_t request,
29 ipmi_response_t response,
30 ipmi_data_len_t data_len,
31 ipmi_context_t context);
Ben Paiba89a1e2020-11-06 17:00:33 +080032
33ipmi_ret_t ipmi_wistron_switch_image(ipmi_netfn_t netfn, ipmi_cmd_t cmd,
34 ipmi_request_t request,
35 ipmi_response_t response,
36 ipmi_data_len_t data_len,
37 ipmi_context_t context);