Skip to content

Commit

Permalink
core/platform: Add an explicit fast-reboot type
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
oohal committed Feb 26, 2020
1 parent f123417 commit 10bbcd0
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 0 deletions.
4 changes: 4 additions & 0 deletions core/platform.c
Expand Up @@ -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;
Expand Down
1 change: 1 addition & 0 deletions include/opal-api.h
Expand Up @@ -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 */
Expand Down

0 comments on commit 10bbcd0

Please sign in to comment.