summaryrefslogtreecommitdiff
path: root/sys/arch/sparc/include/oldmon.h
diff options
context:
space:
mode:
authorTheo de Raadt <deraadt@cvs.openbsd.org>1996-08-11 05:35:37 +0000
committerTheo de Raadt <deraadt@cvs.openbsd.org>1996-08-11 05:35:37 +0000
commite511a52691ddb2290f5d3c9ca6e9f0fc3b320289 (patch)
treef68510b774a71e2a0879cb013e3abd7a15665abc /sys/arch/sparc/include/oldmon.h
parentfc98d7c9a0046f274410f903f952ef6224f68e10 (diff)
netbsd port, now we merge our changes back in
Diffstat (limited to 'sys/arch/sparc/include/oldmon.h')
-rw-r--r--sys/arch/sparc/include/oldmon.h135
1 files changed, 75 insertions, 60 deletions
diff --git a/sys/arch/sparc/include/oldmon.h b/sys/arch/sparc/include/oldmon.h
index 02cbf052656..d18a256f05c 100644
--- a/sys/arch/sparc/include/oldmon.h
+++ b/sys/arch/sparc/include/oldmon.h
@@ -1,4 +1,4 @@
-/* $NetBSD: oldmon.h,v 1.5 1995/09/03 21:36:06 pk Exp $ */
+/* $NetBSD: oldmon.h,v 1.11 1996/03/31 22:21:38 pk Exp $ */
/*
* Copyright (C) 1985 Regents of the University of California
@@ -74,24 +74,56 @@ struct devinfo {
};
/*
+ * A "stand alone I/O request".
+ * This is passed as the main argument to the PROM I/O routines
+ * in the `om_boottable' structure.
+ */
+struct saioreq {
+ char si_flgs;
+ struct om_boottable *si_boottab;/* Points to boottab entry if any */
+ char *si_devdata; /* Device-specific data pointer */
+ int si_ctlr; /* Controller number or address */
+ int si_unit; /* Unit number within controller */
+ long si_boff; /* Partition number within unit */
+ long si_cyloff;
+ long si_offset;
+ long si_bn; /* Block number to R/W */
+ char *si_ma; /* Memory address to R/W */
+ int si_cc; /* Character count to R/W */
+ struct saif *si_sif; /* net if. pointer (set by b_open) */
+ char *si_devaddr; /* Points to mapped in device */
+ char *si_dmaaddr; /* Points to allocated DMA space */
+};
+#define SAIO_F_READ 0x01
+#define SAIO_F_WRITE 0x02
+#define SAIO_F_ALLOC 0x04
+#define SAIO_F_FILE 0x08
+#define SAIO_F_EOF 0x10 /* EOF on device */
+#define SAIO_F_AJAR 0x20 /* Descriptor "ajar" (stopped but not closed) */
+
+
+/*
* The table entry that describes a device. It exists in the PROM; a
* pointer to it is passed in MachMonBootParam. It can be used to locate
* PROM subroutines for opening, reading, and writing the device.
*
* When using this interface, only one device can be open at once.
*
- * NOTE: I am not sure what arguments boot, open, close, and strategy take.
- * What is here is just translated verbatim from the sun monitor code. We
+ * NOTE: I am not sure what arguments boot, open, close, and strategy take.
+ * What is here is just translated verbatim from the sun monitor code. We
* should figure this out eventually if we need it.
*/
struct om_boottable {
char b_devname[2]; /* The name of the device */
- int (*b_probe)(); /* probe() --> -1 or found controller
+ int (*b_probe) __P((void)); /* probe() --> -1 or found controller
number */
- int (*b_boot)(); /* boot(bp) --> -1 or start address */
- int (*b_open)(); /* open(iobp) --> -1 or 0 */
- int (*b_close)(); /* close(iobp) --> -1 or 0 */
- int (*b_strategy)(); /* strategy(iobp,rw) --> -1 or 0 */
+ int (*b_boot) __P((void)); /* boot(bp) --> -1 or start address */
+ int (*b_open)
+ __P((struct saioreq *));/* open(iobp) --> -1 or 0 */
+ int (*b_close)
+ __P((struct saioreq *));/* close(iobp) --> -1 or 0 */
+ int (*b_strategy)
+ __P((struct saioreq *, int));/* strategy(iobp,rw) --> -1 or 0 */
char *b_desc; /* Printable string describing dev */
struct devinfo *b_devinfo; /* info to configure device. */
};
@@ -121,7 +153,7 @@ struct om_bootparam {
*/
struct om_vector {
char *initSp; /* Initial system stack ptr for hardware */
- int (*startMon)(); /* Initial PC for hardware */
+ int (*startMon) __P((void));/* Initial PC for hardware */
int *diagberr; /* Bus err handler for diags */
/* Monitor and hardware revision and identification */
@@ -142,8 +174,8 @@ struct om_vector {
#define PROMDEV_TTYB 2 /* in/out to ttyb */
/* Keyboard input (scanned by monitor nmi routine) */
- int (*getKey)(); /* Get next key if one exists */
- int (*initGetKey)(); /* Initialize get key */
+ int (*getKey) __P((void)); /* Get next key if one exists */
+ int (*initGetKey) __P((void));/* Initialize get key */
u_int *translation; /* Kbd translation selector */
u_char *keyBid; /* Keyboard ID byte */
int *screen_x; /* V2: Screen x pos (R/O) */
@@ -154,10 +186,11 @@ struct om_vector {
char *monId;
/* Frame buffer output and terminal emulation */
- int (*fbWriteChar)(); /* Write a character to FB */
+ int (*fbWriteChar) __P((void));/* Write a character to FB */
int *fbAddr; /* Address of frame buffer */
char **font; /* Font table for FB */
- void (*fbWriteStr) __P((char *, int)); /* Quickly write string to FB */
+ void (*fbWriteStr) __P((char *, int));
+ /* Quickly write string to FB */
/* Reboot interface routine -- resets and reboots system. */
void (*reBoot) __P((char *)); /* e.g. reBoot("xy()vmunix") */
@@ -166,30 +199,30 @@ struct om_vector {
u_char *lineBuf; /* The line input buffer */
u_char **linePtr; /* Cur pointer into linebuf */
int *lineSize; /* length of line in linebuf */
- int (*getLine)(); /* Get line from user */
- u_char (*getNextChar)(); /* Get next char from linebuf */
- u_char (*peekNextChar)(); /* Peek at next char */
+ int (*getLine) __P((void)); /* Get line from user */
+ u_char (*getNextChar) __P((void));/* Get next char from linebuf */
+ u_char (*peekNextChar) __P((void));/* Peek at next char */
int *fbThere; /* =1 if frame buffer there */
- int (*getNum)(); /* Grab hex num from line */
+ int (*getNum) __P((void)); /* Grab hex num from line */
/* Print formatted output to current output sink */
- int (*printf)(); /* Similar to "Kernel printf" */
- int (*printHex)(); /* Format N digits in hex */
+ int (*printf) __P((void)); /* Similar to "Kernel printf" */
+ int (*printHex) __P((void));/* Format N digits in hex */
/* Led stuff */
u_char *leds; /* RAM copy of LED register */
- int (*setLeds)(); /* Sets LED's and RAM copy */
+ int (*setLeds) __P((void)); /* Sets LED's and RAM copy */
- /* Non-maskable interrupt (nmi) information */
- int (*nmiAddr)(); /* Addr for level 7 vector */
- void (*abortEntry) __P((void)); /* Entry for keyboard abort */
+ /* Non-maskable interrupt (nmi) information */
+ int (*nmiAddr) __P((void)); /* Addr for level 7 vector */
+ void (*abortEntry) __P((void));/* Entry for keyboard abort */
int *nmiClock; /* Counts up in msec */
/* Frame buffer type: see <machine/fbio.h> */
int *fbType;
/* Assorted other things */
- u_long romvecVersion; /* Version # of Romvec */
+ u_long romvecVersion; /* Version # of Romvec */
struct globram *globRam; /* monitor global variables */
caddr_t kbdZscc; /* Addr of keyboard in use */
@@ -200,10 +233,12 @@ struct om_vector {
long *resetMap; /* pgmap entry for resetaddr */
/* Really struct pgmapent * */
- __dead void (*exitToMon) __P((void)); /* Exit from user program */
+ __dead void (*exitToMon)
+ __P((void)) __attribute__((noreturn));/* Exit from user program */
u_char **memorybitmap; /* V1: &{0 or &bits} */
- void (*setcxsegmap)(); /* Set seg in any context */
- void (**vector_cmd)(); /* V2: Handler for 'v' cmd */
+ void (*setcxsegmap) /* Set seg in any context */
+ __P((int, caddr_t, int));
+ void (**vector_cmd) __P((u_long, char *));/* V2: Handler for 'v' cmd */
u_long *ExpectedTrapSig;
u_long *TrapVectorTable;
int dummy1z;
@@ -227,9 +262,9 @@ struct om_vector {
/*
* OLDMON_STARTVADDR and OLDMON_ENDVADDR denote the range of the damn monitor.
- *
+ *
* supposedly you can steal pmegs within this range that do not contain
- * valid pages.
+ * valid pages.
*/
#define OLDMON_STARTVADDR 0xFFD00000
#define OLDMON_ENDVADDR 0xFFF00000
@@ -248,33 +283,6 @@ struct om_vector {
#define MONSHORTPAGE 0x0FFFE000
#define MONSHORTSEG 0x0FFE0000
-/*
- * A "stand alone I/O request".
- * This is passed as the main argument to the PROM I/O routines
- * in the `om_boottable' structure.
- */
-struct saioreq {
- char si_flgs;
- struct om_boottable *si_boottab;/* Points to boottab entry if any */
- char *si_devdata; /* Device-specific data pointer */
- int si_ctlr; /* Controller number or address */
- int si_unit; /* Unit number within controller */
- long si_boff; /* Partition number within unit */
- long si_cyloff;
- long si_offset;
- long si_bn; /* Block number to R/W */
- char *si_ma; /* Memory address to R/W */
- int si_cc; /* Character count to R/W */
- struct saif *si_sif; /* net if. pointer (set by b_open) */
- char *si_devaddr; /* Points to mapped in device */
- char *si_dmaaddr; /* Points to allocated DMA space */
-};
-#define SAIO_F_READ 0x01
-#define SAIO_F_WRITE 0x02
-#define SAIO_F_ALLOC 0x04
-#define SAIO_F_FILE 0x08
-#define SAIO_F_EOF 0x10 /* EOF on device */
-#define SAIO_F_AJAR 0x20 /* Descriptor "ajar" (stopped but not closed) */
/*
@@ -288,11 +296,18 @@ struct saioreq {
*/
struct saif {
/* transmit packet, returns zero on success. */
- int (*sif_xmit) __P((void *devdata, char *buf, int len));
+ int (*sif_xmit)(void *devdata, char *buf, int len);
/* wait for packet, zero if none arrived */
- int (*sif_poll) __P((void *devdata, char *buf));
+ int (*sif_poll)(void *devdata, char *buf);
/* reset interface, set addresses, etc. */
- int (*sif_reset) __P((void *devdata, struct saioreq *sip));
+ int (*sif_reset)(void *devdata, struct saioreq *sip);
/* Later (sun4 only) proms have more stuff here. */
};
-#endif /* MACHINE_OLDMON_H */
+
+
+#if defined(SUN4)
+void oldmon_w_trace __P((u_long));
+void oldmon_w_cmd __P((u_long, char *));
+#endif
+
+#endif /* _MACHINE_OLDMON_H */