summaryrefslogtreecommitdiffstats
path: root/sys/i386/include/smptests.h
diff options
context:
space:
mode:
authorfsmp <fsmp@FreeBSD.org>1997-07-15 03:28:53 +0000
committerfsmp <fsmp@FreeBSD.org>1997-07-15 03:28:53 +0000
commit3ccd0ce0a7982bf90c395b93c4e981ebd8482da8 (patch)
tree26b07af297be226928999d660934bd22d13ecb48 /sys/i386/include/smptests.h
parent2cd754efcdc9c3f5bc0c9f365045600e2ea62616 (diff)
downloadFreeBSD-src-3ccd0ce0a7982bf90c395b93c4e981ebd8482da8.zip
FreeBSD-src-3ccd0ce0a7982bf90c395b93c4e981ebd8482da8.tar.gz
Cleanup.
Diffstat (limited to 'sys/i386/include/smptests.h')
-rw-r--r--sys/i386/include/smptests.h106
1 files changed, 56 insertions, 50 deletions
diff --git a/sys/i386/include/smptests.h b/sys/i386/include/smptests.h
index efa37e5..2f807bb 100644
--- a/sys/i386/include/smptests.h
+++ b/sys/i386/include/smptests.h
@@ -33,61 +33,12 @@
* various 'tests in progress'
*/
+
/*
* address of POST hardware port
*
- */
#define POST_ADDR 0x80
-#ifdef POST_ADDR
-#define ASMPOSTCODE_INC \
- pushl %eax ; \
- movl _current_postcode, %eax ; \
- incl %eax ; \
- andl $0xff, %eax ; \
- movl %eax, _current_postcode ; \
- outb %al, $POST_ADDR ; \
- popl %eax
-
-/*
- * Overwrite the current_postcode low nibble .
*/
-#define ASMPOSTCODE_HILO(X) \
- pushl %eax ; \
- movl $X, %eax ; \
- movl %eax, _current_postcode ; \
- outb %al, $POST_ADDR ; \
- popl %eax
-
-/*
- * Overwrite the current_postcode low nibble .
- */
-#define ASMPOSTCODE_LO(X) \
- pushl %eax ; \
- movl _current_postcode, %eax ; \
- andl $0xf0, %eax ; \
- orl $X, %eax ; \
- movl %eax, _current_postcode ; \
- outb %al, $POST_ADDR ; \
- popl %eax
-
-/*
- * Overwrite the current_postcode high nibble .
- * Note: this does NOT shift the digit to the high position!
- */
-#define ASMPOSTCODE_HI(X) \
- pushl %eax ; \
- movl _current_postcode, %eax ; \
- andl $0x0f, %eax ; \
- orl $X, %eax ; \
- movl %eax, _current_postcode ; \
- outb %al, $POST_ADDR ; \
- popl %eax
-#else
-#define ASMPOSTCODE_INC
-#define ASMPOSTCODE_HILO(X)
-#define ASMPOSTCODE_LO(X)
-#define ASMPOSTCODE_HI(X)
-#endif /* POST_ADDR */
/*
@@ -160,6 +111,61 @@
#define IPI_TARGET_TEST1 1
*/
+
+/*
+ * POST hardware macros.
+ */
+#ifdef POST_ADDR
+#define ASMPOSTCODE_INC \
+ pushl %eax ; \
+ movl _current_postcode, %eax ; \
+ incl %eax ; \
+ andl $0xff, %eax ; \
+ movl %eax, _current_postcode ; \
+ outb %al, $POST_ADDR ; \
+ popl %eax
+
+/*
+ * Overwrite the current_postcode value.
+ */
+#define ASMPOSTCODE(X) \
+ pushl %eax ; \
+ movl $X, %eax ; \
+ movl %eax, _current_postcode ; \
+ outb %al, $POST_ADDR ; \
+ popl %eax
+
+/*
+ * Overwrite the current_postcode low nibble.
+ */
+#define ASMPOSTCODE_LO(X) \
+ pushl %eax ; \
+ movl _current_postcode, %eax ; \
+ andl $0xf0, %eax ; \
+ orl $X, %eax ; \
+ movl %eax, _current_postcode ; \
+ outb %al, $POST_ADDR ; \
+ popl %eax
+
+/*
+ * Overwrite the current_postcode high nibble.
+ */
+#define ASMPOSTCODE_HI(X) \
+ pushl %eax ; \
+ movl _current_postcode, %eax ; \
+ andl $0x0f, %eax ; \
+ orl $(X<<4), %eax ; \
+ movl %eax, _current_postcode ; \
+ outb %al, $POST_ADDR ; \
+ popl %eax
+#else
+#define ASMPOSTCODE_INC
+#define ASMPOSTCODE(X)
+#define ASMPOSTCODE_LO(X)
+#define ASMPOSTCODE_HI(X)
+#endif /* POST_ADDR */
+
+
/*
* these are all temps for debugging CPUSTOP code in mplock.s
* they will (hopefully) go away soon...
OpenPOWER on IntegriCloud