<html><body><p><font size="2">Hi </font><tt><font size="2">Ozlabs</font></tt>,<br><br>The following code will replace the platform cec reboot by opal_cec_reboot which can also trigger the soft reboot as OS booted. Could you please help review the code change? Thanks!<br><br><i>(See attached file: opal_fast_reboot_001.patch)</i><br><br><font size="2">diff --git a/core/platform.c b/core/platform.c</font><br><font size="2">index 732f67e..f1e98cb 100644</font><br><font size="2">--- a/core/platform.c</font><br><font size="2">+++ b/core/platform.c</font><br><font size="2">@@ -50,7 +50,7 @@ static int64_t opal_cec_power_down(uint64_t request)</font><br><font size="2"> }</font><br><font size="2"> opal_call(OPAL_CEC_POWER_DOWN, opal_cec_power_down, 1);</font><br><font size="2"> </font><br><font size="2">-static int64_t opal_cec_reboot(void)</font><br><font size="2">+int64_t opal_cec_reboot(void)</font><br><font size="2"> {</font><br><font size="2">         prlog(PR_NOTICE, "OPAL: Reboot request...\n");</font><br><font size="2"> </font><br><font size="2">diff --git a/hw/ipmi/ipmi-sel.c b/hw/ipmi/ipmi-sel.c</font><br><font size="2">index 3386854..2d6adb0 100644</font><br><font size="2">--- a/hw/ipmi/ipmi-sel.c</font><br><font size="2">+++ b/hw/ipmi/ipmi-sel.c</font><br><font size="2">@@ -25,6 +25,7 @@</font><br><font size="2"> #include <errorlog.h></font><br><font size="2"> #include <pel.h></font><br><font size="2"> #include <opal-msg.h></font><br><font size="2">+#include <platform.h></font><br><font size="2"> </font><br><font size="2"> /* OEM SEL fields */</font><br><font size="2"> #define SEL_OEM_ID_0                0x55</font><br><font size="2">@@ -515,10 +516,9 @@ static void sel_power(uint8_t power)</font><br><font size="2">                 break;</font><br><font size="2">         case SOFT_REBOOT:</font><br><font size="2">                 prlog(PR_NOTICE, "Soft reboot requested\n");</font><br><font size="2">-                if (!(debug_descriptor.state_flags & OPAL_BOOT_COMPLETE) &&</font><br><font size="2">-                    platform.cec_reboot) {</font><br><font size="2">+                if (!(debug_descriptor.state_flags & OPAL_BOOT_COMPLETE)) {</font><br><font size="2">                         prlog(PR_NOTICE, "Host not up, rebooting now\n");</font><br><font size="2">-                        platform.cec_reboot();</font><br><font size="2">+                        opal_cec_reboot();</font><br><font size="2">                 } else {</font><br><font size="2">                         opal_queue_msg(OPAL_MSG_SHUTDOWN, NULL, NULL, SOFT_REBOOT);</font><br><font size="2">                 }</font><br><font size="2">diff --git a/include/platform.h b/include/platform.h</font><br><font size="2">index f3af390..fc9527d 100644</font><br><font size="2">--- a/include/platform.h</font><br><font size="2">+++ b/include/platform.h</font><br><font size="2">@@ -217,4 +217,5 @@ extern int wait_for_resource_loaded(enum resource_id id, uint32_t idx);</font><br><font size="2"> </font><br><font size="2"> extern void set_bmc_platform(const struct bmc_platform *bmc);</font><br><font size="2"> </font><br><font size="2">+extern int64_t opal_cec_reboot(void);</font><br><font size="2"> #endif /* __PLATFORM_H */</font><br><br><br><font size="2">Best regards</font><br><font size="2">Mengze Liao</font><br><font size="2">OpenPOWER AE<br>IBM GCG Systems & Technology Group Lab</font><BR>
</body></html>