| Andrew Jeffery | 4fe996c | 2018-02-27 12:16:48 +1030 | [diff] [blame] | 1 | /* SPDX-License-Identifier: Apache-2.0 */ | 
 | 2 | /* Copyright (C) 2018 IBM Corp. */ | 
| Suraj Jitindar Singh | e39c916 | 2017-03-28 10:47:43 +1100 | [diff] [blame] | 3 |  | 
| Andrew Jeffery | 55f4d6f | 2018-08-06 12:26:44 +0930 | [diff] [blame] | 4 | #ifndef DBUS_H | 
 | 5 | #define DBUS_H | 
| Suraj Jitindar Singh | e39c916 | 2017-03-28 10:47:43 +1100 | [diff] [blame] | 6 |  | 
| Andrew Jeffery | 6802307 | 2018-08-06 10:08:11 +0930 | [diff] [blame] | 7 | #include <stdint.h> | 
 | 8 | #include <stddef.h> | 
| Suraj Jitindar Singh | e39c916 | 2017-03-28 10:47:43 +1100 | [diff] [blame] | 9 |  | 
| Andrew Jeffery | 6802307 | 2018-08-06 10:08:11 +0930 | [diff] [blame] | 10 | /* | 
 | 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" | 
| Andrew Jeffery | a6ca7a9 | 2018-08-20 13:03:44 +0930 | [diff] [blame] | 22 | #define MBOX_DBUS_PROTOCOL_IFACE_V2	MBOX_DBUS_PROTOCOL_IFACE ".V2" | 
| Andrew Jeffery | 6802307 | 2018-08-06 10:08:11 +0930 | [diff] [blame] | 23 |  | 
 | 24 | /* Legacy interface */ | 
 | 25 | #define MBOX_DBUS_LEGACY_NAME		"org.openbmc.mboxd" | 
 | 26 | #define MBOX_DBUS_LEGACY_OBJECT		"/org/openbmc/mboxd" | 
 | 27 |  | 
| Suraj Jitindar Singh | e39c916 | 2017-03-28 10:47:43 +1100 | [diff] [blame] | 28 | /* Command Args */ | 
 | 29 | /* Resume */ | 
 | 30 | #define RESUME_NUM_ARGS		1 | 
 | 31 | #define RESUME_NOT_MODIFIED	0x00 | 
 | 32 | #define RESUME_FLASH_MODIFIED	0x01 | 
 | 33 |  | 
| Suraj Jitindar Singh | e39c916 | 2017-03-28 10:47:43 +1100 | [diff] [blame] | 34 | /* Response Args */ | 
 | 35 | /* Status */ | 
 | 36 | #define DAEMON_STATE_NUM_ARGS	1 | 
 | 37 | #define DAEMON_STATE_ACTIVE	0x00 /* Daemon Active */ | 
 | 38 | #define DAEMON_STATE_SUSPENDED	0x01 /* Daemon Suspended */ | 
| Andrew Jeffery | ef9e62d | 2018-08-08 15:48:27 +0930 | [diff] [blame] | 39 |  | 
| Suraj Jitindar Singh | e39c916 | 2017-03-28 10:47:43 +1100 | [diff] [blame] | 40 | /* LPC State */ | 
 | 41 | #define LPC_STATE_NUM_ARGS	1 | 
 | 42 | #define LPC_STATE_INVALID	0x00 /* Invalid State */ | 
 | 43 | #define LPC_STATE_FLASH		0x01 /* LPC Maps Flash Directly */ | 
 | 44 | #define LPC_STATE_MEM		0x02 /* LPC Maps Memory */ | 
 | 45 |  | 
| Suraj Jitindar Singh | e39c916 | 2017-03-28 10:47:43 +1100 | [diff] [blame] | 46 | #endif /* MBOX_DBUS_H */ |