[Skiboot] Skiboot patch for using opal_cec_reboot before OPAL_BOOT_COMPLETE
Meng Ze Liao
liaomz at cn.ibm.com
Mon Dec 4 21:16:33 AEDT 2017
Hi Ozlabs,
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!
(See attached file: opal_fast_reboot_001.patch)
diff --git a/core/platform.c b/core/platform.c
index 732f67e..f1e98cb 100644
--- a/core/platform.c
+++ b/core/platform.c
@@ -50,7 +50,7 @@ static int64_t opal_cec_power_down(uint64_t request)
}
opal_call(OPAL_CEC_POWER_DOWN, opal_cec_power_down, 1);
-static int64_t opal_cec_reboot(void)
+int64_t opal_cec_reboot(void)
{
prlog(PR_NOTICE, "OPAL: Reboot request...\n");
diff --git a/hw/ipmi/ipmi-sel.c b/hw/ipmi/ipmi-sel.c
index 3386854..2d6adb0 100644
--- a/hw/ipmi/ipmi-sel.c
+++ b/hw/ipmi/ipmi-sel.c
@@ -25,6 +25,7 @@
#include <errorlog.h>
#include <pel.h>
#include <opal-msg.h>
+#include <platform.h>
/* OEM SEL fields */
#define SEL_OEM_ID_0 0x55
@@ -515,10 +516,9 @@ static void sel_power(uint8_t power)
break;
case SOFT_REBOOT:
prlog(PR_NOTICE, "Soft reboot requested\n");
- if (!(debug_descriptor.state_flags & OPAL_BOOT_COMPLETE) &&
- platform.cec_reboot) {
+ if (!(debug_descriptor.state_flags & OPAL_BOOT_COMPLETE)) {
prlog(PR_NOTICE, "Host not up, rebooting now\n");
- platform.cec_reboot();
+ opal_cec_reboot();
} else {
opal_queue_msg(OPAL_MSG_SHUTDOWN, NULL, NULL,
SOFT_REBOOT);
}
diff --git a/include/platform.h b/include/platform.h
index f3af390..fc9527d 100644
--- a/include/platform.h
+++ b/include/platform.h
@@ -217,4 +217,5 @@ extern int wait_for_resource_loaded(enum resource_id
id, uint32_t idx);
extern void set_bmc_platform(const struct bmc_platform *bmc);
+extern int64_t opal_cec_reboot(void);
#endif /* __PLATFORM_H */
Best regards
Mengze Liao
OpenPOWER AE
IBM GCG Systems & Technology Group Lab
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.ozlabs.org/pipermail/skiboot/attachments/20171204/7d7996b2/attachment-0001.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: opal_fast_reboot_001.patch
Type: application/octet-stream
Size: 1502 bytes
Desc: not available
URL: <http://lists.ozlabs.org/pipermail/skiboot/attachments/20171204/7d7996b2/attachment-0001.obj>
More information about the Skiboot
mailing list