summaryrefslogtreecommitdiffstats
path: root/sys/sys/smp.h
diff options
context:
space:
mode:
authortegge <tegge@FreeBSD.org>1998-09-06 22:41:42 +0000
committertegge <tegge@FreeBSD.org>1998-09-06 22:41:42 +0000
commit857a03a573e70a598db37cc5e2751f5a6b09c020 (patch)
treeabbb6f5a4e56e7d82120efc18e2c6de6ec06843b /sys/sys/smp.h
parentac59a0c5cd4a2de80842186c8dd22ff48fe29da8 (diff)
downloadFreeBSD-src-857a03a573e70a598db37cc5e2751f5a6b09c020.zip
FreeBSD-src-857a03a573e70a598db37cc5e2751f5a6b09c020.tar.gz
Maintain a mapping from irq number to (ioapic number, int pin) tuple,
and use this when masking/unmasking interrupts. Maintain a mapping from (iopaic number, int pin) tuple to irq number, and use this when configuring devices and programming the ioapics. Previous code assumed that irq number was equal to int pin number, and that the ioapic number was 0. Don't let an AP enter _cpu_switch before all local apics are initialized.
Diffstat (limited to 'sys/sys/smp.h')
-rw-r--r--sys/sys/smp.h22
1 files changed, 13 insertions, 9 deletions
diff --git a/sys/sys/smp.h b/sys/sys/smp.h
index f258630..0f4f915 100644
--- a/sys/sys/smp.h
+++ b/sys/sys/smp.h
@@ -6,7 +6,7 @@
* this stuff is worth it, you can buy me a beer in return. Poul-Henning Kamp
* ----------------------------------------------------------------------------
*
- * $Id: smp.h,v 1.42 1998/04/01 21:07:36 tegge Exp $
+ * $Id: smp.h,v 1.43 1998/05/17 22:12:05 tegge Exp $
*
*/
@@ -103,6 +103,14 @@ 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
+struct apic_intmapinfo {
+ int ioapic;
+ int int_pin;
+ volatile void *apic_address;
+ int redirindex;
+};
+extern struct apic_intmapinfo int_to_apicintpin[];
extern u_int all_cpus;
extern u_char SMP_ioapic[];
extern struct pcb stoppcbs[];
@@ -113,9 +121,10 @@ int mp_probe __P((void));
void mp_start __P((void));
void mp_announce __P((void));
u_int isa_apic_mask __P((u_int));
-int isa_apic_pin __P((int));
-int pci_apic_pin __P((int, int, int));
-int next_apic_pin __P((int));
+int isa_apic_irq __P((int));
+int pci_apic_irq __P((int, int, int));
+int apic_irq __P((int, int));
+int next_apic_irq __P((int));
int undirect_isa_irq __P((int));
int undirect_pci_irq __P((int));
int apic_bus_type __P((int));
@@ -141,12 +150,7 @@ void set_lapic_isrloc __P((int, int));
/* global data in mpapic.c */
extern volatile lapic_t lapic;
-
-#if defined(MULTIPLE_IOAPICS)
-#error MULTIPLE_IOAPICSXXX
-#else
extern volatile ioapic_t *ioapic[];
-#endif /* MULTIPLE_IOAPICS */
/* functions in mpapic.c */
void apic_dump __P((char*));
OpenPOWER on IntegriCloud