summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--sys/arch/mvme88k/stand/libbug/netfopen.c20
-rw-r--r--sys/arch/mvme88k/stand/libbug/netfread.c20
2 files changed, 40 insertions, 0 deletions
diff --git a/sys/arch/mvme88k/stand/libbug/netfopen.c b/sys/arch/mvme88k/stand/libbug/netfopen.c
new file mode 100644
index 00000000000..3a21733b0b8
--- /dev/null
+++ b/sys/arch/mvme88k/stand/libbug/netfopen.c
@@ -0,0 +1,20 @@
+/* $OpenBSD: netfopen.c,v 1.1 2004/01/28 00:27:44 miod Exp $ */
+
+/*
+ * bug routines -- assumes that the necessary sections of memory
+ * are preserved.
+ */
+#include <sys/types.h>
+#include <machine/prom.h>
+
+#include "prom.h"
+
+/* returns 0: success, nonzero: error */
+int
+mvmeprom_netfopen(arg)
+ struct mvmeprom_netfopen *arg;
+{
+ asm volatile ("or r2,r0,%0": : "r" (arg));
+ MVMEPROM_CALL(MVMEPROM_NETFOPEN);
+ return (arg->status);
+}
diff --git a/sys/arch/mvme88k/stand/libbug/netfread.c b/sys/arch/mvme88k/stand/libbug/netfread.c
new file mode 100644
index 00000000000..63190331551
--- /dev/null
+++ b/sys/arch/mvme88k/stand/libbug/netfread.c
@@ -0,0 +1,20 @@
+/* $OpenBSD: netfread.c,v 1.1 2004/01/28 00:27:44 miod Exp $ */
+
+/*
+ * bug routines -- assumes that the necessary sections of memory
+ * are preserved.
+ */
+#include <sys/types.h>
+#include <machine/prom.h>
+
+#include "prom.h"
+
+/* returns 0: success, nonzero: error */
+int
+mvmeprom_netfread(arg)
+ struct mvmeprom_netfread *arg;
+{
+ asm volatile ("or r2,r0,%0": : "r" (arg));
+ MVMEPROM_CALL(MVMEPROM_NETFREAD);
+ return (arg->status);
+}