blob: e25a2436545a2d76346bde4db2f3357ca3bd2bd3 [file] [log] [blame]
Ben Tynerb797b3e2020-06-29 10:12:05 -05001#include <attn/attn_logging.hpp>
Ben Tyner9ae5ca42020-02-28 13:13:50 -06002#include <sdbusplus/bus.hpp>
3
Ben Tyner9ae5ca42020-02-28 13:13:50 -06004namespace attn
5{
6
7/**
8 * @brief Notify Cronus over dbus interface
9 *
10 * When the special attention is due to a breakpoint condition we will notify
11 * Cronus over the dbus interface.
12 */
13void bpHandler()
14{
15 // trace message
Ben Tynerb1ebfcb2020-05-08 18:52:48 -050016 trace<level::INFO>("Notify Cronus");
Ben Tyner9ae5ca42020-02-28 13:13:50 -060017
18 // notify Cronus over dbus
19 auto bus = sdbusplus::bus::new_system();
20 auto msg = bus.new_signal("/", "org.openbmc.cronus", "Brkpt");
21
22 // Cronus will figure out proc, core, thread so just send 0,0,0
23 std::array<uint32_t, 3> params{0, 0, 0};
24 msg.append(params);
25
26 msg.signal_send();
27
28 return;
29}
30
31} // namespace attn