diff options
author | fsmp <fsmp@FreeBSD.org> | 1997-05-31 03:29:06 +0000 |
---|---|---|
committer | fsmp <fsmp@FreeBSD.org> | 1997-05-31 03:29:06 +0000 |
commit | 01f80ab36a3941ded02dcee732b0af773d60d00d (patch) | |
tree | 42d06091babd2f477581e89879f0c0e8dbc06680 /sys/i386/include/mpapic.h | |
parent | a3186f5a8d3f335880383d2da6b9ca97cafb90fd (diff) | |
download | FreeBSD-src-01f80ab36a3941ded02dcee732b0af773d60d00d.zip FreeBSD-src-01f80ab36a3941ded02dcee732b0af773d60d00d.tar.gz |
Modified code in direction of supporting MULTIPLE_IOAPICS.
- removed set_io_apic_mask() & clr_io_apic(_mask)
- moved read_io_apic_maskc24() to i386/mpapic.c, disabled it, currently unused.
Diffstat (limited to 'sys/i386/include/mpapic.h')
-rw-r--r-- | sys/i386/include/mpapic.h | 90 |
1 files changed, 3 insertions, 87 deletions
diff --git a/sys/i386/include/mpapic.h b/sys/i386/include/mpapic.h index 9d4e352..c64ca3e 100644 --- a/sys/i386/include/mpapic.h +++ b/sys/i386/include/mpapic.h @@ -22,7 +22,7 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $Id: mpapic.h,v 1.5 1997/05/25 02:43:42 fsmp Exp $ + * $Id: mpapic.h,v 1.6 1997/05/29 05:57:43 fsmp Exp $ */ #ifndef _MACHINE_MPAPIC_H_ @@ -86,109 +86,25 @@ enum busTypes { /* * read 'reg' from 'apic' */ -#if defined(MULTIPLE_IOAPICS) -#error MULTIPLE_IOAPICSXXX -#else static __inline u_int32_t -#if 1 /** XXX APIC_STRUCT */ +/** XXX APIC_STRUCT */ io_apic_read(int apic, int reg) { ioapic[apic].ioregsel = reg; return ioapic[apic].iowin; -#else -io_apic_read(int apic __attribute__ ((unused)), int reg) -{ - (*io_apic_base) = reg; - return (*(io_apic_base + (IOAPIC_WINDOW / sizeof(u_int)))); -#endif /** XXX APIC_STRUCT */ } -#endif /* MULTIPLE_IOAPICS */ /* * write 'value' to 'reg' of 'apic' */ -#if defined(MULTIPLE_IOAPICS) -#error MULTIPLE_IOAPICSXXX -#else static __inline void -#if 1 /** XXX APIC_STRUCT */ +/** XXX APIC_STRUCT */ io_apic_write(int apic, int reg, u_int32_t value) { ioapic[apic].ioregsel = reg; ioapic[apic].iowin = value; -#else -io_apic_write(int apic __attribute__ ((unused)), int reg, u_int32_t value) -{ - (*io_apic_base) = reg; - (*(io_apic_base + (IOAPIC_WINDOW / sizeof(u_int)))) = value; -#endif /** XXX APIC_STRUCT */ -} -#endif /* MULTIPLE_IOAPICS */ - - -#if defined(READY) -/* - * set the IO APIC mask for INT# 'i' - */ -#if defined(MULTIPLE_IOAPICS) -#error MULTIPLE_IOAPICSXXX -#else -static __inline void -set_io_apic_mask(int apic, u_int32_t i) -{ - int select; /* the select register is 8 bits */ - u_int32_t low_reg; /* the window register is 32 bits */ - - imen |= (1<<i); /* set mask variable */ - - select = IOAPIC_REDTBL + (i * 2); /* calculate addr */ - low_reg = io_apic_read(select); /* read contents */ - - low_reg |= IOART_INTMASK; /* set mask */ - io_apic_write(select, low_reg); /* new value */ -} -#endif /* MULTIPLE_IOAPICS */ -#endif /* READY */ - - -#if defined(READY) -/* - * clear the IO APIC mask for INT# 'i' - */ -#if defined(MULTIPLE_IOAPICS) -#error MULTIPLE_IOAPICSXXX -#else -static __inline void -clr_io_apic_mask(int apic, u_int32_t i) -{ - int select; /* the select register is 8 bits */ - u_int32_t low_reg; /* the window register is 32 bits */ - - imen &= ~(1<<i); /* clear mask variable */ - - select = IOAPIC_REDTBL + (i * 2); /* calculate addr */ - low_reg = io_apic_read(select); /* read contents */ - - low_reg &= ~IOART_INTMASK; /* clear mask */ - io_apic_write(select, low_reg); /* new value */ -} -#endif /* MULTIPLE_IOAPICS */ -#endif /* READY */ - - -/* - * read current IRQ0 -IRQ23 masks - */ -#if defined(MULTIPLE_IOAPICS) -#error MULTIPLE_IOAPICSXXX -#else -static __inline u_int32_t -read_io_apic_mask24(int apic __attribute__ ((unused))) -{ - return (imen & 0x00ffffff); /* return our global copy */ } -#endif /* MULTIPLE_IOAPICS */ /* |