Subversion Repositories HelenOS-historic

Rev

Rev 693 | Rev 812 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 693 Rev 750
Line 42... Line 42...
42
#ifdef CONFIG_SMP
42
#ifdef CONFIG_SMP
43
 
43
 
44
/*
44
/*
45
 * Advanced Programmable Interrupt Controller for SMP systems.
45
 * Advanced Programmable Interrupt Controller for SMP systems.
46
 * Tested on:
46
 * Tested on:
47
 *  Bochs 2.0.2 - Bochs 2.2.5 with 2-8 CPUs
47
 *  Bochs 2.0.2 - Bochs 2.2.6 with 2-8 CPUs
48
 *  Simics 2.0.28 - Simics 2.2.19 2-15 CPUs
48
 *  Simics 2.0.28 - Simics 2.2.19 2-15 CPUs
49
 *  VMware Workstation 5.5 with 2 CPUs
49
 *  VMware Workstation 5.5 with 2 CPUs
50
 *  ASUS P/I-P65UP5 + ASUS C-P55T2D REV. 1.41 with 2x 200Mhz Pentium CPUs
50
 *  ASUS P/I-P65UP5 + ASUS C-P55T2D REV. 1.41 with 2x 200Mhz Pentium CPUs
51
 *  ASUS PCH-DL with 2x 3000Mhz Pentium 4 Xeon (HT) CPUs
51
 *  ASUS PCH-DL with 2x 3000Mhz Pentium 4 Xeon (HT) CPUs
52
 *  MSI K7D Master-L with 2x 2100MHz Athlon MP CPUs
52
 *  MSI K7D Master-L with 2x 2100MHz Athlon MP CPUs
Line 306... Line 306...
306
/** Initialize Local APIC. */
306
/** Initialize Local APIC. */
307
void l_apic_init(void)
307
void l_apic_init(void)
308
{
308
{
309
    lvt_error_t error;
309
    lvt_error_t error;
310
    lvt_lint_t lint;
310
    lvt_lint_t lint;
-
 
311
    tpr_t tpr;
311
    svr_t svr;
312
    svr_t svr;
312
    icr_t icr;
313
    icr_t icr;
313
    tdcr_t tdcr;
314
    tdcr_t tdcr;
314
    lvt_tm_t tm;
315
    lvt_tm_t tm;
315
    ldr_t ldr;
316
    ldr_t ldr;
Line 328... Line 329...
328
 
329
 
329
    /* Initialize LVT LINT1 register. */
330
    /* Initialize LVT LINT1 register. */
330
    lint.value = l_apic[LVT_LINT1];
331
    lint.value = l_apic[LVT_LINT1];
331
    lint.masked = true;
332
    lint.masked = true;
332
    l_apic[LVT_LINT1] = lint.value;
333
    l_apic[LVT_LINT1] = lint.value;
-
 
334
 
-
 
335
    /* Task Priority Register initialization. */
-
 
336
    tpr.value = l_apic[TPR];
-
 
337
    tpr.pri_sc = 0;
-
 
338
    tpr.pri = 0;
-
 
339
    l_apic[TPR] = tpr.value;
333
   
340
   
334
    /* Spurious-Interrupt Vector Register initialization. */
341
    /* Spurious-Interrupt Vector Register initialization. */
335
    svr.value = l_apic[SVR];
342
    svr.value = l_apic[SVR];
336
    svr.vector = VECTOR_APIC_SPUR;
343
    svr.vector = VECTOR_APIC_SPUR;
337
    svr.lapic_enabled = true;
344
    svr.lapic_enabled = true;
-
 
345
    svr.focus_checking = true;
338
    l_apic[SVR] = svr.value;
346
    l_apic[SVR] = svr.value;
339
 
347
 
340
    l_apic[TPR] &= TPRClear;
-
 
341
 
-
 
342
    if (CPU->arch.family >= 6)
348
    if (CPU->arch.family >= 6)
343
        enable_l_apic_in_msr();
349
        enable_l_apic_in_msr();
344
   
350
   
345
    /* Interrupt Command Register initialization. */
351
    /* Interrupt Command Register initialization. */
346
    icr.lo = l_apic[ICRlo];
352
    icr.lo = l_apic[ICRlo];