Search
lxdream.org :: lxdream :: r810:833cc4960556
lxdream 0.9.1
released Jun 29
Download Now
changeset810:833cc4960556
parent809:8bdbf4d95da4
child811:7ff871670e58
authornkeynes
dateSat Aug 09 11:17:06 2008 +0000 (11 years ago)
Remap 1C000000 .. 1FFFFFFF to the P4 region when accessed through TLB
lookup, as per the SH4 manual
src/sh4/mmu.c
1.1 --- a/src/sh4/mmu.c Sat Aug 09 10:48:03 2008 +0000
1.2 +++ b/src/sh4/mmu.c Sat Aug 09 11:17:06 2008 +0000
1.3 @@ -686,8 +686,11 @@
1.4 }
1.5
1.6 /* finally generate the target address */
1.7 - return (mmu_utlb[entryNo].ppn & mmu_utlb[entryNo].mask) |
1.8 - (addr & (~mmu_utlb[entryNo].mask));
1.9 + sh4addr_t pma = (mmu_utlb[entryNo].ppn & mmu_utlb[entryNo].mask) |
1.10 + (addr & (~mmu_utlb[entryNo].mask));
1.11 + if( pma > 0x1C000000 ) // Remap 1Cxx .. 1Fxx region to P4
1.12 + pma |= 0xE0000000;
1.13 + return pma;
1.14 }
1.15 }
1.16
1.17 @@ -746,8 +749,11 @@
1.18 }
1.19
1.20 /* finally generate the target address */
1.21 - return (mmu_utlb[entryNo].ppn & mmu_utlb[entryNo].mask) |
1.22 - (addr & (~mmu_utlb[entryNo].mask));
1.23 + sh4addr_t pma = (mmu_utlb[entryNo].ppn & mmu_utlb[entryNo].mask) |
1.24 + (addr & (~mmu_utlb[entryNo].mask));
1.25 + if( pma > 0x1C000000 ) // Remap 1Cxx .. 1Fxx region to P4
1.26 + pma |= 0xE0000000;
1.27 + return pma;
1.28 }
1.29 }
1.30
.