| Ben Tyner | b797b3e | 2020-06-29 10:12:05 -0500 | [diff] [blame] | 1 | #include <attn/attn_logging.hpp> | 
| Ben Tyner | 9ae5ca4 | 2020-02-28 13:13:50 -0600 | [diff] [blame] | 2 | #include <sdbusplus/bus.hpp> | 
 | 3 |  | 
| Ben Tyner | 9ae5ca4 | 2020-02-28 13:13:50 -0600 | [diff] [blame] | 4 | namespace 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 |  */ | 
 | 13 | void bpHandler() | 
 | 14 | { | 
 | 15 |     // trace message | 
| Ben Tyner | b1ebfcb | 2020-05-08 18:52:48 -0500 | [diff] [blame] | 16 |     trace<level::INFO>("Notify Cronus"); | 
| Ben Tyner | 9ae5ca4 | 2020-02-28 13:13:50 -0600 | [diff] [blame] | 17 |  | 
 | 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 |