Message ID | 20190616171024.22799-18-hegdevasant@linux.vnet.ibm.com |
---|---|
State | Superseded |
Headers | show |
Series | MPIPL support | expand |
Context | Check | Description |
---|---|---|
snowpatch_ozlabs/apply_patch | success | Successfully applied on branch master (dbf27b6c4af84addb36bd3be34f96580aba9c873) |
snowpatch_ozlabs/snowpatch_job_snowpatch-skiboot | fail | Test snowpatch/job/snowpatch-skiboot on branch master |
snowpatch_ozlabs/snowpatch_job_snowpatch-skiboot-dco | success | Signed-off-by present |
Vasant Hegde's on June 17, 2019 3:10 am: > Enhance reboot2 call to support MPIPL. Payload will call this interface > to initiate MPIPL. > > Signed-off-by: Vasant Hegde <hegdevasant@linux.vnet.ibm.com> > --- > core/platform.c | 8 +++++++- > doc/opal-api/opal-cec-reboot-6-116.rst | 7 +++++++ > include/opal-api.h | 1 + > 3 files changed, 15 insertions(+), 1 deletion(-) > > diff --git a/core/platform.c b/core/platform.c > index afa00adf7..da3c8b175 100644 > --- a/core/platform.c > +++ b/core/platform.c > @@ -1,4 +1,4 @@ > -/* Copyright 2013-2016 IBM Corp. > +/* Copyright 2013-2019 IBM Corp. > * > * Licensed under the Apache License, Version 2.0 (the "License"); > * you may not use this file except in compliance with the License. > @@ -15,6 +15,7 @@ > */ > > > +#include <stdlib.h> > #include <skiboot.h> > #include <opal.h> > #include <console.h> > @@ -110,6 +111,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_NOTICE, "Reboot: OS reported error. Performing dump\n"); > + console_complete_flush(); > + _abort("Reboot: OS reported error. Performing dump\n"); > + break; This should be re-named. It should tie in with whatever consisent names you expose to the OS for these facilities. The registration side is called OPAL_MPIPL_, so this would be better to be OPAL_REBOOT_MPIPL. Thanks, Nick
On 06/28/2019 07:13 AM, Nicholas Piggin wrote: > Vasant Hegde's on June 17, 2019 3:10 am: >> Enhance reboot2 call to support MPIPL. Payload will call this interface >> to initiate MPIPL. >> >> Signed-off-by: Vasant Hegde <hegdevasant@linux.vnet.ibm.com> >> --- >> core/platform.c | 8 +++++++- >> doc/opal-api/opal-cec-reboot-6-116.rst | 7 +++++++ >> include/opal-api.h | 1 + >> 3 files changed, 15 insertions(+), 1 deletion(-) >> >> diff --git a/core/platform.c b/core/platform.c >> index afa00adf7..da3c8b175 100644 >> --- a/core/platform.c >> +++ b/core/platform.c >> @@ -1,4 +1,4 @@ >> -/* Copyright 2013-2016 IBM Corp. >> +/* Copyright 2013-2019 IBM Corp. >> * >> * Licensed under the Apache License, Version 2.0 (the "License"); >> * you may not use this file except in compliance with the License. >> @@ -15,6 +15,7 @@ >> */ >> >> >> +#include <stdlib.h> >> #include <skiboot.h> >> #include <opal.h> >> #include <console.h> >> @@ -110,6 +111,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_NOTICE, "Reboot: OS reported error. Performing dump\n"); >> + console_complete_flush(); >> + _abort("Reboot: OS reported error. Performing dump\n"); >> + break; > > This should be re-named. It should tie in with whatever consisent names > you expose to the OS for these facilities. The registration side is > called OPAL_MPIPL_, so this would be better to be OPAL_REBOOT_MPIPL. Initially I wanted this to be generic macro. So that we can replace the backend transparently. Now that I have changed most of the other interfaces, I can change this one as well. -Vasant
diff --git a/core/platform.c b/core/platform.c index afa00adf7..da3c8b175 100644 --- a/core/platform.c +++ b/core/platform.c @@ -1,4 +1,4 @@ -/* Copyright 2013-2016 IBM Corp. +/* Copyright 2013-2019 IBM Corp. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -15,6 +15,7 @@ */ +#include <stdlib.h> #include <skiboot.h> #include <opal.h> #include <console.h> @@ -110,6 +111,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_NOTICE, "Reboot: OS reported error. Performing dump\n"); + console_complete_flush(); + _abort("Reboot: OS reported error. Performing dump\n"); + 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 ba31e7a7a..d56f515ee 100644 --- a/doc/opal-api/opal-cec-reboot-6-116.rst +++ b/doc/opal-api/opal-cec-reboot-6-116.rst @@ -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_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 bc6af2014..5747019f8 100644 --- a/include/opal-api.h +++ b/include/opal-api.h @@ -1135,6 +1135,7 @@ enum { OPAL_REBOOT_NORMAL = 0, OPAL_REBOOT_PLATFORM_ERROR, OPAL_REBOOT_FULL_IPL, + OPAL_REBOOT_OS_ERROR, }; /* Argument to OPAL_PCI_TCE_KILL */
Enhance reboot2 call to support MPIPL. Payload will call this interface to initiate MPIPL. Signed-off-by: Vasant Hegde <hegdevasant@linux.vnet.ibm.com> --- core/platform.c | 8 +++++++- doc/opal-api/opal-cec-reboot-6-116.rst | 7 +++++++ include/opal-api.h | 1 + 3 files changed, 15 insertions(+), 1 deletion(-)