/[gxemul]/trunk/src/devices/dev_cons.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/devices/dev_cons.c

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

revision 4 by dpavlin, Mon Oct 8 16:18:00 2007 UTC revision 8 by dpavlin, Mon Oct 8 16:18:19 2007 UTC
# Line 25  Line 25 
25   *  SUCH DAMAGE.   *  SUCH DAMAGE.
26   *     *  
27   *   *
28   *  $Id: dev_cons.c,v 1.24 2005/02/19 11:51:33 debug Exp $   *  $Id: dev_cons.c,v 1.25 2005/06/11 21:04:31 debug Exp $
29   *     *  
30   *  A console device.  (Fake, only useful for simple tests.)   *  A console device.  (Fake, only useful for simple tests.)
31     *  It is hardwared to the lowest available MIPS hardware IRQ, and only
32     *  interrupts CPU 0.
33   *   *
34   *  This device provides memory mapped I/O for a simple console supporting   *  This device provides memory mapped I/O for a simple console supporting
35   *  putchar (writing to memory) and getchar (reading from memory), and   *  putchar (writing to memory) and getchar (reading from memory), and
# Line 60  struct cons_data { Line 62  struct cons_data {
62   */   */
63  void dev_cons_tick(struct cpu *cpu, void *extra)  void dev_cons_tick(struct cpu *cpu, void *extra)
64  {  {
65            struct cpu *c = cpu->machine->cpus[0];
66          struct cons_data *d = extra;          struct cons_data *d = extra;
67    
68          cpu_interrupt_ack(cpu, d->irq_nr);          cpu_interrupt_ack(c, d->irq_nr);
69    
70          if (console_charavail(d->console_handle))          if (console_charavail(d->console_handle))
71                  cpu_interrupt(cpu, d->irq_nr);                  cpu_interrupt(c, d->irq_nr);
72  }  }
73    
74    

Legend:
Removed from v.4  
changed lines
  Added in v.8

  ViewVC Help
Powered by ViewVC 1.1.26