summaryrefslogtreecommitdiffstats
path: root/sys/i386
diff options
context:
space:
mode:
authoradrian <adrian@FreeBSD.org>2009-06-07 22:52:48 +0000
committeradrian <adrian@FreeBSD.org>2009-06-07 22:52:48 +0000
commit92f847edaf37d804dffd489728e6af48a60a4fbb (patch)
treec885fefb90076be9ff16bb08e5ff3d0cccb7980d /sys/i386
parentf3f59b2ee06917292b96f078892316f83fd2e7b5 (diff)
downloadFreeBSD-src-92f847edaf37d804dffd489728e6af48a60a4fbb.zip
FreeBSD-src-92f847edaf37d804dffd489728e6af48a60a4fbb.tar.gz
Decouple the i386 native and i386 Xen APIC definitions a little further.
I'm experimenting locally with xen APIC emulation a bit and this makes it easier to migrate APIC entries between being bitmapped and not being bitmapped.
Diffstat (limited to 'sys/i386')
-rw-r--r--sys/i386/include/apicvar.h26
1 files changed, 22 insertions, 4 deletions
diff --git a/sys/i386/include/apicvar.h b/sys/i386/include/apicvar.h
index 9f419e2..a03c083 100644
--- a/sys/i386/include/apicvar.h
+++ b/sys/i386/include/apicvar.h
@@ -108,12 +108,13 @@
*/
/* Interrupts for local APIC LVT entries other than the timer. */
+#ifdef XEN
+/* These are the Xen i386 APIC definitions */
#define APIC_LOCAL_INTS 240
#define APIC_ERROR_INT APIC_LOCAL_INTS
#define APIC_THERMAL_INT (APIC_LOCAL_INTS + 1)
-
#define APIC_IPI_INTS (APIC_LOCAL_INTS + 2)
-#ifdef XEN
+
#define IPI_RENDEZVOUS (APIC_IPI_INTS) /* Inter-CPU rendezvous. */
#define IPI_INVLTLB (APIC_IPI_INTS + 1) /* TLB Shootdown IPIs */
#define IPI_INVLPG (APIC_IPI_INTS + 2)
@@ -123,7 +124,24 @@
/* Vector to handle bitmap based IPIs */
#define IPI_BITMAP_VECTOR (APIC_IPI_INTS + 6)
-#else
+/* IPIs handled by IPI_BITMAPED_VECTOR (XXX ups is there a better place?) */
+#define IPI_AST 0 /* Generate software trap. */
+#define IPI_PREEMPT 1
+#define IPI_HARDCLOCK 2
+#define IPI_STATCLOCK 3
+#define IPI_PROFCLOCK 4
+#define IPI_BITMAP_LAST IPI_PROFCLOCK
+#define IPI_IS_BITMAPED(x) ((x) <= IPI_BITMAP_LAST)
+
+#define IPI_STOP (APIC_IPI_INTS + 7) /* Stop CPU until restarted. */
+
+#else /* XEN */
+/* These are the normal i386 APIC definitions */
+#define APIC_LOCAL_INTS 240
+#define APIC_ERROR_INT APIC_LOCAL_INTS
+#define APIC_THERMAL_INT (APIC_LOCAL_INTS + 1)
+#define APIC_IPI_INTS (APIC_LOCAL_INTS + 2)
+
#define IPI_RENDEZVOUS (APIC_IPI_INTS) /* Inter-CPU rendezvous. */
#define IPI_INVLTLB (APIC_IPI_INTS + 1) /* TLB Shootdown IPIs */
#define IPI_INVLPG (APIC_IPI_INTS + 2)
@@ -132,7 +150,6 @@
#define IPI_LAZYPMAP (APIC_IPI_INTS + 5) /* Lazy pmap release. */
/* Vector to handle bitmap based IPIs */
#define IPI_BITMAP_VECTOR (APIC_IPI_INTS + 6)
-#endif
/* IPIs handled by IPI_BITMAPED_VECTOR (XXX ups is there a better place?) */
#define IPI_AST 0 /* Generate software trap. */
@@ -144,6 +161,7 @@
#define IPI_IS_BITMAPED(x) ((x) <= IPI_BITMAP_LAST)
#define IPI_STOP (APIC_IPI_INTS + 7) /* Stop CPU until restarted. */
+#endif /* XEN */
/*
* The spurious interrupt can share the priority class with the IPIs since
OpenPOWER on IntegriCloud