summaryrefslogtreecommitdiff
path: root/sys/arch/mvme68k/stand/libbug/m68k/getbrdid.c
diff options
context:
space:
mode:
authorTheo de Raadt <deraadt@cvs.openbsd.org>1995-10-18 10:44:53 +0000
committerTheo de Raadt <deraadt@cvs.openbsd.org>1995-10-18 10:44:53 +0000
commit49235ceee0c25492d4ca35194d7c72838a9ec284 (patch)
tree14f77677934d4f4cb9baa428691ace792fd0deed /sys/arch/mvme68k/stand/libbug/m68k/getbrdid.c
parentc9328c850e70436131e06a34f73c14cc230c18f9 (diff)
mvme68k port by me. some parts by dale rahn.
Diffstat (limited to 'sys/arch/mvme68k/stand/libbug/m68k/getbrdid.c')
-rw-r--r--sys/arch/mvme68k/stand/libbug/m68k/getbrdid.c18
1 files changed, 18 insertions, 0 deletions
diff --git a/sys/arch/mvme68k/stand/libbug/m68k/getbrdid.c b/sys/arch/mvme68k/stand/libbug/m68k/getbrdid.c
new file mode 100644
index 00000000000..ded49ac3155
--- /dev/null
+++ b/sys/arch/mvme68k/stand/libbug/m68k/getbrdid.c
@@ -0,0 +1,18 @@
+/*
+ * bug routines -- assumes that the necessary sections of memory
+ * are preserved.
+ */
+#include <sys/types.h>
+#include <machine/prom.h>
+
+/* BUG - query board routines */
+struct mvmeprom_brdid *
+mvmeprom_getbrdid()
+{
+ struct mvmeprom_brdid *id;
+
+ asm volatile ("clrl sp@-");
+ MVMEPROM_CALL(MVMEPROM_GETBRDID);
+ asm volatile ("movel sp@+,%0": "=d" (id):);
+ return (id);
+}