[Skiboot] [PATCH 4/4] fast-reboot: Use fast reboot when enabled in NVRAM

Oliver O'Halloran oohall at gmail.com
Wed Sep 28 14:56:32 AEST 2016


Adds a check for the "fast-reboot" config string. When set to "enabled"
Skiboot will handle the OPAL_CEC_REBOOT OPAL call.

Signed-off-by: Oliver O'Halloran <oohall at gmail.com>
---
 core/platform.c | 7 ++++---
 1 file changed, 4 insertions(+), 3 deletions(-)

diff --git a/core/platform.c b/core/platform.c
index 76729141ffac..a213a8313046 100644
--- a/core/platform.c
+++ b/core/platform.c
@@ -24,6 +24,7 @@
 #include <xscom.h>
 #include <errorlog.h>
 #include <bt.h>
+#include <nvram.h>
 
 bool manufacturing_mode = false;
 struct platform	platform;
@@ -54,10 +55,10 @@ static int64_t opal_cec_reboot(void)
 
 	console_complete_flush();
 
-#ifdef ENABLE_FAST_RESET
 	/* Try a fast reset first */
-	fast_reset();
-#endif
+	if (nvram_query_eq("fast-reboot", "enabled"))
+		fast_reset();
+
 	if (platform.cec_reboot)
 		return platform.cec_reboot();
 
-- 
2.5.5



More information about the Skiboot mailing list