Search
lxdream.org :: lxdream/src/sh4/mmu.c :: diff
lxdream 0.9.1
released Jun 29
Download Now
filename src/sh4/mmu.c
changeset 810:833cc4960556
prev807:1ca418e6ed5d
next817:e9d2d9be7cb6
author nkeynes
date Sat Aug 09 11:17:06 2008 +0000 (13 years ago)
permissions -rw-r--r--
last change Remap 1C000000 .. 1FFFFFFF to the P4 region when accessed through TLB
lookup, as per the SH4 manual
file annotate diff log raw
1.1 --- a/src/sh4/mmu.c Sat Aug 09 07:39:47 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
.