diff options
author | Niklas Hallqvist <niklas@cvs.openbsd.org> | 2004-06-23 17:14:32 +0000 |
---|---|---|
committer | Niklas Hallqvist <niklas@cvs.openbsd.org> | 2004-06-23 17:14:32 +0000 |
commit | 2e4ad17cd42b299d528be98b93b04cbce728c523 (patch) | |
tree | f19f64527ee6d93277b6ff50abd316c5fec605e7 /sys/arch/i386/include | |
parent | d6aac7f99748fcac44058d795a91ffeac26c070e (diff) |
Renumber I/O APICs who clash with other APICs. Also clear the delivery
mode before setting it to fixed, since the MP BIOS may have left something
in that field. This fixed a Quad Xeon we have been loaned over the c2k4.
Diffstat (limited to 'sys/arch/i386/include')
-rw-r--r-- | sys/arch/i386/include/i82093reg.h | 7 | ||||
-rw-r--r-- | sys/arch/i386/include/i82093var.h | 13 |
2 files changed, 15 insertions, 5 deletions
diff --git a/sys/arch/i386/include/i82093reg.h b/sys/arch/i386/include/i82093reg.h index 07ec03d8991..88f36e469f2 100644 --- a/sys/arch/i386/include/i82093reg.h +++ b/sys/arch/i386/include/i82093reg.h @@ -1,4 +1,4 @@ -/* $OpenBSD: i82093reg.h,v 1.2 2004/06/13 21:49:16 niklas Exp $ */ +/* $OpenBSD: i82093reg.h,v 1.3 2004/06/23 17:14:31 niklas Exp $ */ /* $NetBSD: i82093reg.h,v 1.1.2.2 2000/02/21 18:54:07 sommerfeld Exp $ */ /*- @@ -53,9 +53,6 @@ * store the register number of interest in IOAPIC_REG, and store/fetch * the real value in IOAPIC_DATA. */ - - - #define IOAPIC_REG 0x0000 #define IOAPIC_DATA 0x0010 @@ -67,6 +64,8 @@ #define IOAPIC_ID_SHIFT 24 #define IOAPIC_ID_MASK 0x0f000000 +#define IOAPIC_ID_MAX \ + ((IOAPIC_ID_MASK >> IOAPIC_ID_SHIFT) + 1) /* Version, and maximum interrupt pin number. */ diff --git a/sys/arch/i386/include/i82093var.h b/sys/arch/i386/include/i82093var.h index c3d7ce586f3..56a7553be43 100644 --- a/sys/arch/i386/include/i82093var.h +++ b/sys/arch/i386/include/i82093var.h @@ -1,4 +1,4 @@ -/* $OpenBSD: i82093var.h,v 1.2 2004/06/13 21:49:16 niklas Exp $ */ +/* $OpenBSD: i82093var.h,v 1.3 2004/06/23 17:14:31 niklas Exp $ */ /* $NetBSD: i82093var.h,v 1.1 2003/02/26 21:26:10 fvdl Exp $ */ /*- @@ -85,6 +85,15 @@ struct ioapic_softc { #define APIC_IRQ_APIC(x) ((x & APIC_INT_APIC_MASK) >> APIC_INT_APIC_SHIFT) #define APIC_IRQ_PIN(x) ((x & APIC_INT_PIN_MASK) >> APIC_INT_PIN_SHIFT) +/* I/O APIC ID remapping helper macros. */ +#define IOAPIC_REMAP_MASK (IOAPIC_ID_MASK >> IOAPIC_ID_SHIFT) +#define IOAPIC_REMAP_FLAG ((IOAPIC_REMAP_MASK + 1) << 1) +#define IOAPIC_REMAP(old_id, new_id) \ + (ioapic_id_remap[(old_id)] = IOAPIC_REMAP_FLAG | (new_id)) +#define IOAPIC_REMAPPED(id) (ioapic_id_remap[(id)] & IOAPIC_REMAP_FLAG) +#define IOAPIC_REMAPPED_ID(id) \ + (IOAPIC_REMAPPED(id) ? ioapic_id_remap[(id)] & IOAPIC_REMAP_MASK : (id)) + void *apic_intr_establish(int, int, int, int (*)(void *), void *, char *); void apic_intr_disestablish(void *); @@ -99,5 +108,7 @@ void lapic_vectorset(void); /* XXX */ extern int ioapic_bsp_id; extern int nioapics; extern struct ioapic_softc *ioapics; +extern u_int16_t ioapic_id_map; +extern u_int8_t ioapic_id_remap[]; #endif /* !_I386_I82093VAR_H_ */ |