original files of m241
This commit is contained in:
@@ -0,0 +1,106 @@
|
||||
/* hwMemLib.h - hardware memory allocation library header file */
|
||||
|
||||
/*
|
||||
* Copyright (c) 2005, 2009, 2012 Wind River Systems, Inc.
|
||||
*
|
||||
* The right to copy, distribute, modify or otherwise make use
|
||||
* of this software may be licensed only pursuant to the terms
|
||||
* of an applicable Wind River license agreement.
|
||||
*/
|
||||
|
||||
/*
|
||||
Modification history
|
||||
--------------------
|
||||
01g,08aug12,l_z remove HWMEM_MAX_ALLOC. (WIND00364661)
|
||||
01f,09dec09,h_k reverted the hwMemAlloc prototype for LP64.
|
||||
01e,05nov09,h_k mapped hwMemAlloc() to calloc.
|
||||
01d,23jun09,jc0 fix WIND00170079, move hwMemShow() from hwMemLib.c to
|
||||
vxbShow.c
|
||||
01c,16jun09,x_s restriction hwMemFree() for small footprint
|
||||
01b,23feb09,h_k updated for LP64 support.
|
||||
01a,31Jan05,tor created
|
||||
*/
|
||||
|
||||
#ifndef INC_HWMEMLIB_H
|
||||
#define INC_HWMEMLIB_H
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
/* includes */
|
||||
|
||||
/* defines */
|
||||
|
||||
#define VMR_MINSIZE (1<<2) /* minimum size to allocate */
|
||||
|
||||
#ifndef _WRS_CONFIG_DELAYED_HW_INIT
|
||||
|
||||
/* typedefs */
|
||||
|
||||
/*
|
||||
* Note: for the hwMemBuf stucture, we need to make sure that the stuff
|
||||
* immediately preceeding the actual memory buffer is 16 bytes in size.
|
||||
* The problem is that in VxWorks, a pointer on a 64-bit arch (e.g. mips64)
|
||||
* is 32 bits wide. For now, this means we need to insert a 4 byte pad
|
||||
* into the structure. However, in the future, its possible that pointers
|
||||
* will actually become 64 bits wide, at which point the structure
|
||||
* definition will need to be fixed.
|
||||
*/
|
||||
|
||||
struct hwMemBuf
|
||||
{
|
||||
long preSentinel; /* sentinel value */
|
||||
UINT32 pad;
|
||||
struct hwMemBuf * pNextBuff; /* next buffer in chain */
|
||||
long postSentinel; /* sentinel value */
|
||||
char pData[1]; /* beginning of data buffer */
|
||||
};
|
||||
|
||||
struct hwMemPool
|
||||
{
|
||||
struct hwMemPool * pNext; /* multi-pool support */
|
||||
char * pLowerLimit; /* pointer to beginning of pool */
|
||||
char * pUpperLimit; /* pointer to end of pool */
|
||||
char * pStore; /* unallocated space */
|
||||
size_t poolSize; /* size of unallocated space */
|
||||
struct hwMemBuf * pHead[6]; /* 48-byte through 2032-byte pools */
|
||||
struct hwMemBuf * pAlloc[6]; /* allocated buffers */
|
||||
UINT32 pad;
|
||||
};
|
||||
|
||||
/* externs */
|
||||
|
||||
IMPORT char hwMemPool[];
|
||||
|
||||
/* locals */
|
||||
|
||||
/* forward declarations */
|
||||
|
||||
void hwMemLibInit (void);
|
||||
STATUS hwMemPoolCreate
|
||||
(
|
||||
char * pMem,
|
||||
size_t size
|
||||
);
|
||||
|
||||
void hwMemInit (void);
|
||||
|
||||
#endif /* !_WRS_CONFIG_DELAYED_HW_INIT */
|
||||
|
||||
char * hwMemAlloc (size_t reqSize);
|
||||
|
||||
#ifndef _WRS_CONFIG_VXBUS_BASIC
|
||||
STATUS hwMemFree (char * pMem);
|
||||
#endif /* !_WRS_CONFIG_VXBUS_BASIC */
|
||||
|
||||
void * hwVMRInit (char * pSpace, size_t size);
|
||||
void * hwVMRAlloc (void * pVMRCookie, int alignShift);
|
||||
char * hwVMRAddrGet (void * pVMRCookie);
|
||||
STATUS hwVMRDeActivate (void * pVMRCookie);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif /* INC_HWMEMLIB_H */
|
||||
@@ -0,0 +1,476 @@
|
||||
/* vxbDmaBufLib.h - buffer and DMA system for VxBus drivers */
|
||||
|
||||
/*
|
||||
* Copyright (c) 2005-2010, 2012 Wind River Systems, Inc.
|
||||
*
|
||||
* The right to copy, distribute, modify or otherwise make use
|
||||
* of this software may be licensed only pursuant to the terms
|
||||
* of an applicable Wind River license agreement.
|
||||
*/
|
||||
|
||||
/*
|
||||
modification history
|
||||
--------------------
|
||||
01t,11jun12,sye Removed duplicate method declaration. (WIND00353762)
|
||||
01s,29apr10,pad Moved extern C statement after include statements.
|
||||
01r,26feb10,h_k added mapSyncPartFunc member in vxbDmaBufMap structure.
|
||||
added vxbDmaBufFragFill().
|
||||
added VXB_DMABUF_CACHESNOOP_BUS and
|
||||
VXB_DMABUF_MEMALLOC_CLEAR_BUF.
|
||||
01q,10feb10,h_k added pBounceSaved in vxbDmaBufMap.
|
||||
added new options related to bounce buffer.
|
||||
added new options for vxbDmaBufSync() to correct the pre-
|
||||
post- DMA sync operations.
|
||||
added vxbDmaBufMapSync().
|
||||
01p,04jan10,h_k replaced FUNCPTR with fully qualified function pointer
|
||||
parameters for mapXxx funcs.
|
||||
01o,21sep09,h_k added VXB_SPACE_MAXADDR macros.
|
||||
01n,01sep09,h_k added fragVirt to vxbDmaBufFrag.
|
||||
changed the type of frag to UINT64.
|
||||
01m,25mar09,h_k added prototype for vxbDmaBufInit().
|
||||
01l,30may08,dlk Access headers under wrn/coreip directly.
|
||||
01k,27mar08,dlk Add mapLoadIpcomFunc member to vxbDmaBufMap, and
|
||||
vxbDmaBufMapIpcomLoad() prototype.
|
||||
01j,31oct07,wap Cache pointer to parent bus controller in DMA map
|
||||
(WIND00104927)
|
||||
01i,21feb07,mil Fixed missing include file vxBus.h.
|
||||
01h,30jan07,wap Use method declaration macros
|
||||
01g,19jul06,wap Refine bounce buffer support
|
||||
01f,18jul06,wap Add some includes to fix project build
|
||||
01e,14jul06,wap Add bounce buffer memory pointer to DMA map structure, move
|
||||
DMA tag structure definition here from vxbDmaBufLib.c
|
||||
01d,29jun06,wap Add support for address translation
|
||||
01c,25may06,wap Add fragment count to map structure
|
||||
01b,30jan06,pdg Updated review comments
|
||||
01a,02Dec05,tor created from FreeBSD DMA system
|
||||
*/
|
||||
|
||||
/*
|
||||
DESCRIPTION
|
||||
|
||||
This file defines the macros, structures and interfaces which can be used
|
||||
by the device drivers to support DMA operations.
|
||||
*/
|
||||
|
||||
#ifndef __INCvxbDmaBufBufLibh
|
||||
#define __INCvxbDmaBufBufLibh
|
||||
|
||||
/* includes */
|
||||
#include <vxBusLib.h>
|
||||
#include <cacheLib.h>
|
||||
#include <hwif/vxbus/vxBus.h>
|
||||
|
||||
#include <net/uio.h>
|
||||
#include <netBufLib.h>
|
||||
#include <net/mbuf.h>
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
/* defines */
|
||||
|
||||
/* vxbDmaBufTagCreate flags */
|
||||
|
||||
#define VXB_DMABUF_ALLOCNOW 0x00000001 /* (currently no effect) */
|
||||
#define VXB_DMABUF_NOCACHE 0x00000002 /* uncacheable buffer */
|
||||
#define VXB_DMABUF_CACHESNOOP_BUS 0x00000004 /* cache-snoop mode bus
|
||||
* This flag is set by
|
||||
* bus controller driver.
|
||||
*/
|
||||
|
||||
/* vxbDmaBufTagCreate flags for VxBus 5.0.0 or later driver */
|
||||
|
||||
#define VXB_DMABUF_CACHEALIGNCHECK 0x00000010 /* create a bounce buffer
|
||||
* to be used in
|
||||
* cache-unaligned case
|
||||
*/
|
||||
|
||||
/* vxbDmaBufMapCreate flags for VxBus 5.0.0 or later driver */
|
||||
|
||||
#define VXB_DMABUF_MAPCREATE_NOBOUNCE_BUF \
|
||||
0x00000100 /* (internal use by
|
||||
* vxbDmaBufMemAlloc)
|
||||
*/
|
||||
|
||||
/*
|
||||
* vxbDmaBufMapLoad, vxbDmaBufMapMblkLoad, vxbDmaBufMapIoVecLoad flags
|
||||
* for VxBus 5.0.0 or later driver
|
||||
*/
|
||||
|
||||
#define VXB_DMABUF_MAPLOAD_CACHEALIGNCHECK \
|
||||
0x00001000 /* enable bounce buffering
|
||||
* in cache-unaligned case
|
||||
*/
|
||||
|
||||
/* vxbDmaBufMemAlloc flags */
|
||||
|
||||
#define VXB_DMABUF_MEMALLOC_CLEAR_BUF 0x00010000 /* zero clear allocated
|
||||
* buffer
|
||||
*/
|
||||
|
||||
/* vxbDmaBufSync and vxbDmaBufMapSync options */
|
||||
|
||||
#define _VXB_DMABUFSYNC_DMA_PREREAD 0x00000001
|
||||
#define _VXB_DMABUFSYNC_DMA_POSTREAD 0x00000002
|
||||
#define _VXB_DMABUFSYNC_DMA_PREWRITE 0x00000004
|
||||
#define _VXB_DMABUFSYNC_DMA_POSTWRITE 0x00000008
|
||||
|
||||
/*
|
||||
* vxbDmaBufSync options for backward compatibility
|
||||
*
|
||||
* The names of the PRE and POST were not correctly defined nor used.
|
||||
* New macros above (_VXB_DMABUFSYNC_DMA_XXX) are introduced in VxWorks 6.9
|
||||
* as their replacements.
|
||||
* Please use the new options for further development.
|
||||
*/
|
||||
|
||||
#define VXB_DMABUFSYNC_PREREAD (_VXB_DMABUFSYNC_DMA_PREREAD | \
|
||||
_VXB_DMABUFSYNC_DMA_POSTREAD)
|
||||
#define VXB_DMABUFSYNC_POSTWRITE _VXB_DMABUFSYNC_DMA_PREWRITE
|
||||
|
||||
/* not supported */
|
||||
#define VXB_DMABUFSYNC_POSTREAD 0x00010000 /* (no effect) */
|
||||
#define VXB_DMABUFSYNC_PREWRITE 0x00080000 /* (no effect) */
|
||||
|
||||
#define VXB_SPACE_MAXADDR_24BIT 0xFFFFFF
|
||||
#define VXB_SPACE_MAXADDR_32BIT 0xFFFFFFFF
|
||||
#define VXB_SPACE_MAXADDR_64BIT 0xFFFFFFFFFFFFFFFFULL
|
||||
|
||||
#define VXB_SPACE_MAXSIZE_24BIT VXB_SPACE_MAXADDR_24BIT
|
||||
#define VXB_SPACE_MAXSIZE_32BIT VXB_SPACE_MAXADDR_32BIT
|
||||
#define VXB_SPACE_MAXSIZE_64BIT VXB_SPACE_MAXADDR_64BIT
|
||||
|
||||
#define VXB_SPACE_UNRESTRICTED (~0)
|
||||
#define VXB_SPACE_MAXSIZE VXB_SPACE_UNRESTRICTED
|
||||
|
||||
#ifdef _WRS_CONFIG_LP64
|
||||
#define VXB_SPACE_MAXADDR VXB_SPACE_MAXADDR_64BIT
|
||||
#else
|
||||
#define VXB_SPACE_MAXADDR VXB_SPACE_MAXADDR_32BIT
|
||||
#endif /* _WRS_CONFIG_LP64 */
|
||||
|
||||
#define VXB_DMA_VIRT_TO_PHYS(adrs) \
|
||||
(bus_addr_t) ((ULONG)CACHE_DRV_VIRT_TO_PHYS(&cacheDmaFuncs, adrs))
|
||||
|
||||
/* typedefs */
|
||||
|
||||
typedef unsigned long bus_size_t;
|
||||
typedef UINT64 bus_addr_t;
|
||||
typedef unsigned long bus_dmasync_op_t;
|
||||
typedef void (bus_dma_filter_t)();
|
||||
typedef void (bus_dma_lock_t)();
|
||||
|
||||
typedef struct vxbDmaBufTag
|
||||
{
|
||||
struct vxbDmaBufTag * pNext; /* pointer to next tag */
|
||||
VXB_DEVICE_ID pInst; /* instance id */
|
||||
struct vxbDmaBufTag * parent; /* parent tag */
|
||||
BOOL vxbTagValid; /* tag validity flag */
|
||||
bus_size_t alignment; /* alignment for segments */
|
||||
bus_size_t boundary; /* boundary for segments */
|
||||
bus_addr_t lowAddr; /* low restricted address */
|
||||
bus_addr_t highAddr; /* high restricted address */
|
||||
bus_dma_filter_t * filter; /* optional filter function */
|
||||
void * filterArg; /* filter function argument */
|
||||
bus_size_t maxSize; /* maximum mapping size */
|
||||
u_int nSegments; /* number of segments */
|
||||
bus_size_t maxSegSz; /* maximum segment size */
|
||||
int flags; /* flags */
|
||||
int refCount; /* reference count */
|
||||
int mapCount; /* map count */
|
||||
bus_dma_lock_t * lockFunc; /* lock Function */
|
||||
void * lockFuncArg; /* lock function argument */
|
||||
} VXB_DMA_TAG;
|
||||
|
||||
typedef VXB_DMA_TAG * VXB_DMA_TAG_ID;
|
||||
|
||||
typedef struct vxbDmaBufFrag VXB_DMA_FRAG;
|
||||
|
||||
struct vxbDmaBufFrag
|
||||
{
|
||||
bus_addr_t frag; /* fragment pointer physical address */
|
||||
void * fragVirt; /* fragment pointer virtual address */
|
||||
bus_size_t fragLen; /* fragment length */
|
||||
};
|
||||
|
||||
typedef struct vxbDmaBufMap VXB_DMA_MAP;
|
||||
typedef struct vxbDmaBufMap * VXB_DMA_MAP_ID;
|
||||
|
||||
struct Ipcom_pkt_struct;
|
||||
|
||||
struct vxbDmaBufMap
|
||||
{
|
||||
VXB_DMA_TAG_ID dmaTagID;
|
||||
VXB_DEVICE_ID pParent; /* Parent device */
|
||||
VXB_DEVICE_ID pDev; /* map owner */
|
||||
STATUS (*mapLoadFunc)(VXB_DEVICE_ID,
|
||||
VXB_DMA_TAG_ID,
|
||||
VXB_DMA_MAP_ID,
|
||||
void *,
|
||||
bus_size_t,
|
||||
int); /* parent bus load func */
|
||||
STATUS (*mapLoadMblkFunc)(VXB_DEVICE_ID,
|
||||
VXB_DMA_TAG_ID,
|
||||
VXB_DMA_MAP_ID,
|
||||
M_BLK_ID,
|
||||
int); /* parent bus mBlk load */
|
||||
STATUS (*mapLoadIoVecFunc)(VXB_DEVICE_ID,
|
||||
VXB_DMA_TAG_ID,
|
||||
VXB_DMA_MAP_ID,
|
||||
struct uio *,
|
||||
int); /* parent bus iovec load func */
|
||||
STATUS (*mapLoadIpcomFunc)(VXB_DEVICE_ID,
|
||||
VXB_DMA_TAG_ID,
|
||||
VXB_DMA_MAP_ID,
|
||||
struct Ipcom_pkt_struct *,
|
||||
int); /* parent bus Ipcom_pkt load */
|
||||
STATUS (*mapUnloadFunc)(VXB_DEVICE_ID,
|
||||
VXB_DMA_TAG_ID,
|
||||
VXB_DMA_MAP_ID);
|
||||
/* parent bus unload func */
|
||||
STATUS (*mapSyncFunc)(VXB_DEVICE_ID,
|
||||
VXB_DMA_TAG_ID,
|
||||
VXB_DMA_MAP_ID,
|
||||
bus_dmasync_op_t);
|
||||
STATUS (*mapSyncPartFunc)(VXB_DEVICE_ID,
|
||||
VXB_DMA_TAG_ID,
|
||||
VXB_DMA_MAP_ID,
|
||||
off_t,
|
||||
size_t,
|
||||
bus_dmasync_op_t);
|
||||
/* parent bus sync func */
|
||||
void *pMem; /* for alignment fixups */
|
||||
void *pMemBounce; /* for bounce buffering */
|
||||
void *pBounceSaved; /* for alignment fixups */
|
||||
int nFrags; /* number of valid frags */
|
||||
VXB_DMA_FRAG fragList[1]; /* list of buffer fragments */
|
||||
};
|
||||
|
||||
/* globals */
|
||||
|
||||
/* function pointers available to be filled in by BSP */
|
||||
|
||||
IMPORT void * (*vxbDmaBufBspAlloc)
|
||||
(
|
||||
VXB_DEVICE_ID pInst,
|
||||
size_t size
|
||||
);
|
||||
IMPORT STATUS (*vxbDmaBufBspFree)
|
||||
(
|
||||
VXB_DEVICE_ID pInst,
|
||||
void * vaddr
|
||||
);
|
||||
|
||||
/* function pointers available to be filled in by arch code */
|
||||
|
||||
IMPORT STATUS (*vxbDmaBufArchInvalidate)
|
||||
(
|
||||
VXB_DEVICE_ID pInst,
|
||||
VXB_DMA_TAG_ID dmaTagID,
|
||||
VXB_DMA_MAP_ID map,
|
||||
int index,
|
||||
off_t offset,
|
||||
size_t length
|
||||
);
|
||||
IMPORT STATUS (*vxbDmaBufArchFlush)
|
||||
(
|
||||
VXB_DEVICE_ID pInst,
|
||||
VXB_DMA_TAG_ID dmaTagID,
|
||||
VXB_DMA_MAP_ID map,
|
||||
int index,
|
||||
off_t offset,
|
||||
size_t length
|
||||
);
|
||||
IMPORT STATUS (*vxbDmaBufMapArchInvalidate)
|
||||
(
|
||||
VXB_DEVICE_ID pInst,
|
||||
VXB_DMA_TAG_ID dmaTagID,
|
||||
VXB_DMA_MAP_ID map
|
||||
);
|
||||
IMPORT STATUS (*vxbDmaBufMapArchFlush)
|
||||
(
|
||||
VXB_DEVICE_ID pInst,
|
||||
VXB_DMA_TAG_ID dmaTagID,
|
||||
VXB_DMA_MAP_ID map
|
||||
);
|
||||
|
||||
/* locals */
|
||||
|
||||
/* forward declarations */
|
||||
|
||||
IMPORT void vxbDmaBufInit();
|
||||
|
||||
IMPORT VXB_DMA_TAG_ID vxbDmaBufTagParentGet
|
||||
(
|
||||
VXB_DEVICE_ID pInst,
|
||||
UINT32 pRegBaseIndex
|
||||
);
|
||||
|
||||
IMPORT VXB_DMA_TAG_ID vxbDmaBufTagCreate
|
||||
(
|
||||
VXB_DEVICE_ID pInst,
|
||||
VXB_DMA_TAG_ID parent,
|
||||
bus_size_t alignment,
|
||||
bus_size_t boundary,
|
||||
bus_addr_t lowAddr,
|
||||
bus_addr_t highAddr,
|
||||
bus_dma_filter_t * filter,
|
||||
void * filterArg,
|
||||
bus_size_t maxSize,
|
||||
int nSegments,
|
||||
bus_size_t maxSegSz,
|
||||
int flags,
|
||||
bus_dma_lock_t * lockFunc,
|
||||
void * lockFuncArg,
|
||||
VXB_DMA_TAG_ID * ppDmaTag
|
||||
);
|
||||
|
||||
IMPORT STATUS vxbDmaBufTagDestroy
|
||||
(
|
||||
VXB_DMA_TAG_ID dmaTagID
|
||||
);
|
||||
|
||||
IMPORT VXB_DMA_MAP_ID vxbDmaBufMapCreate
|
||||
(
|
||||
VXB_DEVICE_ID pInst,
|
||||
VXB_DMA_TAG_ID dmaTagID,
|
||||
int flags,
|
||||
VXB_DMA_MAP_ID * pMap
|
||||
);
|
||||
|
||||
IMPORT STATUS vxbDmaBufMapDestroy
|
||||
(
|
||||
VXB_DMA_TAG_ID dmaTagID,
|
||||
VXB_DMA_MAP_ID map
|
||||
);
|
||||
|
||||
IMPORT void * vxbDmaBufMemAlloc
|
||||
(
|
||||
VXB_DEVICE_ID pInst,
|
||||
VXB_DMA_TAG_ID dmaTagID,
|
||||
void ** vaddr,
|
||||
int flags,
|
||||
VXB_DMA_MAP_ID * pMap
|
||||
);
|
||||
|
||||
IMPORT STATUS vxbDmaBufMemFree
|
||||
(
|
||||
VXB_DMA_TAG_ID dmaTagID,
|
||||
void * vaddr,
|
||||
VXB_DMA_MAP_ID map
|
||||
);
|
||||
|
||||
IMPORT STATUS vxbDmaBufMapLoad
|
||||
(
|
||||
VXB_DEVICE_ID pInst,
|
||||
VXB_DMA_TAG_ID dmaTagID,
|
||||
VXB_DMA_MAP_ID map,
|
||||
void * buf,
|
||||
bus_size_t bufLen,
|
||||
int flags
|
||||
);
|
||||
|
||||
IMPORT STATUS vxbDmaBufMapMblkLoad
|
||||
(
|
||||
VXB_DEVICE_ID pInst,
|
||||
VXB_DMA_TAG_ID dmaTagID,
|
||||
VXB_DMA_MAP_ID map,
|
||||
M_BLK_ID pMblk,
|
||||
int flags
|
||||
);
|
||||
|
||||
IMPORT STATUS vxbDmaBufMapIoVecLoad
|
||||
(
|
||||
VXB_DEVICE_ID pInst,
|
||||
VXB_DMA_TAG_ID dmaTagID,
|
||||
VXB_DMA_MAP_ID map,
|
||||
struct uio * uio,
|
||||
int flags
|
||||
);
|
||||
|
||||
IMPORT STATUS vxbDmaBufMapIpcomLoad
|
||||
(
|
||||
VXB_DEVICE_ID pInst,
|
||||
VXB_DMA_TAG_ID dmaTagID,
|
||||
VXB_DMA_MAP_ID map,
|
||||
struct Ipcom_pkt_struct * pkt,
|
||||
int flags
|
||||
);
|
||||
|
||||
IMPORT STATUS vxbDmaBufMapUnload
|
||||
(
|
||||
VXB_DMA_TAG_ID dmaTagID,
|
||||
VXB_DMA_MAP_ID map
|
||||
);
|
||||
|
||||
IMPORT STATUS vxbDmaBufMapFlush
|
||||
(
|
||||
VXB_DEVICE_ID pInst,
|
||||
VXB_DMA_TAG_ID dmaTagID,
|
||||
VXB_DMA_MAP_ID map
|
||||
);
|
||||
|
||||
IMPORT STATUS vxbDmaBufMapInvalidate
|
||||
(
|
||||
VXB_DEVICE_ID pInst,
|
||||
VXB_DMA_TAG_ID dmaTagID,
|
||||
VXB_DMA_MAP_ID map
|
||||
);
|
||||
|
||||
IMPORT STATUS vxbDmaBufFlush
|
||||
(
|
||||
VXB_DEVICE_ID pInst,
|
||||
VXB_DMA_TAG_ID dmaTagID,
|
||||
VXB_DMA_MAP_ID map,
|
||||
int index,
|
||||
off_t offset,
|
||||
size_t length
|
||||
);
|
||||
|
||||
IMPORT STATUS vxbDmaBufInvalidate
|
||||
(
|
||||
VXB_DEVICE_ID pInst,
|
||||
VXB_DMA_TAG_ID dmaTagID,
|
||||
VXB_DMA_MAP_ID map,
|
||||
int index,
|
||||
off_t offset,
|
||||
size_t length
|
||||
);
|
||||
|
||||
IMPORT STATUS vxbDmaBufSync
|
||||
(
|
||||
VXB_DEVICE_ID pInst,
|
||||
VXB_DMA_TAG_ID dmaTagID,
|
||||
VXB_DMA_MAP_ID map,
|
||||
bus_dmasync_op_t op
|
||||
);
|
||||
|
||||
IMPORT STATUS vxbDmaBufMapSync
|
||||
(
|
||||
VXB_DEVICE_ID pInst,
|
||||
VXB_DMA_TAG_ID dmaTagID,
|
||||
VXB_DMA_MAP_ID map,
|
||||
off_t offset,
|
||||
size_t length,
|
||||
bus_dmasync_op_t op
|
||||
);
|
||||
|
||||
IMPORT STATUS vxbDmaBufFragFill
|
||||
(
|
||||
VXB_DMA_TAG_ID dmaTagID,
|
||||
VXB_DMA_MAP_ID map,
|
||||
void * buf,
|
||||
bus_size_t bufLen,
|
||||
int flags,
|
||||
int * pNSegs,
|
||||
void ** ppBounceBufCur
|
||||
);
|
||||
|
||||
IMPORT void vxbDmaBufInit (void);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif /* __INCvxbDmaBufBufLibh */
|
||||
@@ -0,0 +1,224 @@
|
||||
/* vxbDmaLib.h - vxBus DMA interfaces header file */
|
||||
|
||||
/*
|
||||
* Copyright (c) 2006-2007, 2010, 2018 Wind River Systems, Inc.
|
||||
*
|
||||
* The right to copy, distribute or otherwise make use of this software
|
||||
* may be licensed only pursuant to the terms of an applicable Wind River
|
||||
* license agreement.
|
||||
*/
|
||||
|
||||
/*
|
||||
modification history
|
||||
--------------------
|
||||
01i,26sep18,syt add a new API vxbDmaChanAllocAdvance() (VXW6-86923)
|
||||
01h,12jan18,lyx modify DMA_CHAN_ALLOCATED diffrent from DMA_CHAINED_BUFFERS
|
||||
01g,29apr10,pad Moved extern C statement after include statements.
|
||||
01f,25mar09,h_k updated for LP64 support.
|
||||
01e,26jul07,h_k added includes for vxBusLib.h & vxBus.h
|
||||
01d,13jun07,tor remove VIRT_ADDR
|
||||
01c,06feb07,wap Cleanup
|
||||
01b,05oct06,pdg updated review comments
|
||||
01a,22Jun06,pdg written
|
||||
*/
|
||||
|
||||
/*
|
||||
DESCRIPTION
|
||||
|
||||
This file defines the macros, structures and interfaces which can be used
|
||||
by the device drivers for performing DMA tramsfers.
|
||||
|
||||
*/
|
||||
|
||||
#ifndef __INCvxbDmaLibh
|
||||
#define __INCvxbDmaLibh
|
||||
|
||||
/* includes */
|
||||
|
||||
#include <vxBusLib.h>
|
||||
#include <hwif/vxbus/vxBus.h>
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
/* mask values used */
|
||||
|
||||
#define DMA_INITIATOR_INDEX_MASK 0x000000FF /* index mask */
|
||||
#define DMA_COPY_MODE_MASK 0x00000300 /* copy mode mask */
|
||||
#define DMA_TRANSFER_TYPE_MASK 0x00003000 /* transfer type mask */
|
||||
|
||||
/* 'flags' values in dmaChanAlloc () */
|
||||
|
||||
#define DMA_COPY_MODE_DEVBUF 0x00000000
|
||||
#define DMA_COPY_MODE_FIFO 0x00000100
|
||||
#define DMA_COPY_MODE_NO_SOFT 0x00000200
|
||||
#define DMA_COPY_MODE_NO_HW 0x00000300
|
||||
#define DMA_TRANSFER_TYPE_RD 0x00001000
|
||||
#define DMA_TRANSFER_TYPE_WR 0x00002000
|
||||
|
||||
/* flag value used during dedicated DMA channel allocation */
|
||||
|
||||
#define DMA_CHAN_ALLOCATED 0x02000000
|
||||
|
||||
#define DMA_CHAINED_BUFFERS 0x01000000 /* the dma engine supports */
|
||||
/* chained buffers */
|
||||
#define DMA_INDEX_MASK 0x000000FF
|
||||
#define DMA_CRC_MASK 0x0000FF00 /* crc mask value */
|
||||
#define DMA_CONVERSION_MASK 0x00FF0000 /* features & flags mask */
|
||||
|
||||
/* DMA transfer status values */
|
||||
|
||||
#define DMA_STATUS_OK 0
|
||||
#define DMA_STATUS_ERROR 1
|
||||
#define DMA_STATUS_CANCELLED 2
|
||||
|
||||
/* channel status values */
|
||||
|
||||
#define DMA_NOT_USED 1 /* DMA channel is not in use */
|
||||
#define DMA_IDLE 2 /* DMA channel is inactive */
|
||||
#define DMA_RUNNING 3 /* DMA engine is running */
|
||||
#define DMA_PAUSED 4 /* DMA is currently paused */
|
||||
|
||||
typedef void (* pVXB_DMA_COMPLETE_FN)
|
||||
(
|
||||
void * pArg,
|
||||
UINT32 actualTransferSize,
|
||||
UINT32 transferStatus
|
||||
);
|
||||
|
||||
typedef struct vxbDmaResource VXB_DMA_RESOURCE, * VXB_DMA_RESOURCE_ID;
|
||||
|
||||
/*
|
||||
* This structure holds the function pointers which can be used by IO
|
||||
* device driver instances to perform read and write operations
|
||||
* through the DMA engine, pause, resume dma operations and retrieve
|
||||
* the status of dma operations.
|
||||
*/
|
||||
struct vxbDmaFuncs
|
||||
{
|
||||
STATUS (*dmaRead) /* read from device */
|
||||
(
|
||||
VXB_DMA_RESOURCE_ID dmaChan,
|
||||
char * src,
|
||||
char * dest,
|
||||
int transferSize,
|
||||
int unitSize,
|
||||
UINT32 flags,
|
||||
pVXB_DMA_COMPLETE_FN pDmaComplete,
|
||||
void * pArg
|
||||
);
|
||||
|
||||
STATUS (*dmaReadAndWait) /* read from device and wait for completion */
|
||||
(
|
||||
VXB_DMA_RESOURCE_ID dmaChan,
|
||||
char * src,
|
||||
char * dest,
|
||||
int * pTransferSize,
|
||||
int unitSize,
|
||||
UINT32 flags
|
||||
);
|
||||
|
||||
STATUS (*dmaWrite) /* write to device */
|
||||
(
|
||||
VXB_DMA_RESOURCE_ID dmaChan,
|
||||
char * src,
|
||||
char * dest,
|
||||
int transferSize,
|
||||
int unitSize,
|
||||
UINT32 flags,
|
||||
pVXB_DMA_COMPLETE_FN pDmaComplete,
|
||||
void * pArg
|
||||
);
|
||||
|
||||
STATUS (*dmaWriteAndWait) /* write to device and wait for completion */
|
||||
(
|
||||
VXB_DMA_RESOURCE_ID dmaChan,
|
||||
char * src,
|
||||
char * dest,
|
||||
int * pTransferSize,
|
||||
int unitSize,
|
||||
UINT32 flags
|
||||
);
|
||||
|
||||
STATUS (*dmaCancel) /* cancel a dma transfer */
|
||||
(
|
||||
VXB_DMA_RESOURCE_ID dmaChan
|
||||
);
|
||||
|
||||
STATUS (*dmaPause) /* pause a dma transfer */
|
||||
(
|
||||
VXB_DMA_RESOURCE_ID dmaChan
|
||||
);
|
||||
|
||||
STATUS (*dmaResume) /* resume a dma transfer */
|
||||
(
|
||||
VXB_DMA_RESOURCE_ID dmaChan
|
||||
);
|
||||
|
||||
int (*dmaStatus) /* get the status of DMA channel */
|
||||
(
|
||||
VXB_DMA_RESOURCE_ID dmaChan
|
||||
);
|
||||
};
|
||||
|
||||
#define vxbDmaRead(a,b,c,d,e,f,g,h) (a)->dmaFuncs.dmaRead(a,b,c,d,e,f,g,h)
|
||||
#define vxbDmaWrite(a,b,c,d,e,f,g,h) (a)->dmaFuncs.dmaWrite(a,b,c,d,e,f,g,h)
|
||||
#define vxbDmaReadAndWait(a,b,c,d,e,f) \
|
||||
(a)->dmaFuncs.dmaReadAndWait(a,b,c,d,e,f)
|
||||
#define vxbDmaWriteAndWait(a,b,c,d,e,f) \
|
||||
(a)->dmaFuncs.dmaWriteAndWait(a,b,c,d,e,f)
|
||||
#define vxbDmaCancel(x) (x)->dmaFuncs.dmaCancel(x)
|
||||
#define vxbDmaPause(x) (x)->dmaFuncs.dmaPause(x)
|
||||
#define vxbDmaResume(x) (x)->dmaFuncs.dmaResume(x)
|
||||
#define vxbDmaStatus(x) (x)->dmaFuncs.dmaStatus(x)
|
||||
|
||||
/*
|
||||
* Pointer to struct vxbDmaResource is returned by dmaChanAlloc ().
|
||||
* This has to be used for communication with the DMA engine.
|
||||
*/
|
||||
|
||||
struct vxbDmaResource
|
||||
{
|
||||
struct vxbDmaFuncs dmaFuncs;/* structure holding dma function pointers */
|
||||
void * pDmaChan;/* channel specific data-used by DMA driver */
|
||||
VXB_DEVICE_ID dmaInst; /* dma engine instance ID */
|
||||
};
|
||||
|
||||
/*
|
||||
* if multiple buffers are used during a transfer,
|
||||
* 'src' should point to a list of the following structures. In the case
|
||||
* of multiple buffers, 'destn' need not be used.
|
||||
*/
|
||||
struct vxbDmaBufferDesc
|
||||
{
|
||||
char * srcAddr; /* source address */
|
||||
char * destAddr; /* destination address */
|
||||
int transferSize; /* size of transfer */
|
||||
UINT32 transferStatus; /* status of dma transfer */
|
||||
struct vxbDmaBufferDesc * pNextDesc; /* pointer to the next desc */
|
||||
void * pDmaChanData; /* pointer to the driver data */
|
||||
};
|
||||
|
||||
IMPORT VXB_DMA_RESOURCE_ID vxbDmaChanAlloc (VXB_DEVICE_ID pDev,
|
||||
UINT32 minQueueDepth, UINT32 flags,
|
||||
void * pDedicatedChanInfo);
|
||||
IMPORT VXB_DMA_RESOURCE_ID vxbDmaChanAllocAdvance (VXB_DEVICE_ID pDev,
|
||||
VXB_DEVICE_ID pDmaInst,
|
||||
UINT32 minQueueDepth,
|
||||
UINT32 flags,
|
||||
void * pDedicatedChanInfo);
|
||||
IMPORT void vxbDmaChanFree (VXB_DMA_RESOURCE_ID dmaChan);
|
||||
|
||||
IMPORT void vxbDmaLibInit (void);
|
||||
|
||||
/* Backwards compatibility. */
|
||||
|
||||
#define dmaChanAlloc vxbDmaChanAlloc
|
||||
#define dmaChanFree vxbDmaChanFree
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif /* __cplusplus */
|
||||
|
||||
#endif /* __INCvxbDmaLibh */
|
||||
@@ -0,0 +1,54 @@
|
||||
/* vxbEndQctrl.h - vxbEndQctrl header file */
|
||||
|
||||
/*
|
||||
* Copyright (c) 2007-2009 Wind River Systems, Inc.
|
||||
*
|
||||
* The right to copy, distribute or otherwise make use of this software
|
||||
* may be licensed only pursuant to the terms of an applicable Wind River
|
||||
* license agreement.
|
||||
*/
|
||||
|
||||
/*
|
||||
modification history
|
||||
--------------------
|
||||
01b,03mar09,h_k added prototype for vxbEndRxQParamRestore(),
|
||||
vxbEndDevQueueSet(), vxbEndQueueSet().
|
||||
01a,10oct07,dlk Written.
|
||||
*/
|
||||
|
||||
|
||||
#ifndef __INCvxbEndQctrlh
|
||||
#define __INCvxbEndQctrlh
|
||||
|
||||
#include <vxBusLib.h>
|
||||
#include <hwif/vxbus/vxBus.h>
|
||||
#include <jobQueueLib.h>
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
extern STATUS vxbEndQctrlInit (void);
|
||||
extern STATUS vxbEndQnumSet (char * instName, int unit, unsigned int qnum);
|
||||
extern STATUS vxbEndRxQParamRestore
|
||||
(
|
||||
char * instName, /* VxBus device instance name */
|
||||
int unit /* device unit number */
|
||||
);
|
||||
extern STATUS vxbEndDevQueueSet
|
||||
(
|
||||
VXB_DEVICE_ID pDev,
|
||||
JOB_QUEUE_ID qId
|
||||
);
|
||||
extern STATUS vxbEndQueueSet
|
||||
(
|
||||
char * instName,
|
||||
int unit,
|
||||
JOB_QUEUE_ID qId
|
||||
);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif /* __cplusplus */
|
||||
|
||||
#endif /* __INCvxbEndQctrlh */
|
||||
@@ -0,0 +1,28 @@
|
||||
/* vxbLegacyIntLib.h -- VxBus legacy interrupt support library */
|
||||
|
||||
/*
|
||||
* Copyright (C) 2007 Wind River Systems, Inc. All rights are reserved.
|
||||
*
|
||||
* The right to copy, distribute, modify, or otherwise make use
|
||||
* of this software may be licensed only pursuant to the terms
|
||||
* of an applicable Wind River license agreement.
|
||||
*/
|
||||
|
||||
/*
|
||||
modification history
|
||||
--------------------
|
||||
01a,30oct07,tor created
|
||||
*/
|
||||
|
||||
#ifndef __INCvxbLegacyIntLibh
|
||||
#define __INCvxbLegacyIntLibh
|
||||
|
||||
/* includes */
|
||||
|
||||
#include <vxWorks.h>
|
||||
|
||||
/* globals */
|
||||
|
||||
IMPORT void vxbLegacyIntInit();
|
||||
|
||||
#endif /* __INCvxbLegacyIntLibh */
|
||||
@@ -0,0 +1,47 @@
|
||||
/* vxbMsgSupport.h - message transmit support library */
|
||||
|
||||
/*
|
||||
* Copyright (c) 2012 Wind River Systems, Inc.
|
||||
*
|
||||
* The right to copy, distribute or otherwise make use
|
||||
* of this software may be licensed only pursuant to the terms
|
||||
* of an applicable Wind River license agreement.
|
||||
*/
|
||||
|
||||
/*
|
||||
modification history
|
||||
--------------------
|
||||
01b,20dec12,j_z change MSG_RXCB_FUNC, MSG_TXCB_FUNC prototype
|
||||
01a,30nov12,j_z add common message transmit struct.
|
||||
*/
|
||||
|
||||
/*
|
||||
DESCRIPTION
|
||||
This module provides common message transmit API definitions.
|
||||
*/
|
||||
|
||||
#ifndef __INCvxbMsgSupportH
|
||||
#define __INCvxbMsgSupportH
|
||||
|
||||
typedef struct msgbuf
|
||||
{
|
||||
void * buf;
|
||||
UINT32 len;
|
||||
void * next;
|
||||
} MSG_TRAN_BUF;
|
||||
|
||||
typedef int (*MSG_RXCB_FUNC) (MSG_TRAN_BUF *, STATUS status, void * cbArg);
|
||||
typedef int (*MSG_TXCB_FUNC) (STATUS status, void * cbArg);
|
||||
|
||||
typedef struct msg_trans_api
|
||||
{
|
||||
int (*intRxAddHook) (VXB_DEVICE_ID pServDev, ULONG arg,
|
||||
MSG_RXCB_FUNC rxCbFunc, void * cbArg);
|
||||
int (*intSend) (VXB_DEVICE_ID pServDev, ULONG arg,
|
||||
MSG_TRAN_BUF * desc, MSG_TXCB_FUNC txCbFunc, void * cbArg);
|
||||
int (*pollSend) (VXB_DEVICE_ID pServDev, void * arg, MSG_TRAN_BUF * desc);
|
||||
int (*pollRcv) (VXB_DEVICE_ID pServDev, void * arg, void * buf);
|
||||
int (*pollIntSwitch) (VXB_DEVICE_ID pServDev, void * arg);
|
||||
} MSG_TRANS_API;
|
||||
|
||||
#endif /* __INCvxbMsgSupportH */
|
||||
@@ -0,0 +1,64 @@
|
||||
/* vxbNonVol.h - Management of non-volatile memory devices */
|
||||
|
||||
/*
|
||||
* Copyright (c) 2006-2009 Wind River Systems, Inc.
|
||||
*
|
||||
* The right to copy, distribute, modify, or otherwise make use
|
||||
* of this software may be licensed only pursuant to the terms
|
||||
* of an applicable Wind River license agreement.
|
||||
*/
|
||||
|
||||
/*
|
||||
modification history
|
||||
--------------------
|
||||
01d,03nov09,h_k added hwConf.h header inclusion.
|
||||
01c,06may09,h_k updated for lp64 support.
|
||||
01b,26sep07,pmr fix apigen error
|
||||
01a,01Aug06,tor created
|
||||
*/
|
||||
|
||||
#ifndef INC_vxbNonVolH
|
||||
#define INC_vxbNonVolH
|
||||
|
||||
#include <hwif/vxbus/hwConf.h>
|
||||
|
||||
/* typedefs */
|
||||
|
||||
typedef struct nvRamSegment NVRAM_SEGMENT;
|
||||
|
||||
struct nvRamSegment
|
||||
{
|
||||
char * name;
|
||||
int unit;
|
||||
void * segAddr;
|
||||
size_t segSize;
|
||||
};
|
||||
|
||||
/* forward declarations */
|
||||
|
||||
IMPORT STATUS vxbNonVolGet
|
||||
(
|
||||
char * drvName, /* requestor's name */
|
||||
int drvUnit, /* requestor's unit number */
|
||||
char * buff, /* buffer to copy non-volatile RAM into */
|
||||
off_t offset, /* offset from start of allocation unit */
|
||||
size_t strLen /* maximum number of bytes to copy */
|
||||
);
|
||||
IMPORT STATUS vxbNonVolSet
|
||||
(
|
||||
char * drvName, /* requestor's name */
|
||||
int drvUnit, /* requestor's unit number */
|
||||
char * buff, /* buffer to copy from, into non-volatile RAM */
|
||||
off_t offset, /* offset from start of allocation unit */
|
||||
size_t strLen /* maximum number of bytes to copy */
|
||||
);
|
||||
IMPORT STATUS nvRamSegDefGet
|
||||
(
|
||||
VXB_DEVICE_ID pInst,
|
||||
HCF_DEVICE * pHcf,
|
||||
NVRAM_SEGMENT ** ppSegHd,
|
||||
int * pSegListCount
|
||||
);
|
||||
|
||||
#endif /* INC_vxbNonVolH */
|
||||
|
||||
@@ -0,0 +1,118 @@
|
||||
/* vxbParamSys.h - vxBus parameter system */
|
||||
|
||||
/*
|
||||
* Copyright (c) 2005, 2010 Wind River Systems, Inc.
|
||||
*
|
||||
* The right to copy, distribute or otherwise make use of this software
|
||||
* may be licensed only pursuant to the terms of an applicable Wind River
|
||||
* license agreement.
|
||||
*/
|
||||
|
||||
/*
|
||||
modification history
|
||||
--------------------
|
||||
02b,29apr10,pad Moved extern C statement after include statements.
|
||||
02a,29mar10,cwl add the function vxbInstUsrOptionGet. (WIND00204365)
|
||||
01a,07Nov05,tor created
|
||||
*/
|
||||
|
||||
#ifndef _INC_vxbParamSysH
|
||||
#define _INC_vxbParamSysH
|
||||
|
||||
/* includes */
|
||||
|
||||
#include <vxBusLib.h>
|
||||
#include <hwif/vxbus/vxBus.h>
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
/* defines */
|
||||
|
||||
/* define parameter types */
|
||||
|
||||
#define VXB_PARAM_END_OF_LIST 0x0000
|
||||
#define VXB_PARAM_INT32 0x0001
|
||||
#define VXB_PARAM_INT64 0x0002
|
||||
#define VXB_PARAM_STRING 0x0003
|
||||
#define VXB_PARAM_POINTER 0x0004
|
||||
#define VXB_PARAM_FUNCPTR 0x0005
|
||||
|
||||
/* typedefs */
|
||||
|
||||
/* BSP-resident table containing parameter override values */
|
||||
|
||||
typedef union vxbInstParamValue VXB_INST_PARAM_VALUE;
|
||||
union vxbInstParamValue
|
||||
{
|
||||
void * pValue;
|
||||
UINT32 int32Val;
|
||||
UINT64 int64Val;
|
||||
char * stringVal;
|
||||
FUNCPTR funcVal;
|
||||
};
|
||||
|
||||
typedef struct vxbInstParamOverride VXB_INST_PARAM_OVERRIDE;
|
||||
struct vxbInstParamOverride
|
||||
{
|
||||
char * instName;
|
||||
int unit;
|
||||
char * paramName;
|
||||
UINT32 paramType;
|
||||
union vxbInstParamValue value;
|
||||
};
|
||||
|
||||
/* driver default parameter values */
|
||||
|
||||
typedef struct vxbParams VXB_PARAMETERS;
|
||||
struct vxbParams
|
||||
{
|
||||
char * paramName;
|
||||
UINT32 paramType;
|
||||
union vxbInstParamValue value;
|
||||
};
|
||||
|
||||
/* globals */
|
||||
|
||||
/* locals */
|
||||
|
||||
/* forward declarations */
|
||||
|
||||
IMPORT STATUS vxbInstParamSet
|
||||
(
|
||||
VXB_DEVICE_ID pInst,
|
||||
char * paramName,
|
||||
UINT32 paramType,
|
||||
VXB_INST_PARAM_VALUE * value
|
||||
);
|
||||
IMPORT VXB_DEVICE_ID vxbInstByNameFind
|
||||
(
|
||||
char * instName,
|
||||
int unit
|
||||
);
|
||||
IMPORT STATUS vxbInstParamByNameGet
|
||||
(
|
||||
VXB_DEVICE_ID pInst,
|
||||
char * paramName,
|
||||
UINT32 paramType,
|
||||
union vxbInstParamValue * pValue
|
||||
);
|
||||
IMPORT STATUS vxbInstParamByIndexGet
|
||||
(
|
||||
VXB_DEVICE_ID pInst,
|
||||
int paramIndex,
|
||||
union vxbInstParamValue * pValue
|
||||
);
|
||||
IMPORT STATUS vxbInstUsrOptionGet
|
||||
(
|
||||
char * paramName,
|
||||
UINT32 paramType,
|
||||
VOID ** ppValue
|
||||
);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif /* _INC_vxbParamSysH */
|
||||
@@ -0,0 +1,73 @@
|
||||
/* vxbSmSupport.h - shared memory support library for VxBus drivers */
|
||||
|
||||
/*
|
||||
* Copyright (c) 2006-2007, 2011 Wind River Systems, Inc.
|
||||
*
|
||||
* The right to copy, distribute or otherwise make use of this software
|
||||
* may be licensed only pursuant to the terms of an applicable Wind River
|
||||
* license agreement.
|
||||
*/
|
||||
|
||||
/*
|
||||
modification history
|
||||
--------------------
|
||||
01c,06jan11,cfm Modified the prototype of sysBusTasHelper() to align with its
|
||||
definition. (WIND00236270)
|
||||
01b,07aug07,dtr Use extern for function ptrs.
|
||||
01a,06jul06,dtr written.
|
||||
*/
|
||||
|
||||
/*
|
||||
This module provides VxBus-compliant support for shared memory.
|
||||
*/
|
||||
|
||||
#ifndef __INCvxbSmSupporth
|
||||
#define __INCvxbSmSupporth
|
||||
|
||||
/* API function pointers */
|
||||
|
||||
struct sharedMemSupportAPI
|
||||
{
|
||||
FUNCPTR tas;
|
||||
FUNCPTR tasClear;
|
||||
FUNCPTR intGen;
|
||||
FUNCPTR intAck;
|
||||
FUNCPTR busIntInit;
|
||||
FUNCPTR mailboxInt;
|
||||
FUNCPTR mailboxEnable;
|
||||
FUNCPTR mailboxDisable;
|
||||
FUNCPTR mailboxIntInit;
|
||||
};
|
||||
|
||||
/* hooks */
|
||||
|
||||
extern void (*vxbBusTasClearHook)(char*);
|
||||
extern BOOL (*vxbBusTasHook)(char*);
|
||||
extern STATUS (*vxbBusIntGenHook)(int,int);
|
||||
extern STATUS (*vxbBusIntAckHook)(int);
|
||||
|
||||
/* function declarations */
|
||||
|
||||
void sysBusTasClearHelper
|
||||
(
|
||||
VXB_DEVICE_ID pInst,
|
||||
void * adrs
|
||||
);
|
||||
|
||||
void sysBusTasHelper
|
||||
(
|
||||
VXB_DEVICE_ID pInst,
|
||||
ULONG * adrs
|
||||
);
|
||||
void sysBusIntGenHelper
|
||||
(
|
||||
VXB_DEVICE_ID pInst,
|
||||
void * pArgs
|
||||
);
|
||||
void sysBusIntAckHelper
|
||||
(
|
||||
VXB_DEVICE_ID pInst,
|
||||
int intLevel
|
||||
);
|
||||
|
||||
#endif /* __INCvxbSmSupporth */
|
||||
Reference in New Issue
Block a user