diff options
author | Stewart Smith <stewart@linux.ibm.com> | 2019-06-18 17:29:17 +1000 |
---|---|---|
committer | Stewart Smith <stewart@linux.ibm.com> | 2019-06-24 15:59:07 +1000 |
commit | 5e705176fd26be83d06a9b3ea8be0ced0dc0dcde (patch) | |
tree | 00aa49c8d8047329f6e7a355f489ff34f1f3766b /hw/fsp | |
parent | 9fc0c1287ada4d3ba50dcb76bbc3fc9beaae0bb1 (diff) | |
download | skiboot-5e705176fd26be83d06a9b3ea8be0ced0dc0dcde.zip skiboot-5e705176fd26be83d06a9b3ea8be0ced0dc0dcde.tar.gz skiboot-5e705176fd26be83d06a9b3ea8be0ced0dc0dcde.tar.bz2 |
core/opal: move HIR trigger to FSP poller
Signed-off-by: Stewart Smith <stewart@linux.ibm.com>
Diffstat (limited to 'hw/fsp')
-rw-r--r-- | hw/fsp/fsp.c | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/hw/fsp/fsp.c b/hw/fsp/fsp.c index aa393c7..4415ab5 100644 --- a/hw/fsp/fsp.c +++ b/hw/fsp/fsp.c @@ -38,6 +38,8 @@ #include <opal-msg.h> #include <ccan/list/list.h> +extern uint32_t hir_trigger; + DEFINE_LOG_ENTRY(OPAL_RC_FSP_POLL_TIMEOUT, OPAL_PLATFORM_ERR_EVT, OPAL_FSP, OPAL_PLATFORM_FIRMWARE, OPAL_RECOVERED_ERR_GENERAL, OPAL_NA); @@ -47,6 +49,13 @@ DEFINE_LOG_ENTRY(OPAL_RC_FSP_MBOX_ERR, OPAL_PLATFORM_ERR_EVT, OPAL_FSP, DEFINE_LOG_ENTRY(OPAL_RC_FSP_DISR_HIR_MASK, OPAL_PLATFORM_ERR_EVT, OPAL_FSP, OPAL_PLATFORM_FIRMWARE, OPAL_RECOVERED_ERR_GENERAL, OPAL_NA); +/* We make this look like a Surveillance error, even though it really + * isn't one. + */ +DEFINE_LOG_ENTRY(OPAL_INJECTED_HIR, OPAL_MISC_ERR_EVT, OPAL_SURVEILLANCE, + OPAL_SURVEILLANCE_ERR, OPAL_PREDICTIVE_ERR_GENERAL, + OPAL_MISCELLANEOUS_INFO_ONLY); + #define FSP_TRACE_MSG #define FSP_TRACE_EVENT @@ -2026,6 +2035,14 @@ static void fsp_create_fsp(struct dt_node *fsp_node) static void fsp_opal_poll(void *data __unused) { + /* Test the host initiated reset */ + if (hir_trigger == 0xdeadbeef) { + uint32_t plid = log_simple_error(&e_info(OPAL_INJECTED_HIR), + "SURV: Injected HIR, initiating FSP R/R\n"); + fsp_trigger_reset(plid); + hir_trigger = 0; + } + if (try_lock(&fsp_lock)) { __fsp_poll(false); unlock(&fsp_lock); |