diff options
author | Dale S. Rahn <rahnds@cvs.openbsd.org> | 1997-03-03 19:32:35 +0000 |
---|---|---|
committer | Dale S. Rahn <rahnds@cvs.openbsd.org> | 1997-03-03 19:32:35 +0000 |
commit | 90ff5a441368313fa226376473fea6908c2c3539 (patch) | |
tree | 38e1de6dcfb2805194734736d7209f51e06fa9e1 /sys/arch/mvme88k/stand/libbug/m88k/diskwr.c | |
parent | 7848f1c3b3e234584c90f67e60c6164590478f49 (diff) |
Third try at importing the mvme88k port. This is a working kernel
from nivas.
Userland and compiler still need to be worked on.
Make certain what directory the import is done from.
Diffstat (limited to 'sys/arch/mvme88k/stand/libbug/m88k/diskwr.c')
-rw-r--r-- | sys/arch/mvme88k/stand/libbug/m88k/diskwr.c | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/sys/arch/mvme88k/stand/libbug/m88k/diskwr.c b/sys/arch/mvme88k/stand/libbug/m88k/diskwr.c new file mode 100644 index 00000000000..681f521b5b0 --- /dev/null +++ b/sys/arch/mvme88k/stand/libbug/m88k/diskwr.c @@ -0,0 +1,19 @@ +/* + * bug routines -- assumes that the necessary sections of memory + * are preserved. + */ +#include <sys/types.h> +#include <machine/prom.h> + +/* returns 0: success, nonzero: error */ +int +mvmeprom_diskwr(arg) + struct mvmeprom_dskio *arg; +{ + int ret; + + asm volatile ("or r2,r0,%0": : "r" (arg) ); + MVMEPROM_CALL(MVMEPROM_DSKWR); + asm volatile ("or %0,r0,r2" : "=r" (ret)); + return (!(ret & 0x4)); +} |