aboutsummaryrefslogtreecommitdiff
path: root/core
diff options
context:
space:
mode:
authorOliver O'Halloran <oohall@gmail.com>2020-02-17 12:02:23 +1100
committerOliver O'Halloran <oohall@gmail.com>2020-02-26 20:35:27 +1100
commit10bbcd0788bc73ec675eb06e6c84faab5aab4461 (patch)
tree016da5e8e00556bea948b73bbd34e06ba675821d /core
parentf123417068e51842004bdc047c8c5107b70442ef (diff)
downloadskiboot-10bbcd0788bc73ec675eb06e6c84faab5aab4461.zip
skiboot-10bbcd0788bc73ec675eb06e6c84faab5aab4461.tar.gz
skiboot-10bbcd0788bc73ec675eb06e6c84faab5aab4461.tar.bz2
core/platform: Add an explicit fast-reboot type
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@gmail.com>
Diffstat (limited to 'core')
-rw-r--r--core/platform.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/core/platform.c b/core/platform.c
index 97bc7cb..99cf5c9 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;