Commit b7c7b18129e137bd24240800d7fac02eee3b1edf
1 parent
98352369
fixed VIA irq register access
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@1513 c046a42c-6fe2-441c-8c8c-71466251a162
Showing
1 changed file
with
3 additions
and
6 deletions
hw/cuda.c
@@ -298,9 +298,11 @@ static uint32_t cuda_readb(void *opaque, target_phys_addr_t addr) | @@ -298,9 +298,11 @@ static uint32_t cuda_readb(void *opaque, target_phys_addr_t addr) | ||
298 | break; | 298 | break; |
299 | case 13: | 299 | case 13: |
300 | val = s->ifr; | 300 | val = s->ifr; |
301 | + if (s->ifr & s->ier) | ||
302 | + val |= 0x80; | ||
301 | break; | 303 | break; |
302 | case 14: | 304 | case 14: |
303 | - val = s->ier; | 305 | + val = s->ier | 0x80; |
304 | break; | 306 | break; |
305 | default: | 307 | default: |
306 | case 15: | 308 | case 15: |
@@ -379,7 +381,6 @@ static void cuda_writeb(void *opaque, target_phys_addr_t addr, uint32_t val) | @@ -379,7 +381,6 @@ static void cuda_writeb(void *opaque, target_phys_addr_t addr, uint32_t val) | ||
379 | cuda_update_irq(s); | 381 | cuda_update_irq(s); |
380 | break; | 382 | break; |
381 | case 14: | 383 | case 14: |
382 | -#if 0 | ||
383 | if (val & IER_SET) { | 384 | if (val & IER_SET) { |
384 | /* set bits */ | 385 | /* set bits */ |
385 | s->ier |= val & 0x7f; | 386 | s->ier |= val & 0x7f; |
@@ -387,10 +388,6 @@ static void cuda_writeb(void *opaque, target_phys_addr_t addr, uint32_t val) | @@ -387,10 +388,6 @@ static void cuda_writeb(void *opaque, target_phys_addr_t addr, uint32_t val) | ||
387 | /* reset bits */ | 388 | /* reset bits */ |
388 | s->ier &= ~val; | 389 | s->ier &= ~val; |
389 | } | 390 | } |
390 | -#else | ||
391 | - /* XXX: please explain me why the SPEC is not correct ! */ | ||
392 | - s->ier = val; | ||
393 | -#endif | ||
394 | cuda_update_irq(s); | 391 | cuda_update_irq(s); |
395 | break; | 392 | break; |
396 | default: | 393 | default: |