summaryrefslogtreecommitdiffstats
path: root/sys/sys/smp.h
diff options
context:
space:
mode:
authorfsmp <fsmp@FreeBSD.org>1997-05-29 05:57:43 +0000
committerfsmp <fsmp@FreeBSD.org>1997-05-29 05:57:43 +0000
commit1d5eea67e279ee4c1df42846a2f5cbfb4badaed5 (patch)
treee8e1919865bf1cae6a6e4bc3815e98a7e548030b /sys/sys/smp.h
parent9872779de28c7c9afa5acd60762200a1b0230010 (diff)
downloadFreeBSD-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/sys/smp.h')
-rw-r--r--sys/sys/smp.h14
1 files changed, 13 insertions, 1 deletions
diff --git a/sys/sys/smp.h b/sys/sys/smp.h
index ca4b2e5..ee96269 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.8 1997/05/07 19:53:20 peter Exp $
+ * $Id: smp.h,v 1.9 1997/05/28 18:44:11 fsmp Exp $
*
*/
@@ -25,6 +25,8 @@
#if defined(SMP) || defined(APIC_IO)
+#include <machine/apic.h>
+
/* global data in mpboot.s */
extern int bootMP_size;
@@ -78,11 +80,17 @@ void smp_invltlb __P((void));
/* global data in mpapic.c */
extern volatile u_int* apic_base;
+#if 1 /** XXX APIC_STRUCT */
+extern volatile lapic_t* lapic;
+#endif /** XXX APIC_STRUCT */
#if defined(MULTIPLE_IOAPICS)
#error MULTIPLE_IOAPICSXXX
#else
extern volatile u_int* io_apic_base;
+#if 1 /** XXX APIC_STRUCT */
+extern volatile ioapic_t* ioapic;
+#endif /** XXX APIC_STRUCT */
#endif /* MULTIPLE_IOAPICS */
/* functions in mpapic.c */
@@ -125,7 +133,11 @@ cpunumber(void)
static __inline unsigned
cpunumber(void)
{
+#if 0
return (unsigned)(apic_id_to_logical[(apic_base[8] & 0x0f000000) >> 24]);
+#else
+ return (unsigned)(apic_id_to_logical[(lapic__id & 0x0f000000) >> 24]);
+#endif
}
#endif /* 0 */
OpenPOWER on IntegriCloud