/*
 *  Copyright 2001-2008 Texas Instruments - http://www.ti.com/
 * 
 *  Licensed under the Apache License, Version 2.0 (the "License");
 *  you may not use this file except in compliance with the License.
 *  You may obtain a copy of the License at
 * 
 *     http://www.apache.org/licenses/LICENSE-2.0
 * 
 *  Unless required by applicable law or agreed to in writing, software
 *  distributed under the License is distributed on an "AS IS" BASIS,
 *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 *  See the License for the specific language governing permissions and
 *  limitations under the License.
 */



/*
 *  ======== dbdefs.h ========
 *  DSP-BIOS Bridge driver support functions for TI OMAP processors.
 *  Description:
 *      Global definitions and constants for DSP/BIOS Bridge.
 *
 *! Revision History:
 *! ================
 *! 19-Apr-2004 sb  Aligned DMM definitions with Symbian
 *! 08-Mar-2004 sb  Added MAPATTR & ELEM_SIZE for Dynamic Memory Mapping feature
 *! 09-Feb-2004 vp  Added processor ID numbers for DSP and IVA
 *! 06-Feb-2003 kc  Removed DSP_POSTMESSAGE. Updated IsValid*Event macros.
 *! 22-Nov-2002 gp  Cleaned up comments, formatting.
 *!                 Removed unused DSP_ENUMLASTNODE define.
 *! 13-Feb-2002 jeh Added uSysStackSize to DSP_NDBPROPS.
 *! 23-Jan-2002 ag  Added #define DSP_SHMSEG0.
 *! 12-Dec-2001 ag  Added DSP_ESTRMMODE error code.
 *! 04-Dec-2001 jeh Added DSP_ENOTCONNECTED error code.
 *! 10-Dec-2001 kc: Modified macros and definitions to disable DSP_POSTMESSAGE.
 *! 01-Nov-2001 jeh Added DSP_EOVERLAYMEMORY.
 *! 18-Oct-2001 ag  Added DSP_STRMMODE type.
 *!                 Added DSP_ENOTSHAREDMEM.
 *! 21-Sep-2001 ag  Added additional error codes.
 *! 07-Jun-2001 sg  Made DSPStream_AllocateBuffer fxn name plural.
 *! 11-May-2001 jeh Changed DSP_NODE_MIN_PRIORITY from 0 to 1. Removed hNode
 *!                 from DSP_NODEINFO.
 *! 02-Apr-2001 sg  Added missing error codes, rearranged codes, switched to
 *!             hex offsets, renamed some codes to match API spec.
 *! 16-Jan-2001 jeh Added DSP_ESYMBOL, DSP_EUUID.
 *! 13-Feb-2001 kc: DSP/BIOS Bridge name updates.
 *! 05-Dec-2000 ag: Added DSP_RMSxxx user available message command codes.
 *! 09-Nov-2000 rr: Added DSP_PROCEESORRESTART define; Removed DSP_PBUFFER.
 *!                 Added DSP_DCD_ENOAUTOREGISTER, DSP_EUSER1-16, DSP_ESTRMFUL
 *!                 Removed DSP_EDONE. Macros's modified.
 *! 23-Oct-2000 jeh Replaced DSP_STREAMSTATECHANGE with DSP_STREAMDONE.
 *! 09-Oct-2000 jeh Updated to version 0.9 DSP Bridge API spec.
 *! 29-Sep-2000 kc  Added error codes for DCD and REG to simplify use of
 *!                 these codes within the RM module.
 *! 27-Sep-2000 jeh Added segid, alignment, uNumBufs to DSP_STREAMATTRIN.
 *! 29-Aug-2000 jeh Added DSP_NODETYPE enum, changed DSP_EALREADYATTACHED to
 *!                 DSP_EALREADYCONNECTED. Changed scStreamConnection[1]
 *!                 to scStreamConnection[16] in DSP_NODEINFO structure.
 *!                 Added DSP_NOTIFICATION, DSP_STRMATTR. PSTRING changed
 *!                 back to TCHAR * and moved to dbtype.h.
 *! 11-Aug-2000 rr: Macros to check valid events and notify masks added.
 *! 09-Aug-2000 rr: Changed PSTRING to *CHAR
 *! 07-Aug-2000 rr: PROC_IDLE/SYNCINIT/UNKNOWN state removed.
 *! 20-Jul-2000 rr: Updated to version 0.8
 *! 17-Jul-2000 rr: New PROC states added to the DSP_PROCSTATE.
 *! 27-Jun-2000 rr: Created from dspapi.h
 */

#ifndef DBDEFS_
#define DBDEFS_

#include <dbtype.h>		/* GPP side type definitions           */
#include <std.h>		/* DSP/BIOS type definitions           */
#include <rms_sh.h>		/* Types shared between GPP and DSP    */

#ifdef __cplusplus
extern "C" {
#endif

#define PG_SIZE_4K 4096
#define PG_MASK(pg_size) (~((pg_size)-1))
#define PG_ALIGN_LOW(addr, pg_size) ((addr) & PG_MASK(pg_size))
#define PG_ALIGN_HIGH(addr, pg_size) (((addr)+(pg_size)-1) & PG_MASK(pg_size))

/* API return value and calling convention */
#define DBAPI                       DSP_STATUS CDECL

/* Infinite time value for the uTimeout parameter to DSPStream_Select() */
#define DSP_FOREVER                 (-1)

/* Maximum length of node name, used in DSP_NDBPROPS */
#define DSP_MAXNAMELEN              32

/* uNotifyType values for the RegisterNotify() functions. */
#define DSP_SIGNALEVENT             0x00000001

/* Types of events for processors */
#define DSP_PROCESSORSTATECHANGE    0x00000001
#define DSP_PROCESSORATTACH         0x00000002
#define DSP_PROCESSORDETACH         0x00000004
#define DSP_PROCESSORRESTART        0x00000008

/* DSP exception events (DSP/BIOS and DSP MMU fault) */
#define DSP_MMUFAULT                0x00000010
#define DSP_SYSERROR                0x00000020

/* IVA exception events (IVA MMU fault) */
#define IVA_MMUFAULT                0x00000040
/* Types of events for nodes */
#define DSP_NODESTATECHANGE         0x00000100
#define DSP_NODEMESSAGEREADY        0x00000200

/* Types of events for streams */
#define DSP_STREAMDONE              0x00001000
#define DSP_STREAMIOCOMPLETION      0x00002000

/* Handle definition representing the GPP node in DSPNode_Connect() calls */
#define DSP_HGPPNODE                0xFFFFFFFF

/* Node directions used in DSPNode_Connect() */
#define DSP_TONODE                  1
#define DSP_FROMNODE                2

/* Define Node Minimum and Maximum Priorities */
#define DSP_NODE_MIN_PRIORITY       1
#define DSP_NODE_MAX_PRIORITY       15

/* Pre-Defined Message Command Codes available to user: */
#define DSP_RMSUSERCODESTART RMS_USER	/* Start of RMS user cmd codes */
#define DSP_RMSUSERCODEEND RMS_USER + RMS_MAXUSERCODES;	/* end of user codes */
#define DSP_RMSBUFDESC RMS_BUFDESC	/* MSG contains SM buffer description */

/* Shared memory identifier for MEM segment named "SHMSEG0" */
#define DSP_SHMSEG0     (UINT)(-1)

/* Processor ID numbers */
#define DSP_UNIT    0
#define IVA_UNIT    1

#if ! defined (OMAP_2430) && ! defined (OMAP_3430)
#define DSPWORD       SHORT
#else
#define DSPWORD       BYTE
#endif
#define DSPWORDSIZE     sizeof(DSPWORD)

/* Success & Failure macros  */
#define DSP_SUCCEEDED(Status)      ((INT)(Status) >= 0)
#define DSP_FAILED(Status)         ((INT)(Status) < 0)

/* Power control enumerations */
#define PROC_PWRCONTROL             0x8070

#define PROC_PWRMGT_ENABLE          (PROC_PWRCONTROL + 0x3)
#define PROC_PWRMGT_DISABLE         (PROC_PWRCONTROL + 0x4)

/* Bridge Code Version */
#define BRIDGE_VERSION_CODE         333

#if defined (OMAP_2430) || defined (OMAP_3430)
#define    MAX_PROFILES     16
#endif

/* Types defined for 'Bridge API */
	typedef DWORD DSP_STATUS;	/* API return code type         */

	typedef HANDLE DSP_HNODE;	/* Handle to a DSP Node object  */
	typedef HANDLE DSP_HPROCESSOR;	/* Handle to a Processor object */
	typedef HANDLE DSP_HSTREAM;	/* Handle to a Stream object    */

	typedef ULONG DSP_PROCFAMILY;	/* Processor family             */
	typedef ULONG DSP_PROCTYPE;	/* Processor type (w/in family) */
	typedef ULONG DSP_RTOSTYPE;	/* Type of DSP RTOS             */

	typedef ULONG DSP_RESOURCEMASK;	/* Mask for processor resources */
	typedef ULONG DSP_ERRORMASK;	/* Mask for various error types */

/* Handy Macros */
#define IsValidProcEvent(x)    (((x) == 0) || (((x) & (DSP_PROCESSORSTATECHANGE | \
                                    DSP_PROCESSORATTACH | \
                                    DSP_PROCESSORDETACH | \
                                    DSP_PROCESSORRESTART | \
                                    DSP_NODESTATECHANGE | \
                                    DSP_STREAMDONE | \
                                    DSP_STREAMIOCOMPLETION | \
                                    DSP_MMUFAULT | \
                                    DSP_SYSERROR)) && \
                                !((x) & ~(DSP_PROCESSORSTATECHANGE | \
                                    DSP_PROCESSORATTACH | \
                                    DSP_PROCESSORDETACH | \
                                    DSP_PROCESSORRESTART | \
                                    DSP_NODESTATECHANGE | \
                                    DSP_STREAMDONE | \
                                    DSP_STREAMIOCOMPLETION | \
                                    DSP_MMUFAULT | \
                                    DSP_SYSERROR))))

#define IsValidNodeEvent(x)    (((x) == 0) || (((x) & (DSP_NODESTATECHANGE | \
                                DSP_NODEMESSAGEREADY)) && \
                                !((x) & ~(DSP_NODESTATECHANGE | \
                                DSP_NODEMESSAGEREADY))))

#define IsValidStrmEvent(x)     (((x) == 0) || (((x) & (DSP_STREAMDONE | \
                                DSP_STREAMIOCOMPLETION)) && \
                                !((x) & ~(DSP_STREAMDONE | \
                                DSP_STREAMIOCOMPLETION))))

#define IsValidNotifyMask(x)   ((x) & DSP_SIGNALEVENT)

/* The Node UUID structure */
	struct DSP_UUID {
		ULONG ulData1;
		USHORT usData2;
		USHORT usData3;
		BYTE ucData4;
		BYTE ucData5;
		UCHAR ucData6[6];
	};
	/*DSP_UUID, *DSP_HUUID;*/

/* DCD types */
	typedef enum {
		DSP_DCDNODETYPE,
		DSP_DCDPROCESSORTYPE,
		DSP_DCDLIBRARYTYPE,
		DSP_DCDCREATELIBTYPE,
		DSP_DCDEXECUTELIBTYPE,
		DSP_DCDDELETELIBTYPE
	} DSP_DCDOBJTYPE;

/* Processor states */
	typedef enum {
		PROC_STOPPED,
		PROC_LOADED,
		PROC_RUNNING,
		PROC_ERROR
	} DSP_PROCSTATE;

/* Node types */
	typedef enum {
		NODE_DEVICE,
		NODE_TASK,
		NODE_DAISSOCKET,
		NODE_MESSAGE
	} DSP_NODETYPE;

/* Node states */
	typedef enum {
		NODE_ALLOCATED,
		NODE_CREATED,
		NODE_RUNNING,
		NODE_PAUSED,
		NODE_DONE
	} DSP_NODESTATE;

/* Stream states */
	typedef enum {
		STREAM_IDLE,
		STREAM_READY,
		STREAM_PENDING,
		STREAM_DONE
	} DSP_STREAMSTATE;

/* Stream connect types */
	typedef enum {
		CONNECTTYPE_NODEOUTPUT,
		CONNECTTYPE_GPPOUTPUT,
		CONNECTTYPE_NODEINPUT,
		CONNECTTYPE_GPPINPUT
	} DSP_CONNECTTYPE;

/* Stream mode types */
	typedef enum {
		STRMMODE_PROCCOPY,	/* Processor(s) copy stream data payloads */
		STRMMODE_ZEROCOPY,	/* Stream buffer pointers swapped, no data copied */
		STRMMODE_LDMA,	/* Local DMA : OMAP's System-DMA device */
		STRMMODE_RDMA	/* Remote DMA: OMAP's DSP-DMA device */
	} DSP_STRMMODE;

/* Stream DMA priority. Only Low and High supported */
	typedef enum {
		DMAPRI_LOW,
		DMAPRI_HIGH
	} DSP_DMAPRIORITY;

/* Resource Types */
	typedef enum {
		DSP_RESOURCE_DYNDARAM = 0,
		DSP_RESOURCE_DYNSARAM,
		DSP_RESOURCE_DYNEXTERNAL,
		DSP_RESOURCE_DYNSRAM,
		DSP_RESOURCE_PROCLOAD
	} DSP_RESOURCEINFOTYPE;

/* Memory Segment Types */
	typedef enum {
		DSP_DYNDARAM = 0,
		DSP_DYNSARAM,
		DSP_DYNEXTERNAL,
		DSP_DYNSRAM
	} DSP_MEMTYPE;

/* Memory Flush Types */
       typedef enum {
		PROC_INVALIDATE_MEM = 0,
		PROC_WRITEBACK_MEM,
		PROC_WRITEBACK_INVALIDATE_MEM,
	} DSP_FLUSHTYPE;

/* Memory Segment Status Values */
	 struct DSP_MEMSTAT {
		ULONG ulSize;
		ULONG ulTotalFreeSize;
		ULONG ulLenMaxFreeBlock;
		ULONG ulNumFreeBlocks;
		ULONG ulNumAllocBlocks;
	} ;

/* Processor Load information Values */
	 struct DSP_PROCLOADSTAT {
		ULONG uCurrLoad;
		ULONG uPredictedLoad;
		ULONG uCurrDspFreq;
		ULONG uPredictedFreq;
	} ;

/* Attributes for STRM connections between nodes */
	struct DSP_STRMATTR {
		UINT uSegid;	/* Memory segment on DSP to allocate buffers */
		UINT uBufsize;	/* Buffer size (DSP words) */
		UINT uNumBufs;	/* Number of buffers */
		UINT uAlignment;	/* Buffer alignment */
		UINT uTimeout;	/* Timeout for blocking STRM calls */
		UINT lMode;	/* mode of stream when opened */
		UINT uDMAChnlId;	/* DMA chnl id if DSP_STRMMODE is LDMA or RDMA */
		UINT uDMAPriority;	/* DMA channel priority 0=lowest, >0=high */
	} ;

/* The DSP_CBDATA structure */
	struct DSP_CBDATA {
		ULONG cbData;
		BYTE cData[1];
	} ;
	/*DSP_CBDATA, *DSP_HCBDATA;*/

/* The DSP_MSG structure */
	struct DSP_MSG {
		DWORD dwCmd;
		DWORD dwArg1;
		DWORD dwArg2;
	} ;
	/*DSP_MSG, *DSP_HMSG;*/

/* The DSP_RESOURCEREQMTS structure for node's resource requirements  */
	struct DSP_RESOURCEREQMTS {
		DWORD cbStruct;
		UINT uStaticDataSize;
		UINT uGlobalDataSize;
		UINT uProgramMemSize;
		UINT uWCExecutionTime;
		UINT uWCPeriod;
		UINT uWCDeadline;
		UINT uAvgExectionTime;
		UINT uMinimumPeriod;
	} ;
	/*DSP_RESOURCEREQMTS, *DSP_HRESOURCEREQMTS;*/

/*
 * The DSP_STREAMCONNECT structure describes a stream connection
 * between two nodes, or between a node and the GPP
 */
	struct DSP_STREAMCONNECT {
		DWORD cbStruct;
		DSP_CONNECTTYPE lType;
		UINT uThisNodeStreamIndex;
		DSP_HNODE hConnectedNode;
		struct DSP_UUID uiConnectedNodeID;
		UINT uConnectedNodeStreamIndex;
	} ;
	/*DSP_STREAMCONNECT, *DSP_HSTREAMCONNECT;*/

#if defined (OMAP_2430) || defined (OMAP_3430)
	struct DSP_NODEPROFS {
		UINT ulHeapSize;
	} ;
	/*DSP_NODEPROFS, *DSP_HNODEPROFS;*/
#endif

/* The DSP_NDBPROPS structure reports the attributes of a node */
	struct DSP_NDBPROPS {
		DWORD cbStruct;
		struct DSP_UUID uiNodeID;
		CHARACTER acName[DSP_MAXNAMELEN];
		DSP_NODETYPE uNodeType;
		UINT bCacheOnGPP;
		struct DSP_RESOURCEREQMTS dspResourceReqmts;
		INT iPriority;
		UINT uStackSize;
		UINT uSysStackSize;
		UINT uStackSeg;
		UINT uMessageDepth;
		UINT uNumInputStreams;
		UINT uNumOutputStreams;
		UINT uTimeout;
#if defined (OMAP_2430) || defined (OMAP_3430)
		UINT uCountProfiles;	/* Number of supported profiles */
		struct DSP_NODEPROFS aProfiles[MAX_PROFILES];	/* Array of profiles */
#endif
		UINT uStackSegName; /* Stack Segment Name */
	} ;
	/*DSP_NDBPROPS, *DSP_HNDBPROPS;*/

    /* The DSP_NODEATTRIN structure describes the attributes of a node client */
    struct DSP_NODEATTRIN {
            DWORD cbStruct;
            INT iPriority;
            UINT uTimeout;
#if defined (OMAP_2430) || defined (OMAP_3430)
            UINT    uProfileID;
			/* Reserved, for Bridge Internal use only */
            UINT    uHeapSize;   
            PVOID   pGPPVirtAddr; /* Reserved, for Bridge Internal use only */
#endif
        } ;
	/*DSP_NODEATTRIN, *DSP_HNODEATTRIN;*/

/* The DSP_NODEINFO structure is used to retrieve information about a node */
	struct DSP_NODEINFO {
		DWORD cbStruct;
		struct DSP_NDBPROPS nbNodeDatabaseProps;
		UINT uExecutionPriority;
		DSP_NODESTATE nsExecutionState;
		DSP_HNODE hDeviceOwner;
		UINT uNumberStreams;
		struct DSP_STREAMCONNECT scStreamConnection[16];
		UINT uNodeEnv;
	} ;
	/*DSP_NODEINFO, *DSP_HNODEINFO;*/

/* The DSP_NODEATTR structure describes the attributes of a node */
	struct DSP_NODEATTR {
		DWORD cbStruct;
		struct DSP_NODEATTRIN inNodeAttrIn;
		ULONG uInputs;
		ULONG uOutputs;
		struct DSP_NODEINFO iNodeInfo;
	} ;
	/*DSP_NODEATTR, *DSP_HNODEATTR;*/

/*
 *  Notification type: either the name of an opened event, or an event or
 *  window handle.
 */
	struct DSP_NOTIFICATION {
		PSTRING psName;
		HANDLE handle;
	} ;
	/*DSP_NOTIFICATION, *DSP_HNOTIFICATION;*/

/* The DSP_PROCESSORATTRIN structure describes the attributes of a processor */
	struct DSP_PROCESSORATTRIN{
		DWORD cbStruct;
		UINT uTimeout;
	} ;
	/*DSP_PROCESSORATTRIN, *DSP_HPROCESSORATTRIN;*/

	enum chipTypes {
		DSPTYPE_55 = 6,
		IVA_ARM7 = 0x97,
		DSPTYPE_64 = 0x99
	};

/*
 * The DSP_PROCESSORINFO structure describes basic capabilities of a
 * DSP processor
 */
	struct DSP_PROCESSORINFO {
		DWORD cbStruct;
		DSP_PROCFAMILY uProcessorFamily;
		DSP_PROCTYPE uProcessorType;
		UINT uClockRate;
		ULONG ulInternalMemSize;
		ULONG ulExternalMemSize;
		UINT uProcessorID;
		DSP_RTOSTYPE tyRunningRTOS;
		INT nNodeMinPriority;
		INT nNodeMaxPriority;
	} ;
	/*DSP_PROCESSORINFO, *DSP_HPROCESSORINFO;*/

/* Error information of last DSP exception signalled to the GPP */
	struct DSP_ERRORINFO {
		DWORD dwErrMask;
		DWORD dwVal1;
		DWORD dwVal2;
		DWORD dwVal3;
	} ;
	/*DSP_ERRORINFO;*/

/* The DSP_PROCESSORSTATE structure describes the state of a DSP processor */
	struct DSP_PROCESSORSTATE {
		DWORD cbStruct;
		DSP_PROCSTATE iState;
		struct DSP_ERRORINFO errInfo;
	} ;
	/*DSP_PROCESSORSTATE, *DSP_HPROCESSORSTATE;*/

/*
 * The DSP_RESOURCEINFO structure is used to retrieve information about a
 * processor's resources
 */
	struct DSP_RESOURCEINFO {
		DWORD cbStruct;
		DSP_RESOURCEINFOTYPE uResourceType;
		union {
			ULONG ulResource;
			struct DSP_MEMSTAT memStat;
			struct DSP_PROCLOADSTAT procLoadStat;
		} result;
	} ;
	/*DSP_RESOURCEINFO, *DSP_HRESOURCEINFO;*/

/*
 * The DSP_STREAMATTRIN structure describes the attributes of a stream,
 * including segment and alignment of data buffers allocated with
 * DSPStream_AllocateBuffers(), if applicable
 */
	struct DSP_STREAMATTRIN {
		DWORD cbStruct;
		UINT uTimeout;
		UINT uSegment;
		UINT uAlignment;
		UINT uNumBufs;
		UINT lMode;
		UINT uDMAChnlId;
		UINT uDMAPriority;
	} ;
	/*DSP_STREAMATTRIN, *DSP_HSTREAMATTRIN;*/

/* The DSP_BUFFERATTR structure describes the attributes of a data buffer */
	struct DSP_BUFFERATTR {
		DWORD cbStruct;
		UINT uSegment;
		UINT uAlignment;
	} ;
	/*DSP_BUFFERATTR, *DSP_HBUFFERATTR;*/

/*
 *  The DSP_STREAMINFO structure is used to retrieve information
 *  about a stream.
 */
	struct DSP_STREAMINFO {
		DWORD cbStruct;
		UINT uNumberBufsAllowed;
		UINT uNumberBufsInStream;
		ULONG ulNumberBytes;
		HANDLE hSyncObjectHandle;
		DSP_STREAMSTATE ssStreamState;
	} ;
	/*DSP_STREAMINFO, *DSP_HSTREAMINFO;*/

/* DMM MAP attributes 
It is a bit mask with each bit value indicating a specific attribute
bit 0 - GPP address type (user virtual=0, physical=1)
bit 1 - MMU Endianism (Big Endian=1, Little Endian=0)
bit 2 - MMU mixed page attribute (Mixed/ CPUES=1, TLBES =0)
bit 3 - MMU element size = 8bit (valid only for non mixed page entries)
bit 4 - MMU element size = 16bit (valid only for non mixed page entries)
bit 5 - MMU element size = 32bit (valid only for non mixed page entries)
bit 6 - MMU element size = 64bit (valid only for non mixed page entries)
*/

/* Types of mapping attributes */

/* MPU address is virtual and needs to be translated to physical addr */
#define DSP_MAPVIRTUALADDR          0x00000000
#define DSP_MAPPHYSICALADDR         0x00000001

/* Mapped data is big endian */
#define DSP_MAPBIGENDIAN            0x00000002
#define DSP_MAPLITTLEENDIAN         0x00000000

/* Element size is based on DSP r/w access size */
#define DSP_MAPMIXEDELEMSIZE        0x00000004

/*
 * Element size for MMU mapping (8, 16, 32, or 64 bit)
 * Ignored if DSP_MAPMIXEDELEMSIZE enabled
 */
#define DSP_MAPELEMSIZE8            0x00000008
#define DSP_MAPELEMSIZE16           0x00000010
#define DSP_MAPELEMSIZE32           0x00000020
#define DSP_MAPELEMSIZE64           0x00000040

#define DSP_MAPVMALLOCADDR         0x00000080

#if defined (OMAP_2430) || defined (OMAP_3430)
#define GEM_CACHE_LINE_SIZE     128
#define GEM_L1P_PREFETCH_SIZE   128
#endif

#ifdef __cplusplus
}
#endif
#endif				/* DBDEFS_ */
