/[qemu]/qemu/hw/openpic.c
ViewVC logotype

Diff of /qemu/hw/openpic.c

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

revision 1.8 by bellard, Mon Nov 21 23:29:55 2005 UTC revision 1.9 by bellard, Wed Nov 23 21:13:45 2005 UTC
# Line 159  typedef struct IRQ_dst_t { Line 159  typedef struct IRQ_dst_t {
159      uint32_t pcsr; /* CPU sensitivity register */      uint32_t pcsr; /* CPU sensitivity register */
160      IRQ_queue_t raised;      IRQ_queue_t raised;
161      IRQ_queue_t servicing;      IRQ_queue_t servicing;
162      CPUState *env; /* Needed if we did SMP */      CPUState *env;
163  } IRQ_dst_t;  } IRQ_dst_t;
164    
165  struct openpic_t {  struct openpic_t {
# Line 265  static void IRQ_local_pipe (openpic_t *o Line 265  static void IRQ_local_pipe (openpic_t *o
265      if (priority > dst->raised.priority) {      if (priority > dst->raised.priority) {
266          IRQ_get_next(opp, &dst->raised);          IRQ_get_next(opp, &dst->raised);
267          DPRINTF("Raise CPU IRQ\n");          DPRINTF("Raise CPU IRQ\n");
268          /* XXX: choose the correct cpu */          cpu_interrupt(dst->env, CPU_INTERRUPT_HARD);
         cpu_interrupt(first_cpu, CPU_INTERRUPT_HARD);  
269      }      }
270  }  }
271    
# Line 782  static void openpic_cpu_write (void *opa Line 781  static void openpic_cpu_write (void *opa
781              src = &opp->src[n_IRQ];              src = &opp->src[n_IRQ];
782              if (IPVP_PRIORITY(src->ipvp) > dst->servicing.priority) {              if (IPVP_PRIORITY(src->ipvp) > dst->servicing.priority) {
783                  DPRINTF("Raise CPU IRQ\n");                  DPRINTF("Raise CPU IRQ\n");
784                  /* XXX: choose cpu */                  cpu_interrupt(dst->env, CPU_INTERRUPT_HARD);
                 cpu_interrupt(first_cpu, CPU_INTERRUPT_HARD);  
785              }              }
786          }          }
787          break;          break;
# Line 965  static void openpic_map(PCIDevice *pci_d Line 963  static void openpic_map(PCIDevice *pci_d
963  #endif  #endif
964  }  }
965    
966  openpic_t *openpic_init (PCIBus *bus, int *pmem_index, int nb_cpus)  openpic_t *openpic_init (PCIBus *bus, int *pmem_index, int nb_cpus,
967                             CPUPPCState **envp)
968  {  {
969      openpic_t *opp;      openpic_t *opp;
970      uint8_t *pci_conf;      uint8_t *pci_conf;
# Line 1019  openpic_t *openpic_init (PCIBus *bus, in Line 1018  openpic_t *openpic_init (PCIBus *bus, in
1018      for (; i < MAX_IRQ; i++) {      for (; i < MAX_IRQ; i++) {
1019          opp->src[i].type = IRQ_INTERNAL;          opp->src[i].type = IRQ_INTERNAL;
1020      }      }
1021        for (i = 0; i < nb_cpus; i++)
1022            opp->dst[i].env = envp[i];
1023      openpic_reset(opp);      openpic_reset(opp);
1024      if (pmem_index)      if (pmem_index)
1025          *pmem_index = opp->mem_index;          *pmem_index = opp->mem_index;

Legend:
Removed from v.1.8  
changed lines
  Added in v.1.9

savannah-hackers-public@gnu.org
ViewVC Help
Powered by ViewVC 1.1.26