Changeset 93e90c7 in mainline for arch/ia32/src/smp/apic.c


Ignore:
Timestamp:
2006-01-02T22:10:11Z (19 years ago)
Author:
Jakub Jermar <jakub@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
0132630
Parents:
95d191c
Message:

ia32 work.
Initialize LDR and DFR registers in Local APIC so that logical destination addresses work.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • arch/ia32/src/smp/apic.c

    r95d191c r93e90c7  
    4444 * Advanced Programmable Interrupt Controller for SMP systems.
    4545 * Tested on:
    46  *      Bochs 2.0.2 - Bochs 2.2 with 2-8 CPUs
     46 *      Bochs 2.0.2 - Bochs 2.2.5 with 2-8 CPUs
    4747 *      Simics 2.0.28 - Simics 2.2.19 2-15 CPUs
    4848 *      VMware Workstation 5.5 with 2 CPUs
     
    312312        tdcr_t tdcr;
    313313        lvt_tm_t tm;
     314        ldr_t ldr;
     315        dfr_t dfr;
    314316        __u32 t1, t2;
    315317
     
    373375       
    374376        l_apic[ICRT] = t1-t2;
     377       
     378        /* Program Logical Destination Register. */
     379        ldr.value = l_apic[LDR];
     380        if (CPU->id < sizeof(CPU->id)*8)        /* size in bits */
     381                ldr.id = (1<<CPU->id);
     382        l_apic[LDR] = ldr.value;
     383       
     384        /* Program Destination Format Register for Flat mode. */
     385        dfr.value = l_apic[DFR];
     386        dfr.model = MODEL_FLAT;
     387        l_apic[DFR] = dfr.value;
    375388}
    376389
     
    471484                dlvr = DELMOD_LOWPRI;
    472485
    473        
    474486        reg.lo = io_apic_read(IOREDTBL + pin*2);
    475487        reg.hi = io_apic_read(IOREDTBL + pin*2 + 1);
    476488       
    477         reg.dest =  dest;
     489        reg.dest = dest;
    478490        reg.destmod = DESTMOD_LOGIC;
    479491        reg.trigger_mode = TRIGMOD_EDGE;
Note: See TracChangeset for help on using the changeset viewer.