Search
lxdream.org :: lxdream/src/sh4/mmu.c :: diff
lxdream 0.9.1
released Jun 29
Download Now
filename src/sh4/mmu.c
changeset 571:9bc09948d0f2
prev570:d2893980fbf5
next577:a181aeacd6e8
author nkeynes
date Thu Jan 10 08:28:37 2008 +0000 (13 years ago)
branchlxdream-mmu
permissions -rw-r--r--
last change More MMU work in progess. Much better now...
file annotate diff log raw
1.1 --- a/src/sh4/mmu.c Sun Jan 06 12:24:18 2008 +0000
1.2 +++ b/src/sh4/mmu.c Thu Jan 10 08:28:37 2008 +0000
1.3 @@ -158,11 +158,12 @@
1.4 mmu_lrui = (val >> 26) & 0x3F;
1.5 val &= 0x00000301;
1.6 tmp = MMIO_READ( MMU, MMUCR );
1.7 - if( ((val ^ tmp) & MMUCR_AT) ) {
1.8 + if( ((val ^ tmp) & MMUCR_AT) && sh4_is_using_xlat() ) {
1.9 // AT flag has changed state - flush the xlt cache as all bets
1.10 // are off now. We also need to force an immediate exit from the
1.11 // current block
1.12 - xlat_flush_cache();
1.13 + MMIO_WRITE( MMU, MMUCR, val );
1.14 + sh4_translate_flush_cache();
1.15 }
1.16 break;
1.17 case CCR:
1.18 @@ -221,7 +222,7 @@
1.19 return 1;
1.20 }
1.21 if( fread( &mmu_asid, sizeof(mmu_asid), 1, f ) != 1 ) {
1.22 - return 1;
1.23 + return 1;
1.24 }
1.25 return 0;
1.26 }
.