aboutsummaryrefslogtreecommitdiffstats
path: root/include/asm-sh/cpu-sh4/mmu_context.h
diff options
context:
space:
mode:
authorPaul Mundt <lethal@linux-sh.org>2007-09-20 22:55:03 -0400
committerPaul Mundt <lethal@linux-sh.org>2007-09-20 22:57:55 -0400
commitd04a0f79f502a87bb17b147afc4b3e39e75275c3 (patch)
tree9fcd7244769316e22ce54e11bd0b80f544b30f90 /include/asm-sh/cpu-sh4/mmu_context.h
parentdb2504966ceb9f08557b6ea3ab7e367016fcaba9 (diff)
sh: Fix up extended mode TLB for SH-X2+ cores.
The extended mode TLB requires both 64-bit PTEs and a 64-bit pgprot, correspondingly, the PGD also has to be 64-bits, so fix that up. The kernel and user permission bits really are decoupled in early cuts of the silicon, which means that we also have to set corresponding kernel permissions on user pages or we end up with user pages that the kernel simply can't touch (!). Finally, with those things corrected, really enable MMUCR.ME and correct the PTEA value (this simply needs to be the upper 32-bits of the PTE, with the size and protection bit encoding). Signed-off-by: Paul Mundt <lethal@linux-sh.org>
Diffstat (limited to 'include/asm-sh/cpu-sh4/mmu_context.h')
-rw-r--r--include/asm-sh/cpu-sh4/mmu_context.h14
1 files changed, 11 insertions, 3 deletions
diff --git a/include/asm-sh/cpu-sh4/mmu_context.h b/include/asm-sh/cpu-sh4/mmu_context.h
index ff4c5fbbfaf0..979acddc0f8e 100644
--- a/include/asm-sh/cpu-sh4/mmu_context.h
+++ b/include/asm-sh/cpu-sh4/mmu_context.h
@@ -22,13 +22,21 @@
22#define MMU_UTLB_ADDRESS_ARRAY 0xF6000000 22#define MMU_UTLB_ADDRESS_ARRAY 0xF6000000
23#define MMU_PAGE_ASSOC_BIT 0x80 23#define MMU_PAGE_ASSOC_BIT 0x80
24 24
25#define MMU_NTLB_ENTRIES 64 /* for 7750 */ 25#ifdef CONFIG_X2TLB
26#define MMUCR_ME (1 << 7)
27#else
28#define MMUCR_ME (0)
29#endif
30
26#ifdef CONFIG_SH_STORE_QUEUES 31#ifdef CONFIG_SH_STORE_QUEUES
27#define MMU_CONTROL_INIT 0x05 /* SQMD=0, SV=0, TI=1, AT=1 */ 32#define MMUCR_SQMD (1 << 9)
28#else 33#else
29#define MMU_CONTROL_INIT 0x205 /* SQMD=1, SV=0, TI=1, AT=1 */ 34#define MMUCR_SQMD (0)
30#endif 35#endif
31 36
37#define MMU_NTLB_ENTRIES 64
38#define MMU_CONTROL_INIT (0x05|MMUCR_SQMD|MMUCR_ME)
39
32#define MMU_ITLB_DATA_ARRAY 0xF3000000 40#define MMU_ITLB_DATA_ARRAY 0xF3000000
33#define MMU_UTLB_DATA_ARRAY 0xF7000000 41#define MMU_UTLB_DATA_ARRAY 0xF7000000
34 42