libbug from Dale Rahn. Revisions by Theo de Raadt and myself.
This commit is contained in:
parent
eedc5c7e85
commit
eabb97da52
|
@ -0,0 +1,16 @@
|
|||
# $NetBSD: Makefile,v 1.1 1996/05/17 19:31:46 chuck Exp $
|
||||
|
||||
LIB=bug
|
||||
|
||||
NOPIC=
|
||||
NOPROFILE=
|
||||
|
||||
CFLAGS+=-I${.CURDIR}/../../include
|
||||
|
||||
SRCS= delay.c diskrd.c diskwr.c getbrdid.c instat.c outln.c outstr.c \
|
||||
return.c rtc_rd.c
|
||||
.PATH: ${.CURDIR}/../../../../lib/libc_sa
|
||||
|
||||
install:
|
||||
|
||||
.include <bsd.lib.mk>
|
|
@ -0,0 +1,14 @@
|
|||
# $NetBSD: Makefile.inc,v 1.1 1996/05/17 19:31:48 chuck Exp $
|
||||
|
||||
LIB_BUG_DIR=${S}/arch/${MACHINE}/stand/libbug
|
||||
|
||||
LIBBUG_DIR!= cd ${LIB_BUG_DIR}; \
|
||||
printf "xxx:\n\techo \$${.OBJDIR}\n" | ${MAKE} -r -s -f - xxx
|
||||
|
||||
LIBBUG=${LIBBUG_DIR}/libbug.a
|
||||
|
||||
$(LIBBUG): .NOTMAIN __always_make_libbug
|
||||
@echo making sure the libbug is up to date...
|
||||
@(cd ${LIB_BUG_DIR}; ${MAKE})
|
||||
|
||||
__always_make_libbug: .NOTMAIN
|
|
@ -0,0 +1,17 @@
|
|||
/* $NetBSD: delay.c,v 1.1 1996/05/17 19:31:49 chuck Exp $ */
|
||||
|
||||
/*
|
||||
* bug routines -- assumes that the necessary sections of memory
|
||||
* are preserved.
|
||||
*/
|
||||
#include <sys/types.h>
|
||||
#include <machine/prom.h>
|
||||
|
||||
/* BUG - timing routine */
|
||||
void
|
||||
mvmeprom_delay(msec)
|
||||
int msec;
|
||||
{
|
||||
MVMEPROM_ARG1(msec);
|
||||
MVMEPROM_CALL(MVMEPROM_DELAY);
|
||||
}
|
|
@ -0,0 +1,20 @@
|
|||
/* $NetBSD: diskrd.c,v 1.1 1996/05/17 19:31:50 chuck Exp $ */
|
||||
|
||||
/*
|
||||
* 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;
|
||||
|
||||
MVMEPROM_ARG1(arg);
|
||||
MVMEPROM_CALL(MVMEPROM_DSKRD);
|
||||
MVMEPROM_STATRET(ret);
|
||||
}
|
|
@ -0,0 +1,20 @@
|
|||
/* $NetBSD: diskwr.c,v 1.1 1996/05/17 19:31:51 chuck Exp $ */
|
||||
|
||||
/*
|
||||
* 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;
|
||||
|
||||
MVMEPROM_ARG1(arg);
|
||||
MVMEPROM_CALL(MVMEPROM_DSKWR);
|
||||
MVMEPROM_STATRET(ret);
|
||||
}
|
|
@ -0,0 +1,20 @@
|
|||
/* $NetBSD: getbrdid.c,v 1.1 1996/05/17 19:31:52 chuck Exp $ */
|
||||
|
||||
/*
|
||||
* 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;
|
||||
|
||||
MVMEPROM_NOARG();
|
||||
MVMEPROM_CALL(MVMEPROM_GETBRDID);
|
||||
MVMEPROM_RETURN(id);
|
||||
}
|
|
@ -0,0 +1,18 @@
|
|||
/* $NetBSD: instat.c,v 1.1 1996/05/17 19:31:53 chuck Exp $ */
|
||||
|
||||
/*
|
||||
* bug routines -- assumes that the necessary sections of memory
|
||||
* are preserved.
|
||||
*/
|
||||
#include <sys/types.h>
|
||||
#include <machine/prom.h>
|
||||
|
||||
/* returns 0 if no characters ready to read */
|
||||
int
|
||||
mvmeprom_instat()
|
||||
{
|
||||
int ret;
|
||||
|
||||
MVMEPROM_CALL(MVMEPROM_INSTAT);
|
||||
MVMEPROM_STATRET(ret);
|
||||
}
|
|
@ -0,0 +1,17 @@
|
|||
/* $NetBSD: outln.c,v 1.1 1996/05/17 19:31:54 chuck Exp $ */
|
||||
|
||||
/*
|
||||
* bug routines -- assumes that the necessary sections of memory
|
||||
* are preserved.
|
||||
*/
|
||||
#include <sys/types.h>
|
||||
#include <machine/prom.h>
|
||||
|
||||
void
|
||||
mvmeprom_outln(start, end)
|
||||
char *start, *end;
|
||||
{
|
||||
MVMEPROM_ARG1(start);
|
||||
MVMEPROM_ARG1(end);
|
||||
MVMEPROM_CALL(MVMEPROM_OUTSTRCRLF);
|
||||
}
|
|
@ -0,0 +1,17 @@
|
|||
/* $NetBSD: outstr.c,v 1.1 1996/05/17 19:31:55 chuck Exp $ */
|
||||
|
||||
/*
|
||||
* bug routines -- assumes that the necessary sections of memory
|
||||
* are preserved.
|
||||
*/
|
||||
#include <sys/types.h>
|
||||
#include <machine/prom.h>
|
||||
|
||||
void
|
||||
mvmeprom_outstr(start, end)
|
||||
char *start, *end;
|
||||
{
|
||||
MVMEPROM_ARG1(start);
|
||||
MVMEPROM_ARG2(end);
|
||||
MVMEPROM_CALL(MVMEPROM_OUTSTR);
|
||||
}
|
|
@ -0,0 +1,16 @@
|
|||
/* $NetBSD: return.c,v 1.1 1996/05/17 19:31:56 chuck Exp $ */
|
||||
|
||||
/*
|
||||
* bug routines -- assumes that the necessary sections of memory
|
||||
* are preserved.
|
||||
*/
|
||||
#include <sys/types.h>
|
||||
#include <machine/prom.h>
|
||||
|
||||
/* BUG - return to bug routine */
|
||||
void
|
||||
mvmeprom_return()
|
||||
{
|
||||
MVMEPROM_CALL(MVMEPROM_EXIT);
|
||||
/*NOTREACHED*/
|
||||
}
|
|
@ -0,0 +1,16 @@
|
|||
/* $NetBSD: rtc_rd.c,v 1.1 1996/05/17 19:31:57 chuck Exp $ */
|
||||
|
||||
/*
|
||||
* bug routines -- assumes that the necessary sections of memory
|
||||
* are preserved.
|
||||
*/
|
||||
#include <sys/types.h>
|
||||
#include <machine/prom.h>
|
||||
|
||||
void
|
||||
mvmeprom_rtc_rd(ptime)
|
||||
struct mvmeprom_time *ptime;
|
||||
{
|
||||
MVMEPROM_ARG1(ptime);
|
||||
MVMEPROM_CALL(MVMEPROM_RTC_RD);
|
||||
}
|
Loading…
Reference in New Issue