/[gxemul]/trunk/src/machines/interrupts.c
This is repository of my old source code which isn't updated any more. Go to git.rot13.org for current projects!
ViewVC logotype

Diff of /trunk/src/machines/interrupts.c

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 29 by dpavlin, Mon Oct 8 16:19:56 2007 UTC revision 30 by dpavlin, Mon Oct 8 16:20:40 2007 UTC
# Line 25  Line 25 
25   *  SUCH DAMAGE.   *  SUCH DAMAGE.
26   *     *  
27   *   *
28   *  $Id: interrupts.c,v 1.9 2006/05/17 20:27:31 debug Exp $   *  $Id: interrupts.c,v 1.10 2006/08/14 17:45:47 debug Exp $
29   *   *
30   *  Machine-dependent interrupt glue.   *  Machine-dependent interrupt glue.
31   */   */
# Line 707  void cpc700_interrupt(struct machine *m, Line 707  void cpc700_interrupt(struct machine *m,
707  /*  /*
708   *  Interrupt function for Cobalt, evbmips (Malta), and Algor.   *  Interrupt function for Cobalt, evbmips (Malta), and Algor.
709   *   *
710     *  Most machines will not use secondary_mask1 and native_secondary_irq.
711     *  Algor, however, routes COM1 and COM2 interrupts to MIPS CPU interrupt 4
712     *  (called "secondary" here), and IDE interrupts to CPU interrupt 2.
713     *
714   *  (irq_nr = 8 + 16 can be used to just reassert/deassert interrupts.)   *  (irq_nr = 8 + 16 can be used to just reassert/deassert interrupts.)
715   */   */
716  void isa8_interrupt(struct machine *m, struct cpu *cpu, int irq_nr, int assrt)  void isa8_interrupt(struct machine *m, struct cpu *cpu, int irq_nr, int assrt)
# Line 754  void isa8_interrupt(struct machine *m, s Line 758  void isa8_interrupt(struct machine *m, s
758                  m->isa_pic_data.last_int = x;                  m->isa_pic_data.last_int = x;
759          }          }
760    
761          if (m->isa_pic_data.pic1->irr & ~m->isa_pic_data.pic1->ier)          if (m->isa_pic_data.secondary_mask1 &
762                m->isa_pic_data.pic1->irr & ~m->isa_pic_data.pic1->ier)
763                    cpu_interrupt(cpu, m->isa_pic_data.native_secondary_irq);
764            else
765                    cpu_interrupt_ack(cpu, m->isa_pic_data.native_secondary_irq);
766    
767            if (~m->isa_pic_data.secondary_mask1 &
768                m->isa_pic_data.pic1->irr & ~m->isa_pic_data.pic1->ier)
769                  cpu_interrupt(cpu, m->isa_pic_data.native_irq);                  cpu_interrupt(cpu, m->isa_pic_data.native_irq);
770          else          else
771                  cpu_interrupt_ack(cpu, m->isa_pic_data.native_irq);                  cpu_interrupt_ack(cpu, m->isa_pic_data.native_irq);

Legend:
Removed from v.29  
changed lines
  Added in v.30

  ViewVC Help
Powered by ViewVC 1.1.26