blob: be48cad3738efe1714d0ba0093612bd336d3c361 [file] [log] [blame]
Andrew Jeffery4fe996c2018-02-27 12:16:48 +10301/* SPDX-License-Identifier: Apache-2.0 */
2/* Copyright (C) 2018 IBM Corp. */
Suraj Jitindar Singhe39c9162017-03-28 10:47:43 +11003
Andrew Jeffery55f4d6f2018-08-06 12:26:44 +09304#ifndef DBUS_H
5#define DBUS_H
Suraj Jitindar Singhe39c9162017-03-28 10:47:43 +11006
Andrew Jeffery68023072018-08-06 10:08:11 +09307#include <stdint.h>
8#include <stddef.h>
Suraj Jitindar Singhe39c9162017-03-28 10:47:43 +11009
Andrew Jeffery68023072018-08-06 10:08:11 +093010/*
11 * "mbox" will become an inappropriate name for the protocol/daemon, so claim a
12 * different name on the public interface.
13 *
14 * "hiomapd" expands to "Host I/O Map Daemon"
15 *
16 * TODO: The Great Rename
17 */
18#define MBOX_DBUS_NAME "xyz.openbmc_project.Hiomapd"
19#define MBOX_DBUS_OBJECT "/xyz/openbmc_project/Hiomapd"
20#define MBOX_DBUS_CONTROL_IFACE "xyz.openbmc_project.Hiomapd.Control"
21#define MBOX_DBUS_PROTOCOL_IFACE "xyz.openbmc_project.Hiomapd.Protocol"
22
23/* Legacy interface */
24#define MBOX_DBUS_LEGACY_NAME "org.openbmc.mboxd"
25#define MBOX_DBUS_LEGACY_OBJECT "/org/openbmc/mboxd"
26
Suraj Jitindar Singhe39c9162017-03-28 10:47:43 +110027/* Command Args */
28/* Resume */
29#define RESUME_NUM_ARGS 1
30#define RESUME_NOT_MODIFIED 0x00
31#define RESUME_FLASH_MODIFIED 0x01
32
Suraj Jitindar Singhe39c9162017-03-28 10:47:43 +110033/* Response Args */
34/* Status */
35#define DAEMON_STATE_NUM_ARGS 1
36#define DAEMON_STATE_ACTIVE 0x00 /* Daemon Active */
37#define DAEMON_STATE_SUSPENDED 0x01 /* Daemon Suspended */
Andrew Jefferyef9e62d2018-08-08 15:48:27 +093038
Suraj Jitindar Singhe39c9162017-03-28 10:47:43 +110039/* LPC State */
40#define LPC_STATE_NUM_ARGS 1
41#define LPC_STATE_INVALID 0x00 /* Invalid State */
42#define LPC_STATE_FLASH 0x01 /* LPC Maps Flash Directly */
43#define LPC_STATE_MEM 0x02 /* LPC Maps Memory */
44
Suraj Jitindar Singhe39c9162017-03-28 10:47:43 +110045#endif /* MBOX_DBUS_H */