aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--arch/blackfin/kernel/cplb-mpu/cplbmgr.c10
1 files changed, 8 insertions, 2 deletions
diff --git a/arch/blackfin/kernel/cplb-mpu/cplbmgr.c b/arch/blackfin/kernel/cplb-mpu/cplbmgr.c
index 3b165bbe90fa..44bbfe26ce49 100644
--- a/arch/blackfin/kernel/cplb-mpu/cplbmgr.c
+++ b/arch/blackfin/kernel/cplb-mpu/cplbmgr.c
@@ -165,7 +165,7 @@ static noinline int dcplb_miss(void)
165 && (status & (FAULT_RW | FAULT_USERSUPV)) == FAULT_USERSUPV) { 165 && (status & (FAULT_RW | FAULT_USERSUPV)) == FAULT_USERSUPV) {
166 addr &= ~(1 * 1024 * 1024 - 1); 166 addr &= ~(1 * 1024 * 1024 - 1);
167 d_data &= ~PAGE_SIZE_4KB; 167 d_data &= ~PAGE_SIZE_4KB;
168 d_data |= PAGE_SIZE_1MB | CPLB_USER_RD; 168 d_data |= PAGE_SIZE_1MB;
169 } else 169 } else
170 return CPLB_PROT_VIOL; 170 return CPLB_PROT_VIOL;
171 } else if (addr >= _ramend) { 171 } else if (addr >= _ramend) {
@@ -243,7 +243,13 @@ static noinline int icplb_miss(void)
243#endif 243#endif
244 244
245 if (addr >= physical_mem_end) { 245 if (addr >= physical_mem_end) {
246 return CPLB_PROT_VIOL; 246 if (addr >= BOOT_ROM_START && addr < BOOT_ROM_START + BOOT_ROM_LENGTH
247 && (status & FAULT_USERSUPV)) {
248 addr &= ~(1 * 1024 * 1024 - 1);
249 i_data &= ~PAGE_SIZE_4KB;
250 i_data |= PAGE_SIZE_1MB;
251 } else
252 return CPLB_PROT_VIOL;
247 } else if (addr >= _ramend) { 253 } else if (addr >= _ramend) {
248 i_data |= CPLB_USER_RD; 254 i_data |= CPLB_USER_RD;
249 } else { 255 } else {