@@ -316,6 +316,7 @@ void HeathrowIC::mio_ctrl_write(uint32_t offset, uint32_t value, int size) {
316
316
switch (offset & 0xFC ) {
317
317
case MIO_INT_MASK2:
318
318
this ->int_mask2 |= BYTESWAP_32 (value) & ~MACIO_INT_MODE;
319
+ this ->signal_cpu_int ();
319
320
break ;
320
321
case MIO_INT_CLEAR2:
321
322
this ->int_events2 &= ~(BYTESWAP_32 (value) & 0x7FFFFFFFUL );
@@ -325,6 +326,7 @@ void HeathrowIC::mio_ctrl_write(uint32_t offset, uint32_t value, int size) {
325
326
this ->int_mask1 = BYTESWAP_32 (value);
326
327
// copy IntMode bit to InterruptMask2 register
327
328
this ->int_mask2 = (this ->int_mask2 & ~MACIO_INT_MODE) | (this ->int_mask1 & MACIO_INT_MODE);
329
+ this ->signal_cpu_int ();
328
330
break ;
329
331
case MIO_INT_CLEAR1:
330
332
if ((this ->int_mask1 & MACIO_INT_MODE) && (value & MACIO_INT_CLR)) {
@@ -455,7 +457,6 @@ void HeathrowIC::ack_int(uint32_t irq_id, uint8_t irq_line_state)
455
457
} else {
456
458
this ->int_events2 &= ~irq_id;
457
459
}
458
- this ->int_events2 &= this ->int_mask2 ;
459
460
// update IRQ line state
460
461
if (irq_line_state) {
461
462
this ->int_levels2 |= irq_id;
@@ -476,7 +477,6 @@ void HeathrowIC::ack_int(uint32_t irq_id, uint8_t irq_line_state)
476
477
} else {
477
478
this ->int_events1 &= ~irq_id;
478
479
}
479
- this ->int_events1 &= this ->int_mask1 ;
480
480
// update IRQ line state
481
481
if (irq_line_state) {
482
482
this ->int_levels1 |= irq_id;
@@ -531,7 +531,6 @@ void HeathrowIC::ack_dma_int(uint32_t irq_id, uint8_t irq_line_state)
531
531
} else {
532
532
this ->int_events2 &= ~irq_id;
533
533
}
534
- this ->int_events2 &= this ->int_mask2 ;
535
534
// update IRQ line state
536
535
if (irq_line_state) {
537
536
this ->int_levels2 |= irq_id;
@@ -548,7 +547,6 @@ void HeathrowIC::ack_dma_int(uint32_t irq_id, uint8_t irq_line_state)
548
547
} else {
549
548
this ->int_events1 &= ~irq_id;
550
549
}
551
- this ->int_events1 &= this ->int_mask1 ;
552
550
// update IRQ line state
553
551
if (irq_line_state) {
554
552
this ->int_levels1 |= irq_id;
@@ -591,7 +589,7 @@ void HeathrowIC::ack_dma_int(uint32_t irq_id, uint8_t irq_line_state)
591
589
}
592
590
593
591
void HeathrowIC::signal_cpu_int () {
594
- if (this ->int_events1 || this ->int_events2 ) {
592
+ if (( this ->int_events1 & this -> int_mask1 ) || ( this ->int_events2 & this -> int_mask2 ) ) {
595
593
if (!this ->cpu_int_latch ) {
596
594
this ->cpu_int_latch = true ;
597
595
ppc_assert_int ();
@@ -603,7 +601,8 @@ void HeathrowIC::signal_cpu_int() {
603
601
604
602
void HeathrowIC::clear_cpu_int ()
605
603
{
606
- if (!this ->int_events1 && !this ->int_events2 ) {
604
+ if (!(this ->int_events1 & this ->int_mask1 ) && !(this ->int_events2 & this ->int_mask2 ) &&
605
+ this ->cpu_int_latch ) {
607
606
this ->cpu_int_latch = false ;
608
607
ppc_release_int ();
609
608
LOG_F (5 , " Heathrow: CPU INT latch cleared" );
0 commit comments