summaryrefslogtreecommitdiff
path: root/sys/arch
diff options
context:
space:
mode:
authorMichael Shalayeff <mickey@cvs.openbsd.org>1998-10-30 19:22:44 +0000
committerMichael Shalayeff <mickey@cvs.openbsd.org>1998-10-30 19:22:44 +0000
commit59c1f31ae3ef57a8eaec18c28a14843c86e71268 (patch)
tree2fe399527f8bd534ce51d2c9f4948f1985c48984 /sys/arch
parent54c8b44e81a2dd67096d7c606b76d424212f3120 (diff)
USERMODE() and FRAME_PC definitions
Diffstat (limited to 'sys/arch')
-rw-r--r--sys/arch/hppa/include/frame.h18
1 files changed, 13 insertions, 5 deletions
diff --git a/sys/arch/hppa/include/frame.h b/sys/arch/hppa/include/frame.h
index 836523ce7c4..e183cfcefe3 100644
--- a/sys/arch/hppa/include/frame.h
+++ b/sys/arch/hppa/include/frame.h
@@ -1,10 +1,18 @@
-/* $OpenBSD: frame.h,v 1.2 1998/07/07 21:32:40 mickey Exp $ */
+/* $OpenBSD: frame.h,v 1.3 1998/10/30 19:22:43 mickey Exp $ */
-#ifndef _HPPA_FRAME_H_
-#define _HPPA_FRAME_H_
+#ifndef _MACHINE_FRAME_H_
+#define _MACHINE_FRAME_H_
-#define FRAME_PC 0
+#define FRAME_PC (33*4)
+
+/*
+ * Macros to decode processor status word.
+ */
+#define HPPA_PC_PRIV_MASK 3
+#define HPPA_PC_PRIV_KERN 0
+#define HPPA_PC_PRIV_USER 3
+#define USERMODE(pc) (((pc) & HPPA_PC_PRIV_MASK) != HPPA_PC_PRIV_KERN)
#ifndef _LOCORE
struct trapframe {
@@ -73,4 +81,4 @@ struct trapframe {
};
#endif /* !_LOCORE */
-#endif /* !_HPPA_FRAME_H_ */
+#endif /* !_MACHINE_FRAME_H_ */