diff options
Diffstat (limited to 'sys/arch/mvmeppc/stand/libbug/diskrd.c')
-rw-r--r-- | sys/arch/mvmeppc/stand/libbug/diskrd.c | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/sys/arch/mvmeppc/stand/libbug/diskrd.c b/sys/arch/mvmeppc/stand/libbug/diskrd.c new file mode 100644 index 00000000000..3ff1de00e71 --- /dev/null +++ b/sys/arch/mvmeppc/stand/libbug/diskrd.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_diskrd(arg) + struct mvmeprom_dskio *arg; +{ + int ret; + + asm volatile ("mr 3, %0" :: "r"(arg)); + MVMEPROM_CALL(MVMEPROM_NETRD); + asm volatile ("mr %0, 3" : "=r" (ret)); + return ((ret & 0x8)); +} |