diff options
author | Vasant Hegde <hegdevasant@linux.vnet.ibm.com> | 2020-06-17 12:46:10 +0530 |
---|---|---|
committer | Oliver O'Halloran <oohall@gmail.com> | 2020-06-30 12:07:23 +1000 |
commit | edc936afb6e34a9182244c7f4e9f117afd52fb6e (patch) | |
tree | 9041088cc841eb22db1bf99364aa30e2bfbc4303 /hw | |
parent | 9f5374b46aab4a2980d5bf745d79fa9d7bb609e1 (diff) | |
download | skiboot-edc936afb6e34a9182244c7f4e9f117afd52fb6e.zip skiboot-edc936afb6e34a9182244c7f4e9f117afd52fb6e.tar.gz skiboot-edc936afb6e34a9182244c7f4e9f117afd52fb6e.tar.bz2 |
mpipl: Move opal_mpipl_save_crashing_pir() call to platform specific code
Commit 34664746 moved opal_mpipl_save_crashing_pir() function call from
platform specific code to generic assert() path. I completely missed
to take care of all terminate path :-(
This resulted in breaking `opalcore` on Linux kernel initiated MPIPL. As :
- Linux initiated MPIPL calls platform termination function directly
- ELF core format needs crashing CPU details to generate proper code
Hence I think it makes sense to move this back to platform specific
terminate handler code.
Today we have two ways to trigger MPIPL based on service processor.
- On BMC system we call SBE S0 interrupt
- On FSP system we call `attn` instruction
In future if we add new ways to trigger MPIPL then we have to add platform
specific support code anyway. That way its fine to move this to platform
sepcific code.
One alternative is to make this call in all code path before making
platform.terminate call... which makes it more complicated than above approach.
Signed-off-by: Vasant Hegde <hegdevasant@linux.vnet.ibm.com>
Signed-off-by: Oliver O'Halloran <oohall@gmail.com>
Diffstat (limited to 'hw')
-rw-r--r-- | hw/fsp/fsp-attn.c | 4 | ||||
-rw-r--r-- | hw/sbe-p9.c | 3 |
2 files changed, 7 insertions, 0 deletions
diff --git a/hw/fsp/fsp-attn.c b/hw/fsp/fsp-attn.c index 9d032d1..6e358e0 100644 --- a/hw/fsp/fsp-attn.c +++ b/hw/fsp/fsp-attn.c @@ -14,6 +14,7 @@ #include <hdata/spira.h> #include <stack.h> #include <processor.h> +#include <opal-dump.h> #define TI_CMD_VALID 0x1 /* Command valid */ #define TI_CMD 0xA1 /* Terminate Immediate command */ @@ -118,6 +119,9 @@ void __attribute__((noreturn)) ibm_fsp_terminate(const char *msg) /* Update op panel op_display */ op_display(OP_FATAL, OP_MOD_CORE, 0x6666); + /* Save crashing CPU details */ + opal_mpipl_save_crashing_pir(); + /* XXX FIXME: We should fsp_poll for a while to ensure any pending * console writes have made it out, but until we have decent PSI * link handling we must not do it forever. Polling can prevent the diff --git a/hw/sbe-p9.c b/hw/sbe-p9.c index 24ed91b..ae5aacb 100644 --- a/hw/sbe-p9.c +++ b/hw/sbe-p9.c @@ -952,6 +952,9 @@ void p9_sbe_terminate(void) if (!is_mpipl_enabled()) return; + /* Save crashing CPU details */ + opal_mpipl_save_crashing_pir(); + /* Unregister flash. It will request BMC MBOX reset */ if (!flash_unregister()) { prlog(PR_DEBUG, "Failed to reset BMC MBOX\n"); |