/* $Id: hps.ccdl.h,v 2.2 91/01/10 20:41:29 dave Exp $ */
/****************************************************************/
/* hps.ccdl.h													*/
/****************************************************************/
/*																*/
/*                 Confidential Information                     */
/*      Limited Distribution to Authorized Persons Only         */
/*     Created 1987 and Protected as an Unpublished Work        */
/*          Under the U.S. Copyright Act of 1976.               */
/*         Copyright (c) 1987, 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.									*/
/****************************************************************/
/*																*/
/* Cluster Download Task definitions							*/
/*																*/
/****************************************************************/

/*
 * Precede with:
 *	#include "hps.types.h"
 *	#include "hps.iocb.h"
 *	#include "hps.onb.h"
 *	#include "hps.net.h"
*/


/*
 * Cluster download IOCB 
 */

#ifdef HPS_ALIGN
	typedef struct
	{
		IOCBHDR	hdr;			/* standard IOCB header */
		bit8	command;		/* command (see below) */
		bit8	load_id;		/* load ID */
		bit16	res;
		bit32	st_addr;		/* starting address */
		bit16	chksum;			/* checksum */
		bit16	res2;
	} DL_IOCB;
#else
	typedef struct
	{
		IOCBHDR	hdr;			/* standard IOCB header */
		bit8	command;		/* command (see below) */
		bit8	load_id;		/* load ID */
		bit32	st_addr;		/* starting address */
		bit16	chksum;			/* checksum */
	} DL_IOCB;
#endif


/* Cluster download command codes (IOCB) */

#define CD_STLOAD	1	/* start load sequence	*/
#define CD_WRITE	2	/* write				*/
#define CD_ENDLD	3	/* end load sequence	*/
#define CD_ABTLD	4	/* abort load sequence	*/

/* Cluster download task parameters */

#define CLD_ID		224			/* unique upper byte for ID's			*/
#define CLD_TID	(CLD_ID + 1)	/* cluster download task ID			*/
#define CLD_IOCBQ	(CLD_ID + 2)	/* queue ID for host requests			*/
#define CLD_DEV	0xfc			/* major device number				*/
#define CLD_LDSEQ	1			/* minor device (currently only one)	*/
#define CLD_NETQ	(CLD_ID + 3)	/* queue ID for network messages		*/
#define CLD_RXQ	(CLD_ID + 4)	/* queue ID for returned xmit messages	*/
#define CLD_PRI	170			/* cluster download task priority		*/
#define CLD_SKT	0xcd			/* cluster download socket ID			*/
#define PLOAD_SKT	0xce			/* primitive loader (cluster) socket ID */
#define MAXCNCT	32			/* size of cluster connection table	*/
#define MAXLS		8			/* max number of load sequences		*/
#define MAX_RETRIES	3			/* max retries on xmit network msgs	*/

/*
 * ONE_SECOND is the number of system timer ticks to make one second.  Every
 * second, the timeout routine runs and processes internal timers.  Therefore,
 * internal timers have one-second ticks.  RESP_TIME is used to set internal
 * timers.
 */
#define ONE_SECOND	20			/* system ticks to make one second delay */
#define RESP_TIME	 5			/* 5 sec to wait for responses on net    */

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