summaryrefslogtreecommitdiffstats
path: root/asm
diff options
context:
space:
mode:
authorBenjamin Herrenschmidt <benh@kernel.crashing.org>2017-03-09 11:45:40 +1100
committerStewart Smith <stewart@linux.vnet.ibm.com>2017-03-09 13:36:35 +1100
commitbc2a9650f089edb98cd62fc5768b88cdda08fa2c (patch)
treea3fbf3ae26c043260b3d2dedaf2dbddf530bed4b /asm
parent55b280a836af0632e942e21272ab4405bba938b8 (diff)
downloadtalos-skiboot-bc2a9650f089edb98cd62fc5768b88cdda08fa2c.tar.gz
talos-skiboot-bc2a9650f089edb98cd62fc5768b88cdda08fa2c.zip
asm: Add POWER9 case to init_shared_sprs
For now, setup the HID and HMEER. We'll add more as we get good default values from HW. Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org> Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
Diffstat (limited to 'asm')
-rw-r--r--asm/head.S24
1 files changed, 24 insertions, 0 deletions
diff --git a/asm/head.S b/asm/head.S
index 23daa724..beb53550 100644
--- a/asm/head.S
+++ b/asm/head.S
@@ -670,6 +670,8 @@ init_shared_sprs:
beq 3f
cmpwi cr0,%r3,PVR_TYPE_P8NVL
beq 3f
+ cmpwi cr0,%r3,PVR_TYPE_P9
+ beq 4f
/* Unsupported CPU type... what do we do ? */
b 9f
@@ -718,6 +720,28 @@ init_shared_sprs:
/* RPR (per-LPAR but let's treat it as replicated for now) */
LOAD_IMM64(%r3,0x00000103070F1F3F)
mtspr SPR_RPR,%r3
+ b 9f
+
+4: /* P9 */
+ /* HID0: Clear bit 5 (enable core recovery)
+ * Clear bit 4 (HILE)
+ */
+ mfspr %r3,SPR_HID0
+ li %r0,1
+ sldi %r4,%r0,(63-5)
+ sldi %r5,%r0,(63-4)
+ or %r0,%r4,%r5,
+ andc %r3,%r3,%r0
+ sync
+ mtspr SPR_HID0,%r3
+ isync
+ /* HMEER: Enable HMIs for core recovery and TOD errors. */
+ LOAD_IMM64(%r0,SPR_HMEER_HMI_ENABLE_MASK)
+ mfspr %r3,SPR_HMEER
+ or %r3,%r3,%r0
+ sync
+ mtspr SPR_HMEER,%r3
+ isync
9: blr
.global init_replicated_sprs
OpenPOWER on IntegriCloud