summaryrefslogtreecommitdiffstats
path: root/asm/head.S
diff options
context:
space:
mode:
Diffstat (limited to 'asm/head.S')
-rw-r--r--asm/head.S30
1 files changed, 28 insertions, 2 deletions
diff --git a/asm/head.S b/asm/head.S
index 04eb959e..23daa724 100644
--- a/asm/head.S
+++ b/asm/head.S
@@ -722,12 +722,38 @@ init_shared_sprs:
.global init_replicated_sprs
init_replicated_sprs:
+ mfspr %r3,SPR_PVR
+ srdi %r3,%r3,16
+ cmpwi cr0,%r3,PVR_TYPE_P7
+ beq 1f
+ cmpwi cr0,%r3,PVR_TYPE_P7P
+ beq 1f
+ cmpwi cr0,%r3,PVR_TYPE_P8E
+ beq 3f
+ cmpwi cr0,%r3,PVR_TYPE_P8
+ beq 3f
+ cmpwi cr0,%r3,PVR_TYPE_P8NVL
+ beq 3f
+ cmpwi cr0,%r3,PVR_TYPE_P9
+ beq 3f
+ /* Unsupported CPU type... what do we do ? */
+ b 9f
+
+1: /* P7, P7+ */
/* LPCR: sane value */
LOAD_IMM64(%r3,0x0040000000000004)
mtspr SPR_LPCR, %r3
+ sync
+ isync
+ b 9f
- /* XXX TODO: Add more */
- blr
+3: /* P8, P8E, P9 */
+ /* LPCR: sane value */
+ LOAD_IMM64(%r3,0x0040000000000000)
+ mtspr SPR_LPCR, %r3
+ sync
+ isync
+9: blr
.global enter_nap
enter_nap:
OpenPOWER on IntegriCloud