[v6,15/22] fadump: Introduce new reboot type

Message ID 20181128110244.17664-16-hegdevasant@linux.vnet.ibm.com
State New
Headers show
Series
  • MPIPL support
Related show

Checks

Context Check Description
snowpatch_ozlabs/snowpatch_job_snowpatch-skiboot success Test snowpatch/job/snowpatch-skiboot on branch master
snowpatch_ozlabs/apply_patch success master/apply_patch Successfully applied

Commit Message

Vasant Hegde Nov. 28, 2018, 11:02 a.m.
Enhance reboot2 call to support FADUMP. Payload will call this interface
to initiate fadump.

Signed-off-by: Vasant Hegde <hegdevasant@linux.vnet.ibm.com>
---
 core/platform.c                        | 5 +++++
 doc/opal-api/opal-cec-reboot-6-116.rst | 7 +++++++
 include/opal-api.h                     | 1 +
 3 files changed, 13 insertions(+)

Patch

diff --git a/core/platform.c b/core/platform.c
index 570a4309a..66a5a52ed 100644
--- a/core/platform.c
+++ b/core/platform.c
@@ -103,6 +103,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_OS_ERROR:
+		prlog(PR_ERR, "Kernel requested for fadump\n");
+		console_complete_flush();
+		assert(false);
+		break;
 	default:
 		prlog(PR_NOTICE, "OPAL: Unsupported reboot request %d\n", reboot_type);
 		return OPAL_UNSUPPORTED;
diff --git a/doc/opal-api/opal-cec-reboot-6-116.rst b/doc/opal-api/opal-cec-reboot-6-116.rst
index 516d4fc01..9ac7f9f69 100644
--- a/doc/opal-api/opal-cec-reboot-6-116.rst
+++ b/doc/opal-api/opal-cec-reboot-6-116.rst
@@ -63,6 +63,13 @@  OPAL_REBOOT_FULL_IPL = 2
 	On platforms that don't support fast reboot, this is equivalent to a
 	normal reboot.
 
+OPAL_REBOOT_OS_ERROR = 3
+	Request for fadump reboot. Firmware will reboot the system and collect
+	dump.
+
+	On platforms that don't support fadump, 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.
diff --git a/include/opal-api.h b/include/opal-api.h
index d66295304..a5cc32624 100644
--- a/include/opal-api.h
+++ b/include/opal-api.h
@@ -1235,6 +1235,7 @@  enum {
 	OPAL_REBOOT_NORMAL = 0,
 	OPAL_REBOOT_PLATFORM_ERROR,
 	OPAL_REBOOT_FULL_IPL,
+	OPAL_REBOOT_OS_ERROR,
 };
 
 /* Argument to OPAL_PCI_TCE_KILL */