diff options
Diffstat (limited to 'arch/powerpc/include/asm/mmu-44x.h')
-rw-r--r-- | arch/powerpc/include/asm/mmu-44x.h | 51 |
1 files changed, 50 insertions, 1 deletions
diff --git a/arch/powerpc/include/asm/mmu-44x.h b/arch/powerpc/include/asm/mmu-44x.h index 0372669383a8..bf52d704fc47 100644 --- a/arch/powerpc/include/asm/mmu-44x.h +++ b/arch/powerpc/include/asm/mmu-44x.h | |||
@@ -40,7 +40,7 @@ | |||
40 | #define PPC44x_TLB_I 0x00000400 /* Caching is inhibited */ | 40 | #define PPC44x_TLB_I 0x00000400 /* Caching is inhibited */ |
41 | #define PPC44x_TLB_M 0x00000200 /* Memory is coherent */ | 41 | #define PPC44x_TLB_M 0x00000200 /* Memory is coherent */ |
42 | #define PPC44x_TLB_G 0x00000100 /* Memory is guarded */ | 42 | #define PPC44x_TLB_G 0x00000100 /* Memory is guarded */ |
43 | #define PPC44x_TLB_E 0x00000080 /* Memory is guarded */ | 43 | #define PPC44x_TLB_E 0x00000080 /* Memory is little endian */ |
44 | 44 | ||
45 | #define PPC44x_TLB_PERM_MASK 0x0000003f | 45 | #define PPC44x_TLB_PERM_MASK 0x0000003f |
46 | #define PPC44x_TLB_UX 0x00000020 /* User execution */ | 46 | #define PPC44x_TLB_UX 0x00000020 /* User execution */ |
@@ -53,6 +53,52 @@ | |||
53 | /* Number of TLB entries */ | 53 | /* Number of TLB entries */ |
54 | #define PPC44x_TLB_SIZE 64 | 54 | #define PPC44x_TLB_SIZE 64 |
55 | 55 | ||
56 | /* 47x bits */ | ||
57 | #define PPC47x_MMUCR_TID 0x0000ffff | ||
58 | #define PPC47x_MMUCR_STS 0x00010000 | ||
59 | |||
60 | /* Page identification fields */ | ||
61 | #define PPC47x_TLB0_EPN_MASK 0xfffff000 /* Effective Page Number */ | ||
62 | #define PPC47x_TLB0_VALID 0x00000800 /* Valid flag */ | ||
63 | #define PPC47x_TLB0_TS 0x00000400 /* Translation address space */ | ||
64 | #define PPC47x_TLB0_4K 0x00000000 | ||
65 | #define PPC47x_TLB0_16K 0x00000010 | ||
66 | #define PPC47x_TLB0_64K 0x00000030 | ||
67 | #define PPC47x_TLB0_1M 0x00000070 | ||
68 | #define PPC47x_TLB0_16M 0x000000f0 | ||
69 | #define PPC47x_TLB0_256M 0x000001f0 | ||
70 | #define PPC47x_TLB0_1G 0x000003f0 | ||
71 | #define PPC47x_TLB0_BOLTED_R 0x00000008 /* tlbre only */ | ||
72 | |||
73 | /* Translation fields */ | ||
74 | #define PPC47x_TLB1_RPN_MASK 0xfffff000 /* Real Page Number */ | ||
75 | #define PPC47x_TLB1_ERPN_MASK 0x000003ff | ||
76 | |||
77 | /* Storage attribute and access control fields */ | ||
78 | #define PPC47x_TLB2_ATTR_MASK 0x0003ff80 | ||
79 | #define PPC47x_TLB2_IL1I 0x00020000 /* Memory is guarded */ | ||
80 | #define PPC47x_TLB2_IL1D 0x00010000 /* Memory is guarded */ | ||
81 | #define PPC47x_TLB2_U0 0x00008000 /* User 0 */ | ||
82 | #define PPC47x_TLB2_U1 0x00004000 /* User 1 */ | ||
83 | #define PPC47x_TLB2_U2 0x00002000 /* User 2 */ | ||
84 | #define PPC47x_TLB2_U3 0x00001000 /* User 3 */ | ||
85 | #define PPC47x_TLB2_W 0x00000800 /* Caching is write-through */ | ||
86 | #define PPC47x_TLB2_I 0x00000400 /* Caching is inhibited */ | ||
87 | #define PPC47x_TLB2_M 0x00000200 /* Memory is coherent */ | ||
88 | #define PPC47x_TLB2_G 0x00000100 /* Memory is guarded */ | ||
89 | #define PPC47x_TLB2_E 0x00000080 /* Memory is little endian */ | ||
90 | #define PPC47x_TLB2_PERM_MASK 0x0000003f | ||
91 | #define PPC47x_TLB2_UX 0x00000020 /* User execution */ | ||
92 | #define PPC47x_TLB2_UW 0x00000010 /* User write */ | ||
93 | #define PPC47x_TLB2_UR 0x00000008 /* User read */ | ||
94 | #define PPC47x_TLB2_SX 0x00000004 /* Super execution */ | ||
95 | #define PPC47x_TLB2_SW 0x00000002 /* Super write */ | ||
96 | #define PPC47x_TLB2_SR 0x00000001 /* Super read */ | ||
97 | #define PPC47x_TLB2_U_RWX (PPC47x_TLB2_UX|PPC47x_TLB2_UW|PPC47x_TLB2_UR) | ||
98 | #define PPC47x_TLB2_S_RWX (PPC47x_TLB2_SX|PPC47x_TLB2_SW|PPC47x_TLB2_SR) | ||
99 | #define PPC47x_TLB2_S_RW (PPC47x_TLB2_SW | PPC47x_TLB2_SR) | ||
100 | #define PPC47x_TLB2_IMG (PPC47x_TLB2_I | PPC47x_TLB2_M | PPC47x_TLB2_G) | ||
101 | |||
56 | #ifndef __ASSEMBLY__ | 102 | #ifndef __ASSEMBLY__ |
57 | 103 | ||
58 | extern unsigned int tlb_44x_hwater; | 104 | extern unsigned int tlb_44x_hwater; |
@@ -79,12 +125,15 @@ typedef struct { | |||
79 | 125 | ||
80 | #if (PAGE_SHIFT == 12) | 126 | #if (PAGE_SHIFT == 12) |
81 | #define PPC44x_TLBE_SIZE PPC44x_TLB_4K | 127 | #define PPC44x_TLBE_SIZE PPC44x_TLB_4K |
128 | #define PPC47x_TLBE_SIZE PPC47x_TLB0_4K | ||
82 | #define mmu_virtual_psize MMU_PAGE_4K | 129 | #define mmu_virtual_psize MMU_PAGE_4K |
83 | #elif (PAGE_SHIFT == 14) | 130 | #elif (PAGE_SHIFT == 14) |
84 | #define PPC44x_TLBE_SIZE PPC44x_TLB_16K | 131 | #define PPC44x_TLBE_SIZE PPC44x_TLB_16K |
132 | #define PPC47x_TLBE_SIZE PPC47x_TLB0_16K | ||
85 | #define mmu_virtual_psize MMU_PAGE_16K | 133 | #define mmu_virtual_psize MMU_PAGE_16K |
86 | #elif (PAGE_SHIFT == 16) | 134 | #elif (PAGE_SHIFT == 16) |
87 | #define PPC44x_TLBE_SIZE PPC44x_TLB_64K | 135 | #define PPC44x_TLBE_SIZE PPC44x_TLB_64K |
136 | #define PPC47x_TLBE_SIZE PPC47x_TLB0_64K | ||
88 | #define mmu_virtual_psize MMU_PAGE_64K | 137 | #define mmu_virtual_psize MMU_PAGE_64K |
89 | #elif (PAGE_SHIFT == 18) | 138 | #elif (PAGE_SHIFT == 18) |
90 | #define PPC44x_TLBE_SIZE PPC44x_TLB_256K | 139 | #define PPC44x_TLBE_SIZE PPC44x_TLB_256K |