Commit c6fdf5fca0149fbc2d05d8d5ad43e3686c37514e
1 parent
1b1afeb9
Fix interrupt controller address masking
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@2844 c046a42c-6fe2-441c-8c8c-71466251a162
Showing
1 changed file
with
3 additions
and
2 deletions
hw/slavio_intctl.c
... | ... | @@ -58,7 +58,8 @@ typedef struct SLAVIO_INTCTLState { |
58 | 58 | } SLAVIO_INTCTLState; |
59 | 59 | |
60 | 60 | #define INTCTL_MAXADDR 0xf |
61 | -#define INTCTLM_MAXADDR 0xf | |
61 | +#define INTCTLM_MAXADDR 0x13 | |
62 | +#define INTCTLM_MASK 0x1f | |
62 | 63 | static void slavio_check_interrupts(void *opaque); |
63 | 64 | |
64 | 65 | // per-cpu interrupt controller |
... | ... | @@ -143,7 +144,7 @@ static void slavio_intctlm_mem_writel(void *opaque, target_phys_addr_t addr, uin |
143 | 144 | SLAVIO_INTCTLState *s = opaque; |
144 | 145 | uint32_t saddr; |
145 | 146 | |
146 | - saddr = (addr & INTCTLM_MAXADDR) >> 2; | |
147 | + saddr = (addr & INTCTLM_MASK) >> 2; | |
147 | 148 | switch (saddr) { |
148 | 149 | case 2: // clear (enable) |
149 | 150 | // Force clear unused bits | ... | ... |