diff options
author | bellard <bellard@c046a42c-6fe2-441c-8c8c-71466251a162> | 2005-11-23 20:59:44 +0000 |
---|---|---|
committer | bellard <bellard@c046a42c-6fe2-441c-8c8c-71466251a162> | 2005-11-23 20:59:44 +0000 |
commit | 8dd69b8f2cba91b7f2bcb3b4e12fbd35574869c1 (patch) | |
tree | 3b3fac50ae14acc3c0fa57e7f85d640e2bbbe0b4 /hw | |
parent | 089af991182fb44915c30075ea4e202ad268afcb (diff) | |
download | qemu-8dd69b8f2cba91b7f2bcb3b4e12fbd35574869c1.zip qemu-8dd69b8f2cba91b7f2bcb3b4e12fbd35574869c1.tar.gz qemu-8dd69b8f2cba91b7f2bcb3b4e12fbd35574869c1.tar.bz2 |
fummy DM_LOWPRI handling
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@1648 c046a42c-6fe2-441c-8c8c-71466251a162
Diffstat (limited to 'hw')
-rw-r--r-- | hw/apic.c | 19 |
1 files changed, 11 insertions, 8 deletions
@@ -109,8 +109,16 @@ static void apic_bus_deliver(uint32_t deliver_bitmask, uint8_t delivery_mode, switch (delivery_mode) { case APIC_DM_LOWPRI: + /* XXX: search for focus processor, arbitration */ + if (deliver_bitmask) { + uint32_t m = 1; + while ((deliver_bitmask & m) == 0) + m <<= 1; + deliver_bitmask = m; + } + break; + case APIC_DM_FIXED: - /* XXX: arbitration */ break; case APIC_DM_SMI: @@ -336,12 +344,12 @@ static void apic_init_ipi(APICState *s) static void apic_startup(APICState *s, int vector_num) { CPUState *env = s->cpu_env; - if (!env->cpu_halted) + if (!(env->hflags & HF_HALTED_MASK)) return; env->eip = 0; cpu_x86_load_seg_cache(env, R_CS, vector_num << 8, vector_num << 12, 0xffff, 0); - env->cpu_halted = 0; + env->hflags &= ~HF_HALTED_MASK; } static void apic_deliver(APICState *s, uint8_t dest, uint8_t dest_mode, @@ -368,11 +376,6 @@ static void apic_deliver(APICState *s, uint8_t dest, uint8_t dest_mode, } switch (delivery_mode) { - case APIC_DM_LOWPRI: - /* XXX: search for focus processor, arbitration */ - dest = s->id; - break; - case APIC_DM_INIT: { int trig_mode = (s->icr[0] >> 15) & 1; |