summaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
Diffstat (limited to 'include')
-rw-r--r--include/ipmi.h13
-rw-r--r--include/opal.h5
2 files changed, 17 insertions, 1 deletions
diff --git a/include/ipmi.h b/include/ipmi.h
index 95435153..42906e64 100644
--- a/include/ipmi.h
+++ b/include/ipmi.h
@@ -18,6 +18,7 @@
#define __IPMI_H
#include <stdint.h>
+#include <ccan/list/list.h>
#include <stdbool.h>
/*
@@ -108,8 +109,14 @@
#define IPMI_DEFAULT_INTERFACE 0
+#define IPMI_MAX_REQ_SIZE 64
+#define IPMI_MAX_RESP_SIZE 64
+
struct ipmi_backend;
struct ipmi_msg {
+ /* Can be used by command implementations to track requests */
+ struct list_node link;
+
struct ipmi_backend *backend;
uint8_t netfn;
uint8_t cmd;
@@ -128,12 +135,15 @@ struct ipmi_msg {
};
struct ipmi_backend {
+ uint64_t opal_event_ipmi_recv;
struct ipmi_msg *(*alloc_msg)(size_t, size_t);
void (*free_msg)(struct ipmi_msg *);
int (*queue_msg)(struct ipmi_msg *);
int (*dequeue_msg)(struct ipmi_msg *);
};
+extern struct ipmi_backend *ipmi_backend;
+
/* Initialise the IPMI interface */
void ipmi_init(void);
@@ -166,4 +176,7 @@ void ipmi_register_backend(struct ipmi_backend *backend);
/* Register rtc ipmi commands with as opal callbacks. */
void ipmi_rtc_init(void);
+/* Register ipmi host interface access callbacks */
+void ipmi_opal_init(void);
+
#endif
diff --git a/include/opal.h b/include/opal.h
index 8a833dfb..730aee72 100644
--- a/include/opal.h
+++ b/include/opal.h
@@ -36,6 +36,7 @@
#define OPAL_HARDWARE_FROZEN -13
#define OPAL_WRONG_STATE -14
#define OPAL_ASYNC_COMPLETION -15
+#define OPAL_EMPTY -16
/* API Tokens (in r0) */
#define OPAL_TEST 0
@@ -142,7 +143,9 @@
#define OPAL_READ_TPO 104
#define OPAL_GET_DPO_STATUS 105
#define OPAL_I2C_REQUEST 106
-#define OPAL_LAST 106
+#define OPAL_IPMI_SEND 107
+#define OPAL_IPMI_RECV 108
+#define OPAL_LAST 108
#ifndef __ASSEMBLY__
OpenPOWER on IntegriCloud