summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMiod Vallat <miod@cvs.openbsd.org>2004-01-24 21:12:39 +0000
committerMiod Vallat <miod@cvs.openbsd.org>2004-01-24 21:12:39 +0000
commitf0d601a612354a8fc00f1f3b78cce43519e7359d (patch)
tree45384819f97ac8ea5f710e807dbe7bb9f97d1772
parent3a5fa9add0385fc3ec28c0e0b93731e6784e24a4 (diff)
Deal with <machine/prom.h> changes.
-rw-r--r--sys/arch/mvmeppc/stand/libbug/delay.c5
-rw-r--r--sys/arch/mvmeppc/stand/libbug/diskrd.c5
-rw-r--r--sys/arch/mvmeppc/stand/libbug/diskwr.c5
-rw-r--r--sys/arch/mvmeppc/stand/libbug/getbrdid.c5
-rw-r--r--sys/arch/mvmeppc/stand/libbug/inchr.c4
-rw-r--r--sys/arch/mvmeppc/stand/libbug/instat.c5
-rw-r--r--sys/arch/mvmeppc/stand/libbug/libbug.h9
-rw-r--r--sys/arch/mvmeppc/stand/libbug/netctrl.c5
-rw-r--r--sys/arch/mvmeppc/stand/libbug/netfopen.c5
-rw-r--r--sys/arch/mvmeppc/stand/libbug/netfread.c5
-rw-r--r--sys/arch/mvmeppc/stand/libbug/netrd.c5
-rw-r--r--sys/arch/mvmeppc/stand/libbug/netwr.c5
-rw-r--r--sys/arch/mvmeppc/stand/libbug/outch.c5
-rw-r--r--sys/arch/mvmeppc/stand/libbug/outln.c5
-rw-r--r--sys/arch/mvmeppc/stand/libbug/outstr.c5
-rw-r--r--sys/arch/mvmeppc/stand/libbug/putchar.c4
-rw-r--r--sys/arch/mvmeppc/stand/libbug/return.c5
-rw-r--r--sys/arch/mvmeppc/stand/libbug/rtc_rd.c5
18 files changed, 54 insertions, 38 deletions
diff --git a/sys/arch/mvmeppc/stand/libbug/delay.c b/sys/arch/mvmeppc/stand/libbug/delay.c
index 3d114872b02..2e7b283729f 100644
--- a/sys/arch/mvmeppc/stand/libbug/delay.c
+++ b/sys/arch/mvmeppc/stand/libbug/delay.c
@@ -1,11 +1,12 @@
-/* $OpenBSD: delay.c,v 1.2 2001/07/04 08:31:34 niklas Exp $ */
+/* $OpenBSD: delay.c,v 1.3 2004/01/24 21:12:38 miod Exp $ */
/*
* bug routines -- assumes that the necessary sections of memory
* are preserved.
*/
#include <sys/types.h>
-#include <machine/prom.h>
+
+#include "libbug.h"
/* BUG - timing routine */
void
diff --git a/sys/arch/mvmeppc/stand/libbug/diskrd.c b/sys/arch/mvmeppc/stand/libbug/diskrd.c
index fa8070bcfeb..c8debc01da3 100644
--- a/sys/arch/mvmeppc/stand/libbug/diskrd.c
+++ b/sys/arch/mvmeppc/stand/libbug/diskrd.c
@@ -1,11 +1,12 @@
-/* $OpenBSD: diskrd.c,v 1.2 2001/07/04 08:31:34 niklas Exp $ */
+/* $OpenBSD: diskrd.c,v 1.3 2004/01/24 21:12:38 miod Exp $ */
/*
* bug routines -- assumes that the necessary sections of memory
* are preserved.
*/
#include <sys/types.h>
-#include <machine/prom.h>
+
+#include "libbug.h"
/* returns 0: success, nonzero: error */
int
diff --git a/sys/arch/mvmeppc/stand/libbug/diskwr.c b/sys/arch/mvmeppc/stand/libbug/diskwr.c
index 210b270fede..a92ff72c6fc 100644
--- a/sys/arch/mvmeppc/stand/libbug/diskwr.c
+++ b/sys/arch/mvmeppc/stand/libbug/diskwr.c
@@ -1,11 +1,12 @@
-/* $OpenBSD: diskwr.c,v 1.2 2001/07/04 08:31:35 niklas Exp $ */
+/* $OpenBSD: diskwr.c,v 1.3 2004/01/24 21:12:38 miod Exp $ */
/*
* bug routines -- assumes that the necessary sections of memory
* are preserved.
*/
#include <sys/types.h>
-#include <machine/prom.h>
+
+#include "libbug.h"
/* returns 0: success, nonzero: error */
int
diff --git a/sys/arch/mvmeppc/stand/libbug/getbrdid.c b/sys/arch/mvmeppc/stand/libbug/getbrdid.c
index 4fca7da9d23..ccb080fc84c 100644
--- a/sys/arch/mvmeppc/stand/libbug/getbrdid.c
+++ b/sys/arch/mvmeppc/stand/libbug/getbrdid.c
@@ -1,11 +1,12 @@
-/* $OpenBSD: getbrdid.c,v 1.2 2001/07/04 08:31:35 niklas Exp $ */
+/* $OpenBSD: getbrdid.c,v 1.3 2004/01/24 21:12:38 miod Exp $ */
/*
* bug routines -- assumes that the necessary sections of memory
* are preserved.
*/
#include <sys/types.h>
-#include <machine/prom.h>
+
+#include "libbug.h"
/* BUG - query board routines */
struct mvmeprom_brdid *
diff --git a/sys/arch/mvmeppc/stand/libbug/inchr.c b/sys/arch/mvmeppc/stand/libbug/inchr.c
index c1fce2e7414..8251d889bea 100644
--- a/sys/arch/mvmeppc/stand/libbug/inchr.c
+++ b/sys/arch/mvmeppc/stand/libbug/inchr.c
@@ -1,13 +1,11 @@
-/* $OpenBSD: inchr.c,v 1.1 2001/06/26 21:58:04 smurph Exp $ */
+/* $OpenBSD: inchr.c,v 1.2 2004/01/24 21:12:38 miod Exp $ */
/*
* bug routines -- assumes that the necessary sections of memory
* are preserved.
*/
#include <sys/types.h>
-#include <machine/prom.h>
-#include "stand.h"
#include "libbug.h"
/* returns 0 if no characters ready to read */
diff --git a/sys/arch/mvmeppc/stand/libbug/instat.c b/sys/arch/mvmeppc/stand/libbug/instat.c
index 44fd4243501..d58384b53a4 100644
--- a/sys/arch/mvmeppc/stand/libbug/instat.c
+++ b/sys/arch/mvmeppc/stand/libbug/instat.c
@@ -1,11 +1,12 @@
-/* $OpenBSD: instat.c,v 1.2 2001/07/04 08:31:35 niklas Exp $ */
+/* $OpenBSD: instat.c,v 1.3 2004/01/24 21:12:38 miod Exp $ */
/*
* bug routines -- assumes that the necessary sections of memory
* are preserved.
*/
#include <sys/types.h>
-#include <machine/prom.h>
+
+#include "libbug.h"
/* returns 0 if no characters ready to read */
int
diff --git a/sys/arch/mvmeppc/stand/libbug/libbug.h b/sys/arch/mvmeppc/stand/libbug/libbug.h
index 0a0aa465b61..2c724e44ace 100644
--- a/sys/arch/mvmeppc/stand/libbug/libbug.h
+++ b/sys/arch/mvmeppc/stand/libbug/libbug.h
@@ -1,4 +1,6 @@
-/* $OpenBSD: libbug.h,v 1.3 2002/03/14 03:15:58 millert Exp $ */
+/* $OpenBSD: libbug.h,v 1.4 2004/01/24 21:12:38 miod Exp $ */
+
+#include <machine/prom.h>
/*
* prototypes and such. note that get/put char are in stand.h
@@ -27,3 +29,8 @@ int mvmeprom_netctrl_reset(u_char, u_char);
extern struct mvmeprom_args bugargs;
void bugexec(void (*)());
+
+/* Invoke the BUG */
+#define MVMEPROM_CALL(x) \
+ __asm__ __volatile__ ( __CONCAT("addi %r10,%r0,",__STRING(x)) ); \
+ __asm__ __volatile__ ("sc");
diff --git a/sys/arch/mvmeppc/stand/libbug/netctrl.c b/sys/arch/mvmeppc/stand/libbug/netctrl.c
index 8b21dca1866..e46dfea9fec 100644
--- a/sys/arch/mvmeppc/stand/libbug/netctrl.c
+++ b/sys/arch/mvmeppc/stand/libbug/netctrl.c
@@ -1,11 +1,12 @@
-/* $OpenBSD: netctrl.c,v 1.2 2001/07/04 08:31:36 niklas Exp $ */
+/* $OpenBSD: netctrl.c,v 1.3 2004/01/24 21:12:38 miod Exp $ */
/*
* bug routines -- assumes that the necessary sections of memory
* are preserved.
*/
#include <sys/types.h>
-#include <machine/prom.h>
+
+#include "libbug.h"
/* returns 0: success, nonzero: error */
int
diff --git a/sys/arch/mvmeppc/stand/libbug/netfopen.c b/sys/arch/mvmeppc/stand/libbug/netfopen.c
index fdc175fac2f..52d7b8e9cf0 100644
--- a/sys/arch/mvmeppc/stand/libbug/netfopen.c
+++ b/sys/arch/mvmeppc/stand/libbug/netfopen.c
@@ -1,11 +1,12 @@
-/* $OpenBSD: netfopen.c,v 1.2 2001/07/04 08:31:36 niklas Exp $ */
+/* $OpenBSD: netfopen.c,v 1.3 2004/01/24 21:12:38 miod Exp $ */
/*
* bug routines -- assumes that the necessary sections of memory
* are preserved.
*/
#include <sys/types.h>
-#include <machine/prom.h>
+
+#include "libbug.h"
/* returns 0: success, nonzero: error */
int
diff --git a/sys/arch/mvmeppc/stand/libbug/netfread.c b/sys/arch/mvmeppc/stand/libbug/netfread.c
index 049bb13f3e6..c06521a8bbc 100644
--- a/sys/arch/mvmeppc/stand/libbug/netfread.c
+++ b/sys/arch/mvmeppc/stand/libbug/netfread.c
@@ -1,11 +1,12 @@
-/* $OpenBSD: netfread.c,v 1.2 2001/07/04 08:31:36 niklas Exp $ */
+/* $OpenBSD: netfread.c,v 1.3 2004/01/24 21:12:38 miod Exp $ */
/*
* bug routines -- assumes that the necessary sections of memory
* are preserved.
*/
#include <sys/types.h>
-#include <machine/prom.h>
+
+#include "libbug.h"
/* returns 0: success, nonzero: error */
int
diff --git a/sys/arch/mvmeppc/stand/libbug/netrd.c b/sys/arch/mvmeppc/stand/libbug/netrd.c
index 787d824fa5e..7257cc3652a 100644
--- a/sys/arch/mvmeppc/stand/libbug/netrd.c
+++ b/sys/arch/mvmeppc/stand/libbug/netrd.c
@@ -1,11 +1,12 @@
-/* $OpenBSD: netrd.c,v 1.2 2001/07/04 08:31:36 niklas Exp $ */
+/* $OpenBSD: netrd.c,v 1.3 2004/01/24 21:12:38 miod Exp $ */
/*
* bug routines -- assumes that the necessary sections of memory
* are preserved.
*/
#include <sys/types.h>
-#include <machine/prom.h>
+
+#include "libbug.h"
/* returns 0: success, nonzero: error */
int
diff --git a/sys/arch/mvmeppc/stand/libbug/netwr.c b/sys/arch/mvmeppc/stand/libbug/netwr.c
index d17e020fc26..7ba81d0887b 100644
--- a/sys/arch/mvmeppc/stand/libbug/netwr.c
+++ b/sys/arch/mvmeppc/stand/libbug/netwr.c
@@ -1,11 +1,12 @@
-/* $OpenBSD: netwr.c,v 1.2 2001/07/04 08:31:36 niklas Exp $ */
+/* $OpenBSD: netwr.c,v 1.3 2004/01/24 21:12:38 miod Exp $ */
/*
* bug routines -- assumes that the necessary sections of memory
* are preserved.
*/
#include <sys/types.h>
-#include <machine/prom.h>
+
+#include "libbug.h"
/* returns 0: success, nonzero: error */
int
diff --git a/sys/arch/mvmeppc/stand/libbug/outch.c b/sys/arch/mvmeppc/stand/libbug/outch.c
index 1d872ee9924..93dffcbd958 100644
--- a/sys/arch/mvmeppc/stand/libbug/outch.c
+++ b/sys/arch/mvmeppc/stand/libbug/outch.c
@@ -1,11 +1,12 @@
-/* $OpenBSD: outch.c,v 1.2 2001/07/04 08:31:36 niklas Exp $ */
+/* $OpenBSD: outch.c,v 1.3 2004/01/24 21:12:38 miod Exp $ */
/*
* bug routines -- assumes that the necessary sections of memory
* are preserved.
*/
#include <sys/types.h>
-#include <machine/prom.h>
+
+#include "libbug.h"
void
mvmeprom_outchr(a)
diff --git a/sys/arch/mvmeppc/stand/libbug/outln.c b/sys/arch/mvmeppc/stand/libbug/outln.c
index e31c1941512..d9b2509cd04 100644
--- a/sys/arch/mvmeppc/stand/libbug/outln.c
+++ b/sys/arch/mvmeppc/stand/libbug/outln.c
@@ -1,11 +1,12 @@
-/* $OpenBSD: outln.c,v 1.2 2001/07/04 08:31:37 niklas Exp $ */
+/* $OpenBSD: outln.c,v 1.3 2004/01/24 21:12:38 miod Exp $ */
/*
* bug routines -- assumes that the necessary sections of memory
* are preserved.
*/
#include <sys/types.h>
-#include <machine/prom.h>
+
+#include "libbug.h"
void
mvmeprom_outln(start, end)
diff --git a/sys/arch/mvmeppc/stand/libbug/outstr.c b/sys/arch/mvmeppc/stand/libbug/outstr.c
index b2e8310f06a..313b80c099a 100644
--- a/sys/arch/mvmeppc/stand/libbug/outstr.c
+++ b/sys/arch/mvmeppc/stand/libbug/outstr.c
@@ -1,11 +1,12 @@
-/* $OpenBSD: outstr.c,v 1.2 2001/07/04 08:31:37 niklas Exp $ */
+/* $OpenBSD: outstr.c,v 1.3 2004/01/24 21:12:38 miod Exp $ */
/*
* bug routines -- assumes that the necessary sections of memory
* are preserved.
*/
#include <sys/types.h>
-#include <machine/prom.h>
+
+#include "libbug.h"
void
mvmeprom_outstr(start, end)
diff --git a/sys/arch/mvmeppc/stand/libbug/putchar.c b/sys/arch/mvmeppc/stand/libbug/putchar.c
index 9a15bfb6b3f..e99ee1eb346 100644
--- a/sys/arch/mvmeppc/stand/libbug/putchar.c
+++ b/sys/arch/mvmeppc/stand/libbug/putchar.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: putchar.c,v 1.1 2001/06/26 21:58:05 smurph Exp $ */
+/* $OpenBSD: putchar.c,v 1.2 2004/01/24 21:12:38 miod Exp $ */
/*
* putchar: easier to do this with outstr than to add more macros to
@@ -6,9 +6,7 @@
*/
#include <sys/types.h>
-#include <machine/prom.h>
-#include "stand.h"
#include "libbug.h"
void
diff --git a/sys/arch/mvmeppc/stand/libbug/return.c b/sys/arch/mvmeppc/stand/libbug/return.c
index 7e1730a1378..f1bd1a66853 100644
--- a/sys/arch/mvmeppc/stand/libbug/return.c
+++ b/sys/arch/mvmeppc/stand/libbug/return.c
@@ -1,12 +1,11 @@
-/* $OpenBSD: return.c,v 1.2 2001/07/04 08:31:37 niklas Exp $ */
+/* $OpenBSD: return.c,v 1.3 2004/01/24 21:12:38 miod Exp $ */
/*
* bug routines -- assumes that the necessary sections of memory
* are preserved.
*/
#include <sys/types.h>
-#include <machine/prom.h>
-#include "stand.h"
+
#include "libbug.h"
/* BUG - return to bug routine */
diff --git a/sys/arch/mvmeppc/stand/libbug/rtc_rd.c b/sys/arch/mvmeppc/stand/libbug/rtc_rd.c
index a67f8118109..3c61ce45415 100644
--- a/sys/arch/mvmeppc/stand/libbug/rtc_rd.c
+++ b/sys/arch/mvmeppc/stand/libbug/rtc_rd.c
@@ -1,11 +1,12 @@
-/* $OpenBSD: rtc_rd.c,v 1.2 2001/07/04 08:31:37 niklas Exp $ */
+/* $OpenBSD: rtc_rd.c,v 1.3 2004/01/24 21:12:38 miod Exp $ */
/*
* bug routines -- assumes that the necessary sections of memory
* are preserved.
*/
#include <sys/types.h>
-#include <machine/prom.h>
+
+#include "libbug.h"
void
mvmeprom_rtc_rd(ptime)