/*****************************************************************************
 * Copyright (c) 1988-95 Digi International Inc., All Rights Reserved
 * 
 * This  software  contains  proprietary  and  confidential   information   of
 * Digi International  Inc.   By  accepting  transfer  of this copy, Recipient
 * agrees to retain this software in  confidence,  to  prevent  disclosure  to
 * others,  and  to make no  use of this software other than that for which it
 * was delivered.  This is an unpublished copyright work  Digi   International
 * Inc.    Except   as   permitted   by  federal  law,  17 USC 117, copying is
 * strictly prohibited.
 * 
 * Digi  International  Inc.  CONFIDENTIAL  -   (Digi    International    Inc.
 * Confidential  when   combined   with   the   aggregated  modules  for  this
 * product) OBJECT CODE ONLY SOURCE MATERIALS
 * 
 * (C) COPYRIGHT Digi International Inc. 1995
 * 
 * All Rights Reserved
 * 
 * US   Government   Users   Restricted   Rights   -   Use,   duplication   or
 * disclosure  restricted by GSA ADP Schedule Contract with Digi International
 * Inc.
 * 
 *****************************************************************************/

/*
 * $Id: epcspace.h,v 1.9 1997/08/05 15:01:12 gary Exp $
 */

/*
 * Free memory pool ranges
 */


#ifdef POWERPC
#include "ppcmem.h"
#endif
 
#define	LOCAL_MEMORY_START	0xA000B000L
#define	LOCAL_MEMORY_END	0xA0040000L

#ifdef DXB

                   /**************************************/
                   /**                                  **/
                   /**    DXB MEMORY MAP DEFINITIONS    **/
                   /**                                  **/
                   /**************************************/

#if POWERPC

#define DXB_COMMAND_QUEUE_SIZE  SLAVEMODECOMMANDBUFFERSIZE 
#define DXB_EVENT_QUEUE_SIZE    SLAVEMODEEVENTBUFFERSIZE

#define DXB_COMMAND_STRUCTURE	PPCDXBCOMMANDSTRUCTURELOCATION
#define DXB_EVENT_STRUCTURE	PPCDXBEVENTSTRUCTURELOCATION
#define SHARED_MEMORY_END       0x400000L

#else

#if PRI

#ifdef FOURMEG

#define DXB_COMMAND_QUEUE_START 0xA03E8000L
#define DXB_EVENT_QUEUE_START   0xA03F0000L
#define SHARED_MEMORY_END       0xA03E8000L

#else

#ifdef TWOMEG

#define DXB_COMMAND_QUEUE_START 0xA01E8000L
#define DXB_EVENT_QUEUE_START   0xA01F0000L
#define SHARED_MEMORY_END       0xA01E8000L

#else

#define DXB_COMMAND_QUEUE_START 0xA00E8000L
#define DXB_EVENT_QUEUE_START   0xA00F0000L
#define SHARED_MEMORY_END       0xA00E8000L
#endif  /* TWOMEG */
#endif  /* FOURMEG */

#else /* PRI */

#ifdef PCI

#define DXB_COMMAND_QUEUE_START 0xA01E0000L
#define DXB_EVENT_QUEUE_START   0xA01E8000L
#define SHARED_MEMORY_END       0xA01E0000L

#else
#ifdef FOURMEG

#define DXB_COMMAND_QUEUE_START 0xA33E8000L
#define DXB_EVENT_QUEUE_START   0xA33F0000L
#define SHARED_MEMORY_END       0xA33E8000L

#else
#ifdef TWOMEG


#define DXB_COMMAND_QUEUE_START 0xA31E8000L
#define DXB_EVENT_QUEUE_START   0xA31F0000L
#define SHARED_MEMORY_END       0xA31E8000L

#else

#define DXB_COMMAND_QUEUE_START 0xA30E8000L
#define DXB_EVENT_QUEUE_START   0xA30F0000L
#define SHARED_MEMORY_END       0xA30E8000L

#endif  /* TWOMEG */
#endif  /* FOURMEG */
#endif  /* PCI */

#endif  /* PRI */
#endif	/* POWERPC */


#else

                   /**************************************/
                   /**                                  **/
                   /**    SXB MEMORY MAP DEFINITIONS    **/
                   /**                                  **/
                   /**************************************/

#if PRI

/* Phoenix Host Adapter */

#ifdef FOURMEG

#define	SHARED_MEMORY_END	0xA03FC000L

#else
#ifdef TWOMEG

#define	SHARED_MEMORY_END	0xA01FC000L

#else

#define	SHARED_MEMORY_END	0xA00FC000L

#endif	/* TWOMEG */
#endif	/* FOURMEG */


#else

/* SyncPort Host Adapter */

#ifdef PCI

#define	SHARED_MEMORY_END	0xA01F0000L

#else
#ifdef FOURMEG

#define	SHARED_MEMORY_END	0xA33FC000L

#else
#ifdef TWOMEG

#define	SHARED_MEMORY_END	0xA31FC000L

#else

#define	SHARED_MEMORY_END	0xA30FC000L

#endif	/* TWOMEG */
#endif	/* FOURMEG */
#endif	/* PCI */
#endif	/* PRI */

#endif	/* DXB */

/*
 * There is no fixed shared memory freepool "start".
 * It is set equal to the end of the firmware image, and
 * is found during runtime.
 */

/*
 * Stack diagnostic constants
 */
#define	STACK_BOTTOM		SHARED_MEMORY_END
/* expressed in terms of longwords */
#define	STACK_SAFETY_ZONE	256
#define	STACK_SAFETY_PATTERN	0xA55A5AA5UL

