side-switch: request bmc reboot to switch to new image
The final piece is to issue a BMC reboot so the system can get over to
the image with the highest priority.
Tested:
- Set running firmware priority to 1 and ran the application. Side
switch detection ran and BMC was rebooted. After the reboot, the
system automatically powered on and running image was priority 0.
Signed-off-by: Andrew Geissler <geissonator@yahoo.com>
Change-Id: Iaafea49f75ad7dd959d4c71a4de29e763f593a83
diff --git a/side-switch/side_switch.hpp b/side-switch/side_switch.hpp
index 1ffd4d9..ddaa922 100644
--- a/side-switch/side_switch.hpp
+++ b/side-switch/side_switch.hpp
@@ -22,3 +22,10 @@
* @return True if policy set correctly, false otherwise
*/
bool setAutoPowerRestart(sdbusplus::bus::bus& bus);
+
+/** @brief Reboot the BMC
+ *
+ * @param[in] bus - The Dbus bus object
+ * @return True if reboot request had no error, false otherwise
+ */
+bool rebootTheBmc(sdbusplus::bus::bus& bus);