summaryrefslogtreecommitdiff
path: root/sys/arch/m88k/include
diff options
context:
space:
mode:
authorMiod Vallat <miod@cvs.openbsd.org>2004-07-28 12:28:08 +0000
committerMiod Vallat <miod@cvs.openbsd.org>2004-07-28 12:28:08 +0000
commit051d3b68976d0583c64d4b4d42b9170b3ee10e73 (patch)
tree88fa00c3d3500df3b126f983af53081bcfef4fce /sys/arch/m88k/include
parent04d0f1d314509e3f5822146a24ea0bdebab2b618 (diff)
Keep exception specific defines in the exception handling code, instead of
polluting the kernel namespace.
Diffstat (limited to 'sys/arch/m88k/include')
-rw-r--r--sys/arch/m88k/include/asm.h50
1 files changed, 7 insertions, 43 deletions
diff --git a/sys/arch/m88k/include/asm.h b/sys/arch/m88k/include/asm.h
index 80c21b188fc..b2edbbcf339 100644
--- a/sys/arch/m88k/include/asm.h
+++ b/sys/arch/m88k/include/asm.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: asm.h,v 1.1 2004/04/26 12:34:05 miod Exp $ */
+/* $OpenBSD: asm.h,v 1.2 2004/07/28 12:28:06 miod Exp $ */
/*
* Mach Operating System
@@ -27,8 +27,8 @@
* rights to redistribute these changes.
*/
-#ifndef __MACHINE_M88K_ASM_H__
-#define __MACHINE_M88K_ASM_H__
+#ifndef __M88K_ASM_H__
+#define __M88K_ASM_H__
#ifdef __STDC__
#define _C_LABEL(name) _ ## name
@@ -187,46 +187,10 @@
addu r31, r31, 32
/*
- * SR1 - CPU FLAGS REGISTER
- * XXX clean this when the trap handler is reworked. Among the things
- * I like to see is having the trap frame on the kernel stack instead
- * of putting in the PCB. If done properly, we don't need SR1 for doing
- * anything special. nivas
- *
- * SR1 contains flags about the current CPU status.
- *
- * The bit FLAG_IGNORE_DATA_EXCEPTION indicates that any data exceptions
- * should be ignored (well, at least treated in a special way).
- * The bit FLAG_ENABLING_FPU indicates that the exception handler is
- * in the process of enabling the FPU (so that an exception can
- * be serviced). This is needed because enabling the FPU can
- * cause other exceptions to happen, and the whole system is
- * in a rather precarious state and so special cautions must
- * be taken.
- */
-#define FLAG_CPU_FIELD_WIDTH 2 /* must be <= 12 */
-#define FLAG_IGNORE_DATA_EXCEPTION 5
-#define FLAG_ENABLING_FPU 7
-#define FLAG_FROM_KERNEL 8
-
-/* REGister OFFset into the E.F. (exception frame) */
-#define REG_OFF(reg_num) ((reg_num) * 4) /* (num * sizeof(register_t)) */
-#define GENREG_OFF(num) (REG_OFF(EF_R0 + (num))) /* GENeral REGister OFFset */
-
-/*
- * Some registers used during the setting up of the new exception frame.
- * Don't choose r1, r30, or r31 for any of them.
- *
- * Also, if any are 'r2' or 'r3', be careful using with CALL above!
+ * Fields in cr18. More bits are used privately in the exception handling
+ * code.
*/
-#define FLAGS r2
-#define TMP r3
-#define TMP2 r10
-#define TMP3 r11
-#define SAVE_TMP2 st r10, r31, GENREG_OFF(10)
-#define SAVE_TMP3 st r11, r31, GENREG_OFF(11)
-#define RESTORE_TMP2 ld r10, r31, GENREG_OFF(10)
-#define RESTORE_TMP3 ld r11, r31, GENREG_OFF(11)
+#define FLAG_CPU_FIELD_WIDTH 2 /* must match cpu_number.h */
/*
* Info about the PSR
@@ -307,4 +271,4 @@
#endif /* _KERNEL */
-#endif /* __MACHINE_M88K_ASM_H__ */
+#endif /* __M88K_ASM_H__ */