[Skiboot] [PATCH RFC] platform: add OPAL_REBOOT_FULL_IPL reboot type

Andrew Donnellan andrew.donnellan at au1.ibm.com
Tue Nov 22 20:17:25 AEDT 2016


There may be circumstances in which a user wants to force a full IPL reboot
rather than using fast reboot. Add a new reboot type, OPAL_REBOOT_FULL_IPL,
that disables fast reboot. On platforms which don't support fast reboot,
this will be equivalent to a normal reboot.

Signed-off-by: Andrew Donnellan <andrew.donnellan at au1.ibm.com>

---

Does this seem like a sensible idea? Corresponding kernel RFC will be sent 
shortly.

---
 core/platform.c                        | 3 +++
 doc/opal-api/opal-cec-reboot-6-116.rst | 6 ++++++
 include/opal-api.h                     | 1 +
 3 files changed, 10 insertions(+)

diff --git a/core/platform.c b/core/platform.c
index 5878164..68eb2d6 100644
--- a/core/platform.c
+++ b/core/platform.c
@@ -92,6 +92,9 @@ static int64_t opal_cec_reboot2(uint32_t reboot_type, char *diag)
 		}
 		disable_fast_reboot("Reboot due to Platform Error");
 		return xscom_trigger_xstop();
+	case OPAL_REBOOT_FULL_IPL:
+		disable_fast_reboot("full IPL reboot requested");
+		return opal_cec_reboot();
 	default:
 		prlog(PR_NOTICE, "OPAL: Unsupported reboot request %d\n", reboot_type);
 		return OPAL_UNSUPPORTED;
diff --git a/doc/opal-api/opal-cec-reboot-6-116.rst b/doc/opal-api/opal-cec-reboot-6-116.rst
index db7cd83..516d4fc 100644
--- a/doc/opal-api/opal-cec-reboot-6-116.rst
+++ b/doc/opal-api/opal-cec-reboot-6-116.rst
@@ -57,6 +57,12 @@ OPAL_REBOOT_PLATFORM_ERROR = 1
 	In absence of 'ibm,sw-checkstop-fir' device property, this function
 	will return with OPAL_UNSUPPORTED and no reboot will be triggered.
 
+OPAL_REBOOT_FULL_IPL = 2
+	Force a full IPL reboot rather than using fast reboot.
+
+	On platforms that don't support fast reboot, this is equivalent to a
+	normal reboot.
+
 Unsupported Reboot type
 	For unsupported reboot type, this function will return with
 	OPAL_UNSUPPORTED and no reboot will be triggered.
diff --git a/include/opal-api.h b/include/opal-api.h
index 05ff51d..6d2a316 100644
--- a/include/opal-api.h
+++ b/include/opal-api.h
@@ -1047,6 +1047,7 @@ struct opal_i2c_request {
 enum {
 	OPAL_REBOOT_NORMAL = 0,
 	OPAL_REBOOT_PLATFORM_ERROR,
+	OPAL_REBOOT_FULL_IPL,
 };
 
 /* Argument to OPAL_PCI_TCE_KILL */
-- 
Andrew Donnellan              OzLabs, ADL Canberra
andrew.donnellan at au1.ibm.com  IBM Australia Limited



More information about the Skiboot mailing list