Commit b7c7b18129e137bd24240800d7fac02eee3b1edf

Authored by bellard
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 298 break;
299 299 case 13:
300 300 val = s->ifr;
  301 + if (s->ifr & s->ier)
  302 + val |= 0x80;
301 303 break;
302 304 case 14:
303   - val = s->ier;
  305 + val = s->ier | 0x80;
304 306 break;
305 307 default:
306 308 case 15:
... ... @@ -379,7 +381,6 @@ static void cuda_writeb(void *opaque, target_phys_addr_t addr, uint32_t val)
379 381 cuda_update_irq(s);
380 382 break;
381 383 case 14:
382   -#if 0
383 384 if (val & IER_SET) {
384 385 /* set bits */
385 386 s->ier |= val & 0x7f;
... ... @@ -387,10 +388,6 @@ static void cuda_writeb(void *opaque, target_phys_addr_t addr, uint32_t val)
387 388 /* reset bits */
388 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 391 cuda_update_irq(s);
395 392 break;
396 393 default:
... ...