Search
lxdream.org :: lxdream :: r448:3e5f0c52f0ec
lxdream 0.9.1
released Jun 29
Download Now
changeset448:3e5f0c52f0ec
parent447:3e095bfcb476
child449:21440948c684
authornkeynes
dateTue Oct 16 12:36:59 2007 +0000 (12 years ago)
Downgrade the errors to warnings - they're more whinges than anything fatal
src/sh4/sh4mem.c
1.1 --- a/src/sh4/sh4mem.c Tue Oct 16 12:36:29 2007 +0000
1.2 +++ b/src/sh4/sh4mem.c Tue Oct 16 12:36:59 2007 +0000
1.3 @@ -1,5 +1,5 @@
1.4 /**
1.5 - * $Id: sh4mem.c,v 1.28 2007-10-08 12:09:06 nkeynes Exp $
1.6 + * $Id: sh4mem.c,v 1.29 2007-10-16 12:36:59 nkeynes Exp $
1.7 * sh4mem.c is responsible for the SH4's access to memory (including memory
1.8 * mapped I/O), using the page maps created in mem.c
1.9 *
1.10 @@ -76,7 +76,7 @@
1.11 if( (addr & 0xFF000000) != 0xF4000000 ) {
1.12 /* OC address cache isn't implemented, but don't complain about it.
1.13 * Complain about anything else though */
1.14 - ERROR( "Attempted read from unknown P4 region: %08X", addr );
1.15 + WARN( "Attempted read from unknown P4 region: %08X", addr );
1.16 }
1.17 return 0;
1.18 } else {
1.19 @@ -96,7 +96,7 @@
1.20 } else if( (addr & 0xFF000000) != 0xF4000000 ) {
1.21 /* OC address cache isn't implemented, but don't complain about it.
1.22 * Complain about anything else though */
1.23 - ERROR( "Attempted write to unknown P4 region: %08X", addr );
1.24 + WARN( "Attempted write to unknown P4 region: %08X", addr );
1.25 }
1.26 } else {
1.27 TRACE_P4IO( "Long write %08X => %08X", io, (addr&0xFFF), val, addr );
1.28 @@ -117,7 +117,7 @@
1.29 page = page_map[ (addr & 0x1FFFFFFF) >> 12 ];
1.30 if( ((uint32_t)page) < MAX_IO_REGIONS ) { /* IO Region */
1.31 if( page == NULL ) {
1.32 - ERROR( "Attempted word read to missing page: %08X",
1.33 + WARN( "Attempted word read to missing page: %08X",
1.34 addr );
1.35 return 0;
1.36 }
1.37 @@ -148,7 +148,7 @@
1.38 if( ((uint32_t)page) < MAX_IO_REGIONS ) { /* IO Region */
1.39 int32_t val;
1.40 if( page == NULL ) {
1.41 - ERROR( "Attempted long read to missing page: %08X", addr );
1.42 + WARN( "Attempted long read to missing page: %08X", addr );
1.43 return 0;
1.44 }
1.45 val = io_rgn[(uint32_t)page]->io_read(addr&0xFFF);
1.46 @@ -180,7 +180,7 @@
1.47 if( ((uint32_t)page) < MAX_IO_REGIONS ) { /* IO Region */
1.48 int32_t val;
1.49 if( page == NULL ) {
1.50 - ERROR( "Attempted word read to missing page: %08X", addr );
1.51 + WARN( "Attempted word read to missing page: %08X", addr );
1.52 return 0;
1.53 }
1.54 val = SIGNEXT16(io_rgn[(uint32_t)page]->io_read(addr&0xFFF));
1.55 @@ -213,7 +213,7 @@
1.56 if( ((uint32_t)page) < MAX_IO_REGIONS ) { /* IO Region */
1.57 int32_t val;
1.58 if( page == NULL ) {
1.59 - ERROR( "Attempted byte read to missing page: %08X", addr );
1.60 + WARN( "Attempted byte read to missing page: %08X", addr );
1.61 return 0;
1.62 }
1.63 val = SIGNEXT8(io_rgn[(uint32_t)page]->io_read(addr&0xFFF));
1.64 @@ -248,7 +248,7 @@
1.65 }
1.66
1.67 if( (addr&0x1FFFFFFF) < 0x200000 ) {
1.68 - ERROR( "Attempted write to read-only memory: %08X => %08X", val, addr);
1.69 + WARN( "Attempted write to read-only memory: %08X => %08X", val, addr);
1.70 sh4_stop();
1.71 return;
1.72 }
1.73 @@ -261,7 +261,7 @@
1.74 if( (addr & 0x1F000000) >= 0x04000000 &&
1.75 (addr & 0x1F000000) < 0x07000000 )
1.76 return;
1.77 - ERROR( "Long write to missing page: %08X => %08X", val, addr );
1.78 + WARN( "Long write to missing page: %08X => %08X", val, addr );
1.79 return;
1.80 }
1.81 TRACE_IO( "Long write %08X => %08X", page, (addr&0xFFF), val, addr );
1.82 @@ -295,14 +295,14 @@
1.83 }
1.84
1.85 if( (addr&0x1FFFFFFF) < 0x200000 ) {
1.86 - ERROR( "Attempted write to read-only memory: %08X => %08X", val, addr);
1.87 + WARN( "Attempted write to read-only memory: %08X => %08X", val, addr);
1.88 sh4_stop();
1.89 return;
1.90 }
1.91 page = page_map[ (addr & 0x1FFFFFFF) >> 12 ];
1.92 if( ((uint32_t)page) < MAX_IO_REGIONS ) { /* IO Region */
1.93 if( page == NULL ) {
1.94 - ERROR( "Attempted word write to missing page: %08X", addr );
1.95 + WARN( "Attempted word write to missing page: %08X", addr );
1.96 return;
1.97 }
1.98 TRACE_IO( "Word write %04X => %08X", page, (addr&0xFFF), val&0xFFFF, addr );
1.99 @@ -336,14 +336,14 @@
1.100 }
1.101
1.102 if( (addr&0x1FFFFFFF) < 0x200000 ) {
1.103 - ERROR( "Attempted write to read-only memory: %08X => %08X", val, addr);
1.104 + WARN( "Attempted write to read-only memory: %08X => %08X", val, addr);
1.105 sh4_stop();
1.106 return;
1.107 }
1.108 page = page_map[ (addr & 0x1FFFFFFF) >> 12 ];
1.109 if( ((uint32_t)page) < MAX_IO_REGIONS ) { /* IO Region */
1.110 if( page == NULL ) {
1.111 - ERROR( "Attempted byte write to missing page: %08X", addr );
1.112 + WARN( "Attempted byte write to missing page: %08X", addr );
1.113 return;
1.114 }
1.115 TRACE_IO( "Byte write %02X => %08X", page, (addr&0xFFF), val&0xFF, addr );
1.116 @@ -364,7 +364,7 @@
1.117 } else {
1.118 char *src = mem_get_region(srcaddr);
1.119 if( src == NULL ) {
1.120 - ERROR( "Attempted block read from unknown address %08X", srcaddr );
1.121 + WARN( "Attempted block read from unknown address %08X", srcaddr );
1.122 } else {
1.123 memcpy( dest, src, count );
1.124 }
1.125 @@ -383,7 +383,7 @@
1.126 }
1.127 char *dest = mem_get_region(destaddr);
1.128 if( dest == NULL )
1.129 - ERROR( "Attempted block write to unknown address %08X", destaddr );
1.130 + WARN( "Attempted block write to unknown address %08X", destaddr );
1.131 else {
1.132 xlat_invalidate_block( destaddr, count );
1.133 memcpy( dest, src, count );
.