[Skiboot] [PATCH 1/2] core/platform: Add an explicit fast-reboot type
Oliver O'Halloran
oohall at gmail.com
Mon Feb 17 12:02:23 AEDT 2020
The OPAL_CEC_REBOOT2 OPAL call allows a specific type of reboot to be
requested. We can use this to allow the OS to request a fast-reboot
explicitly rather than relying on nvram hacks to change the default
behaviour.
Signed-off-by: Oliver O'Halloran <oohall at gmail.com>
---
core/platform.c | 4 ++++
include/opal-api.h | 1 +
2 files changed, 5 insertions(+)
diff --git a/core/platform.c b/core/platform.c
index 97bc7cb6fa1e..99cf5c985399 100644
--- a/core/platform.c
+++ b/core/platform.c
@@ -116,6 +116,10 @@ static int64_t opal_cec_reboot2(uint32_t reboot_type, char *diag)
opal_cec_reboot();
for (;;);
break;
+ case OPAL_REBOOT_FAST:
+ prlog(PR_NOTICE, "Reboot: Fast reboot requested by OS\n");
+ fast_reboot();
+ break;
default:
prlog(PR_NOTICE, "OPAL: Unsupported reboot request %d\n", reboot_type);
return OPAL_UNSUPPORTED;
diff --git a/include/opal-api.h b/include/opal-api.h
index 5b07dea1321b..e425d79f209a 100644
--- a/include/opal-api.h
+++ b/include/opal-api.h
@@ -1135,6 +1135,7 @@ enum {
OPAL_REBOOT_PLATFORM_ERROR,
OPAL_REBOOT_FULL_IPL,
OPAL_REBOOT_MPIPL,
+ OPAL_REBOOT_FAST,
};
/* Argument to OPAL_PCI_TCE_KILL */
--
2.21.1
More information about the Skiboot
mailing list