APIC ABI: Support 32 IDT vectors
authorSepherosa Ziehau <sephe@dragonflybsd.org>
Fri, 17 Jul 2009 11:14:17 +0000 (19:14 +0800)
committerSepherosa Ziehau <sephe@dragonflybsd.org>
Fri, 17 Jul 2009 11:46:31 +0000 (19:46 +0800)
For two IO APIC hardware configuration, it is now common that number
of needed IDT vectors goes beyond 24, since we pre-allocate the PCI
irq number (irq number and IDT vector is 1:1 mapping) during MP table
parsing.

Reported-by: y0netan1@
sys/platform/pc32/apic/apic_abi.c
sys/platform/pc32/apic/apic_ipl.h
sys/platform/pc32/apic/apic_vector.s
sys/platform/pc32/include/smp.h

index 0eeef9b..56285b0 100644 (file)
@@ -76,7 +76,11 @@ extern inthand_t
        IDTVEC(apic_fastintr16), IDTVEC(apic_fastintr17),
        IDTVEC(apic_fastintr18), IDTVEC(apic_fastintr19),
        IDTVEC(apic_fastintr20), IDTVEC(apic_fastintr21),
-       IDTVEC(apic_fastintr22), IDTVEC(apic_fastintr23);
+       IDTVEC(apic_fastintr22), IDTVEC(apic_fastintr23),
+       IDTVEC(apic_fastintr24), IDTVEC(apic_fastintr25),
+       IDTVEC(apic_fastintr26), IDTVEC(apic_fastintr27),
+       IDTVEC(apic_fastintr28), IDTVEC(apic_fastintr29),
+       IDTVEC(apic_fastintr30), IDTVEC(apic_fastintr31);
 
 static int apic_setvar(int, const void *);
 static int apic_getvar(int, void *);
@@ -96,7 +100,11 @@ static inthand_t *apic_fastintr[APIC_HWI_VECTORS] = {
        &IDTVEC(apic_fastintr16), &IDTVEC(apic_fastintr17),
        &IDTVEC(apic_fastintr18), &IDTVEC(apic_fastintr19),
        &IDTVEC(apic_fastintr20), &IDTVEC(apic_fastintr21),
-       &IDTVEC(apic_fastintr22), &IDTVEC(apic_fastintr23)
+       &IDTVEC(apic_fastintr22), &IDTVEC(apic_fastintr23),
+       &IDTVEC(apic_fastintr24), &IDTVEC(apic_fastintr25),
+       &IDTVEC(apic_fastintr26), &IDTVEC(apic_fastintr27),
+       &IDTVEC(apic_fastintr28), &IDTVEC(apic_fastintr29),
+       &IDTVEC(apic_fastintr30), &IDTVEC(apic_fastintr31)
 };
 
 static int apic_imcr_present;
index 92abd41..7855e9f 100644 (file)
@@ -34,7 +34,7 @@
 /* IDT vector base for regular (aka. slow) and fast interrupts */
 #define TPR_FAST_INTS  0x60
 
-#define APIC_HWI_VECTORS 24
+#define APIC_HWI_VECTORS 32
 
 #endif
 
index a392764..a536fbc 100644 (file)
@@ -376,6 +376,14 @@ MCOUNT_LABEL(bintr)
        FAST_INTR(21,apic_fastintr21)
        FAST_INTR(22,apic_fastintr22)
        FAST_INTR(23,apic_fastintr23)
+       FAST_INTR(24,apic_fastintr24)
+       FAST_INTR(25,apic_fastintr25)
+       FAST_INTR(26,apic_fastintr26)
+       FAST_INTR(27,apic_fastintr27)
+       FAST_INTR(28,apic_fastintr28)
+       FAST_INTR(29,apic_fastintr29)
+       FAST_INTR(30,apic_fastintr30)
+       FAST_INTR(31,apic_fastintr31)
 MCOUNT_LABEL(eintr)
 
 #endif
index 7c0aa57..2c6532f 100644 (file)
@@ -65,7 +65,7 @@ extern u_int32_t              *io_apic_versions;
 extern int                     cpu_num_to_apic_id[];
 extern int                     io_num_to_apic_id[];
 extern int                     apic_id_to_logical[];
-#define APIC_INTMAPSIZE 24
+#define APIC_INTMAPSIZE 32
 /*
  * NOTE:
  * - Keep size of apic_intmapinfo power of 2