summaryrefslogtreecommitdiffstats
path: root/sys/amd64/include/apicreg.h
diff options
context:
space:
mode:
authorfsmp <fsmp@FreeBSD.org>1997-07-15 02:47:54 +0000
committerfsmp <fsmp@FreeBSD.org>1997-07-15 02:47:54 +0000
commite8a415386f1da7c5292cc35bee3f56bd6329744e (patch)
treefca589216fd44819394c7b542b87b326392c9428 /sys/amd64/include/apicreg.h
parentdd0a098be8e408ee41a9b5ea1134338e6228a281 (diff)
downloadFreeBSD-src-e8a415386f1da7c5292cc35bee3f56bd6329744e.zip
FreeBSD-src-e8a415386f1da7c5292cc35bee3f56bd6329744e.tar.gz
New defines to eliminate "magic numbers" in various places.
Diffstat (limited to 'sys/amd64/include/apicreg.h')
-rw-r--r--sys/amd64/include/apicreg.h24
1 files changed, 22 insertions, 2 deletions
diff --git a/sys/amd64/include/apicreg.h b/sys/amd64/include/apicreg.h
index c70a9ed..b3bd820 100644
--- a/sys/amd64/include/apicreg.h
+++ b/sys/amd64/include/apicreg.h
@@ -22,7 +22,7 @@
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*
- * $Id: apic.h,v 1.2 1997/07/08 23:29:48 smp Exp smp $
+ * $Id: apic.h,v 1.3 1997/07/15 00:09:00 smp Exp smp $
*/
#ifndef _MACHINE_APIC_H_
@@ -213,7 +213,27 @@ typedef struct IOAPIC ioapic_t;
#undef PAD4
#undef PAD3
-#endif /* LOCORE */
+#endif /* !LOCORE */
+
+
+/******************************************************************************
+ * various code 'logical' values
+ */
+
+#define LOPRIO_LEVEL 0x00000010 /* TPR of CPUs accepting INT */
+
+/* XXX these 2 don't really belong here... */
+#define COUNT_FIELD 0x00ffffff /* count portion of the lock */
+#define FREE_LOCK 0xffffffff /* value of lock when free */
+
+/*
+ * XXX This code assummes that the reserved field of the
+ * local APIC TPR can be written with all 0s.
+ * This saves quite a few memory accesses.
+ * If the silicon ever changes then things will break!
+ * It affects mplock.s, swtch.s, and possibly other files.
+ */
+#define CHEAP_TPR
/******************************************************************************
OpenPOWER on IntegriCloud