diff options
Diffstat (limited to 'hw/slavio_timer.c')
-rw-r--r-- | hw/slavio_timer.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/hw/slavio_timer.c b/hw/slavio_timer.c index e8b435f1c0..6bc293e672 100644 --- a/hw/slavio_timer.c +++ b/hw/slavio_timer.c @@ -59,6 +59,7 @@ typedef struct SLAVIO_TIMERState { } SLAVIO_TIMERState; #define TIMER_MAXADDR 0x1f +#define TIMER_SIZE (TIMER_MAXADDR + 1) // Update count, set irq, update expire_time // Convert from ptimer countdown units @@ -260,7 +261,7 @@ void slavio_timer_init(target_phys_addr_t addr, int irq, int mode, slavio_timer_io_memory = cpu_register_io_memory(0, slavio_timer_mem_read, slavio_timer_mem_write, s); - cpu_register_physical_memory(addr, TIMER_MAXADDR, slavio_timer_io_memory); + cpu_register_physical_memory(addr, TIMER_SIZE, slavio_timer_io_memory); register_savevm("slavio_timer", addr, 2, slavio_timer_save, slavio_timer_load, s); qemu_register_reset(slavio_timer_reset, s); slavio_timer_reset(s); |