blob: 7b4744c91404a87e7f46051eb1f1eb026bf6559b [file] [log] [blame]
Ben Tyner9ae5ca42020-02-28 13:13:50 -06001#include <logging.hpp>
2#include <sdbusplus/bus.hpp>
3
4#include <sstream>
5
6namespace attn
7{
8
9/**
10 * @brief Notify Cronus over dbus interface
11 *
12 * When the special attention is due to a breakpoint condition we will notify
13 * Cronus over the dbus interface.
14 */
15void bpHandler()
16{
17 // trace message
18 std::stringstream ss;
19 ss << "Notify Cronus" << std::endl;
20 log<level::INFO>(ss.str().c_str());
21
22 // notify Cronus over dbus
23 auto bus = sdbusplus::bus::new_system();
24 auto msg = bus.new_signal("/", "org.openbmc.cronus", "Brkpt");
25
26 // Cronus will figure out proc, core, thread so just send 0,0,0
27 std::array<uint32_t, 3> params{0, 0, 0};
28 msg.append(params);
29
30 msg.signal_send();
31
32 return;
33}
34
35} // namespace attn