1998-02-05 07:56:24 +03:00
|
|
|
/* $NetBSD: mon.h,v 1.23 1998/02/05 04:56:54 gwr Exp $ */
|
1994-10-26 12:07:55 +03:00
|
|
|
|
1996-11-20 21:56:49 +03:00
|
|
|
/*-
|
|
|
|
* Copyright (c) 1996 The NetBSD Foundation, Inc.
|
1993-08-28 19:35:16 +04:00
|
|
|
* All rights reserved.
|
|
|
|
*
|
1996-11-20 21:56:49 +03:00
|
|
|
* This code is derived from software contributed to The NetBSD Foundation
|
|
|
|
* by Adam Glass.
|
|
|
|
*
|
1993-08-28 19:35:16 +04:00
|
|
|
* Redistribution and use in source and binary forms, with or without
|
|
|
|
* modification, are permitted provided that the following conditions
|
|
|
|
* are met:
|
|
|
|
* 1. Redistributions of source code must retain the above copyright
|
|
|
|
* notice, this list of conditions and the following disclaimer.
|
|
|
|
* 2. Redistributions in binary form must reproduce the above copyright
|
|
|
|
* notice, this list of conditions and the following disclaimer in the
|
|
|
|
* documentation and/or other materials provided with the distribution.
|
|
|
|
* 3. All advertising materials mentioning features or use of this software
|
|
|
|
* must display the following acknowledgement:
|
1996-11-20 21:56:49 +03:00
|
|
|
* This product includes software developed by the NetBSD
|
|
|
|
* Foundation, Inc. and its contributors.
|
|
|
|
* 4. Neither the name of The NetBSD Foundation nor the names of its
|
|
|
|
* contributors may be used to endorse or promote products derived
|
|
|
|
* from this software without specific prior written permission.
|
1993-08-28 19:35:16 +04:00
|
|
|
*
|
1996-11-20 21:56:49 +03:00
|
|
|
* THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS
|
|
|
|
* ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
|
|
|
|
* TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
|
1997-01-27 22:40:46 +03:00
|
|
|
* PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS
|
|
|
|
* BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
|
1996-11-20 21:56:49 +03:00
|
|
|
* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
|
|
|
|
* SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
|
|
|
|
* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
|
|
|
|
* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
|
|
|
|
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
|
|
|
* POSSIBILITY OF SUCH DAMAGE.
|
1993-08-28 19:35:16 +04:00
|
|
|
*/
|
1994-11-22 00:26:40 +03:00
|
|
|
|
1993-06-25 14:28:37 +04:00
|
|
|
/*
|
|
|
|
* This file derived from kernel/mach/sun3.md/machMon.h from the
|
|
|
|
* sprite distribution.
|
|
|
|
*
|
|
|
|
* In particular, this file came out of the Walnut Creek cdrom collection
|
1995-02-07 08:01:05 +03:00
|
|
|
* which contained no warnings about any possible copyright infringement.
|
1993-06-25 14:28:37 +04:00
|
|
|
* It was also indentical to a file in the sprite kernel tar file found on
|
|
|
|
* allspice.berkeley.edu.
|
|
|
|
* It also written in the annoying sprite coding style. I've made
|
|
|
|
* efforts not to heavily edit their file, just ifdef parts out. -- glass
|
|
|
|
*/
|
|
|
|
|
1993-08-02 06:04:30 +04:00
|
|
|
#ifndef _MACHINE_MON_H
|
|
|
|
#define _MACHINE_MON_H
|
1998-02-05 07:56:24 +03:00
|
|
|
|
1993-06-25 14:28:37 +04:00
|
|
|
/*
|
|
|
|
* machMon.h --
|
|
|
|
*
|
|
|
|
* Structures, constants and defines for access to the sun monitor.
|
|
|
|
* These are translated from the sun monitor header file "sunromvec.h".
|
|
|
|
*
|
|
|
|
* NOTE: The file keyboard.h in the monitor directory has all sorts of useful
|
|
|
|
* keyboard stuff defined. I haven't attempted to translate that file
|
|
|
|
* because I don't need it. If anyone wants to use it, be my guest.
|
|
|
|
*
|
|
|
|
* Copyright (C) 1985 Regents of the University of California
|
|
|
|
* All rights reserved.
|
|
|
|
*
|
|
|
|
*
|
1998-02-05 07:56:24 +03:00
|
|
|
* Header: /sprite/src/kernel/mach/sun3.md/RCS/machMon.h,v 9.1
|
1997-02-05 17:51:23 +03:00
|
|
|
* 90/10/03 13:52:34 mgbaker Exp SPRITE (Berkeley)
|
1993-06-25 14:28:37 +04:00
|
|
|
*/
|
|
|
|
|
|
|
|
/*
|
|
|
|
* Structure set up by the boot command to pass arguments to the program that
|
|
|
|
* is booted.
|
|
|
|
*/
|
1998-02-05 07:56:24 +03:00
|
|
|
struct bootparam {
|
1993-06-25 14:28:37 +04:00
|
|
|
char *argPtr[8]; /* String arguments */
|
|
|
|
char strings[100]; /* String table for string arguments */
|
|
|
|
char devName[2]; /* Device name */
|
|
|
|
int ctlrNum; /* Controller number */
|
|
|
|
int unitNum; /* Unit number */
|
|
|
|
int partNum; /* Partition/file number */
|
|
|
|
char *fileName; /* File name, points into strings */
|
1997-02-05 17:51:23 +03:00
|
|
|
struct boottab *bootDevice; /* Defined in saio.h */
|
1998-02-05 07:56:24 +03:00
|
|
|
};
|
1993-06-25 14:28:37 +04:00
|
|
|
|
1997-02-05 17:51:23 +03:00
|
|
|
/*
|
|
|
|
* This structure defines a segment of physical memory. To support
|
|
|
|
* sparse physical memory, the PROM constructs a linked list of
|
|
|
|
* these at power-on-self-test time.
|
|
|
|
*/
|
|
|
|
struct physmemory {
|
1998-02-05 07:56:24 +03:00
|
|
|
u_int address;
|
|
|
|
u_int size;
|
1997-02-05 17:51:23 +03:00
|
|
|
struct physmemory *next;
|
|
|
|
};
|
|
|
|
|
1993-06-25 14:28:37 +04:00
|
|
|
/*
|
1997-02-05 17:51:23 +03:00
|
|
|
* Here is the structure of the vector table found at the front of the boot
|
1993-06-25 14:28:37 +04:00
|
|
|
* rom. The functions defined in here are explained below.
|
|
|
|
*
|
|
|
|
* NOTE: This struct has references to the structures keybuf and globram which
|
|
|
|
* I have not translated. If anyone needs to use these they should
|
|
|
|
* translate these structs into Sprite format.
|
|
|
|
*/
|
1998-02-05 07:56:24 +03:00
|
|
|
struct sunromvec {
|
|
|
|
char *init_SP; /* Initial SP for hardware */
|
|
|
|
char *init_PC; /* Initial PC for hardware */
|
1996-12-18 00:10:35 +03:00
|
|
|
int *diagberr; /* Bus err handler for diags */
|
1993-06-25 14:28:37 +04:00
|
|
|
|
1997-02-05 17:51:23 +03:00
|
|
|
/*
|
1993-06-25 14:28:37 +04:00
|
|
|
* Monitor and hardware revision and identification
|
|
|
|
*/
|
|
|
|
|
1996-12-18 00:10:35 +03:00
|
|
|
struct bootparam **bootParam; /* Info for bootstrapped pgm */
|
1997-02-05 17:51:23 +03:00
|
|
|
u_int *memorySize; /* Usable memory in bytes */
|
1993-06-25 14:28:37 +04:00
|
|
|
|
1997-02-05 17:51:23 +03:00
|
|
|
/*
|
|
|
|
* Single-character input and output
|
1993-06-25 14:28:37 +04:00
|
|
|
*/
|
|
|
|
|
1996-12-18 00:10:35 +03:00
|
|
|
u_char (*getChar)__P((void)); /* Get char from input source */
|
|
|
|
int (*putChar)__P((int)); /* Put char to output sink */
|
|
|
|
int (*mayGet)__P((void)); /* Maybe get char, or -1 */
|
|
|
|
int (*mayPut)__P((int)); /* Maybe put char, or -1 */
|
|
|
|
u_char *echo; /* Should getchar echo? */
|
|
|
|
u_char *inSource; /* Input source selector */
|
|
|
|
u_char *outSink; /* Output sink selector */
|
1993-06-25 14:28:37 +04:00
|
|
|
|
1997-02-05 17:51:23 +03:00
|
|
|
/*
|
|
|
|
* Keyboard input (scanned by monitor nmi routine)
|
1993-06-25 14:28:37 +04:00
|
|
|
*/
|
|
|
|
|
1996-12-18 00:10:35 +03:00
|
|
|
int (*getKey)__P((void)); /* Get next key if one exists */
|
|
|
|
int (*initGetKey)__P((void*)); /* Initialize get key */
|
1997-02-05 17:51:23 +03:00
|
|
|
u_int *translation; /* Kbd translation selector
|
|
|
|
(see keyboard.h in sun
|
1996-12-18 00:10:35 +03:00
|
|
|
monitor code) */
|
|
|
|
u_char *keyBid; /* Keyboard ID byte */
|
|
|
|
int *screen_x; /* V2: Screen x pos (R/O) */
|
|
|
|
int *screen_y; /* V2: Screen y pos (R/O) */
|
|
|
|
struct keybuf *keyBuf; /* Up/down keycode buffer */
|
1993-06-25 14:28:37 +04:00
|
|
|
|
|
|
|
/*
|
|
|
|
* Monitor revision level.
|
|
|
|
*/
|
|
|
|
|
|
|
|
char *monId;
|
|
|
|
|
1997-02-05 17:51:23 +03:00
|
|
|
/*
|
|
|
|
* Frame buffer output and terminal emulation
|
1993-06-25 14:28:37 +04:00
|
|
|
*/
|
|
|
|
|
1996-12-18 00:10:35 +03:00
|
|
|
int (*fbWriteChar)__P((int)); /* Write a character to FB */
|
|
|
|
int *fbAddr; /* Address of frame buffer */
|
|
|
|
char **font; /* Font table for FB */
|
|
|
|
/* Quickly write string to FB */
|
|
|
|
int (*fbWriteStr)__P((char *buf, int len));
|
1993-06-25 14:28:37 +04:00
|
|
|
|
1997-02-05 17:51:23 +03:00
|
|
|
/*
|
|
|
|
* Reboot interface routine -- resets and reboots system. No return.
|
1993-06-25 14:28:37 +04:00
|
|
|
*/
|
|
|
|
|
1996-12-18 00:10:35 +03:00
|
|
|
int (*reBoot)__P((char *)); /* e.g. reBoot("xy()vmunix") */
|
1993-06-25 14:28:37 +04:00
|
|
|
|
1997-02-05 17:51:23 +03:00
|
|
|
/*
|
|
|
|
* Line input and parsing
|
1993-06-25 14:28:37 +04:00
|
|
|
*/
|
|
|
|
|
1996-12-18 00:10:35 +03:00
|
|
|
u_char *lineBuf; /* The line input buffer */
|
|
|
|
u_char **linePtr; /* Cur pointer into linebuf */
|
|
|
|
int *lineSize; /* length of line in linebuf */
|
|
|
|
int (*getLine)__P((int)); /* Get line from user */
|
|
|
|
u_char (*getNextChar)__P((void)); /* Get next char from linebuf */
|
|
|
|
u_char (*peekNextChar)__P((void)); /* Peek at next char */
|
1993-06-25 14:28:37 +04:00
|
|
|
int *fbThere; /* =1 if frame buffer there */
|
1996-12-18 00:10:35 +03:00
|
|
|
int (*getNum)__P((void)); /* Grab hex num from line */
|
1993-06-25 14:28:37 +04:00
|
|
|
|
1997-02-05 17:51:23 +03:00
|
|
|
/*
|
|
|
|
* Print formatted output to current output sink
|
1993-06-25 14:28:37 +04:00
|
|
|
*/
|
|
|
|
|
1996-12-18 00:10:35 +03:00
|
|
|
int (*printf)__P((char *, ...)); /* Like kernel printf */
|
|
|
|
int (*printHex)__P((int,int)); /* Format N digits in hex */
|
1993-06-25 14:28:37 +04:00
|
|
|
|
|
|
|
/*
|
1997-02-05 17:51:23 +03:00
|
|
|
* Led stuff
|
1993-06-25 14:28:37 +04:00
|
|
|
*/
|
|
|
|
|
1996-12-18 00:10:35 +03:00
|
|
|
u_char *leds; /* RAM copy of LED register */
|
|
|
|
int (*setLeds)__P((int)); /* Sets LED's and RAM copy */
|
1993-06-25 14:28:37 +04:00
|
|
|
|
1997-02-05 17:51:23 +03:00
|
|
|
/*
|
1993-06-25 14:28:37 +04:00
|
|
|
* Non-maskable interrupt (nmi) information
|
1997-02-05 17:51:23 +03:00
|
|
|
*/
|
1993-06-25 14:28:37 +04:00
|
|
|
|
1996-12-18 00:10:35 +03:00
|
|
|
int (*nmiAddr)__P((void*)); /* Addr for level 7 vector */
|
|
|
|
int (*abortEntry)__P((void*)); /* Entry for keyboard abort */
|
|
|
|
int *nmiClock; /* Counts up in msec */
|
1993-06-25 14:28:37 +04:00
|
|
|
|
|
|
|
/*
|
|
|
|
* Frame buffer type: see <sun/fbio.h>
|
|
|
|
*/
|
|
|
|
|
|
|
|
int *fbType;
|
|
|
|
|
1997-02-05 17:51:23 +03:00
|
|
|
/*
|
|
|
|
* Assorted other things
|
1993-06-25 14:28:37 +04:00
|
|
|
*/
|
|
|
|
|
1997-02-05 17:51:23 +03:00
|
|
|
u_int romvecVersion; /* Version # of Romvec */
|
1996-12-18 00:10:35 +03:00
|
|
|
struct globram *globRam; /* monitor global variables */
|
1998-02-05 07:56:24 +03:00
|
|
|
void *kbdZscc; /* Addr of keyboard in use */
|
1996-12-18 00:10:35 +03:00
|
|
|
|
|
|
|
int *keyrInit; /* ms before kbd repeat */
|
|
|
|
u_char *keyrTick; /* ms between repetitions */
|
|
|
|
u_int *memoryAvail; /* V1: Main mem usable size */
|
|
|
|
long *resetAddr; /* where to jump on a reset */
|
|
|
|
long *resetMap; /* pgmap entry for resetaddr */
|
|
|
|
/* Really struct pgmapent * */
|
|
|
|
int (*exitToMon)__P((void)); /* Exit from user program */
|
|
|
|
u_char **memorybitmap; /* V1: &{0 or &bits} */
|
|
|
|
|
1997-02-05 17:51:23 +03:00
|
|
|
/****************************************************************
|
|
|
|
* Note: from here on, things vary per-architecture!
|
|
|
|
****************************************************************/
|
1998-02-05 07:56:24 +03:00
|
|
|
union {
|
|
|
|
void *un_pad[8]; /* this determines the size */
|
|
|
|
struct {
|
|
|
|
/* Set seg in all contexts (ctx, va, sme) */
|
|
|
|
void (*un3_setcxsegmap)__P((int,int,int));
|
|
|
|
/* V2: Handler for 'v' cmd */
|
|
|
|
void (**un3_vector_cmd)__P((int, char*));
|
|
|
|
} un3;
|
|
|
|
struct {
|
|
|
|
/* V2: Handler for 'v' cmd */
|
|
|
|
void (**un3x_vector_cmd)__P((int, char*));
|
|
|
|
/* Address of low memory PTEs (maps at least 4MB) */
|
|
|
|
int **un3x_lomemptaddr;
|
|
|
|
/*
|
|
|
|
* Address of debug/mon PTEs which map the 2MB space
|
|
|
|
* starting at MON_KDB_BASE, ending at MONEND.
|
|
|
|
*/
|
|
|
|
int **un3x_monptaddr;
|
|
|
|
/*
|
|
|
|
* Address of dvma PTEs. This is a VA that maps the I/O MMU
|
|
|
|
* page table, but only the last part, which corresponds to
|
|
|
|
* the CPU virtual space at MON_DVMA_BASE (see below).
|
|
|
|
*/
|
|
|
|
int **un3x_dvmaptaddr;
|
|
|
|
/*
|
|
|
|
* Physical Address of the debug/mon PTEs found at the
|
|
|
|
* virtual address given by *romVectorPtr->monptaddr;
|
|
|
|
*/
|
|
|
|
int **un3x_monptphysaddr;
|
|
|
|
/*
|
|
|
|
* Address of shadow copy of DVMA PTEs. This is a VA that
|
|
|
|
* maps the PTEs used by the CPU to map the same physical
|
|
|
|
* pages as the I/O MMU into the CPU virtual space starting
|
|
|
|
* at MON_DVMA_BASE, length MON_DVMA_SIZE (see below).
|
|
|
|
*/
|
|
|
|
int **un3x_shadowpteaddr;
|
|
|
|
/* Ptr to memory list for 3/80 */
|
|
|
|
struct physmemory *un3x_physmemory;
|
|
|
|
} un3x;
|
|
|
|
} mon_un;
|
|
|
|
};
|
1993-06-25 14:28:37 +04:00
|
|
|
|
|
|
|
/*
|
|
|
|
* Functions defined in the vector:
|
|
|
|
*
|
|
|
|
*
|
|
|
|
* getChar -- Return the next character from the input source
|
|
|
|
*
|
1996-12-18 00:10:35 +03:00
|
|
|
* u_char getChar()
|
1993-06-25 14:28:37 +04:00
|
|
|
*
|
|
|
|
* putChar -- Write the given character to the output source.
|
|
|
|
*
|
|
|
|
* void putChar(ch)
|
|
|
|
* char ch;
|
|
|
|
*
|
1997-02-05 17:51:23 +03:00
|
|
|
* mayGet -- Maybe get a character from the current input source. Return -1
|
1993-06-25 14:28:37 +04:00
|
|
|
* if don't return a character.
|
|
|
|
*
|
|
|
|
* int mayGet()
|
|
|
|
*
|
|
|
|
* mayPut -- Maybe put a character to the current output source. Return -1
|
|
|
|
* if no character output.
|
|
|
|
*
|
|
|
|
* int mayPut(ch)
|
|
|
|
* char ch;
|
|
|
|
*
|
|
|
|
* getKey -- Returns a key code (if up/down codes being returned),
|
|
|
|
* a byte of ASCII (if that's requested),
|
|
|
|
* NOKEY (if no key has been hit).
|
|
|
|
*
|
|
|
|
* int getKey()
|
|
|
|
*
|
|
|
|
* initGetKey -- Initialize things for get key.
|
|
|
|
*
|
|
|
|
* void initGetKey()
|
|
|
|
*
|
|
|
|
* fbWriteChar -- Write a character to the frame buffer
|
|
|
|
*
|
|
|
|
* void fwritechar(ch)
|
1996-12-18 00:10:35 +03:00
|
|
|
* u_char ch;
|
1993-06-25 14:28:37 +04:00
|
|
|
*
|
|
|
|
* fbWriteStr -- Write a string to the frame buffer.
|
|
|
|
*
|
|
|
|
* void fwritestr(addr,len)
|
1996-12-18 00:10:35 +03:00
|
|
|
* register u_char *addr; / * String to be written * /
|
1998-02-05 07:56:24 +03:00
|
|
|
* register short len; / * Length of string * /
|
1993-06-25 14:28:37 +04:00
|
|
|
*
|
|
|
|
* getLine -- read the next input line into a global buffer
|
|
|
|
*
|
|
|
|
* getline(echop)
|
|
|
|
* int echop; / * 1 if should echo input, 0 if not * /
|
|
|
|
*
|
|
|
|
* getNextChar -- return the next character from the global line buffer.
|
|
|
|
*
|
1996-12-18 00:10:35 +03:00
|
|
|
* u_char getNextChar()
|
1993-06-25 14:28:37 +04:00
|
|
|
*
|
|
|
|
* peekNextChar -- look at the next character in the global line buffer.
|
|
|
|
*
|
1996-12-18 00:10:35 +03:00
|
|
|
* u_char peekNextChar()
|
1993-06-25 14:28:37 +04:00
|
|
|
*
|
|
|
|
* getNum -- Grab hex num from the global line buffer.
|
|
|
|
*
|
|
|
|
* int getNum()
|
|
|
|
*
|
1996-10-13 07:47:25 +04:00
|
|
|
* printf -- Scaled down version of C library printf. Only %d, %x, %s, and %c
|
1993-06-25 14:28:37 +04:00
|
|
|
* are recognized.
|
|
|
|
*
|
|
|
|
* printhex -- prints rightmost <digs> hex digits of <val>
|
|
|
|
*
|
|
|
|
* printhex(val,digs)
|
|
|
|
* register int val;
|
|
|
|
* register int digs;
|
|
|
|
*
|
|
|
|
* abortEntry -- Entry for keyboard abort.
|
|
|
|
*
|
|
|
|
* abortEntry()
|
|
|
|
*/
|
|
|
|
|
|
|
|
/*
|
|
|
|
* Functions and defines to access the monitor.
|
|
|
|
*/
|
|
|
|
|
1996-10-13 07:47:25 +04:00
|
|
|
#define mon_printf (romVectorPtr->printf)
|
1993-08-08 16:18:27 +04:00
|
|
|
#define mon_putchar (romVectorPtr->putChar)
|
1994-02-23 11:28:11 +03:00
|
|
|
#define mon_may_getchar (romVectorPtr->mayGet)
|
1993-06-25 14:28:37 +04:00
|
|
|
#define mon_exit_to_mon (romVectorPtr->exitToMon)
|
1994-09-20 20:26:40 +04:00
|
|
|
#define mon_reboot (romVectorPtr->reBoot)
|
1993-08-06 03:09:17 +04:00
|
|
|
|
1993-07-27 16:04:41 +04:00
|
|
|
|
1993-08-02 06:04:30 +04:00
|
|
|
/*
|
1998-02-05 07:56:24 +03:00
|
|
|
* Sun3 specific stuff...
|
1997-02-05 17:51:23 +03:00
|
|
|
*/
|
|
|
|
|
1998-02-05 07:56:24 +03:00
|
|
|
#ifdef _SUN3_
|
|
|
|
#define setcxsegmap mon_un.un3.un3_setcxsegmap
|
|
|
|
#define vector_cmd mon_un.un3.un3_vector_cmd
|
|
|
|
#define romVectorPtr ((struct sunromvec *) SUN3_PROM_BASE)
|
|
|
|
#endif /* SUN3 */
|
1997-02-05 17:51:23 +03:00
|
|
|
|
|
|
|
/*
|
|
|
|
* MONSTART and MONEND denote the range used by the monitor.
|
1998-02-05 07:56:24 +03:00
|
|
|
* PROM_BASE is the virtual address of the PROM.
|
1993-08-02 06:04:30 +04:00
|
|
|
*/
|
1998-02-05 07:56:24 +03:00
|
|
|
#define SUN3_MONSTART 0x0FE00000
|
|
|
|
#define SUN3_PROM_BASE 0x0FEF0000
|
|
|
|
#define SUN3_MONEND 0x0FF00000
|
1993-08-02 06:04:30 +04:00
|
|
|
|
|
|
|
/*
|
1998-02-05 07:56:24 +03:00
|
|
|
* These describe the monitor's short segment (one it can reach using
|
|
|
|
* short PC-relative addressing) which it uses to map its data page.
|
|
|
|
* MONSHORTPAGE is the page; MONSHORTSEG is the containing segment.
|
|
|
|
* Its mapping must not be removed or the PROM monitor will fail.
|
|
|
|
* MONSHORTPAGE is also where the "ie" puts its SCP.
|
1997-02-05 17:51:23 +03:00
|
|
|
*/
|
1998-02-05 07:56:24 +03:00
|
|
|
#define SUN3_MONSHORTPAGE 0x0FFFE000
|
|
|
|
#define SUN3_MONSHORTSEG 0x0FFE0000
|
1997-02-05 17:51:23 +03:00
|
|
|
|
1998-02-05 07:56:24 +03:00
|
|
|
/*
|
|
|
|
* Sun3X specific stuff...
|
|
|
|
*/
|
1997-02-05 17:51:23 +03:00
|
|
|
|
1998-02-05 07:56:24 +03:00
|
|
|
#ifdef _SUN3X_
|
|
|
|
#define vector_cmd mon_un.un3x.un3x_vector_cmd
|
|
|
|
#define lomemptaddr mon_un.un3x.un3x_lomemptaddr
|
|
|
|
#define monptaddr mon_un.un3x.un3x_monptaddr
|
|
|
|
#define dvmaptaddr mon_un.un3x.un3x_dvmaptaddr
|
|
|
|
#define monptphysaddr mon_un.un3x.un3x_monptphysaddr
|
|
|
|
#define shadowpteaddr mon_un.un3x.un3x_shadowpteaddr
|
|
|
|
#define v_physmemory mon_un.un3x.un3x_physmemory
|
|
|
|
#define romVectorPtr ((struct sunromvec *) SUN3X_PROM_BASE)
|
|
|
|
#endif /* SUN3X */
|
1997-02-05 17:51:23 +03:00
|
|
|
|
|
|
|
/*
|
|
|
|
* We don't have a separate kernel debugger like sun kadb,
|
|
|
|
* but this range is setup by the monitor for such a thing.
|
|
|
|
* We might as well preserve the mappings anyway.
|
|
|
|
*/
|
1998-02-05 07:56:24 +03:00
|
|
|
#define SUN3X_MON_KDB_BASE 0xFEE00000
|
|
|
|
#define SUN3X_MON_KDB_SIZE 0x100000
|
1997-02-05 17:51:23 +03:00
|
|
|
|
|
|
|
/*
|
|
|
|
* MONSTART and MONEND define the range used by the monitor.
|
|
|
|
* MONDATA is its data page (do not touch!)
|
|
|
|
* PROM_BASE is where the boot PROM lives.
|
1993-08-02 06:04:30 +04:00
|
|
|
*/
|
1998-02-05 07:56:24 +03:00
|
|
|
#define SUN3X_MONSTART 0xFEF00000
|
|
|
|
#define SUN3X_MONDATA 0xFEF72000
|
|
|
|
#define SUN3X_PROM_BASE 0xFEFE0000
|
|
|
|
#define SUN3X_MONEND 0xFF000000
|
1993-08-02 06:04:30 +04:00
|
|
|
|
1997-02-05 17:51:23 +03:00
|
|
|
/*
|
|
|
|
* These define the CPU virtual address range mapped by the
|
|
|
|
* PROM for use as DVMA space. The physical pages mapped in
|
1998-02-05 07:56:24 +03:00
|
|
|
* this range are also mapped by the I/O MMU. Note that the
|
|
|
|
* last page is reserved for the PROM (really for the "ie").
|
1997-02-05 17:51:23 +03:00
|
|
|
*/
|
1998-02-05 07:56:24 +03:00
|
|
|
#define SUN3X_MON_DVMA_BASE 0xFFF00000
|
|
|
|
#define SUN3X_MON_DVMA_SIZE 0x100000 /* 1MB */
|
|
|
|
|
|
|
|
#ifdef _STANDALONE
|
|
|
|
/* The libsa code uses a pointer... */
|
|
|
|
extern struct sunromvec *_romvec;
|
|
|
|
#undef romVectorPtr
|
|
|
|
#define romVectorPtr _romvec
|
|
|
|
#endif /* _STANDALONE */
|
1993-07-27 16:04:41 +04:00
|
|
|
|
1998-02-05 07:56:24 +03:00
|
|
|
#endif /* _MACHINE_MON_H */
|