summaryrefslogtreecommitdiffstats
path: root/mbox.h
diff options
context:
space:
mode:
Diffstat (limited to 'mbox.h')
-rw-r--r--mbox.h18
1 files changed, 18 insertions, 0 deletions
diff --git a/mbox.h b/mbox.h
index 67d5622..7ae002b 100644
--- a/mbox.h
+++ b/mbox.h
@@ -118,6 +118,21 @@ struct window_list {
struct window_context *window;
};
+struct mbox_msg {
+ uint8_t command;
+ uint8_t seq;
+ uint8_t args[MBOX_ARGS_BYTES];
+ uint8_t response;
+};
+
+union mbox_regs {
+ uint8_t raw[MBOX_REG_BYTES];
+ struct mbox_msg msg;
+};
+
+typedef int (*mboxd_mbox_handler)(struct mbox_context *, union mbox_regs *,
+ struct mbox_msg *);
+
struct mbox_context {
/* System State */
enum mbox_state state;
@@ -128,6 +143,9 @@ struct mbox_context {
uint8_t bmc_events;
uint8_t prev_seq;
+/* Command Dispatch */
+ const mboxd_mbox_handler *handlers;
+
/* Window State */
/* The window list struct containing all current "windows" */
struct window_list windows;
OpenPOWER on IntegriCloud