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

Diff of /qemu/hw/apic.c

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

revision 1.6 by bellard, Mon Nov 21 23:26:26 2005 UTC revision 1.7 by bellard, Wed Nov 23 20:59:44 2005 UTC
# Line 109  static void apic_bus_deliver(uint32_t de Line 109  static void apic_bus_deliver(uint32_t de
109    
110      switch (delivery_mode) {      switch (delivery_mode) {
111          case APIC_DM_LOWPRI:          case APIC_DM_LOWPRI:
112                /* XXX: search for focus processor, arbitration */
113                if (deliver_bitmask) {
114                    uint32_t m = 1;
115                    while ((deliver_bitmask & m) == 0)
116                        m <<= 1;
117                    deliver_bitmask = m;
118                }
119                break;
120    
121          case APIC_DM_FIXED:          case APIC_DM_FIXED:
             /* XXX: arbitration */  
122              break;              break;
123    
124          case APIC_DM_SMI:          case APIC_DM_SMI:
# Line 336  static void apic_init_ipi(APICState *s) Line 344  static void apic_init_ipi(APICState *s)
344  static void apic_startup(APICState *s, int vector_num)  static void apic_startup(APICState *s, int vector_num)
345  {  {
346      CPUState *env = s->cpu_env;      CPUState *env = s->cpu_env;
347      if (!env->cpu_halted)      if (!(env->hflags & HF_HALTED_MASK))
348          return;          return;
349      env->eip = 0;      env->eip = 0;
350      cpu_x86_load_seg_cache(env, R_CS, vector_num << 8, vector_num << 12,      cpu_x86_load_seg_cache(env, R_CS, vector_num << 8, vector_num << 12,
351                             0xffff, 0);                             0xffff, 0);
352      env->cpu_halted = 0;      env->hflags &= ~HF_HALTED_MASK;
353  }  }
354    
355  static void apic_deliver(APICState *s, uint8_t dest, uint8_t dest_mode,  static void apic_deliver(APICState *s, uint8_t dest, uint8_t dest_mode,
# Line 368  static void apic_deliver(APICState *s, u Line 376  static void apic_deliver(APICState *s, u
376      }      }
377    
378      switch (delivery_mode) {      switch (delivery_mode) {
         case APIC_DM_LOWPRI:  
             /* XXX: search for focus processor, arbitration */  
             dest = s->id;  
             break;  
   
379          case APIC_DM_INIT:          case APIC_DM_INIT:
380              {              {
381                  int trig_mode = (s->icr[0] >> 15) & 1;                  int trig_mode = (s->icr[0] >> 15) & 1;

Legend:
Removed from v.1.6  
changed lines
  Added in v.1.7

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