1 #include <attn/attn_common.hpp> 2 #include <attn/attn_logging.hpp> 3 #include <sdbusplus/bus.hpp> 4 #include <util/trace.hpp> 5 6 namespace 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 */ 15 int bpHandler() 16 { 17 int rc = RC_SUCCESS; // assume success 18 19 // trace message 20 trace::inf("Notify Cronus"); 21 22 // notify Cronus over dbus 23 try 24 { 25 auto bus = sdbusplus::bus::new_system(); 26 auto msg = bus.new_signal("/", "org.openbmc.cronus", "Brkpt"); 27 28 // Cronus will figure out proc, core, thread so just send 0,0,0 29 std::array<uint32_t, 3> params{0, 0, 0}; 30 msg.append(params); 31 32 msg.signal_send(); 33 } 34 catch (const sdbusplus::exception::SdBusError& e) 35 { 36 trace::inf("bpHandler() exception"); 37 trace::err(e.what()); 38 rc = RC_NOT_HANDLED; 39 } 40 41 return rc; 42 } 43 44 } // namespace attn 45