From 196add41e6dfb1dd4688aa01eb694ae821ec3d98 Mon Sep 17 00:00:00 2001 From: Miod Vallat Date: Tue, 16 May 2006 22:51:31 +0000 Subject: Cleanup of mvme88k standalone code, with rewritten startup code with fewer assembly statements and much less magic, a few display artefacts removed, and private definitions moved out of the main prom.h. --- sys/arch/mvme88k/stand/libbug/libbug.h | 23 ++++++++++++++++++----- sys/arch/mvme88k/stand/libbug/putchar.c | 18 ++++++++---------- sys/arch/mvme88k/stand/libbug/return.c | 10 +--------- 3 files changed, 27 insertions(+), 24 deletions(-) (limited to 'sys/arch/mvme88k/stand/libbug') diff --git a/sys/arch/mvme88k/stand/libbug/libbug.h b/sys/arch/mvme88k/stand/libbug/libbug.h index f5325292ce7..005ae94b617 100644 --- a/sys/arch/mvme88k/stand/libbug/libbug.h +++ b/sys/arch/mvme88k/stand/libbug/libbug.h @@ -1,23 +1,36 @@ -/* $OpenBSD: libbug.h,v 1.3 2002/03/14 03:15:57 millert Exp $ */ +/* $OpenBSD: libbug.h,v 1.4 2006/05/16 22:51:30 miod Exp $ */ /* * prototypes and such. note that get/put char are in stand.h */ - void mvmeprom_delay(int); int mvmeprom_diskrd(struct mvmeprom_dskio *); int mvmeprom_diskwr(struct mvmeprom_dskio *); -struct mvmeprom_brdid *mvmeprom_getbrdid(void); -int peekchar(void); +struct mvmeprom_brdid *mvmeprom_getbrdid(void); +int mvmeprom_netfopen(struct mvmeprom_netfopen *); +int mvmeprom_netfread(struct mvmeprom_netfread *); void mvmeprom_outln(char *, char *); void mvmeprom_outstr(char *, char *); void mvmeprom_rtc_rd(struct mvmeprom_time *); /* - * bugcrt stuff + * bugcrt stuff */ +struct mvmeprom_args { + u_int dev_lun; + u_int ctrl_lun; + u_int flags; + u_int ctrl_addr; + u_int entry; + u_int conf_blk; + char *arg_start; + char *arg_end; + char *nbarg_start; + char *nbarg_end; +}; + extern struct mvmeprom_args bugargs; void bugexec(void (*)()); diff --git a/sys/arch/mvme88k/stand/libbug/putchar.c b/sys/arch/mvme88k/stand/libbug/putchar.c index a097e36f5b4..1968152875e 100644 --- a/sys/arch/mvme88k/stand/libbug/putchar.c +++ b/sys/arch/mvme88k/stand/libbug/putchar.c @@ -1,4 +1,4 @@ -/* $OpenBSD: putchar.c,v 1.3 2003/09/07 21:35:35 miod Exp $ */ +/* $OpenBSD: putchar.c,v 1.4 2006/05/16 22:51:30 miod Exp $ */ /* * putchar: easier to do this with outstr than to add more macros to @@ -13,14 +13,12 @@ void putchar(c) - -int c; - + int c; { - char ca; - ca = (char)c & 0xFF; - if (ca == '\n') - putchar('\r'); - asm volatile ("or r2,r0,%0" : : "r" (ca)); - MVMEPROM_CALL(MVMEPROM_OUTCHR); + char ca; + ca = (char)c & 0xFF; + if (ca == '\n') + putchar('\r'); + asm volatile ("or r2,r0,%0" : : "r" (ca)); + MVMEPROM_CALL(MVMEPROM_OUTCHR); } diff --git a/sys/arch/mvme88k/stand/libbug/return.c b/sys/arch/mvme88k/stand/libbug/return.c index ff218a3a5f7..113dd3e2186 100644 --- a/sys/arch/mvme88k/stand/libbug/return.c +++ b/sys/arch/mvme88k/stand/libbug/return.c @@ -1,4 +1,4 @@ -/* $OpenBSD: return.c,v 1.3 2003/09/07 21:35:35 miod Exp $ */ +/* $OpenBSD: return.c,v 1.4 2006/05/16 22:51:30 miod Exp $ */ /* * bug routines -- assumes that the necessary sections of memory @@ -9,14 +9,6 @@ #include "stand.h" #include "prom.h" -/* BUG - return to bug routine */ -void -mvmeprom_return() -{ - MVMEPROM_CALL(MVMEPROM_EXIT); - /*NOTREACHED*/ -} - /* BUG - return to bug routine */ __dead void _rtt() -- cgit v1.2.3