summaryrefslogtreecommitdiff
path: root/sys/arch/mvme88k/include/prom.h
diff options
context:
space:
mode:
authorMiod Vallat <miod@cvs.openbsd.org>2003-09-01 19:14:05 +0000
committerMiod Vallat <miod@cvs.openbsd.org>2003-09-01 19:14:05 +0000
commit8c643fa97dba3913c4dcf9288ab2a0086f149862 (patch)
treec26c00124db4bb3801cbbadddf2e58f52d568e29 /sys/arch/mvme88k/include/prom.h
parent2184cb26e19fac9e35b58667a17599f739d23317 (diff)
Prevent userland from invoking BUG system calls, by saving the initial BUG
trap vector contents, putting the bugtrap() stub in place, and switching back and forth between them when the kernel needs to invoke BUG functions.
Diffstat (limited to 'sys/arch/mvme88k/include/prom.h')
-rw-r--r--sys/arch/mvme88k/include/prom.h11
1 files changed, 6 insertions, 5 deletions
diff --git a/sys/arch/mvme88k/include/prom.h b/sys/arch/mvme88k/include/prom.h
index 5fc34b43042..551213cffd7 100644
--- a/sys/arch/mvme88k/include/prom.h
+++ b/sys/arch/mvme88k/include/prom.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: prom.h,v 1.10 2003/06/04 04:11:37 deraadt Exp $ */
+/* $OpenBSD: prom.h,v 1.11 2003/09/01 19:14:04 miod Exp $ */
/*
* Copyright (c) 1998 Steve Murphree, Jr.
* Copyright (c) 1996 Nivas Madhur
@@ -30,6 +30,9 @@
#ifndef __MACHINE_PROM_H__
#define __MACHINE_PROM_H__
+/* BUG trap vector */
+#define MVMEPROM_VECTOR 496
+
#define MVMEPROM_INCHR 0x00
#define MVMEPROM_INSTAT 0x01
#define MVMEPROM_INLN 0x02
@@ -157,11 +160,9 @@ struct mvmeprom_args {
u_int cputyp;
};
-#endif
+extern unsigned long bugvec[2], sysbugvec[2]; /* BUG trap vector copies */
-#define MVMEPROM_CALL(x) \
- __asm__ __volatile__ ( __CONCAT("or r9,r0,",__STRING(x)) ); \
- __asm__ __volatile__ ("tb0 0,r0,496")
+#endif /* _LOCORE */
#define MVMEPROM_REG_DEVLUN "r2"
#define MVMEPROM_REG_CTRLLUN "r3"