diff options
Diffstat (limited to 'arch/arm/mm/dump.c')
-rw-r--r-- | arch/arm/mm/dump.c | 50 |
1 files changed, 35 insertions, 15 deletions
diff --git a/arch/arm/mm/dump.c b/arch/arm/mm/dump.c index 2b3a56414271..c508f41a43bc 100644 --- a/arch/arm/mm/dump.c +++ b/arch/arm/mm/dump.c | |||
@@ -120,34 +120,51 @@ static const struct prot_bits pte_bits[] = { | |||
120 | }; | 120 | }; |
121 | 121 | ||
122 | static const struct prot_bits section_bits[] = { | 122 | static const struct prot_bits section_bits[] = { |
123 | #ifndef CONFIG_ARM_LPAE | 123 | #ifdef CONFIG_ARM_LPAE |
124 | /* These are approximate */ | 124 | { |
125 | .mask = PMD_SECT_USER, | ||
126 | .val = PMD_SECT_USER, | ||
127 | .set = "USR", | ||
128 | }, { | ||
129 | .mask = PMD_SECT_RDONLY, | ||
130 | .val = PMD_SECT_RDONLY, | ||
131 | .set = "ro", | ||
132 | .clear = "RW", | ||
133 | #elif __LINUX_ARM_ARCH__ >= 6 | ||
125 | { | 134 | { |
126 | .mask = PMD_SECT_AP_READ | PMD_SECT_AP_WRITE, | 135 | .mask = PMD_SECT_APX | PMD_SECT_AP_READ | PMD_SECT_AP_WRITE, |
127 | .val = 0, | 136 | .val = PMD_SECT_APX | PMD_SECT_AP_WRITE, |
128 | .set = " ro", | 137 | .set = " ro", |
129 | }, { | 138 | }, { |
130 | .mask = PMD_SECT_AP_READ | PMD_SECT_AP_WRITE, | 139 | .mask = PMD_SECT_APX | PMD_SECT_AP_READ | PMD_SECT_AP_WRITE, |
131 | .val = PMD_SECT_AP_WRITE, | 140 | .val = PMD_SECT_AP_WRITE, |
132 | .set = " RW", | 141 | .set = " RW", |
133 | }, { | 142 | }, { |
134 | .mask = PMD_SECT_AP_READ | PMD_SECT_AP_WRITE, | 143 | .mask = PMD_SECT_APX | PMD_SECT_AP_READ | PMD_SECT_AP_WRITE, |
135 | .val = PMD_SECT_AP_READ, | 144 | .val = PMD_SECT_AP_READ, |
136 | .set = "USR ro", | 145 | .set = "USR ro", |
137 | }, { | 146 | }, { |
138 | .mask = PMD_SECT_AP_READ | PMD_SECT_AP_WRITE, | 147 | .mask = PMD_SECT_APX | PMD_SECT_AP_READ | PMD_SECT_AP_WRITE, |
139 | .val = PMD_SECT_AP_READ | PMD_SECT_AP_WRITE, | 148 | .val = PMD_SECT_AP_READ | PMD_SECT_AP_WRITE, |
140 | .set = "USR RW", | 149 | .set = "USR RW", |
141 | #else | 150 | #else /* ARMv4/ARMv5 */ |
151 | /* These are approximate */ | ||
142 | { | 152 | { |
143 | .mask = PMD_SECT_USER, | 153 | .mask = PMD_SECT_AP_READ | PMD_SECT_AP_WRITE, |
144 | .val = PMD_SECT_USER, | 154 | .val = 0, |
145 | .set = "USR", | 155 | .set = " ro", |
146 | }, { | 156 | }, { |
147 | .mask = PMD_SECT_RDONLY, | 157 | .mask = PMD_SECT_AP_READ | PMD_SECT_AP_WRITE, |
148 | .val = PMD_SECT_RDONLY, | 158 | .val = PMD_SECT_AP_WRITE, |
149 | .set = "ro", | 159 | .set = " RW", |
150 | .clear = "RW", | 160 | }, { |
161 | .mask = PMD_SECT_AP_READ | PMD_SECT_AP_WRITE, | ||
162 | .val = PMD_SECT_AP_READ, | ||
163 | .set = "USR ro", | ||
164 | }, { | ||
165 | .mask = PMD_SECT_AP_READ | PMD_SECT_AP_WRITE, | ||
166 | .val = PMD_SECT_AP_READ | PMD_SECT_AP_WRITE, | ||
167 | .set = "USR RW", | ||
151 | #endif | 168 | #endif |
152 | }, { | 169 | }, { |
153 | .mask = PMD_SECT_XN, | 170 | .mask = PMD_SECT_XN, |
@@ -264,6 +281,9 @@ static void walk_pmd(struct pg_state *st, pud_t *pud, unsigned long start) | |||
264 | note_page(st, addr, 3, pmd_val(*pmd)); | 281 | note_page(st, addr, 3, pmd_val(*pmd)); |
265 | else | 282 | else |
266 | walk_pte(st, pmd, addr); | 283 | walk_pte(st, pmd, addr); |
284 | |||
285 | if (SECTION_SIZE < PMD_SIZE && pmd_large(pmd[1])) | ||
286 | note_page(st, addr + SECTION_SIZE, 3, pmd_val(pmd[1])); | ||
267 | } | 287 | } |
268 | } | 288 | } |
269 | 289 | ||