diff options
author | fsmp <fsmp@FreeBSD.org> | 1997-05-29 05:57:43 +0000 |
---|---|---|
committer | fsmp <fsmp@FreeBSD.org> | 1997-05-29 05:57:43 +0000 |
commit | 1d5eea67e279ee4c1df42846a2f5cbfb4badaed5 (patch) | |
tree | e8e1919865bf1cae6a6e4bc3815e98a7e548030b /sys/i386/include/mpapic.h | |
parent | 9872779de28c7c9afa5acd60762200a1b0230010 (diff) | |
download | FreeBSD-src-1d5eea67e279ee4c1df42846a2f5cbfb4badaed5.zip FreeBSD-src-1d5eea67e279ee4c1df42846a2f5cbfb4badaed5.tar.gz |
apic.h now has structure definitions for both the local APIC and io APIC.
apic.h has defines like:
#define lapic__id lapic->id
Once private pages and "known virtual addr" mapping of the APICs is
ready all 'lapic__XXX' will be changed to 'lapic.XXX', and the defines
will be removed.
Changes to smp.h for lapic_t lapic && ioapic_t ioapic pointers,
currently equal to apic_base && io_apic_base, will stand alone with the
private page mapping.
Diffstat (limited to 'sys/i386/include/mpapic.h')
-rw-r--r-- | sys/i386/include/mpapic.h | 19 |
1 files changed, 16 insertions, 3 deletions
diff --git a/sys/i386/include/mpapic.h b/sys/i386/include/mpapic.h index baf00a0..9d4e352 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.4 1997/05/22 22:04:45 fsmp Exp $ + * $Id: mpapic.h,v 1.5 1997/05/25 02:43:42 fsmp Exp $ */ #ifndef _MACHINE_MPAPIC_H_ @@ -90,11 +90,17 @@ enum busTypes { #error MULTIPLE_IOAPICSXXX #else static __inline u_int32_t +#if 1 /** 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 */ @@ -106,10 +112,17 @@ io_apic_read(int apic __attribute__ ((unused)), int reg) #error MULTIPLE_IOAPICSXXX #else static __inline void +#if 1 /** 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 */ @@ -184,7 +197,7 @@ read_io_apic_mask24(int apic __attribute__ ((unused))) static __inline void apic_eoi(void) { - apic_base[APIC_EOI] = 0; + lapic__eoi = 0; } |