14fe996c2SAndrew Jeffery /* SPDX-License-Identifier: Apache-2.0 */ 24fe996c2SAndrew Jeffery /* Copyright (C) 2018 IBM Corp. */ 3e39c9163SSuraj Jitindar Singh 455f4d6f9SAndrew Jeffery #ifndef DBUS_H 555f4d6f9SAndrew Jeffery #define DBUS_H 6e39c9163SSuraj Jitindar Singh 768023074SAndrew Jeffery #include <stdint.h> 868023074SAndrew Jeffery #include <stddef.h> 9e39c9163SSuraj Jitindar Singh 1068023074SAndrew Jeffery /* 1168023074SAndrew Jeffery * "mbox" will become an inappropriate name for the protocol/daemon, so claim a 1268023074SAndrew Jeffery * different name on the public interface. 1368023074SAndrew Jeffery * 1468023074SAndrew Jeffery * "hiomapd" expands to "Host I/O Map Daemon" 1568023074SAndrew Jeffery * 1668023074SAndrew Jeffery * TODO: The Great Rename 1768023074SAndrew Jeffery */ 1868023074SAndrew Jeffery #define MBOX_DBUS_NAME "xyz.openbmc_project.Hiomapd" 1968023074SAndrew Jeffery #define MBOX_DBUS_OBJECT "/xyz/openbmc_project/Hiomapd" 2068023074SAndrew Jeffery #define MBOX_DBUS_CONTROL_IFACE "xyz.openbmc_project.Hiomapd.Control" 2168023074SAndrew Jeffery #define MBOX_DBUS_PROTOCOL_IFACE "xyz.openbmc_project.Hiomapd.Protocol" 22*a6ca7a9cSAndrew Jeffery #define MBOX_DBUS_PROTOCOL_IFACE_V2 MBOX_DBUS_PROTOCOL_IFACE ".V2" 2368023074SAndrew Jeffery 2468023074SAndrew Jeffery /* Legacy interface */ 2568023074SAndrew Jeffery #define MBOX_DBUS_LEGACY_NAME "org.openbmc.mboxd" 2668023074SAndrew Jeffery #define MBOX_DBUS_LEGACY_OBJECT "/org/openbmc/mboxd" 2768023074SAndrew Jeffery 28e39c9163SSuraj Jitindar Singh /* Command Args */ 29e39c9163SSuraj Jitindar Singh /* Resume */ 30e39c9163SSuraj Jitindar Singh #define RESUME_NUM_ARGS 1 31e39c9163SSuraj Jitindar Singh #define RESUME_NOT_MODIFIED 0x00 32e39c9163SSuraj Jitindar Singh #define RESUME_FLASH_MODIFIED 0x01 33e39c9163SSuraj Jitindar Singh 34e39c9163SSuraj Jitindar Singh /* Response Args */ 35e39c9163SSuraj Jitindar Singh /* Status */ 36e39c9163SSuraj Jitindar Singh #define DAEMON_STATE_NUM_ARGS 1 37e39c9163SSuraj Jitindar Singh #define DAEMON_STATE_ACTIVE 0x00 /* Daemon Active */ 38e39c9163SSuraj Jitindar Singh #define DAEMON_STATE_SUSPENDED 0x01 /* Daemon Suspended */ 39ef9e62d3SAndrew Jeffery 40e39c9163SSuraj Jitindar Singh /* LPC State */ 41e39c9163SSuraj Jitindar Singh #define LPC_STATE_NUM_ARGS 1 42e39c9163SSuraj Jitindar Singh #define LPC_STATE_INVALID 0x00 /* Invalid State */ 43e39c9163SSuraj Jitindar Singh #define LPC_STATE_FLASH 0x01 /* LPC Maps Flash Directly */ 44e39c9163SSuraj Jitindar Singh #define LPC_STATE_MEM 0x02 /* LPC Maps Memory */ 45e39c9163SSuraj Jitindar Singh 46e39c9163SSuraj Jitindar Singh #endif /* MBOX_DBUS_H */ 47