/* $Id: hps.conf.h,v 2.2 91/01/10 20:41:38 dave Exp $ */
/****************************************************************/
/* hps.conf.h													*/
/****************************************************************/
/*																*/
/*                 Confidential Information                     */
/*      Limited Distribution to Authorized Persons Only         */
/*     Created 1986 and Protected as an Unpublished Work        */
/*          Under the U.S. Copyright Act of 1976.               */
/*         Copyright (c) 1986, Systech Corporation          	*/
/*                  All Rights Reserved                         */
/*																*/
/*	THIS SOFTWARE IS LICENSED BY AND IS THE	CONFIDENTIAL AND 	*/
/*	PROPRIETARY PROPERTY OF SYSTECH COMPUTER CORPORATION AND 	*/
/*	MAY NOT, WITHOUT THE PRIOR WRITTEN CONSENT OF SYSTECH 		*/
/*	COMPUTER CORPORATION, BE REPRODUCED, USED OR DISCLOSED 		*/
/*	EXCEPT IN ACCORDANCE WITH A SYSTECH COMPUTER CORPORATION 	*/
/*	SOFTWARE LICENSE AGREEMENT.									*/
/****************************************************************/
/*																*/
/* This file defines the structures for the VRTX and TRACER		*/
/* configuration tables.  The initial VRTX configuration table	*/
/* always resides on the HPS board at absolute address CONF_TAB.*/
/* The user may read this table to pick up the initial 			*/
/* configuration * parameters.  The first field og the VRTX		*/
/* table points to the TRACER configuration table.  If TRACER is*/
/* not present, then this field will be NULL.  After downloading*/
/* new code, and before issuing a VRTX INIT ioctl(), the user	*/
/* should load new configuration tables onto the board,			*/
/* somewhere in the user RAM area.  Pointers to the new tables	*/
/* must be loaded into the Exception Vector table.  The VRTX	*/
/* configuration table pointer goes at absolute address			*/
/* VRTX_PTR.  * The TRACER configuration table pointer goes at	*/
/* TRACER_PTR.													*/
/*																*/
/* Precede with:												*/
/*	#include "hps.types.h"										*/
/*																*/
/****************************************************************/

#ifdef OLDWAY


#define	RAM_BASE		0x100000	/* HPS-68xx Controller RAM	*/

#ifdef HPS6860
#define	DPRAM_BASE	RAM_BASE
#else 
#	ifdef HPS6845 
#	define	DPRAM_BASE	0x400000
#	endif
#	ifdef HPS6830
#	define	DPRAM_BASE	0x400000
#	endif
#	ifdef HPS6236
#	define	DPRAM_BASE	0x1000000
#	endif
#endif
#define P_BLOCK ((struct HPS6816 *) DPRAM_BASE)

#endif

#ifdef HPS6860
#define	RAM_BASE	0x100000
#define	DPRAM_BASE	RAM_BASE
#define	RAM_LEN		0x80000
#endif

#ifdef HPS6845 
#define	RAM_BASE	0x100000
#define	DPRAM_BASE	0x400000
#define	RAM_LEN		0x80000
#endif

#ifdef HPS6830
#define	RAM_BASE	0x100000
#define	DPRAM_BASE	0x400000
#define	RAM_LEN		0x80000
#endif

#ifdef HPS6236
#define	RAM_BASE	0x1000000
#define	DPRAM_BASE	RAM_BASE
#define	RAM_LEN		0x100000
#endif

#ifdef HPS624X
#define	RAM_BASE	0x1000000
#define	DPRAM_BASE	RAM_BASE
#define	RAM_LEN		0x100000
#endif

#define RAM_TOP		(RAM_BASE+RAM_LEN)

#define P_BLOCK ((struct HPS6816 *) DPRAM_BASE)


struct v_table
{
	long	tracer;			/* Points to TRACER configuration table	*/
	long	workspace;		/* On-board address of VRTX workspace	*/
	long	ws_size;		/* Size of VRTX workspace (in bytes)	*/
	short	ss_size;		/* Size of system stack (in bytes)		*/
	short	is_size;		/* Int.service stack size (in bytes)	*/
	long	res_1[2];		/* H&R reserved							*/
	short	d_mask;			/* Disable mask							*/
	short	us_size;		/* User stack size (in bytes)			*/
	long	res_2;			/* H&R reserved							*/
	short	task_c;			/* Task count							*/
	short	res_3;			/* H&R reserved							*/
	int		(*txrdy)();		/* Transmitter ready routine			*/
	int		(*tcreate)();	/* Task create routine					*/
	int		(*tdelete)();	/* Task delete routine					*/
	int		(*tswitch)();	/* Task switch routine					*/
	long	cvt;			/* Component vector table				*/
	long	res_4;			/* Systech reserved						*/
	long	res_5;			/* Systech reserved						*/
};

struct t_table
{
	short	res_1;			/* H&R reserved						*/
	long	codespace;		/* VRTX codespace address			*/
	long	workspace;		/* TRACER workspace address			*/
	long	ws_size;		/* TRACER workspace size (in bytes)	*/
	short	channels;		/* VRTX/TRACER I/O channels			*/
	short	toggle;			/* VRTX-TRACER I/O toggle			*/
	short	d_mask;			/* TRACER disable mask				*/
	short	trap_instr;		/* TRAP instruction					*/
	int		(*trap)();		/* TRAP handler routine				*/
	int		(*txrdy)();		/* Transmitter ready routine		*/
	int		(*i_filter)();	/* Input filter routine				*/
	int		(*o_filter)();	/* Output filter routine			*/
	char    *susp_outp;		/* Suspend output string			*/
	char    *cancel;		/* Cancel line						*/
	char    *backspace;		/* Backspace string					*/
	char    *newline;		/* Newline string					*/
	char    *reprint;		/* Reprint line string				*/
	char    *reissue;		/* Re-issue line string				*/
	int		(*download)();	/* Download routine					*/
	short	res_2[7];		/* H&R reserved						*/
};



/* The user boot routine uses these structures */

typedef struct
{
	bit32	t_addr;	/* Starting address of task	*/
	bit8	t_pri;	/* Priority of task			*/
	bit8	t_id;	/* ID of task				*/
	bit16	t_mode;	/* Mode of task (0 or 1)	*/
} TASK;

typedef struct
{
	bit32	p_size;		/* Total size of partition	*/
	bit16	p_bsize;	/* Partition block size		*/
	bit16	p_id;		/* Partition ID				*/
} PARTITION;

typedef struct
{
	bit16	q_id;		/* Queue ID					*/
	bit16	q_size;		/* # of elements in queue	*/
} QUEUE;

typedef struct
{
	bit16	i_qid;		/* Destination queue ID		*/
	bit32	i_mbox;		/* Mail box address			*/
	bit8	i_majno;	/* Major device number		*/
} R_IOCB;

typedef struct
{
	bit16	n_qid;		/* Destination queue ID			*/
	long    *n_mbox;	/* Mailbox address				*/
	bit8	n_socket;	/* Socket number				*/
	bit8	n_flag;		/* Flags (see NET_??? below)	*/
} R_NETWORK;

/* bit definitions for network routing table flag byte */

#define NET_NOTIFY	0x01		/* Notify of reconfigurations */
#define NET_BCAST	0x02		/* Send msgs addressed to broadcast socket */
#define NET_CONFIG	0x04		/* Notify of net config state changes */

/*
 * MODIFICATION HISTORY:
 *
 * $Log:	hps.conf.h,v $
 * Revision 1.1.2.1  92/06/24  13:53:19  marker
 * Branch RISCOS_5_01_2_FIXES off of trunk.
 * 
 * Revision 2.2  91/01/10  20:41:38  dave
 * Update header.
 * COSMETIC
 * 
 */
