Ben Tyner | 9ae5ca4 | 2020-02-28 13:13:50 -0600 | [diff] [blame] | 1 | #include <logging.hpp> |
| 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 | 9dbab8b | 2020-03-31 08:55:23 -0500 | [diff] [blame^] | 16 | log<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 |