Commit b2463a64ec9a5e276a69348aa2d91360e353ea9a

Authored by aurel32
1 parent d317b92d

SH4: R2D-PLUS FPGA: simply unassigned memory triggering

Use NULL to trigger unassigned memory error on 32-bit accesses instead
of assert(0) as suggested by Blue Swirl.

Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>

git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5141 c046a42c-6fe2-441c-8c8c-71466251a162
Showing 1 changed file with 2 additions and 16 deletions
hw/r2d.c
@@ -27,7 +27,6 @@ @@ -27,7 +27,6 @@
27 #include "sh.h" 27 #include "sh.h"
28 #include "sysemu.h" 28 #include "sysemu.h"
29 #include "boards.h" 29 #include "boards.h"
30 -#include "assert.h"  
31 30
32 #define SDRAM_BASE 0x0c000000 /* Physical location of SDRAM: Area 3 */ 31 #define SDRAM_BASE 0x0c000000 /* Physical location of SDRAM: Area 3 */
33 #define SDRAM_SIZE 0x04000000 32 #define SDRAM_SIZE 0x04000000
@@ -100,29 +99,16 @@ r2d_fpga_write(void *opaque, target_phys_addr_t addr, uint32_t value) @@ -100,29 +99,16 @@ r2d_fpga_write(void *opaque, target_phys_addr_t addr, uint32_t value)
100 } 99 }
101 } 100 }
102 101
103 -static uint32_t invalid_read(void *opaque, target_phys_addr_t addr)  
104 -{  
105 - assert(0);  
106 -  
107 - return 0;  
108 -}  
109 -  
110 -static void invalid_write(void *opaque, target_phys_addr_t addr,  
111 - uint32_t mem_value)  
112 -{  
113 - assert(0);  
114 -}  
115 -  
116 static CPUReadMemoryFunc *r2d_fpga_readfn[] = { 102 static CPUReadMemoryFunc *r2d_fpga_readfn[] = {
117 r2d_fpga_read, 103 r2d_fpga_read,
118 r2d_fpga_read, 104 r2d_fpga_read,
119 - invalid_read, 105 + NULL,
120 }; 106 };
121 107
122 static CPUWriteMemoryFunc *r2d_fpga_writefn[] = { 108 static CPUWriteMemoryFunc *r2d_fpga_writefn[] = {
123 r2d_fpga_write, 109 r2d_fpga_write,
124 r2d_fpga_write, 110 r2d_fpga_write,
125 - invalid_write, 111 + NULL,
126 }; 112 };
127 113
128 static void r2d_fpga_init(target_phys_addr_t base) 114 static void r2d_fpga_init(target_phys_addr_t base)