diff options
author | blueswir1 <blueswir1@c046a42c-6fe2-441c-8c8c-71466251a162> | 2007-05-26 17:39:43 +0000 |
---|---|---|
committer | blueswir1 <blueswir1@c046a42c-6fe2-441c-8c8c-71466251a162> | 2007-05-26 17:39:43 +0000 |
commit | 5aca8c3b2fbada188ff86781fba24685d346cef9 (patch) | |
tree | d3cc0526e7c45b23dfddf42a123d4261f87a93b4 /hw/slavio_intctl.c | |
parent | db7b5426a4b424249b4aba3496bf14da69a6625b (diff) |
Split DMA controller in two
Fix register size related bugs
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@2869 c046a42c-6fe2-441c-8c8c-71466251a162
Diffstat (limited to 'hw/slavio_intctl.c')
-rw-r--r-- | hw/slavio_intctl.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/hw/slavio_intctl.c b/hw/slavio_intctl.c index 2d1f6552e0..7f93b22e32 100644 --- a/hw/slavio_intctl.c +++ b/hw/slavio_intctl.c @@ -58,7 +58,9 @@ typedef struct SLAVIO_INTCTLState { } SLAVIO_INTCTLState; #define INTCTL_MAXADDR 0xf +#define INTCTL_SIZE (INTCTL_MAXADDR + 1) #define INTCTLM_MAXADDR 0x13 +#define INTCTLM_SIZE (INTCTLM_MAXADDR + 1) #define INTCTLM_MASK 0x1f static void slavio_check_interrupts(void *opaque); @@ -386,11 +388,12 @@ void *slavio_intctl_init(target_phys_addr_t addr, target_phys_addr_t addrg, s->intbit_to_level = intbit_to_level; for (i = 0; i < MAX_CPUS; i++) { slavio_intctl_io_memory = cpu_register_io_memory(0, slavio_intctl_mem_read, slavio_intctl_mem_write, s); - cpu_register_physical_memory(addr + i * TARGET_PAGE_SIZE, INTCTL_MAXADDR, slavio_intctl_io_memory); + cpu_register_physical_memory(addr + i * TARGET_PAGE_SIZE, INTCTL_SIZE, + slavio_intctl_io_memory); } slavio_intctlm_io_memory = cpu_register_io_memory(0, slavio_intctlm_mem_read, slavio_intctlm_mem_write, s); - cpu_register_physical_memory(addrg, INTCTLM_MAXADDR, slavio_intctlm_io_memory); + cpu_register_physical_memory(addrg, INTCTLM_SIZE, slavio_intctlm_io_memory); register_savevm("slavio_intctl", addr, 1, slavio_intctl_save, slavio_intctl_load, s); qemu_register_reset(slavio_intctl_reset, s); |