Search
lxdream.org :: lxdream :: r980:deb4361928fe
lxdream 0.9.1
released Jun 29
Download Now
changeset980:deb4361928fe
parent979:2cc7b486ea6c
child981:79fcace1ab43
authornkeynes
dateWed Feb 04 21:45:21 2009 +0000 (11 years ago)
Fix signedness in mmu_ext_page_remapped (Thanks kaz!)
Fix fallthrough case in mmu_utlb_entry_for_vpn
Fix signedness warnings in cache.c
src/sh4/cache.c
src/sh4/mmu.c
1.1 --- a/src/sh4/cache.c Wed Feb 04 00:58:54 2009 +0000
1.2 +++ b/src/sh4/cache.c Wed Feb 04 21:45:21 2009 +0000
1.3 @@ -24,7 +24,6 @@
1.4 #include "clock.h"
1.5 #include "sh4/sh4core.h"
1.6 #include "sh4/sh4mmio.h"
1.7 -#include "sh4/xltcache.h"
1.8 #include "sh4/mmu.h"
1.9
1.10 #define OCRAM_START (0x7C000000>>LXDREAM_PAGE_BITS)
1.11 @@ -186,7 +185,7 @@
1.12 {
1.13 int entry = addr & 0x00003FE0;
1.14 struct cache_line *line = &ccn_ocache[entry>>5];
1.15 - char *cache_data = &ccn_ocache_data[entry];
1.16 + unsigned char *cache_data = &ccn_ocache_data[entry];
1.17 sh4addr_t old_addr = line->tag;
1.18 line->tag = addr & 0x1FFFFFE0;
1.19 char oldstate = ccn_cache_map[old_addr>>5];
1.20 @@ -287,7 +286,7 @@
1.21 int oldflags = ccn_cache_map[addr>>5];
1.22 ccn_cache_map[addr>>5] &= ~CACHE_VALID;
1.23 if( oldflags == (CACHE_VALID|CACHE_DIRTY) ) {
1.24 - char *cache_data = &ccn_ocache_data[addr & 0x3FE0];
1.25 + unsigned char *cache_data = &ccn_ocache_data[addr & 0x3FE0];
1.26 ext_address_space[addr>>12]->write_burst(addr, cache_data);
1.27 }
1.28 }
1.29 @@ -297,7 +296,7 @@
1.30 addr &= 0x1FFFFFE0;
1.31 if( ccn_cache_map[addr>>5] == (CACHE_VALID|CACHE_DIRTY) ) {
1.32 ccn_cache_map[addr>>5] &= ~CACHE_DIRTY;
1.33 - char *cache_data = &ccn_ocache_data[addr & 0x3FE0];
1.34 + unsigned char *cache_data = &ccn_ocache_data[addr & 0x3FE0];
1.35 ext_address_space[addr>>12]->write_burst(addr, cache_data);
1.36 }
1.37 }
2.1 --- a/src/sh4/mmu.c Wed Feb 04 00:58:54 2009 +0000
2.2 +++ b/src/sh4/mmu.c Wed Feb 04 21:45:21 2009 +0000
2.3 @@ -389,7 +389,7 @@
2.4
2.5 static gboolean mmu_ext_page_remapped( sh4addr_t page, mem_region_fn_t fn, void *user_data )
2.6 {
2.7 - int i;
2.8 + unsigned int i;
2.9 if( (MMIO_READ(MMU,MMUCR)) & MMUCR_AT ) {
2.10 /* TLB on */
2.11 sh4_address_space[(page|0x80000000)>>12] = fn; /* Direct map to P1 and P2 */
2.12 @@ -873,7 +873,8 @@
2.13 if( fn >= &mmu_utlb_pages[0].fn && fn < &mmu_utlb_pages[UTLB_ENTRY_COUNT].fn ) {
2.14 return ((struct utlb_page_entry *)fn) - &mmu_utlb_pages[0];
2.15 }
2.16 - } else if( fn == &mem_region_tlb_multihit ) {
2.17 + }
2.18 + if( fn == &mem_region_tlb_multihit ) {
2.19 return -2;
2.20 } else {
2.21 return -1;
.