summaryrefslogtreecommitdiffstats
path: root/sensorhandler.h
diff options
context:
space:
mode:
authorTom Joseph <tomjoseph@in.ibm.com>2018-02-22 00:33:38 +0530
committerTom Joseph <tomjoseph@in.ibm.com>2018-03-01 05:34:21 +0000
commit5ca50959438c3c99acfafe4d0ff301eb29b84233 (patch)
tree2029e9f55678f63251b0e1aa5b75a8f8aa226004 /sensorhandler.h
parentdc212b235dbf0251f5da787316f629d615ede997 (diff)
downloadphosphor-host-ipmid-5ca50959438c3c99acfafe4d0ff301eb29b84233.tar.gz
phosphor-host-ipmid-5ca50959438c3c99acfafe4d0ff301eb29b84233.zip
Implement Get SDR and Reserve SDR repository command
Both Get SDR and Reserve SDR repository command is same as Get Device SDR and Reserve Device SDR command respectively. So the same implementation is shared. Resolves openbmc/openbmc#2615 Change-Id: I64e37837bc5a616bed41a3ceff7d63033d88455c Signed-off-by: Tom Joseph <tomjoseph@in.ibm.com>
Diffstat (limited to 'sensorhandler.h')
-rw-r--r--sensorhandler.h17
1 files changed, 14 insertions, 3 deletions
diff --git a/sensorhandler.h b/sensorhandler.h
index 4dd079d..d6426f6 100644
--- a/sensorhandler.h
+++ b/sensorhandler.h
@@ -3,13 +3,14 @@
#include <stdint.h>
#include "types.hpp"
+#include "host-ipmid/ipmid-api.h"
// IPMI commands for net functions.
enum ipmi_netfn_sen_cmds
{
- IPMI_CMD_GET_SDR_INFO = 0x20,
- IPMI_CMD_GET_SDR = 0x21,
- IPMI_CMD_RESERVE_SDR_REPO = 0x22,
+ IPMI_CMD_GET_DEVICE_SDR_INFO = 0x20,
+ IPMI_CMD_GET_DEVICE_SDR = 0x21,
+ IPMI_CMD_RESERVE_DEVICE_SDR_REPO = 0x22,
IPMI_CMD_GET_SENSOR_READING = 0x2D,
IPMI_CMD_GET_SENSOR_TYPE = 0x2F,
IPMI_CMD_SET_SENSOR = 0x30,
@@ -50,6 +51,16 @@ int set_sensor_dbus_state_s(uint8_t , const char *, const char *);
int set_sensor_dbus_state_y(uint8_t , const char *, const uint8_t);
int find_openbmc_path(uint8_t , dbus_interface_t *);
+ipmi_ret_t ipmi_sen_get_sdr(ipmi_netfn_t netfn, ipmi_cmd_t cmd,
+ ipmi_request_t request, ipmi_response_t response,
+ ipmi_data_len_t data_len, ipmi_context_t context);
+
+ipmi_ret_t ipmi_sen_reserve_sdr(ipmi_netfn_t netfn, ipmi_cmd_t cmd,
+ ipmi_request_t request,
+ ipmi_response_t response,
+ ipmi_data_len_t data_len,
+ ipmi_context_t context);
+
static const uint16_t FRU_RECORD_ID_START = 256;
static const uint8_t SDR_VERSION = 0x51;
static const uint16_t END_OF_RECORD = 0xFFFF;
OpenPOWER on IntegriCloud