blob: 4ab734d8cbbe937140ed3f1eefc61ebea0a09a76 [file] [log] [blame]
Ben Tyner9ae5ca42020-02-28 13:13:50 -06001#include <logging.hpp>
2#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 Tyner9dbab8b2020-03-31 08:55:23 -050016 log<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