diff options
author | Michael Neuling <mikey@neuling.org> | 2012-11-02 01:41:58 -0400 |
---|---|---|
committer | Benjamin Herrenschmidt <benh@kernel.crashing.org> | 2012-11-14 23:08:06 -0500 |
commit | b0302722eec7c086a31de6e3d9789304ef21df7b (patch) | |
tree | 85614ae0a912bff7e9d7a2164a2952a50df13526 /arch | |
parent | f7c32c24f5788798f17d4e520a5d238335a859cb (diff) |
powerpc: Setup relocation on exceptions for bare metal systems
This turns on MMU on execptions via AIL field in the LPCR.
Signed-off-by: Matt Evans <matt@ozlabs.org>
Signed-off-by: Michael Neuling <mikey@neuling.org>
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Diffstat (limited to 'arch')
-rw-r--r-- | arch/powerpc/include/asm/reg.h | 2 | ||||
-rw-r--r-- | arch/powerpc/kernel/cpu_setup_power.S | 2 |
2 files changed, 4 insertions, 0 deletions
diff --git a/arch/powerpc/include/asm/reg.h b/arch/powerpc/include/asm/reg.h index 7b44a6e3e0f0..1b853f744f8b 100644 --- a/arch/powerpc/include/asm/reg.h +++ b/arch/powerpc/include/asm/reg.h | |||
@@ -249,6 +249,8 @@ | |||
249 | #define LPCR_RMLS 0x1C000000 /* impl dependent rmo limit sel */ | 249 | #define LPCR_RMLS 0x1C000000 /* impl dependent rmo limit sel */ |
250 | #define LPCR_RMLS_SH (63-37) | 250 | #define LPCR_RMLS_SH (63-37) |
251 | #define LPCR_ILE 0x02000000 /* !HV irqs set MSR:LE */ | 251 | #define LPCR_ILE 0x02000000 /* !HV irqs set MSR:LE */ |
252 | #define LPCR_AIL_0 0x00000000 /* MMU off exception offset 0x0 */ | ||
253 | #define LPCR_AIL_3 0x01800000 /* MMU on exception offset 0xc00...4xxx */ | ||
252 | #define LPCR_PECE 0x00007000 /* powersave exit cause enable */ | 254 | #define LPCR_PECE 0x00007000 /* powersave exit cause enable */ |
253 | #define LPCR_PECE0 0x00004000 /* ext. exceptions can cause exit */ | 255 | #define LPCR_PECE0 0x00004000 /* ext. exceptions can cause exit */ |
254 | #define LPCR_PECE1 0x00002000 /* decrementer can cause exit */ | 256 | #define LPCR_PECE1 0x00002000 /* decrementer can cause exit */ |
diff --git a/arch/powerpc/kernel/cpu_setup_power.S b/arch/powerpc/kernel/cpu_setup_power.S index 52dd03396c5d..57cf14065aec 100644 --- a/arch/powerpc/kernel/cpu_setup_power.S +++ b/arch/powerpc/kernel/cpu_setup_power.S | |||
@@ -54,6 +54,7 @@ _GLOBAL(__setup_cpu_power8) | |||
54 | li r0,0 | 54 | li r0,0 |
55 | mtspr SPRN_LPID,r0 | 55 | mtspr SPRN_LPID,r0 |
56 | mfspr r3,SPRN_LPCR | 56 | mfspr r3,SPRN_LPCR |
57 | oris r3, r3, LPCR_AIL_3@h | ||
57 | bl __init_LPCR | 58 | bl __init_LPCR |
58 | bl __init_TLB | 59 | bl __init_TLB |
59 | mtlr r11 | 60 | mtlr r11 |
@@ -67,6 +68,7 @@ _GLOBAL(__restore_cpu_power8) | |||
67 | li r0,0 | 68 | li r0,0 |
68 | mtspr SPRN_LPID,r0 | 69 | mtspr SPRN_LPID,r0 |
69 | mfspr r3,SPRN_LPCR | 70 | mfspr r3,SPRN_LPCR |
71 | oris r3, r3, LPCR_AIL_3@h | ||
70 | bl __init_LPCR | 72 | bl __init_LPCR |
71 | bl __init_TLB | 73 | bl __init_TLB |
72 | mtlr r11 | 74 | mtlr r11 |