Skip to content

Commit

Permalink
platform: Introduce new reboot type
Browse files Browse the repository at this point in the history
Enhance reboot2 call to support MPIPL. Payload will call this interface
to initiate MPIPL.

Signed-off-by: Vasant Hegde <hegdevasant@linux.vnet.ibm.com>
[oliver: rebased]
Signed-off-by: Oliver O'Halloran <oohall@gmail.com>
  • Loading branch information
Vasant Hegde authored and oohal committed Aug 15, 2019
1 parent aa694ea commit 4a669d0
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 0 deletions.
6 changes: 6 additions & 0 deletions core/platform.c
Expand Up @@ -9,6 +9,7 @@
* Copyright 2013-2019 IBM Corp.
*/

#include <stdlib.h>
#include <skiboot.h>
#include <opal.h>
#include <console.h>
Expand Down Expand Up @@ -104,6 +105,11 @@ static int64_t opal_cec_reboot2(uint32_t reboot_type, char *diag)
case OPAL_REBOOT_FULL_IPL:
disable_fast_reboot("full IPL reboot requested");
return opal_cec_reboot();
case OPAL_REBOOT_MPIPL:
prlog(PR_NOTICE, "Reboot: OS reported error. Performing MPIPL\n");
console_complete_flush();
_abort("Reboot: OS reported error. Performing MPIPL\n");
break;
default:
prlog(PR_NOTICE, "OPAL: Unsupported reboot request %d\n", reboot_type);
return OPAL_UNSUPPORTED;
Expand Down
7 changes: 7 additions & 0 deletions doc/opal-api/opal-cec-reboot-6-116.rst
Expand Up @@ -127,6 +127,13 @@ OPAL_REBOOT_FULL_IPL = 2
On platforms that don't support fast reboot, this is equivalent to a
normal reboot.

OPAL_REBOOT_MPIPL = 3
Request for MPIPL reboot. Firmware will reboot the system and collect
dump.

On platforms that don't support MPIPL, this is equivalent to a
normal assert.

Unsupported Reboot type
For unsupported reboot type, this function will return with
OPAL_UNSUPPORTED and no reboot will be triggered.
Expand Down
1 change: 1 addition & 0 deletions include/opal-api.h
Expand Up @@ -1123,6 +1123,7 @@ enum {
OPAL_REBOOT_NORMAL = 0,
OPAL_REBOOT_PLATFORM_ERROR,
OPAL_REBOOT_FULL_IPL,
OPAL_REBOOT_MPIPL,
};

/* Argument to OPAL_PCI_TCE_KILL */
Expand Down

0 comments on commit 4a669d0

Please sign in to comment.