aboutsummaryrefslogtreecommitdiff
path: root/hw
diff options
context:
space:
mode:
authorMahesh Salgaonkar <mahesh@linux.vnet.ibm.com>2015-03-11 16:02:18 +0530
committerStewart Smith <stewart@linux.vnet.ibm.com>2015-03-26 11:12:18 +1100
commita2f6ec1ec030f9f038615f889a75376c4db99d91 (patch)
treef9288f6ed358cb9521b54c3cf72778b0875d238f /hw
parentfcca42f63e16aa186e3ef1bb088fb5abfef3590e (diff)
downloadskiboot-a2f6ec1ec030f9f038615f889a75376c4db99d91.zip
skiboot-a2f6ec1ec030f9f038615f889a75376c4db99d91.tar.gz
skiboot-a2f6ec1ec030f9f038615f889a75376c4db99d91.tar.bz2
opal: Recover from TFMR DEC parity error.
Recovery process for TFMR DEC parity error: - Set DEC Register with all ones. - Reset TFMR DEC parity error bit. To inject TFMR DEC parity error issue: $ putscom pu.ex 10013281 0006080000000000 -all Signed-off-by: Mahesh Salgaonkar <mahesh@linux.vnet.ibm.com> Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
Diffstat (limited to 'hw')
-rw-r--r--hw/chiptod.c11
1 files changed, 10 insertions, 1 deletions
diff --git a/hw/chiptod.c b/hw/chiptod.c
index 6f6800f..1c77cb7 100644
--- a/hw/chiptod.c
+++ b/hw/chiptod.c
@@ -697,6 +697,14 @@ static bool tfmr_recover_non_tb_errors(uint64_t tfmr)
tfmr_reset_errors |= SPR_TFMR_HDEC_PARITY_ERROR;
}
+ if (tfmr & SPR_TFMR_DEC_PARITY_ERR) {
+ /* Set DEC with all ones */
+ mtspr(SPR_DEC, ~0);
+
+ /* set bit 59 to clear TFMR DEC parity error. */
+ tfmr_reset_errors |= SPR_TFMR_DEC_PARITY_ERR;
+ }
+
/* Write TFMR twice to clear the error */
mtspr(SPR_TFMR, base_tfmr | tfmr_reset_errors);
mtspr(SPR_TFMR, base_tfmr | tfmr_reset_errors);
@@ -848,7 +856,8 @@ int chiptod_recover_tb_errors(void)
/*
* Now that TB is running, check for TFMR non-TB errors.
*/
- if (tfmr & SPR_TFMR_HDEC_PARITY_ERROR) {
+ if ((tfmr & SPR_TFMR_HDEC_PARITY_ERROR) ||
+ (tfmr & SPR_TFMR_DEC_PARITY_ERR)) {
if (!tfmr_recover_non_tb_errors(tfmr)) {
rc = 0;
goto error_out;