Moved files from the ipc3x_dev branch in syslink_qnx repository into direct
authorVW <vwan@ti.com>
Tue, 5 Mar 2013 17:44:49 +0000 (09:44 -0800)
committerVW <vwan@ti.com>
Tue, 5 Mar 2013 17:44:49 +0000 (09:44 -0800)
ory qnx/src/ipc3x_dev

Reference point is https://gforge01.dal.design.ti.com/gf/project/syslink_qnx/scmgit/?p=syslink_qnx;a=shortlog;h=refs/heads/ipc3x_dev, commit id 0eafb4c5a0025248a745cf6c42a0e4e80c34d6b4

492 files changed:
qnx/src/ipc3x_dev/.cproject [new file with mode: 0644]
qnx/src/ipc3x_dev/.gitignore [new file with mode: 0644]
qnx/src/ipc3x_dev/.project [new file with mode: 0644]
qnx/src/ipc3x_dev/Makefile [new file with mode: 0644]
qnx/src/ipc3x_dev/ReadMe.txt [new file with mode: 0644]
qnx/src/ipc3x_dev/perfutils/Makefile [new file with mode: 0644]
qnx/src/ipc3x_dev/perfutils/PerfUtils.c [new file with mode: 0644]
qnx/src/ipc3x_dev/perfutils/PerfUtils.h [new file with mode: 0644]
qnx/src/ipc3x_dev/perfutils/arm/Makefile [new file with mode: 0644]
qnx/src/ipc3x_dev/perfutils/arm/so.le.v7/Makefile [new file with mode: 0644]
qnx/src/ipc3x_dev/perfutils/common.mk [new file with mode: 0644]
qnx/src/ipc3x_dev/sharedmemallocator/Makefile [new file with mode: 0644]
qnx/src/ipc3x_dev/sharedmemallocator/resmgr/Makefile [new file with mode: 0644]
qnx/src/ipc3x_dev/sharedmemallocator/resmgr/SharedMemoryAllocator.c [new file with mode: 0644]
qnx/src/ipc3x_dev/sharedmemallocator/resmgr/arm/Makefile [new file with mode: 0644]
qnx/src/ipc3x_dev/sharedmemallocator/resmgr/arm/le.v7/Makefile [new file with mode: 0644]
qnx/src/ipc3x_dev/sharedmemallocator/resmgr/common.mk [new file with mode: 0644]
qnx/src/ipc3x_dev/sharedmemallocator/resmgr/mmap_peer.c [new file with mode: 0644]
qnx/src/ipc3x_dev/sharedmemallocator/resmgr/public/ti/shmemallocator/SharedMemoryAllocator.h [new file with mode: 0644]
qnx/src/ipc3x_dev/sharedmemallocator/resmgr/shmemallocator.use [new file with mode: 0644]
qnx/src/ipc3x_dev/sharedmemallocator/samples/Makefile [new file with mode: 0644]
qnx/src/ipc3x_dev/sharedmemallocator/samples/sharedMemAllocator/Makefile [new file with mode: 0644]
qnx/src/ipc3x_dev/sharedmemallocator/samples/sharedMemAllocator/usr/Makefile [new file with mode: 0644]
qnx/src/ipc3x_dev/sharedmemallocator/samples/sharedMemAllocator/usr/SharedMemAllocator.c [new file with mode: 0644]
qnx/src/ipc3x_dev/sharedmemallocator/samples/sharedMemAllocator/usr/SharedMemoryAllocatorTestApp.use [new file with mode: 0644]
qnx/src/ipc3x_dev/sharedmemallocator/samples/sharedMemAllocator/usr/arm/Makefile [new file with mode: 0644]
qnx/src/ipc3x_dev/sharedmemallocator/samples/sharedMemAllocator/usr/arm/le.v7/Makefile [new file with mode: 0644]
qnx/src/ipc3x_dev/sharedmemallocator/samples/sharedMemAllocator/usr/common.mk [new file with mode: 0644]
qnx/src/ipc3x_dev/sharedmemallocator/usr/Makefile [new file with mode: 0644]
qnx/src/ipc3x_dev/sharedmemallocator/usr/SharedMemoryAllocator.c [new file with mode: 0644]
qnx/src/ipc3x_dev/sharedmemallocator/usr/arm/Makefile [new file with mode: 0644]
qnx/src/ipc3x_dev/sharedmemallocator/usr/arm/so.le.v7/Makefile [new file with mode: 0644]
qnx/src/ipc3x_dev/sharedmemallocator/usr/common.mk [new file with mode: 0644]
qnx/src/ipc3x_dev/sharedmemallocator/usr/public/ti/shmemallocator/SharedMemoryAllocatorUsr.h [new file with mode: 0644]
qnx/src/ipc3x_dev/ti/Makefile [new file with mode: 0644]
qnx/src/ipc3x_dev/ti/syslink/Makefile [new file with mode: 0644]
qnx/src/ipc3x_dev/ti/syslink/ProcMgr.h [new file with mode: 0644]
qnx/src/ipc3x_dev/ti/syslink/Std.h [new file with mode: 0644]
qnx/src/ipc3x_dev/ti/syslink/SysLink.h [new file with mode: 0644]
qnx/src/ipc3x_dev/ti/syslink/build/Makefile [new file with mode: 0644]
qnx/src/ipc3x_dev/ti/syslink/build/Qnx/Makefile [new file with mode: 0644]
qnx/src/ipc3x_dev/ti/syslink/build/Qnx/lib/Makefile [new file with mode: 0644]
qnx/src/ipc3x_dev/ti/syslink/build/Qnx/lib/arm/Makefile [new file with mode: 0644]
qnx/src/ipc3x_dev/ti/syslink/build/Qnx/lib/arm/so.le.v7/Makefile [new file with mode: 0644]
qnx/src/ipc3x_dev/ti/syslink/build/Qnx/lib/common.mk [new file with mode: 0644]
qnx/src/ipc3x_dev/ti/syslink/build/Qnx/resmgr/Makefile [new file with mode: 0644]
qnx/src/ipc3x_dev/ti/syslink/build/Qnx/resmgr/arm/Makefile [new file with mode: 0644]
qnx/src/ipc3x_dev/ti/syslink/build/Qnx/resmgr/arm/le.v7/Makefile [new file with mode: 0644]
qnx/src/ipc3x_dev/ti/syslink/build/Qnx/resmgr/common.mk [new file with mode: 0644]
qnx/src/ipc3x_dev/ti/syslink/build/Qnx/resmgr/proto.h [new file with mode: 0644]
qnx/src/ipc3x_dev/ti/syslink/build/Qnx/resmgr/syslink.use [new file with mode: 0644]
qnx/src/ipc3x_dev/ti/syslink/build/Qnx/resmgr/syslink_devctl.c [new file with mode: 0644]
qnx/src/ipc3x_dev/ti/syslink/build/Qnx/resmgr/syslink_main.c [new file with mode: 0644]
qnx/src/ipc3x_dev/ti/syslink/build/Qnx/traceDaemon/Makefile [new file with mode: 0644]
qnx/src/ipc3x_dev/ti/syslink/build/Qnx/traceDaemon/SyslinkTraceDaemon.c [new file with mode: 0644]
qnx/src/ipc3x_dev/ti/syslink/build/Qnx/traceDaemon/arm/Makefile [new file with mode: 0644]
qnx/src/ipc3x_dev/ti/syslink/build/Qnx/traceDaemon/arm/le.v7/Makefile [new file with mode: 0644]
qnx/src/ipc3x_dev/ti/syslink/build/Qnx/traceDaemon/common.mk [new file with mode: 0644]
qnx/src/ipc3x_dev/ti/syslink/build/Qnx/traceDaemon/syslink_trace_daemon.use [new file with mode: 0644]
qnx/src/ipc3x_dev/ti/syslink/family/common/ClockOps.c [new file with mode: 0644]
qnx/src/ipc3x_dev/ti/syslink/family/common/ti81xx/ti81xxdsp/Dm8168DspHal.c [new file with mode: 0644]
qnx/src/ipc3x_dev/ti/syslink/family/common/ti81xx/ti81xxdsp/Dm8168DspHalBoot.c [new file with mode: 0644]
qnx/src/ipc3x_dev/ti/syslink/family/common/ti81xx/ti81xxdsp/Dm8168DspHalReset.c [new file with mode: 0644]
qnx/src/ipc3x_dev/ti/syslink/family/common/ti81xx/ti81xxdsp/Dm8168DspPhyShmem.c [new file with mode: 0644]
qnx/src/ipc3x_dev/ti/syslink/family/common/ti81xx/ti81xxdsp/Dm8168DspProc.c [new file with mode: 0644]
qnx/src/ipc3x_dev/ti/syslink/family/common/ti81xx/ti81xxdsp/Dm8168DspPwr.c [new file with mode: 0644]
qnx/src/ipc3x_dev/ti/syslink/family/common/ti81xx/ti81xxducati/Dm8168DucatiMmu.c [new file with mode: 0644]
qnx/src/ipc3x_dev/ti/syslink/family/common/ti81xx/ti81xxducati/Dm8168DucatiPwr.c [new file with mode: 0644]
qnx/src/ipc3x_dev/ti/syslink/family/common/ti81xx/ti81xxducati/ti81xxvideom3/Dm8168M3VideoHal.c [new file with mode: 0644]
qnx/src/ipc3x_dev/ti/syslink/family/common/ti81xx/ti81xxducati/ti81xxvideom3/Dm8168M3VideoHalBoot.c [new file with mode: 0644]
qnx/src/ipc3x_dev/ti/syslink/family/common/ti81xx/ti81xxducati/ti81xxvideom3/Dm8168M3VideoHalReset.c [new file with mode: 0644]
qnx/src/ipc3x_dev/ti/syslink/family/common/ti81xx/ti81xxducati/ti81xxvideom3/Dm8168M3VideoPhyShmem.c [new file with mode: 0644]
qnx/src/ipc3x_dev/ti/syslink/family/common/ti81xx/ti81xxducati/ti81xxvideom3/Dm8168M3VideoProc.c [new file with mode: 0644]
qnx/src/ipc3x_dev/ti/syslink/family/common/ti81xx/ti81xxducati/ti81xxvpssm3/Dm8168M3DssHal.c [new file with mode: 0644]
qnx/src/ipc3x_dev/ti/syslink/family/common/ti81xx/ti81xxducati/ti81xxvpssm3/Dm8168M3DssHalBoot.c [new file with mode: 0644]
qnx/src/ipc3x_dev/ti/syslink/family/common/ti81xx/ti81xxducati/ti81xxvpssm3/Dm8168M3DssHalReset.c [new file with mode: 0644]
qnx/src/ipc3x_dev/ti/syslink/family/common/ti81xx/ti81xxducati/ti81xxvpssm3/Dm8168M3DssPhyShmem.c [new file with mode: 0644]
qnx/src/ipc3x_dev/ti/syslink/family/common/ti81xx/ti81xxducati/ti81xxvpssm3/Dm8168M3DssProc.c [new file with mode: 0644]
qnx/src/ipc3x_dev/ti/syslink/family/hlos/knl/ti81xx/Platform.c [new file with mode: 0644]
qnx/src/ipc3x_dev/ti/syslink/family/hlos/knl/ti81xx/Qnx/Cache.c [new file with mode: 0644]
qnx/src/ipc3x_dev/ti/syslink/family/hlos/knl/ti81xx/ti81xxdsp/Dm8168DspHalMmu.c [new file with mode: 0644]
qnx/src/ipc3x_dev/ti/syslink/family/hlos/knl/ti81xx/ti81xxducati/ti81xxvideom3/Dm8168M3VideoHalMmu.c [new file with mode: 0644]
qnx/src/ipc3x_dev/ti/syslink/family/hlos/knl/ti81xx/ti81xxducati/ti81xxvpssm3/Dm8168M3DssHalMmu.c [new file with mode: 0644]
qnx/src/ipc3x_dev/ti/syslink/family/omap4430/Platform.c [new file with mode: 0644]
qnx/src/ipc3x_dev/ti/syslink/family/omap4430/ipu/GlobalTypes.h [new file with mode: 0644]
qnx/src/ipc3x_dev/ti/syslink/family/omap4430/ipu/MMUAccInt.h [new file with mode: 0644]
qnx/src/ipc3x_dev/ti/syslink/family/omap4430/ipu/MMURegAcM.h [new file with mode: 0644]
qnx/src/ipc3x_dev/ti/syslink/family/omap4430/ipu/OMAP4430DucatiPhyShmem.c [new file with mode: 0644]
qnx/src/ipc3x_dev/ti/syslink/family/omap4430/ipu/hw_defs.h [new file with mode: 0644]
qnx/src/ipc3x_dev/ti/syslink/family/omap4430/ipu/hw_mmu.c [new file with mode: 0644]
qnx/src/ipc3x_dev/ti/syslink/family/omap4430/ipu/hw_mmu.h [new file with mode: 0644]
qnx/src/ipc3x_dev/ti/syslink/family/omap4430/ipu/omap4430Dmm.c [new file with mode: 0644]
qnx/src/ipc3x_dev/ti/syslink/family/omap4430/ipu/omap4430DucatiEnabler.c [new file with mode: 0644]
qnx/src/ipc3x_dev/ti/syslink/family/omap4430/ipu/omap4430DucatiHal.c [new file with mode: 0644]
qnx/src/ipc3x_dev/ti/syslink/family/omap4430/ipu/omap4430DucatiHalMmu.c [new file with mode: 0644]
qnx/src/ipc3x_dev/ti/syslink/family/omap4430/ipu/omap4430DucatiHalReset.c [new file with mode: 0644]
qnx/src/ipc3x_dev/ti/syslink/family/omap4430/ipu/omap4430DucatiProc.c [new file with mode: 0644]
qnx/src/ipc3x_dev/ti/syslink/family/omap5430/Platform.c [new file with mode: 0644]
qnx/src/ipc3x_dev/ti/syslink/family/omap5430/ipu/GlobalTypes.h [new file with mode: 0644]
qnx/src/ipc3x_dev/ti/syslink/family/omap5430/ipu/MMUAccInt.h [new file with mode: 0644]
qnx/src/ipc3x_dev/ti/syslink/family/omap5430/ipu/MMURegAcM.h [new file with mode: 0644]
qnx/src/ipc3x_dev/ti/syslink/family/omap5430/ipu/OMAP5430BenelliPhyShmem.c [new file with mode: 0644]
qnx/src/ipc3x_dev/ti/syslink/family/omap5430/ipu/hw_defs.h [new file with mode: 0644]
qnx/src/ipc3x_dev/ti/syslink/family/omap5430/ipu/hw_mmu.c [new file with mode: 0644]
qnx/src/ipc3x_dev/ti/syslink/family/omap5430/ipu/hw_mmu.h [new file with mode: 0644]
qnx/src/ipc3x_dev/ti/syslink/family/omap5430/ipu/omap5430BenelliEnabler.c [new file with mode: 0644]
qnx/src/ipc3x_dev/ti/syslink/family/omap5430/ipu/omap5430BenelliHal.c [new file with mode: 0644]
qnx/src/ipc3x_dev/ti/syslink/family/omap5430/ipu/omap5430BenelliHalMmu.c [new file with mode: 0644]
qnx/src/ipc3x_dev/ti/syslink/family/omap5430/ipu/omap5430BenelliHalReset.c [new file with mode: 0644]
qnx/src/ipc3x_dev/ti/syslink/family/omap5430/ipu/omap5430BenelliProc.c [new file with mode: 0644]
qnx/src/ipc3x_dev/ti/syslink/family/omap5430/ipu/omap5430Dmm.c [new file with mode: 0644]
qnx/src/ipc3x_dev/ti/syslink/headers/Makefile [new file with mode: 0644]
qnx/src/ipc3x_dev/ti/syslink/inc/Bitops.h [new file with mode: 0644]
qnx/src/ipc3x_dev/ti/syslink/inc/ClockOps.h [new file with mode: 0644]
qnx/src/ipc3x_dev/ti/syslink/inc/Dm8168Clock.h [new file with mode: 0644]
qnx/src/ipc3x_dev/ti/syslink/inc/ElfLoader.h [new file with mode: 0644]
qnx/src/ipc3x_dev/ti/syslink/inc/GateHWSpinlock.h [new file with mode: 0644]
qnx/src/ipc3x_dev/ti/syslink/inc/HwSpinLockCmdBase.h [new file with mode: 0644]
qnx/src/ipc3x_dev/ti/syslink/inc/IGateMPSupport.h [new file with mode: 0644]
qnx/src/ipc3x_dev/ti/syslink/inc/IObject.h [new file with mode: 0644]
qnx/src/ipc3x_dev/ti/syslink/inc/IpcCmdBase.h [new file with mode: 0644]
qnx/src/ipc3x_dev/ti/syslink/inc/MessageQCopyDrvDefs.h [new file with mode: 0644]
qnx/src/ipc3x_dev/ti/syslink/inc/MultiProcDrvDefs.h [new file with mode: 0644]
qnx/src/ipc3x_dev/ti/syslink/inc/OsalMutex.h [new file with mode: 0644]
qnx/src/ipc3x_dev/ti/syslink/inc/Qnx/atomic_qnx.h [new file with mode: 0644]
qnx/src/ipc3x_dev/ti/syslink/inc/Qnx/std_qnx.h [new file with mode: 0644]
qnx/src/ipc3x_dev/ti/syslink/inc/TraceDrv.h [new file with mode: 0644]
qnx/src/ipc3x_dev/ti/syslink/inc/TraceDrvDefs.h [new file with mode: 0644]
qnx/src/ipc3x_dev/ti/syslink/inc/UtilsCmdBase.h [new file with mode: 0644]
qnx/src/ipc3x_dev/ti/syslink/inc/_Ipc.h [new file with mode: 0644]
qnx/src/ipc3x_dev/ti/syslink/inc/_MessageQCopy.h [new file with mode: 0644]
qnx/src/ipc3x_dev/ti/syslink/inc/_MultiProc.h [new file with mode: 0644]
qnx/src/ipc3x_dev/ti/syslink/inc/_MultiProcPlat.h [new file with mode: 0644]
qnx/src/ipc3x_dev/ti/syslink/inc/_ProcMgr.h [new file with mode: 0644]
qnx/src/ipc3x_dev/ti/syslink/inc/knl/ArchIpcInt.h [new file with mode: 0644]
qnx/src/ipc3x_dev/ti/syslink/inc/knl/Dm8168DspHal.h [new file with mode: 0644]
qnx/src/ipc3x_dev/ti/syslink/inc/knl/Dm8168DspHalBoot.h [new file with mode: 0644]
qnx/src/ipc3x_dev/ti/syslink/inc/knl/Dm8168DspHalMmu.h [new file with mode: 0644]
qnx/src/ipc3x_dev/ti/syslink/inc/knl/Dm8168DspHalReset.h [new file with mode: 0644]
qnx/src/ipc3x_dev/ti/syslink/inc/knl/Dm8168DspPhyShmem.h [new file with mode: 0644]
qnx/src/ipc3x_dev/ti/syslink/inc/knl/Dm8168DspProc.h [new file with mode: 0644]
qnx/src/ipc3x_dev/ti/syslink/inc/knl/Dm8168DspPwr.h [new file with mode: 0644]
qnx/src/ipc3x_dev/ti/syslink/inc/knl/Dm8168DucatiPwr.h [new file with mode: 0644]
qnx/src/ipc3x_dev/ti/syslink/inc/knl/Dm8168IpcInt.h [new file with mode: 0644]
qnx/src/ipc3x_dev/ti/syslink/inc/knl/Dm8168M3DssHal.h [new file with mode: 0644]
qnx/src/ipc3x_dev/ti/syslink/inc/knl/Dm8168M3DssHalBoot.h [new file with mode: 0644]
qnx/src/ipc3x_dev/ti/syslink/inc/knl/Dm8168M3DssHalMmu.h [new file with mode: 0644]
qnx/src/ipc3x_dev/ti/syslink/inc/knl/Dm8168M3DssHalReset.h [new file with mode: 0644]
qnx/src/ipc3x_dev/ti/syslink/inc/knl/Dm8168M3DssPhyShmem.h [new file with mode: 0644]
qnx/src/ipc3x_dev/ti/syslink/inc/knl/Dm8168M3DssProc.h [new file with mode: 0644]
qnx/src/ipc3x_dev/ti/syslink/inc/knl/Dm8168M3VideoHal.h [new file with mode: 0644]
qnx/src/ipc3x_dev/ti/syslink/inc/knl/Dm8168M3VideoHalBoot.h [new file with mode: 0644]
qnx/src/ipc3x_dev/ti/syslink/inc/knl/Dm8168M3VideoHalMmu.h [new file with mode: 0644]
qnx/src/ipc3x_dev/ti/syslink/inc/knl/Dm8168M3VideoHalReset.h [new file with mode: 0644]
qnx/src/ipc3x_dev/ti/syslink/inc/knl/Dm8168M3VideoPhyShmem.h [new file with mode: 0644]
qnx/src/ipc3x_dev/ti/syslink/inc/knl/Dm8168M3VideoProc.h [new file with mode: 0644]
qnx/src/ipc3x_dev/ti/syslink/inc/knl/IpcKnl.h [new file with mode: 0644]
qnx/src/ipc3x_dev/ti/syslink/inc/knl/Linux/Dm8168DucatiMmu.h [new file with mode: 0644]
qnx/src/ipc3x_dev/ti/syslink/inc/knl/Loader.h [new file with mode: 0644]
qnx/src/ipc3x_dev/ti/syslink/inc/knl/LoaderDefs.h [new file with mode: 0644]
qnx/src/ipc3x_dev/ti/syslink/inc/knl/OMAP4430Dmm.h [new file with mode: 0644]
qnx/src/ipc3x_dev/ti/syslink/inc/knl/OMAP4430DucatiEnabler.h [new file with mode: 0644]
qnx/src/ipc3x_dev/ti/syslink/inc/knl/OMAP4430DucatiHal.h [new file with mode: 0644]
qnx/src/ipc3x_dev/ti/syslink/inc/knl/OMAP4430DucatiHalMmu.h [new file with mode: 0644]
qnx/src/ipc3x_dev/ti/syslink/inc/knl/OMAP4430DucatiHalReset.h [new file with mode: 0644]
qnx/src/ipc3x_dev/ti/syslink/inc/knl/OMAP4430DucatiPhyShmem.h [new file with mode: 0644]
qnx/src/ipc3x_dev/ti/syslink/inc/knl/OMAP4430DucatiProc.h [new file with mode: 0644]
qnx/src/ipc3x_dev/ti/syslink/inc/knl/OMAP5430BenelliEnabler.h [new file with mode: 0644]
qnx/src/ipc3x_dev/ti/syslink/inc/knl/OMAP5430BenelliHal.h [new file with mode: 0644]
qnx/src/ipc3x_dev/ti/syslink/inc/knl/OMAP5430BenelliHalMmu.h [new file with mode: 0644]
qnx/src/ipc3x_dev/ti/syslink/inc/knl/OMAP5430BenelliHalReset.h [new file with mode: 0644]
qnx/src/ipc3x_dev/ti/syslink/inc/knl/OMAP5430BenelliPhyShmem.h [new file with mode: 0644]
qnx/src/ipc3x_dev/ti/syslink/inc/knl/OMAP5430BenelliProc.h [new file with mode: 0644]
qnx/src/ipc3x_dev/ti/syslink/inc/knl/OMAP5430Dmm.h [new file with mode: 0644]
qnx/src/ipc3x_dev/ti/syslink/inc/knl/Omap4430IpcInt.h [new file with mode: 0644]
qnx/src/ipc3x_dev/ti/syslink/inc/knl/Omap5430IpcInt.h [new file with mode: 0644]
qnx/src/ipc3x_dev/ti/syslink/inc/knl/OsalDelay.h [new file with mode: 0644]
qnx/src/ipc3x_dev/ti/syslink/inc/knl/OsalDriver.h [new file with mode: 0644]
qnx/src/ipc3x_dev/ti/syslink/inc/knl/OsalDrv.h [new file with mode: 0644]
qnx/src/ipc3x_dev/ti/syslink/inc/knl/OsalEvent.h [new file with mode: 0644]
qnx/src/ipc3x_dev/ti/syslink/inc/knl/OsalIsr.h [new file with mode: 0644]
qnx/src/ipc3x_dev/ti/syslink/inc/knl/OsalKfile.h [new file with mode: 0644]
qnx/src/ipc3x_dev/ti/syslink/inc/knl/OsalSemaphore.h [new file with mode: 0644]
qnx/src/ipc3x_dev/ti/syslink/inc/knl/OsalSpinlock.h [new file with mode: 0644]
qnx/src/ipc3x_dev/ti/syslink/inc/knl/OsalThread.h [new file with mode: 0644]
qnx/src/ipc3x_dev/ti/syslink/inc/knl/Platform.h [new file with mode: 0644]
qnx/src/ipc3x_dev/ti/syslink/inc/knl/ProcDefs.h [new file with mode: 0644]
qnx/src/ipc3x_dev/ti/syslink/inc/knl/Processor.h [new file with mode: 0644]
qnx/src/ipc3x_dev/ti/syslink/inc/knl/PwrDefs.h [new file with mode: 0644]
qnx/src/ipc3x_dev/ti/syslink/inc/knl/PwrMgr.h [new file with mode: 0644]
qnx/src/ipc3x_dev/ti/syslink/inc/knl/Qnx/ProcMgrDrv.h [new file with mode: 0644]
qnx/src/ipc3x_dev/ti/syslink/inc/knl/VirtQueue.h [new file with mode: 0644]
qnx/src/ipc3x_dev/ti/syslink/inc/knl/_ArchIpcInt.h [new file with mode: 0644]
qnx/src/ipc3x_dev/ti/syslink/inc/knl/_Dm8168DspProc.h [new file with mode: 0644]
qnx/src/ipc3x_dev/ti/syslink/inc/knl/_Dm8168DspPwr.h [new file with mode: 0644]
qnx/src/ipc3x_dev/ti/syslink/inc/knl/_Dm8168DucatiPwr.h [new file with mode: 0644]
qnx/src/ipc3x_dev/ti/syslink/inc/knl/_Dm8168IpcInt.h [new file with mode: 0644]
qnx/src/ipc3x_dev/ti/syslink/inc/knl/_Dm8168M3DssProc.h [new file with mode: 0644]
qnx/src/ipc3x_dev/ti/syslink/inc/knl/_Dm8168M3VideoProc.h [new file with mode: 0644]
qnx/src/ipc3x_dev/ti/syslink/inc/knl/_ElfLoader.h [new file with mode: 0644]
qnx/src/ipc3x_dev/ti/syslink/inc/knl/_Omap4430IpcInt.h [new file with mode: 0644]
qnx/src/ipc3x_dev/ti/syslink/inc/knl/_Omap5430IpcInt.h [new file with mode: 0644]
qnx/src/ipc3x_dev/ti/syslink/inc/knl/_ProcDefs.h [new file with mode: 0644]
qnx/src/ipc3x_dev/ti/syslink/inc/knl/_rprcloader.h [new file with mode: 0644]
qnx/src/ipc3x_dev/ti/syslink/inc/rprcloader.h [new file with mode: 0644]
qnx/src/ipc3x_dev/ti/syslink/inc/ti/ipc/HwSpinLockUsr.h [new file with mode: 0644]
qnx/src/ipc3x_dev/ti/syslink/inc/ti/ipc/Ipc.h [new file with mode: 0644]
qnx/src/ipc3x_dev/ti/syslink/inc/ti/ipc/MessageQCopy.h [new file with mode: 0644]
qnx/src/ipc3x_dev/ti/syslink/inc/ti/ipc/MultiProc.h [new file with mode: 0644]
qnx/src/ipc3x_dev/ti/syslink/inc/ti/ipc/rpmsg_dce.h [new file with mode: 0644]
qnx/src/ipc3x_dev/ti/syslink/inc/ti/ipc/rpmsg_omx.h [new file with mode: 0644]
qnx/src/ipc3x_dev/ti/syslink/inc/ti/ipc/ti_ipc.h [new file with mode: 0644]
qnx/src/ipc3x_dev/ti/syslink/inc/usr/Qnx/MessageQCopyDrv.h [new file with mode: 0644]
qnx/src/ipc3x_dev/ti/syslink/ipc/hlos/knl/GateHWSpinlock.c [new file with mode: 0644]
qnx/src/ipc3x_dev/ti/syslink/ipc/hlos/knl/Ipc.c [new file with mode: 0644]
qnx/src/ipc3x_dev/ti/syslink/ipc/hlos/knl/MessageQCopy.c [new file with mode: 0644]
qnx/src/ipc3x_dev/ti/syslink/ipc/hlos/knl/Qnx/MessageQCopyDrv.c [new file with mode: 0644]
qnx/src/ipc3x_dev/ti/syslink/ipc/hlos/knl/_MessageQCopyDefs.h [new file with mode: 0644]
qnx/src/ipc3x_dev/ti/syslink/ipc/hlos/knl/arch/ArchIpcInt.c [new file with mode: 0644]
qnx/src/ipc3x_dev/ti/syslink/ipc/hlos/knl/arch/omap4430/Omap4430IpcInt.c [new file with mode: 0644]
qnx/src/ipc3x_dev/ti/syslink/ipc/hlos/knl/arch/omap5430/Omap5430IpcInt.c [new file with mode: 0644]
qnx/src/ipc3x_dev/ti/syslink/ipc/hlos/knl/arch/ti81xx/Dm8168IpcInt.c [new file with mode: 0644]
qnx/src/ipc3x_dev/ti/syslink/ipc/hlos/knl/rpmsg.h [new file with mode: 0644]
qnx/src/ipc3x_dev/ti/syslink/ipc/hlos/knl/transports/virtio/VirtQueue.c [new file with mode: 0644]
qnx/src/ipc3x_dev/ti/syslink/ipc/hlos/knl/transports/virtio/_rpmsg.h [new file with mode: 0644]
qnx/src/ipc3x_dev/ti/syslink/ipc/hlos/knl/transports/virtio/virtio_ring.h [new file with mode: 0644]
qnx/src/ipc3x_dev/ti/syslink/ipc/hlos/usr/HwSpinLock.c [new file with mode: 0644]
qnx/src/ipc3x_dev/ti/syslink/ipc/hlos/usr/MessageQCopy.c [new file with mode: 0644]
qnx/src/ipc3x_dev/ti/syslink/ipc/hlos/usr/Qnx/MessageQCopyDrv.c [new file with mode: 0644]
qnx/src/ipc3x_dev/ti/syslink/procMgr/hlos/knl/Loader.c [new file with mode: 0644]
qnx/src/ipc3x_dev/ti/syslink/procMgr/hlos/knl/ProcMgr.c [new file with mode: 0644]
qnx/src/ipc3x_dev/ti/syslink/procMgr/hlos/knl/Processor.c [new file with mode: 0644]
qnx/src/ipc3x_dev/ti/syslink/procMgr/hlos/knl/PwrMgr.c [new file with mode: 0644]
qnx/src/ipc3x_dev/ti/syslink/procMgr/hlos/knl/loaders/Elf/Qnx/DLOAD/C60_DLOAD_DYN/Makefile.inc [new file with mode: 0644]
qnx/src/ipc3x_dev/ti/syslink/procMgr/hlos/knl/loaders/Elf/Qnx/DLOAD/C60_DLOAD_DYN/c60_dynamic.c [new file with mode: 0644]
qnx/src/ipc3x_dev/ti/syslink/procMgr/hlos/knl/loaders/Elf/Qnx/DLOAD/C60_DLOAD_DYN/c60_dynamic.h [new file with mode: 0644]
qnx/src/ipc3x_dev/ti/syslink/procMgr/hlos/knl/loaders/Elf/Qnx/DLOAD/C60_DLOAD_DYN/c60_elf32.h [new file with mode: 0644]
qnx/src/ipc3x_dev/ti/syslink/procMgr/hlos/knl/loaders/Elf/Qnx/DLOAD/C60_DLOAD_REL/Makefile.inc [new file with mode: 0644]
qnx/src/ipc3x_dev/ti/syslink/procMgr/hlos/knl/loaders/Elf/Qnx/DLOAD/C60_DLOAD_REL/c60_reloc.c [new file with mode: 0644]
qnx/src/ipc3x_dev/ti/syslink/procMgr/hlos/knl/loaders/Elf/Qnx/DLOAD/C60_DLOAD_REL/test_c60_reloc.h [new file with mode: 0644]
qnx/src/ipc3x_dev/ti/syslink/procMgr/hlos/knl/loaders/Elf/Qnx/DLOAD/DLOAD/ArrayList.c [new file with mode: 0644]
qnx/src/ipc3x_dev/ti/syslink/procMgr/hlos/knl/loaders/Elf/Qnx/DLOAD/DLOAD/ArrayList.h [new file with mode: 0644]
qnx/src/ipc3x_dev/ti/syslink/procMgr/hlos/knl/loaders/Elf/Qnx/DLOAD/DLOAD/Makefile.inc [new file with mode: 0644]
qnx/src/ipc3x_dev/ti/syslink/procMgr/hlos/knl/loaders/Elf/Qnx/DLOAD/DLOAD/Queue.h [new file with mode: 0644]
qnx/src/ipc3x_dev/ti/syslink/procMgr/hlos/knl/loaders/Elf/Qnx/DLOAD/DLOAD/dload.c [new file with mode: 0644]
qnx/src/ipc3x_dev/ti/syslink/procMgr/hlos/knl/loaders/Elf/Qnx/DLOAD/DLOAD/dload.h [new file with mode: 0644]
qnx/src/ipc3x_dev/ti/syslink/procMgr/hlos/knl/loaders/Elf/Qnx/DLOAD/DLOAD/dload_endian.c [new file with mode: 0644]
qnx/src/ipc3x_dev/ti/syslink/procMgr/hlos/knl/loaders/Elf/Qnx/DLOAD/DLOAD/dload_endian.h [new file with mode: 0644]
qnx/src/ipc3x_dev/ti/syslink/procMgr/hlos/knl/loaders/Elf/Qnx/DLOAD/DLOAD/elf32.c [new file with mode: 0644]
qnx/src/ipc3x_dev/ti/syslink/procMgr/hlos/knl/loaders/Elf/Qnx/DLOAD/DLOAD/elf32.h [new file with mode: 0644]
qnx/src/ipc3x_dev/ti/syslink/procMgr/hlos/knl/loaders/Elf/Qnx/DLOAD/DLOAD/relocate.h [new file with mode: 0644]
qnx/src/ipc3x_dev/ti/syslink/procMgr/hlos/knl/loaders/Elf/Qnx/DLOAD/DLOAD/symtab.h [new file with mode: 0644]
qnx/src/ipc3x_dev/ti/syslink/procMgr/hlos/knl/loaders/Elf/Qnx/DLOAD/DLOAD/util.h [new file with mode: 0644]
qnx/src/ipc3x_dev/ti/syslink/procMgr/hlos/knl/loaders/Elf/Qnx/DLOAD/DLOAD/version.h [new file with mode: 0644]
qnx/src/ipc3x_dev/ti/syslink/procMgr/hlos/knl/loaders/Elf/Qnx/DLOAD/DLOAD_API/api_version_change.log [new file with mode: 0644]
qnx/src/ipc3x_dev/ti/syslink/procMgr/hlos/knl/loaders/Elf/Qnx/DLOAD/DLOAD_API/dload_api.h [new file with mode: 0644]
qnx/src/ipc3x_dev/ti/syslink/procMgr/hlos/knl/loaders/Elf/Qnx/DLOAD/DLOAD_SYM/Makefile.inc [new file with mode: 0644]
qnx/src/ipc3x_dev/ti/syslink/procMgr/hlos/knl/loaders/Elf/Qnx/DLOAD/DLOAD_SYM/symtab.c [new file with mode: 0644]
qnx/src/ipc3x_dev/ti/syslink/procMgr/hlos/knl/loaders/Elf/Qnx/DLOAD/DLWRAPPER/Makefile.ridl [new file with mode: 0644]
qnx/src/ipc3x_dev/ti/syslink/procMgr/hlos/knl/loaders/Elf/Qnx/DLOAD/DLWRAPPER/arm_export.cmd [new file with mode: 0644]
qnx/src/ipc3x_dev/ti/syslink/procMgr/hlos/knl/loaders/Elf/Qnx/DLOAD/DLWRAPPER/c60_export.cmd [new file with mode: 0644]
qnx/src/ipc3x_dev/ti/syslink/procMgr/hlos/knl/loaders/Elf/Qnx/DLOAD/DLWRAPPER/dlmodules.c [new file with mode: 0644]
qnx/src/ipc3x_dev/ti/syslink/procMgr/hlos/knl/loaders/Elf/Qnx/DLOAD/DLWRAPPER/dlw.c [new file with mode: 0644]
qnx/src/ipc3x_dev/ti/syslink/procMgr/hlos/knl/loaders/Elf/Qnx/DLOAD/DLWRAPPER/dlw_client.c [new file with mode: 0644]
qnx/src/ipc3x_dev/ti/syslink/procMgr/hlos/knl/loaders/Elf/Qnx/DLOAD/DLWRAPPER/dlw_debug.c [new file with mode: 0644]
qnx/src/ipc3x_dev/ti/syslink/procMgr/hlos/knl/loaders/Elf/Qnx/DLOAD/DLWRAPPER/dlw_debug.h [new file with mode: 0644]
qnx/src/ipc3x_dev/ti/syslink/procMgr/hlos/knl/loaders/Elf/Qnx/DLOAD/DLWRAPPER/dlw_trgmem.c [new file with mode: 0644]
qnx/src/ipc3x_dev/ti/syslink/procMgr/hlos/knl/loaders/Elf/Qnx/DLOAD/DLWRAPPER/dlw_trgmem.h [new file with mode: 0644]
qnx/src/ipc3x_dev/ti/syslink/procMgr/hlos/knl/loaders/Elf/Qnx/DLOAD/DLWRAPPER/read_me_dlwrapper.txt [new file with mode: 0644]
qnx/src/ipc3x_dev/ti/syslink/procMgr/hlos/knl/loaders/Elf/Qnx/DLOAD/Makefile [new file with mode: 0644]
qnx/src/ipc3x_dev/ti/syslink/procMgr/hlos/knl/loaders/Elf/Qnx/DLOAD/TMS470_DLOAD_DYN/Makefile.inc [new file with mode: 0644]
qnx/src/ipc3x_dev/ti/syslink/procMgr/hlos/knl/loaders/Elf/Qnx/DLOAD/TMS470_DLOAD_DYN/arm_dynamic.c [new file with mode: 0644]
qnx/src/ipc3x_dev/ti/syslink/procMgr/hlos/knl/loaders/Elf/Qnx/DLOAD/TMS470_DLOAD_DYN/arm_dynamic.h [new file with mode: 0644]
qnx/src/ipc3x_dev/ti/syslink/procMgr/hlos/knl/loaders/Elf/Qnx/DLOAD/TMS470_DLOAD_DYN/arm_elf32.h [new file with mode: 0644]
qnx/src/ipc3x_dev/ti/syslink/procMgr/hlos/knl/loaders/Elf/Qnx/DLOAD/TMS470_DLOAD_REL/Makefile.inc [new file with mode: 0644]
qnx/src/ipc3x_dev/ti/syslink/procMgr/hlos/knl/loaders/Elf/Qnx/DLOAD/TMS470_DLOAD_REL/arm_reloc.c [new file with mode: 0644]
qnx/src/ipc3x_dev/ti/syslink/procMgr/hlos/knl/loaders/Elf/Qnx/DLOAD/TMS470_DLOAD_REL/test_arm_reloc.h [new file with mode: 0644]
qnx/src/ipc3x_dev/ti/syslink/procMgr/hlos/knl/loaders/Elf/Qnx/DLOAD/lnk.cmd [new file with mode: 0644]
qnx/src/ipc3x_dev/ti/syslink/procMgr/hlos/knl/loaders/Elf/Qnx/ElfLoader.c [new file with mode: 0644]
qnx/src/ipc3x_dev/ti/syslink/procMgr/hlos/knl/loaders/Elf/Qnx/Makefile.inc [new file with mode: 0644]
qnx/src/ipc3x_dev/ti/syslink/procMgr/hlos/knl/loaders/Elf/Qnx/dlw_client/Makefile.inc [new file with mode: 0644]
qnx/src/ipc3x_dev/ti/syslink/procMgr/hlos/knl/loaders/Elf/Qnx/dlw_client/Stack.h [new file with mode: 0644]
qnx/src/ipc3x_dev/ti/syslink/procMgr/hlos/knl/loaders/Elf/Qnx/dlw_client/dlw_client.c [new file with mode: 0644]
qnx/src/ipc3x_dev/ti/syslink/procMgr/hlos/knl/loaders/Elf/Qnx/dlw_client/dlw_dsbt.c [new file with mode: 0644]
qnx/src/ipc3x_dev/ti/syslink/procMgr/hlos/knl/loaders/Elf/Qnx/dlw_client/dlw_dsbt.h [new file with mode: 0644]
qnx/src/ipc3x_dev/ti/syslink/procMgr/hlos/knl/loaders/rprc/readrprc.c [new file with mode: 0644]
qnx/src/ipc3x_dev/ti/syslink/procMgr/hlos/knl/loaders/rprc/rprcfmt.h [new file with mode: 0644]
qnx/src/ipc3x_dev/ti/syslink/procMgr/hlos/knl/loaders/rprc/rprcloader.c [new file with mode: 0644]
qnx/src/ipc3x_dev/ti/syslink/resources/RscTable.c [new file with mode: 0644]
qnx/src/ipc3x_dev/ti/syslink/resources/RscTable.h [new file with mode: 0644]
qnx/src/ipc3x_dev/ti/syslink/resources/rsc_types.h [new file with mode: 0644]
qnx/src/ipc3x_dev/ti/syslink/rpmsg-dce/hlos/knl/Qnx/rpmsg-dcedrv.c [new file with mode: 0644]
qnx/src/ipc3x_dev/ti/syslink/rpmsg-dce/hlos/knl/Qnx/rpmsg-dcedrv.h [new file with mode: 0644]
qnx/src/ipc3x_dev/ti/syslink/rpmsg-omx/hlos/knl/Qnx/mmap_peer.c [new file with mode: 0644]
qnx/src/ipc3x_dev/ti/syslink/rpmsg-omx/hlos/knl/Qnx/rpmsg-omxdrv.c [new file with mode: 0644]
qnx/src/ipc3x_dev/ti/syslink/rpmsg-omx/hlos/knl/Qnx/rpmsg-omxdrv.h [new file with mode: 0644]
qnx/src/ipc3x_dev/ti/syslink/rpmsg-resmgr/hlos/knl/Qnx/SysLinkMemUtils.c [new file with mode: 0644]
qnx/src/ipc3x_dev/ti/syslink/rpmsg-resmgr/hlos/knl/Qnx/SysLinkMemUtils.h [new file with mode: 0644]
qnx/src/ipc3x_dev/ti/syslink/rpmsg-resmgr/hlos/knl/Qnx/family/ipu_pm.h [new file with mode: 0644]
qnx/src/ipc3x_dev/ti/syslink/rpmsg-resmgr/hlos/knl/Qnx/family/omap4430/_ipu_pm.h [new file with mode: 0644]
qnx/src/ipc3x_dev/ti/syslink/rpmsg-resmgr/hlos/knl/Qnx/family/omap4430/ipu_pm.c [new file with mode: 0644]
qnx/src/ipc3x_dev/ti/syslink/rpmsg-resmgr/hlos/knl/Qnx/family/omap5430/_ipu_pm.h [new file with mode: 0644]
qnx/src/ipc3x_dev/ti/syslink/rpmsg-resmgr/hlos/knl/Qnx/family/omap5430/ipu_pm.c [new file with mode: 0644]
qnx/src/ipc3x_dev/ti/syslink/rpmsg-resmgr/hlos/knl/Qnx/rpmsg-resmgrdrv.c [new file with mode: 0644]
qnx/src/ipc3x_dev/ti/syslink/rpmsg-resmgr/hlos/knl/Qnx/rpmsg-resmgrdrv.h [new file with mode: 0644]
qnx/src/ipc3x_dev/ti/syslink/rpmsg-resmgr/hlos/knl/Qnx/rpmsg_resmgr.h [new file with mode: 0644]
qnx/src/ipc3x_dev/ti/syslink/samples/Makefile [new file with mode: 0644]
qnx/src/ipc3x_dev/ti/syslink/samples/hlos/Makefile [new file with mode: 0644]
qnx/src/ipc3x_dev/ti/syslink/samples/hlos/MessageQCopy/Makefile [new file with mode: 0644]
qnx/src/ipc3x_dev/ti/syslink/samples/hlos/MessageQCopy/MessageQCopyApp.c [new file with mode: 0644]
qnx/src/ipc3x_dev/ti/syslink/samples/hlos/MessageQCopy/MessageQCopyApp.h [new file with mode: 0644]
qnx/src/ipc3x_dev/ti/syslink/samples/hlos/MessageQCopy/usr/Makefile [new file with mode: 0644]
qnx/src/ipc3x_dev/ti/syslink/samples/hlos/MessageQCopy/usr/Qnx/MessageQCopyAppOS.c [new file with mode: 0644]
qnx/src/ipc3x_dev/ti/syslink/samples/hlos/MessageQCopy/usr/arm/Makefile [new file with mode: 0644]
qnx/src/ipc3x_dev/ti/syslink/samples/hlos/MessageQCopy/usr/arm/le.v7/Makefile [new file with mode: 0644]
qnx/src/ipc3x_dev/ti/syslink/samples/hlos/MessageQCopy/usr/common.mk [new file with mode: 0644]
qnx/src/ipc3x_dev/ti/syslink/samples/hlos/MessageQCopy/usr/mqcopytestapp.use [new file with mode: 0644]
qnx/src/ipc3x_dev/ti/syslink/samples/hlos/benchmark/Makefile [new file with mode: 0644]
qnx/src/ipc3x_dev/ti/syslink/samples/hlos/benchmark/usr/Makefile [new file with mode: 0644]
qnx/src/ipc3x_dev/ti/syslink/samples/hlos/benchmark/usr/arm/Makefile [new file with mode: 0644]
qnx/src/ipc3x_dev/ti/syslink/samples/hlos/benchmark/usr/arm/le.v7/Makefile [new file with mode: 0644]
qnx/src/ipc3x_dev/ti/syslink/samples/hlos/benchmark/usr/common.mk [new file with mode: 0644]
qnx/src/ipc3x_dev/ti/syslink/samples/hlos/benchmark/usr/omx_packet.h [new file with mode: 0644]
qnx/src/ipc3x_dev/ti/syslink/samples/hlos/benchmark/usr/rpmsg-omx-benchmark.use [new file with mode: 0644]
qnx/src/ipc3x_dev/ti/syslink/samples/hlos/benchmark/usr/tests_omx_benchmark.c [new file with mode: 0644]
qnx/src/ipc3x_dev/ti/syslink/samples/hlos/deh/Makefile [new file with mode: 0644]
qnx/src/ipc3x_dev/ti/syslink/samples/hlos/deh/usr/Makefile [new file with mode: 0644]
qnx/src/ipc3x_dev/ti/syslink/samples/hlos/deh/usr/arm/Makefile [new file with mode: 0644]
qnx/src/ipc3x_dev/ti/syslink/samples/hlos/deh/usr/arm/le.v7/Makefile [new file with mode: 0644]
qnx/src/ipc3x_dev/ti/syslink/samples/hlos/deh/usr/common.mk [new file with mode: 0644]
qnx/src/ipc3x_dev/ti/syslink/samples/hlos/deh/usr/omx_packet.h [new file with mode: 0644]
qnx/src/ipc3x_dev/ti/syslink/samples/hlos/deh/usr/rpmsg-omx-errors.use [new file with mode: 0644]
qnx/src/ipc3x_dev/ti/syslink/samples/hlos/deh/usr/tests_omx_errors.c [new file with mode: 0644]
qnx/src/ipc3x_dev/ti/syslink/samples/hlos/hwspinlock/Makefile [new file with mode: 0644]
qnx/src/ipc3x_dev/ti/syslink/samples/hlos/hwspinlock/usr/HWSpinlock.c [new file with mode: 0644]
qnx/src/ipc3x_dev/ti/syslink/samples/hlos/hwspinlock/usr/HwSpinLockTestApp.use [new file with mode: 0644]
qnx/src/ipc3x_dev/ti/syslink/samples/hlos/hwspinlock/usr/Makefile [new file with mode: 0644]
qnx/src/ipc3x_dev/ti/syslink/samples/hlos/hwspinlock/usr/arm/Makefile [new file with mode: 0644]
qnx/src/ipc3x_dev/ti/syslink/samples/hlos/hwspinlock/usr/arm/le.v7/Makefile [new file with mode: 0644]
qnx/src/ipc3x_dev/ti/syslink/samples/hlos/hwspinlock/usr/common.mk [new file with mode: 0644]
qnx/src/ipc3x_dev/ti/syslink/samples/hlos/rpmsg-omx/Makefile [new file with mode: 0644]
qnx/src/ipc3x_dev/ti/syslink/samples/hlos/rpmsg-omx/usr/Makefile [new file with mode: 0644]
qnx/src/ipc3x_dev/ti/syslink/samples/hlos/rpmsg-omx/usr/arm/Makefile [new file with mode: 0644]
qnx/src/ipc3x_dev/ti/syslink/samples/hlos/rpmsg-omx/usr/arm/le.v7/Makefile [new file with mode: 0644]
qnx/src/ipc3x_dev/ti/syslink/samples/hlos/rpmsg-omx/usr/common.mk [new file with mode: 0644]
qnx/src/ipc3x_dev/ti/syslink/samples/hlos/rpmsg-omx/usr/omx_packet.h [new file with mode: 0644]
qnx/src/ipc3x_dev/ti/syslink/samples/hlos/rpmsg-omx/usr/rpmsg-omx-test.use [new file with mode: 0644]
qnx/src/ipc3x_dev/ti/syslink/samples/hlos/rpmsg-omx/usr/tests_omx_sample.c [new file with mode: 0644]
qnx/src/ipc3x_dev/ti/syslink/samples/hlos/stress/Makefile [new file with mode: 0644]
qnx/src/ipc3x_dev/ti/syslink/samples/hlos/stress/usr/Makefile [new file with mode: 0644]
qnx/src/ipc3x_dev/ti/syslink/samples/hlos/stress/usr/arm/Makefile [new file with mode: 0644]
qnx/src/ipc3x_dev/ti/syslink/samples/hlos/stress/usr/arm/le.v7/Makefile [new file with mode: 0644]
qnx/src/ipc3x_dev/ti/syslink/samples/hlos/stress/usr/common.mk [new file with mode: 0644]
qnx/src/ipc3x_dev/ti/syslink/samples/hlos/stress/usr/omx_packet.h [new file with mode: 0644]
qnx/src/ipc3x_dev/ti/syslink/samples/hlos/stress/usr/rpmsg-omx-stress.use [new file with mode: 0644]
qnx/src/ipc3x_dev/ti/syslink/samples/hlos/stress/usr/tests_omx_stress.c [new file with mode: 0644]
qnx/src/ipc3x_dev/ti/syslink/samples/hlos/ti-ipc/Makefile [new file with mode: 0644]
qnx/src/ipc3x_dev/ti/syslink/samples/hlos/ti-ipc/arm/Makefile [new file with mode: 0644]
qnx/src/ipc3x_dev/ti/syslink/samples/hlos/ti-ipc/arm/le.v7/Makefile [new file with mode: 0644]
qnx/src/ipc3x_dev/ti/syslink/samples/hlos/ti-ipc/common.mk [new file with mode: 0644]
qnx/src/ipc3x_dev/ti/syslink/samples/hlos/ti-ipc/tests_ipc_sample.c [new file with mode: 0644]
qnx/src/ipc3x_dev/ti/syslink/samples/hlos/ti-ipc/ti-ipc-test.use [new file with mode: 0644]
qnx/src/ipc3x_dev/ti/syslink/ti-ipc/ti-ipc.c [new file with mode: 0644]
qnx/src/ipc3x_dev/ti/syslink/ti-ipc/ti-ipc.h [new file with mode: 0644]
qnx/src/ipc3x_dev/ti/syslink/utils/Cache.h [new file with mode: 0644]
qnx/src/ipc3x_dev/ti/syslink/utils/Cfg.h [new file with mode: 0644]
qnx/src/ipc3x_dev/ti/syslink/utils/Gate.h [new file with mode: 0644]
qnx/src/ipc3x_dev/ti/syslink/utils/GateMutex.h [new file with mode: 0644]
qnx/src/ipc3x_dev/ti/syslink/utils/GateSpinlock.h [new file with mode: 0644]
qnx/src/ipc3x_dev/ti/syslink/utils/IGateProvider.h [new file with mode: 0644]
qnx/src/ipc3x_dev/ti/syslink/utils/IHeap.h [new file with mode: 0644]
qnx/src/ipc3x_dev/ti/syslink/utils/List.h [new file with mode: 0644]
qnx/src/ipc3x_dev/ti/syslink/utils/Memory.h [new file with mode: 0644]
qnx/src/ipc3x_dev/ti/syslink/utils/MemoryDefs.h [new file with mode: 0644]
qnx/src/ipc3x_dev/ti/syslink/utils/MemoryOS.h [new file with mode: 0644]
qnx/src/ipc3x_dev/ti/syslink/utils/OsalPrint.h [new file with mode: 0644]
qnx/src/ipc3x_dev/ti/syslink/utils/String.h [new file with mode: 0644]
qnx/src/ipc3x_dev/ti/syslink/utils/Trace.h [new file with mode: 0644]
qnx/src/ipc3x_dev/ti/syslink/utils/_MemoryDefs.h [new file with mode: 0644]
qnx/src/ipc3x_dev/ti/syslink/utils/common/Cfg.c [new file with mode: 0644]
qnx/src/ipc3x_dev/ti/syslink/utils/hlos/Cache.c [new file with mode: 0644]
qnx/src/ipc3x_dev/ti/syslink/utils/hlos/Memory.c [new file with mode: 0644]
qnx/src/ipc3x_dev/ti/syslink/utils/hlos/String.c [new file with mode: 0644]
qnx/src/ipc3x_dev/ti/syslink/utils/hlos/Trace.c [new file with mode: 0644]
qnx/src/ipc3x_dev/ti/syslink/utils/hlos/knl/Gate.c [new file with mode: 0644]
qnx/src/ipc3x_dev/ti/syslink/utils/hlos/knl/GateMutex.c [new file with mode: 0644]
qnx/src/ipc3x_dev/ti/syslink/utils/hlos/knl/GateSpinlock.c [new file with mode: 0644]
qnx/src/ipc3x_dev/ti/syslink/utils/hlos/knl/List.c [new file with mode: 0644]
qnx/src/ipc3x_dev/ti/syslink/utils/hlos/knl/MultiProc.c [new file with mode: 0644]
qnx/src/ipc3x_dev/ti/syslink/utils/hlos/knl/Qnx/TraceDrv.c [new file with mode: 0644]
qnx/src/ipc3x_dev/ti/syslink/utils/hlos/knl/osal/Qnx/MemoryOS.c [new file with mode: 0644]
qnx/src/ipc3x_dev/ti/syslink/utils/hlos/knl/osal/Qnx/OsalDrv.c [new file with mode: 0644]
qnx/src/ipc3x_dev/ti/syslink/utils/hlos/knl/osal/Qnx/OsalEvent.c [new file with mode: 0644]
qnx/src/ipc3x_dev/ti/syslink/utils/hlos/knl/osal/Qnx/OsalIsr.c [new file with mode: 0644]
qnx/src/ipc3x_dev/ti/syslink/utils/hlos/knl/osal/Qnx/OsalKfile.c [new file with mode: 0644]
qnx/src/ipc3x_dev/ti/syslink/utils/hlos/knl/osal/Qnx/OsalMutex.c [new file with mode: 0644]
qnx/src/ipc3x_dev/ti/syslink/utils/hlos/knl/osal/Qnx/OsalPrint.c [new file with mode: 0644]
qnx/src/ipc3x_dev/ti/syslink/utils/hlos/knl/osal/Qnx/OsalSemaphore.c [new file with mode: 0644]
qnx/src/ipc3x_dev/ti/syslink/utils/hlos/knl/osal/Qnx/OsalSpinlock.c [new file with mode: 0644]
qnx/src/ipc3x_dev/ti/syslink/utils/hlos/knl/osal/Qnx/OsalThread.c [new file with mode: 0644]
qnx/src/ipc3x_dev/ti/syslink/utils/hlos/usr/Qnx/TraceDrv.c [new file with mode: 0644]
qnx/src/ipc3x_dev/ti/syslink/utils/hlos/usr/osal/Qnx/MemoryOS.c [new file with mode: 0644]
qnx/src/ipc3x_dev/ti/syslink/utils/hlos/usr/osal/Qnx/OsalPrint.c [new file with mode: 0644]
qnx/src/ipc3x_dev/tiler/Makefile [new file with mode: 0644]
qnx/src/ipc3x_dev/tiler/resmgr/Makefile [new file with mode: 0644]
qnx/src/ipc3x_dev/tiler/resmgr/tiler/List.c [new file with mode: 0644]
qnx/src/ipc3x_dev/tiler/resmgr/tiler/List.h [new file with mode: 0644]
qnx/src/ipc3x_dev/tiler/resmgr/tiler/Makefile [new file with mode: 0644]
qnx/src/ipc3x_dev/tiler/resmgr/tiler/arm/Makefile [new file with mode: 0644]
qnx/src/ipc3x_dev/tiler/resmgr/tiler/arm/le.v7/Makefile [new file with mode: 0644]
qnx/src/ipc3x_dev/tiler/resmgr/tiler/common.mk [new file with mode: 0644]
qnx/src/ipc3x_dev/tiler/resmgr/tiler/main.c [new file with mode: 0644]
qnx/src/ipc3x_dev/tiler/resmgr/tiler/mmap_peer.c [new file with mode: 0644]
qnx/src/ipc3x_dev/tiler/resmgr/tiler/proto.h [new file with mode: 0644]
qnx/src/ipc3x_dev/tiler/resmgr/tiler/public/tiler/tiler_devctl.h [new file with mode: 0644]
qnx/src/ipc3x_dev/tiler/resmgr/tiler/public/tiler/tiler_devctl_cmds.h [new file with mode: 0644]
qnx/src/ipc3x_dev/tiler/resmgr/tiler/tcm/_tcm_sita.h [new file with mode: 0644]
qnx/src/ipc3x_dev/tiler/resmgr/tiler/tcm/tcm.h [new file with mode: 0644]
qnx/src/ipc3x_dev/tiler/resmgr/tiler/tcm/tcm_sita.c [new file with mode: 0644]
qnx/src/ipc3x_dev/tiler/resmgr/tiler/tcm/tcm_sita.h [new file with mode: 0644]
qnx/src/ipc3x_dev/tiler/resmgr/tiler/tcm/tcm_utils.h [new file with mode: 0644]
qnx/src/ipc3x_dev/tiler/resmgr/tiler/tiler.c [new file with mode: 0644]
qnx/src/ipc3x_dev/tiler/resmgr/tiler/tiler.h [new file with mode: 0644]
qnx/src/ipc3x_dev/tiler/resmgr/tiler/tiler.use [new file with mode: 0644]
qnx/src/ipc3x_dev/tiler/resmgr/tiler/tiler_def.h [new file with mode: 0644]
qnx/src/ipc3x_dev/tiler/resmgr/tiler/tiler_pack.c [new file with mode: 0644]
qnx/src/ipc3x_dev/tiler/resmgr/tiler/tiler_rot.c [new file with mode: 0644]
qnx/src/ipc3x_dev/tiler/resmgr/tiler/tmm.h [new file with mode: 0644]
qnx/src/ipc3x_dev/tiler/resmgr/tiler/tmm_pat.c [new file with mode: 0644]
qnx/src/ipc3x_dev/tiler/tiler_pat/Makefile [new file with mode: 0644]
qnx/src/ipc3x_dev/tiler/tiler_pat/arm.le.v7.dll/Makefile [new file with mode: 0644]
qnx/src/ipc3x_dev/tiler/tiler_pat/common.mk [new file with mode: 0644]
qnx/src/ipc3x_dev/tiler/tiler_pat/dmm.c [new file with mode: 0644]
qnx/src/ipc3x_dev/tiler/tiler_pat/dmm.h [new file with mode: 0644]
qnx/src/ipc3x_dev/tiler/tiler_pat/tiler_pat.c [new file with mode: 0644]
qnx/src/ipc3x_dev/tiler/usr/Makefile [new file with mode: 0644]
qnx/src/ipc3x_dev/tiler/usr/idlcommon.mk [new file with mode: 0644]
qnx/src/ipc3x_dev/tiler/usr/memmgr/Makefile [new file with mode: 0644]
qnx/src/ipc3x_dev/tiler/usr/memmgr/arm/Makefile [new file with mode: 0644]
qnx/src/ipc3x_dev/tiler/usr/memmgr/arm/a.le.v7/Makefile [new file with mode: 0644]
qnx/src/ipc3x_dev/tiler/usr/memmgr/arm/so.le.v7/Makefile [new file with mode: 0644]
qnx/src/ipc3x_dev/tiler/usr/memmgr/common.mk [new file with mode: 0644]
qnx/src/ipc3x_dev/tiler/usr/memmgr/memmgr.c [new file with mode: 0644]
qnx/src/ipc3x_dev/tiler/usr/memmgr/public/memmgr/mem_types.h [new file with mode: 0644]
qnx/src/ipc3x_dev/tiler/usr/memmgr/public/memmgr/memmgr.h [new file with mode: 0644]
qnx/src/ipc3x_dev/tiler/usr/memmgr/public/memmgr/tiler.h [new file with mode: 0644]
qnx/src/ipc3x_dev/tiler/usr/memmgr/public/memmgr/tilermem.h [new file with mode: 0644]
qnx/src/ipc3x_dev/tiler/usr/memmgr/public/memmgr/tilermem_utils.h [new file with mode: 0644]
qnx/src/ipc3x_dev/tiler/usr/memmgr/public/memmgr/tilermgr.h [new file with mode: 0644]
qnx/src/ipc3x_dev/tiler/usr/memmgr/tilermgr.c [new file with mode: 0644]
qnx/src/ipc3x_dev/tiler/usr/tests/Makefile [new file with mode: 0644]
qnx/src/ipc3x_dev/tiler/usr/tests/memmgr/Makefile [new file with mode: 0644]
qnx/src/ipc3x_dev/tiler/usr/tests/memmgr/arm/Makefile [new file with mode: 0644]
qnx/src/ipc3x_dev/tiler/usr/tests/memmgr/arm/le.v7/Makefile [new file with mode: 0644]
qnx/src/ipc3x_dev/tiler/usr/tests/memmgr/common.mk [new file with mode: 0644]
qnx/src/ipc3x_dev/tiler/usr/tests/memmgr/memmgr_test.c [new file with mode: 0644]
qnx/src/ipc3x_dev/tiler/usr/tests/memmgr/memmgr_test.use [new file with mode: 0644]
qnx/src/ipc3x_dev/tiler/usr/tests/tiler/Makefile [new file with mode: 0644]
qnx/src/ipc3x_dev/tiler/usr/tests/tiler/arm/Makefile [new file with mode: 0644]
qnx/src/ipc3x_dev/tiler/usr/tests/tiler/arm/le.v7/Makefile [new file with mode: 0644]
qnx/src/ipc3x_dev/tiler/usr/tests/tiler/common.mk [new file with mode: 0644]
qnx/src/ipc3x_dev/tiler/usr/tests/tiler/tiler_ptest.c [new file with mode: 0644]
qnx/src/ipc3x_dev/tiler/usr/tests/tiler/tiler_test.use [new file with mode: 0644]
qnx/src/ipc3x_dev/tiler/usr/tests/tilerusr/Makefile [new file with mode: 0644]
qnx/src/ipc3x_dev/tiler/usr/tests/tilerusr/arm/Makefile [new file with mode: 0644]
qnx/src/ipc3x_dev/tiler/usr/tests/tilerusr/arm/le.v7/Makefile [new file with mode: 0644]
qnx/src/ipc3x_dev/tiler/usr/tests/tilerusr/common.mk [new file with mode: 0644]
qnx/src/ipc3x_dev/tiler/usr/tests/tilerusr/tilerusr_test.c [new file with mode: 0644]
qnx/src/ipc3x_dev/tiler/usr/tests/tilerusr/tilerusr_test.use [new file with mode: 0644]
qnx/src/ipc3x_dev/tiler/usr/tests/utils/Makefile [new file with mode: 0644]
qnx/src/ipc3x_dev/tiler/usr/tests/utils/arm/Makefile [new file with mode: 0644]
qnx/src/ipc3x_dev/tiler/usr/tests/utils/arm/le.v7/Makefile [new file with mode: 0644]
qnx/src/ipc3x_dev/tiler/usr/tests/utils/common.mk [new file with mode: 0644]
qnx/src/ipc3x_dev/tiler/usr/tests/utils/utils_test.c [new file with mode: 0644]
qnx/src/ipc3x_dev/tiler/usr/tests/utils/utils_test.use [new file with mode: 0644]
qnx/src/ipc3x_dev/tiler/usr/tilerusr/Makefile [new file with mode: 0644]
qnx/src/ipc3x_dev/tiler/usr/tilerusr/arm/Makefile [new file with mode: 0644]
qnx/src/ipc3x_dev/tiler/usr/tilerusr/arm/a.le.v7/Makefile [new file with mode: 0644]
qnx/src/ipc3x_dev/tiler/usr/tilerusr/arm/so.le.v7/Makefile [new file with mode: 0644]
qnx/src/ipc3x_dev/tiler/usr/tilerusr/common.mk [new file with mode: 0644]
qnx/src/ipc3x_dev/tiler/usr/tilerusr/public/tilerusr/tiler.h [new file with mode: 0644]
qnx/src/ipc3x_dev/tiler/usr/tilerusr/tilerusr.c [new file with mode: 0644]
qnx/src/ipc3x_dev/tiler/usr/utils/Makefile [new file with mode: 0644]
qnx/src/ipc3x_dev/tiler/usr/utils/arm/Makefile [new file with mode: 0644]
qnx/src/ipc3x_dev/tiler/usr/utils/arm/a.le.v7/Makefile [new file with mode: 0644]
qnx/src/ipc3x_dev/tiler/usr/utils/arm/so.le.v7/Makefile [new file with mode: 0644]
qnx/src/ipc3x_dev/tiler/usr/utils/common.mk [new file with mode: 0644]
qnx/src/ipc3x_dev/tiler/usr/utils/public/tiler_utils/debug_utils.h [new file with mode: 0644]
qnx/src/ipc3x_dev/tiler/usr/utils/public/tiler_utils/list_utils.h [new file with mode: 0644]
qnx/src/ipc3x_dev/tiler/usr/utils/public/tiler_utils/utils.h [new file with mode: 0644]
qnx/src/ipc3x_dev/tiler/usr/utils/testlib.c [new file with mode: 0644]
qnx/src/ipc3x_dev/tiler/usr/utils/testlib.h [new file with mode: 0644]

diff --git a/qnx/src/ipc3x_dev/.cproject b/qnx/src/ipc3x_dev/.cproject
new file mode 100644 (file)
index 0000000..9e4a753
--- /dev/null
@@ -0,0 +1,62 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<?fileVersion 4.0.0?>
+
+<cproject storage_type_id="org.eclipse.cdt.core.XmlProjectDescriptionStorage">
+<storageModule moduleId="org.eclipse.cdt.core.settings">
+<cconfiguration id="org.eclipse.cdt.core.default.config.1828060775">
+<storageModule buildSystemId="org.eclipse.cdt.core.defaultConfigDataProvider" id="org.eclipse.cdt.core.default.config.1828060775" moduleId="org.eclipse.cdt.core.settings" name="Configuration">
+<externalSettings/>
+<extensions>
+<extension id="com.qnx.tools.ide.qde.core.QDEBynaryParser" point="org.eclipse.cdt.core.BinaryParser"/>
+</extensions>
+</storageModule>
+<storageModule moduleId="org.eclipse.cdt.core.externalSettings"/>
+<storageModule moduleId="org.eclipse.cdt.core.pathentry">
+<pathentry kind="src" path=""/>
+<pathentry kind="out" path=""/>
+<pathentry kind="con" path="com.qnx.tools.ide.qde.QDE_PROJECT_CONTAINER"/>
+</storageModule>
+<storageModule moduleId="org.eclipse.cdt.make.core.buildtargets">
+<buildTargets>
+<target name="build" path="" targetID="com.qnx.tools.ide.qde.core.cbuilder">
+<buildCommand>make</buildCommand>
+<buildArguments/>
+<buildTarget>all</buildTarget>
+<stopOnError>false</stopOnError>
+<useDefaultCommand>true</useDefaultCommand>
+<runAllBuilders>true</runAllBuilders>
+</target>
+<target name="clean" path="" targetID="com.qnx.tools.ide.qde.core.cbuilder">
+<buildCommand>make</buildCommand>
+<buildArguments/>
+<buildTarget>clean</buildTarget>
+<stopOnError>false</stopOnError>
+<useDefaultCommand>true</useDefaultCommand>
+<runAllBuilders>true</runAllBuilders>
+</target>
+<target name="rebuild" path="" targetID="com.qnx.tools.ide.qde.core.cbuilder">
+<buildCommand>make</buildCommand>
+<buildArguments/>
+<buildTarget>clean all</buildTarget>
+<stopOnError>false</stopOnError>
+<useDefaultCommand>true</useDefaultCommand>
+<runAllBuilders>true</runAllBuilders>
+</target>
+</buildTargets>
+</storageModule>
+<storageModule moduleId="org.eclipse.cdt.internal.ui.text.commentOwnerProjectMappings"/>
+<storageModule moduleId="com.qnx.tools.ide.qde.core.QNXProjectProperties">
+<makefile value="Makefile"/>
+<command value="make"/>
+<code_coverage value="false"/>
+<profiling value="false"/>
+<mudflapth value="false"/>
+<instrumentedFunctionProfiling value="false"/>
+<type value="6"/>
+<parallel_build value="false"/>
+<parallel_build_number value="1"/>
+<active_configurations/>
+</storageModule>
+</cconfiguration>
+</storageModule>
+</cproject>
diff --git a/qnx/src/ipc3x_dev/.gitignore b/qnx/src/ipc3x_dev/.gitignore
new file mode 100644 (file)
index 0000000..d020852
--- /dev/null
@@ -0,0 +1,23 @@
+.qnx_internal.mk
+*.map
+*.o
+*.so
+*.a
+*.pinfo
+sharedmemallocator/resmgr/arm/le.v7/shmemallocator
+sharedmemallocator/samples/sharedMemAllocator/usr/arm/le.v7/SharedMemoryAllocatorTestApp
+ti/syslink/build/Qnx/resmgr/arm/le.v7/syslink
+ti/syslink/build/Qnx/traceDaemon/arm/le.v7/syslink_trace_daemon
+ti/syslink/samples/hlos/MessageQCopy/usr/arm/le.v7/mqcopytestapp
+ti/syslink/samples/hlos/benchmark/usr/arm/le.v7/rpmsg-omx-benchmark
+ti/syslink/samples/hlos/hwspinlock/usr/arm/le.v7/HwSpinLockTestApp
+ti/syslink/samples/hlos/rpmsg-omx/usr/arm/le.v7/rpmsg-omx-test
+ti/syslink/samples/hlos/stress/usr/arm/le.v7/rpmsg-omx-stress
+ti/syslink/samples/hlos/deh/usr/arm/le.v7/rpmsg-omx-errors
+ti/syslink/samples/hlos/ti-ipc/arm/le.v7/ti-ipc-test
+tiler/resmgr/tiler/arm/le.v7/tiler
+tiler/usr/tests/memmgr/arm/le.v7/memmgr_test
+tiler/usr/tests/tiler/arm/le.v7/tiler_test
+tiler/usr/tests/tilerusr/arm/le.v7/tilerusr_test
+tiler/usr/tests/utils/arm/le.v7/utils_test
+*.patch
diff --git a/qnx/src/ipc3x_dev/.project b/qnx/src/ipc3x_dev/.project
new file mode 100644 (file)
index 0000000..3539161
--- /dev/null
@@ -0,0 +1,71 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+       <name>syslink_3_0</name>
+       <comment></comment>
+       <projects>
+       </projects>
+       <buildSpec>
+               <buildCommand>
+                       <name>com.qnx.tools.ide.qde.core.cbuilder</name>
+                       <triggers>clean,full,incremental,</triggers>
+                       <arguments>
+                               <dictionary>
+                                       <key>org.eclipse.cdt.core.errorOutputParser</key>
+                                       <value>com.qnx.tools.ide.qde.core.IntelCErrorParser;com.qnx.tools.ide.qde.core.QdeExtraMakeErrorParser;org.eclipse.cdt.core.MakeErrorParser;org.eclipse.cdt.core.GCCErrorParser;org.eclipse.cdt.core.GASErrorParser;org.eclipse.cdt.core.GLDErrorParser;org.eclipse.cdt.core.VCErrorParser;</value>
+                               </dictionary>
+                               <dictionary>
+                                       <key>org.eclipse.cdt.make.core.build.command</key>
+                                       <value>make</value>
+                               </dictionary>
+                               <dictionary>
+                                       <key>org.eclipse.cdt.make.core.build.location</key>
+                                       <value></value>
+                               </dictionary>
+                               <dictionary>
+                                       <key>org.eclipse.cdt.make.core.build.target.auto</key>
+                                       <value>all</value>
+                               </dictionary>
+                               <dictionary>
+                                       <key>org.eclipse.cdt.make.core.build.target.clean</key>
+                                       <value>clean</value>
+                               </dictionary>
+                               <dictionary>
+                                       <key>org.eclipse.cdt.make.core.build.target.full</key>
+                                       <value>all</value>
+                               </dictionary>
+                               <dictionary>
+                                       <key>org.eclipse.cdt.make.core.build.target.inc</key>
+                                       <value>all</value>
+                               </dictionary>
+                               <dictionary>
+                                       <key>org.eclipse.cdt.make.core.enableAutoBuild</key>
+                                       <value>false</value>
+                               </dictionary>
+                               <dictionary>
+                                       <key>org.eclipse.cdt.make.core.enableCleanBuild</key>
+                                       <value>true</value>
+                               </dictionary>
+                               <dictionary>
+                                       <key>org.eclipse.cdt.make.core.enableFullBuild</key>
+                                       <value>true</value>
+                               </dictionary>
+                               <dictionary>
+                                       <key>org.eclipse.cdt.make.core.enabledIncrementalBuild</key>
+                                       <value>true</value>
+                               </dictionary>
+                               <dictionary>
+                                       <key>org.eclipse.cdt.make.core.stopOnError</key>
+                                       <value>false</value>
+                               </dictionary>
+                               <dictionary>
+                                       <key>org.eclipse.cdt.make.core.useDefaultBuildCmd</key>
+                                       <value>true</value>
+                               </dictionary>
+                       </arguments>
+               </buildCommand>
+       </buildSpec>
+       <natures>
+               <nature>org.eclipse.cdt.core.cnature</nature>
+               <nature>com.qnx.tools.ide.qde.core.qnxnature</nature>
+       </natures>
+</projectDescription>
diff --git a/qnx/src/ipc3x_dev/Makefile b/qnx/src/ipc3x_dev/Makefile
new file mode 100644 (file)
index 0000000..f647674
--- /dev/null
@@ -0,0 +1,37 @@
+#
+#   Copyright (c) 2013, Texas Instruments Incorporated
+#
+#   Redistribution and use in source and binary forms, with or without
+#   modification, are permitted provided that the following conditions
+#   are met:
+#
+#   *  Redistributions of source code must retain the above copyright
+#      notice, this list of conditions and the following disclaimer.
+#
+#   *  Redistributions in binary form must reproduce the above copyright
+#      notice, this list of conditions and the following disclaimer in the
+#      documentation and/or other materials provided with the distribution.
+#
+#   *  Neither the name of Texas Instruments Incorporated nor the names of
+#      its contributors may be used to endorse or promote products derived
+#      from this software without specific prior written permission.
+#
+#   THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+#   AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
+#   THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+#   PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
+#   CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+#   EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+#   PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
+#   OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
+#   WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
+#   OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
+#   EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+#
+
+EARLY_DIRS=tiler perfutils
+LATE_DIRS=ti
+
+SYSLINK_BUILDOS=Qnx
+
+include recurse.mk
diff --git a/qnx/src/ipc3x_dev/ReadMe.txt b/qnx/src/ipc3x_dev/ReadMe.txt
new file mode 100644 (file)
index 0000000..5a6d0b2
--- /dev/null
@@ -0,0 +1,524 @@
+                             SysLink 3 / Tiler
+
+This is the Qnx SysLink IPC that uses the VirtQueue transport to communicate
+with the sys-bios rpmsg.
+
+Source Code:
+============
+    - Qnx SysLink Source
+      The source code is located in the gforge01 git tree.
+
+      git clone ssh://<aid/xid>@gforge01.dal.design.ti.com/gitroot/syslink_qnx
+      branch: sl3_dev
+      Provide enterprise password when prompted.
+
+    - BIOS RPMSG Source
+      The source code is located in git.omapzoom.org
+
+      branch: master
+      tag: 2.00.11.31
+      commit-id: 91f6379282230ef5d1818ce8363ce1e64f23cda2
+      patches needed on top for Qnx can be found at:
+      \\dta0866189\SHARE\sl3\patches\sl3_1.05.23\sysbios-rpmsg
+      0001-IPC-Protect-Message-Sending-to-Serialize-Messages.patch
+      0002-WIP-Add-j5-and-j5eco-support.patch
+      0003-Resources-Update-ti811x-resource-table-for-shmem-car.patch
+      0004-Update-number-of-HwSpinlocks.patch
+
+      Note: For running the benchmarking test, follow the instructions at the
+            top of the MPU-side benchmarking test app.
+
+      Default firmware files are generated in
+      /sysbios-rpmsg/src/ti/examples/srvmgr/ti_platform_<...>.  The folder is
+      named for the platform.  For example, for the OMAP5 ipu firmware, the folder
+      is named ti_platform_omap54xx_ipu.
+
+Tools:
+======
+    - Qnx Momentics IDE 6.5.x
+      For more information please refer to the Wiki:
+      http://opbuwiki.dal.design.ti.com/index.php/QNX_Main_Page#Developer_Setup
+    - OMAP5 BSP Information is available in thie Wiki:
+      http://opbuwiki.dal.design.ti.com/index.php/OMAP5_QNX_BSP
+    - J5Eco BSP Information can be found on this Wiki:
+      http://opbuwiki.dal.design.ti.com/index.php/J5eco_QNX_RPMSG#QNX_J5_eco_BSP
+    - Please refer to the ReadMe in the Bios RPMSG source for the tools
+      required to build the BIOS RPMSG source.
+
+Build Instructions (Windows):
+=============================
+    1) Open a command prompt and change directory to the syslink project
+       directory.
+    2) (Optional) To override the default install root, create a new file named
+       qconf-override.mk with the following contents:
+           INSTALL_ROOT_nto := C:/ide-4.7-workspace/trunk
+           USE_INSTALL_ROOT = 1
+       Set the environment variable QCONF_OVERRIDE as follows:
+           set QCONF_OVERRIDE = C:\ide-4.7-workspace\trunk\qconf-override.mk
+    3) From the command prompt:
+           To build for OMAP4:
+               > make
+           To build for OMAP5:
+               > make SYSLINK_PLATFORM=omap5430 TILER_PLATFORM=omap5430 SMP=1
+           To build for TI811X (note, there is no tiler support for j5 eco):
+               > make SYSLINK_PLATFORM=ti81xx SYSLINK_VARIANT=TI811X
+       Note: To export the tiler headers and built binaries/libraries to the
+             install root, you can instead run "make install"
+
+Note: To build the binaries/libraries with the debug compile options of -g and
+      -O0, add the following to the build command:
+
+          "SYSLINK_DEBUG=1 TILER_DEBUG=1".
+
+Clean Instructions (Windows):
+=============================
+    1) Open a command prompt and change directory to the syslink project
+       directory.
+    3) From the command prompt:
+           > make clean
+
+Build Output:
+=============
+
+    Tiler binary and libs:
+    ----------------------
+    \tiler\resmgr\tiler\arm\le.v7\tiler                     Tiler Resource Manager
+    \tiler\usr\memmgr\arm\so.le.v7\libmemmgr.so        Tiler MemMgr API library
+    \tiler\usr\tilerusr\arm\so.le.v7\libtilerusr.so    Tiler TilerUsr API library
+    \tiler\usr\utils\arm\so.le.v7\libmemmgr_utils.so   Tiler MmemMgr Utils library
+
+    Tiler samples:
+    --------------
+    \tiler\usr\tests\memmgr\arm\le.v7\memmgr_test     Tiler MemMgr test
+    \tiler\usr\tests\tiler\arm\le.v7\tiler_test              Tiler parametric test
+    \tiler\usr\tests\tilerusr\arm\le.v7\tilerusr_test Tiler TilerUsr test
+    \tiler\usr\tests\utils\arm\le.v7\utils_test              Tiler Utils test
+
+    SharedMemAllocator binary and libs:
+    -----------------------------------
+    \sharedmemallocator\resmgr\arm\le.v7\shmemallocator                     ResMgr
+    \sharedmemallocator\usr\arm\so.le.v7\libsharedmemallocator.so    User Lib
+
+    SharedMemAllocator samples:
+    ---------------------------
+    \sharedmemallocator\samples\sharedMemAllocator\usr\arm\le.v7\SharedMemoryAllocatorTestApp
+
+    SysLink binary and lib (under \ti\syslink\build\Qnx\):
+    ------------------------------------------------------
+    resmgr\arm\le.v7\syslink                    Syslink Resource Manager
+    lib\arm\so.le.v7\libsyslink_client.so       Syslink client library (
+                                                needed for using HWSpinLock API
+                                                and running the
+                                                MQCopy test app)
+
+    SysLink samples (under \ti\syslink\samples\hlos\):
+    --------------------------------------------------
+    benchmark\usr\arm\le.v7\rpmsg-omx-benchmark     Benchmark test
+    MessageQCopy\usr\arm\le.v7\mqcopytestapp        MessageQCopy test
+    rpmsg-omx\usr\arm\le.v7\rpmsg-omx-test          Rpmsg-omx interface test
+    hwspinlock\usr\arm\le.v7\HwSpinLockTestApp      HWSpinLock test
+
+    Note: If an install root was specified, you will find the above mentioned binaries and
+    libraries in the follwing paths in the install root:
+
+    <install_root>\bin\
+        -> syslink
+        -> rpmsg-omx-benchmark
+        -> mqcopytestapp
+        -> rpmsg-omx-test
+        -> HwSpinLockTestApp
+    <install_root>\sbin\
+        -> tiler
+        -> memmgr_test
+        -> tiler_test
+        -> tilerusr_test
+        -> utils_test
+    <install_root>\usr\lib
+        -> libmemmgr.so
+        -> libtilerusr.so
+        -> libmemmgr_utils.so
+        -> libsyslink_client.so
+
+To Run SysLink/Tiler/SharedMemAllocator:
+========================================
+
+    SharedMemAllocator
+    ------------------
+    On the target, sharedmemallocator can be started by running the following
+    command
+        # shmemallocator
+    No additional command line arguments are required.
+    The default carveouts will be created unless the resource manager
+    source file is modified to define different carveouts.
+    Note: If the source file is modified, then the carveouts will need to be
+    modified in the syslink Platform.c file, and the sysbios-rpmsg resource
+    table file in order for the carveouts to be visible to the remote core.
+
+    Tiler
+    -----
+    On the target, tiler can be started by running the following command
+        # tiler
+    No additional command line arguments required.  To see what options are
+    available, run "use tiler" or view the tiler.use file.
+
+    SysLink
+    -------
+    On the target, syslink can be started by running the following commad
+        # syslink <proc_name> <ipu_firmware_file> ...
+    The IPU firmware file to be loaded must be specified when starting syslink.
+    The proc_name is the same as the MultiProc name for the proc that is to
+    be loaded and is specific to the platform. Multiple proc_name/file pairs
+    can be listed and all will be loaded.
+    To see what other options may be available, run "use syslink" or view the
+    syslink.use file.
+    For example:
+        - To start syslink with DSP for TI811X:
+            # syslink DSP <dsp_firmware_file>
+    For backward-compatibility with previous OMAP5 releases, the "-f" and "-d"
+    options can be used instead to load IPU and DSP, respectively:
+        # syslink -f <ipu_firmware_file> -d <dsp_firmware_file>
+
+Disabling Hibernation and Changing the Hibernation Timeout:
+=======================================
+    To disable hibernation, use the "-H 0" option when starting syslink:
+
+    # syslink -f <ducati_firmware_file> -H 0
+
+    To change the hibernation timeout, use the "-T" option when starting syslink.
+    The value should  be in msec:
+
+    # syslink -f <ducati_firmware_file> -T 10000
+
+Remote Core Traces:
+===================
+    To see a dump of the remote core trace buffer, simply cat
+    /dev/syslink-trace<proc_id>.  Proc_id is the same as the MultiProc procId.
+
+    For IPU traces for OMAP5:
+    # cat /dev/syslink-trace2
+
+    For DSP traces for OMAP5 or TI811X:
+    # cat /dev/syslink-trace0
+
+Changing SharedMemAllocator Carveouts:
+======================================
+    The carveouts used by the SharedMemAllocator are defined in
+    \sharedmemallocator\resmgr\SharedMemoryAllocator.c at in the "blocks" array.
+    In order to modify the addresses/sizes/number of the carveouts, modify this
+    array and then re-build the module.
+
+Defining Carveouts for the Remote Cores:
+========================================
+    In order to be able to perform the address translation and to have the
+    carveout mapped into the MMU for the remote core, the carveouts must be
+    defined in the sysbio-rpmsg resource table for the cores which need access
+    to them.  Carveouts should be added as "devmem" entries in the table, with
+    the virtual and physical addresses given in the entry.
+
+    The MPU-side Platform.c file for the target should also be updated to define
+    the updated/new carveouts in the Syslink_Override_Params.  The carveouts
+    should be listed here for each core which needs access to them.
+
+Validating on the TARGET:
+=============================
+
+    SysLink standalone tests:
+    -------------------------------------
+    1) Setup the target:
+       Copy the following files to the target:
+           syslink
+           mqcopytestapp
+           rpmsg-omx-test
+           libsyslink_client.so
+           test_omx_ipu.xem3 (for OMAP5 IPU)
+           test_omx_dsp.xe64T (for OMAP5 or TI811X DSP)
+
+       Note: The binaries are from the sysbios-rpmsg tree, and
+             can be found in the examples folder.
+
+    3) Start syslink from the terminal:
+       For OMAP5:
+       # /tmp/syslink -f /tmp/test_omx_ipu.xem3 -d /tmp/test_omx_dsp.xe64T -H 0
+       For TI811X:
+       # /tmp/syslink DSP /tmp/test_omx_dsp.xe64T -H 0
+
+       You will see output like below on the console (OMAP5 output shown as example):
+       # /tmp/syslink -f /tmp/test_omx_ipu.xem3 -d /tmp/test_omx_dsp.xe64T -H 0
+       Starting syslink resource manager...
+       RscTable_process: RscTable version is [1]
+       RscTable_process: vring [256] @ [0xa0000000]
+       RscTable_process: vring [256] @ [0xa0004000]
+       RscTable_process: carveout [IPU_MEM_TEXT] @ da [0x00000000] pa [0xeda00000] len [0x600000]
+       RscTable_process: carveout [IPU_MEM_DATA] @ da [0x80000000] pa [0xee000000] len [0x9c00000]
+       RscTable_process: carveout [IPU_MEM_IPC_DATA] @ da [0x9f000000] pa [0xf7c00000] len [0x100000]
+       RscTable_process: trace [trace:sysm3] @ da [0x9f000000] len [0x8000]
+       RscTable_process: devmem [IPU_MEM_IPC_VRING] @ da [0xa0000000] pa [0xed900000] len [0x100000]
+       RscTable_process: devmem [IPU_MEM_IOBUFS] @ da [0x90000000] pa [0xf7d00000] len [0x5a00000]
+       RscTable_process: devmem [IPU_TILER_MODE_0_1] @ da [0x60000000] pa [0x60000000] len [0x10000000]
+       RscTable_process: devmem [IPU_TILER_MODE_2] @ da [0x70000000] pa [0x70000000] len [0x8000000]
+       RscTable_process: devmem [IPU_TILER_MODE_3] @ da [0x78000000] pa [0x78000000] len [0x8000000]
+       RscTable_process: devmem [IPU_PERIPHERAL_L4CFG] @ da [0xaa000000] pa [0x4a000000] len [0x1000000]
+       RscTable_process: devmem [IPU_PERIPHERAL_L4PER] @ da [0xa8000000] pa [0x48000000] len [0x1000000]
+       RscTable_process: devmem [IPU_IVAHD_CONFIG] @ da [0xba000000] pa [0x5a000000] len [0x1000000]
+       RscTable_process: devmem [IPU_IVAHD_SL2] @ da [0xbb000000] pa [0x5b000000] len [0x1000000]
+       RscTable_process: devmem [IPU_PERIPHERAL_DMM] @ da [0xae000000] pa [0x4e000000] len [0x100000]
+       << DLOAD >> WARNING: '' does not have a dynamic segment; assuming that it is a static executable and it cannot be relocated.
+         Programming Benelli memory regions
+       =========================================
+       VA = [0xa0000000] of size [0x100000] at PA = [0xed900000]
+       VA = [0x0] of size [0x600000] at PA = [0xeda00000]
+       VA = [0x80000000] of size [0x9c00000] at PA = [0xee000000]
+       VA = [0x9f000000] of size [0x100000] at PA = [0xf7c00000]
+         Programming Benelli L4 peripherals
+       =========================================
+       PA [0x60000000] VA [0x60000000] size [0x10000000]
+       PA [0x70000000] VA [0x70000000] size [0x8000000]
+       PA [0x78000000] VA [0x78000000] size [0x8000000]
+       PA [0x4a000000] VA [0xaa000000] size [0x1000000]
+       PA [0x48000000] VA [0xa8000000] size [0x1000000]
+       PA [0x4e000000] VA [0xae000000] size [0x100000]
+       PA [0x5a000000] VA [0xba000000] size [0x1000000]
+       PA [0x5b000000] VA [0xbb000000] size [0x1000000]
+       PA [0x58000000] VA [0xb8000000] size [0x1000000]
+       RscTable_process: RscTable version is [1]
+       RscTable_process: vring [256] @ [0xa0000000]
+       RscTable_process: vring [256] @ [0xa0004000]
+       RscTable_process: carveout [DSP_MEM_TEXT] @ da [0x20000000] pa [0xe0d00000] len [0x100000]
+       RscTable_process: carveout [DSP_MEM_DATA] @ da [0x90000000] pa [0xe0e00000] len [0x100000]
+       RscTable_process: carveout [DSP_MEM_HEAP] @ da [0x90100000] pa [0xe0f00000] len [0x300000]
+       RscTable_process: carveout [DSP_MEM_IPC_DATA] @ da [0x9f000000] pa [0xe1200000] len [0x100000]
+       RscTable_process: trace [trace:dsp] @ da [0x9f000000] len [0x8000]
+       RscTable_process: devmem [DSP_MEM_IPC_VRING] @ da [0xa0000000] pa [0xe0c00000] len [0x100000]
+       RscTable_process: devmem [DSP_MEM_IOBUFS] @ da [0x80000000] pa [0xe1300000] len [0x5a00000]
+       RscTable_process: devmem [DSP_TILER_MODE_0_1] @ da [0x60000000] pa [0x60000000] len [0x10000000]
+       RscTable_process: devmem [DSP_TILER_MODE_2] @ da [0x70000000] pa [0x70000000] len [0x8000000]
+       RscTable_process: devmem [DSP_TILER_MODE_3] @ da [0x78000000] pa [0x78000000] len [0x8000000]
+       RscTable_process: devmem [DSP_PERIPHERAL_L4CFG] @ da [0x4a000000] pa [0x4a000000] len [0x1000000]
+       RscTable_process: devmem [DSP_PERIPHERAL_L4PER] @ da [0x48000000] pa [0x48000000] len [0x1000000]
+       RscTable_process: devmem [DSP_PERIPHERAL_DMM] @ da [0x4e000000] pa [0x4e000000] len [0x100000]
+       << DLOAD >> WARNING: '' does not have a dynamic segment; assuming that it is a static executable and it cannot be relocated.
+         Programming Tesla memory regions
+       =========================================
+       VA = [0xa0000000] of size [0x100000] at PA = [0xe0c00000]
+       VA = [0x20000000] of size [0x100000] at PA = [0xe0d00000]
+       VA = [0x90000000] of size [0x100000] at PA = [0xe0e00000]
+       VA = [0x90100000] of size [0x300000] at PA = [0xe0f00000]
+       VA = [0x9f000000] of size [0x100000] at PA = [0xe1200000]
+         Programming L4 peripherals
+       =========================================
+       VA = [0x60000000] and PA [0x60000000] of size = [0x10000000]
+       VA = [0x70000000] and PA [0x70000000] of size = [0x8000000]
+       VA = [0x78000000] and PA [0x78000000] of size = [0x8000000]
+       VA = [0x4a000000] and PA [0x4a000000] of size = [0x1000000]
+       VA = [0x48000000] and PA [0x48000000] of size = [0x1000000]
+       VA = [0x49000000] and PA [0x49000000] of size = [0x1000000]
+       VA = [0xba000000] and PA [0x5a000000] of size = [0x1000000]
+       Syslink resource manager started
+       #
+
+    4) rpmsg-omx-test:
+       # rpmsg-omx-test 1 10
+
+       You will see output like below on the console:
+       # rpmsg-omx-test 10
+       omx_sample: Connected to OMX
+       omx_sample (1): OMX_GetHandle (H264_decoder).
+               msg_id: 99, fxn_idx: 5, data_size: 13, data: OMX_Callback
+       omx_sample (1): Got omx_handle: 0x5c0ffee5
+       omx_sample(1): OMX_SetParameter (0x5c0ffee5)
+       omx_sample (1): Got result 0
+       omx_sample (2): OMX_GetHandle (H264_decoder).
+               msg_id: 99, fxn_idx: 5, data_size: 13, data: OMX_Callback
+       omx_sample (2): Got omx_handle: 0x5c0ffee5
+       omx_sample(2): OMX_SetParameter (0x5c0ffee5)
+       omx_sample (2): Got result 0
+
+       [...]
+
+       omx_sample (10): OMX_GetHandle (H264_decoder).
+               msg_id: 99, fxn_idx: 5, data_size: 13, data: OMX_Callback
+       omx_sample (10): Got omx_handle: 0x5c0ffee5
+       omx_sample(10): OMX_SetParameter (0x5c0ffee5)
+       omx_sample (10): Got result 0
+       omx_sample: Closed connection to OMX!
+       #
+
+    5) mqcopytestapp:
+       # mqcopytestapp 1
+
+       To see the test app output, run sloginfo:
+       Jan 01 00:00:00    4    42     0 MessageQCopyApp sample application
+
+       Jan 01 00:00:00    4    42     0 Entered MessageQCopyApp_startup
+
+       Jan 01 00:00:00    4    42     0 Leaving MessageQCopyApp_startup. Status [0x0]
+
+       Jan 01 00:00:00    4    42     0 Entered MessageQCopyApp_execute
+
+       Jan 01 00:00:00   4    42     0 <1>mqcopy_server_test_cb 0 for handle 6141352 from 50 [hello world!]
+       Jan 01 00:00:00    4    42     0 <1>mqcopy_server_test_cb 1 for handle 6141352 from 50 [hello world!]
+       Jan 01 00:00:00    4    42     0 <1>mqcopy_server_test_cb 2 for handle 6141352 from 50 [hello world!]
+       Jan 01 00:00:00    4    42     0 <1>mqcopy_server_test_cb 3 for handle 6141352 from 50 [hello world!]
+       Jan 01 00:00:00    4    42     0 <1>mqcopy_server_test_cb 4 for handle 6141352 from 50 [hello world!]
+       Jan 01 00:00:00    4    42     0 <1>mqcopy_server_test_cb 5 for handle 6141352 from 50 [hello world!]
+
+       [...]
+
+       Jan 01 00:00:00    4    42     0 <1>mqcopy_server_test_cb 495 for handle 6141352 from 50 [hello world!]
+       Jan 01 00:00:00    4    42     0 <1>mqcopy_server_test_cb 496 for handle 6141352 from 50 [hello world!]
+       Jan 01 00:00:00    4    42     0 <1>mqcopy_server_test_cb 497 for handle 6141352 from 50 [hello world!]
+       Jan 01 00:00:00    4    42     0 <1>mqcopy_server_test_cb 498 for handle 6141352 from 50 [hello world!]
+       Jan 01 00:00:00    4    42     0 <1>mqcopy_server_test_cb 499 for handle 6141352 from 50 [hello world!]
+       Jan 01 00:00:00    4    42     0 <1>_MessageQCopy_callback_bufReady: no object for endpoint: 103
+
+       Jan 01 00:00:00    4    42     0 Leaving MessageQCopyApp_execute. Status [0x0]
+
+       Jan 01 00:00:00    4    42     0 Entered MessageQCopyApp_shutdown
+
+       Jan 01 00:00:00    4    42     0 Leaving MessageQCopyApp_shutdown. Status [0x0]
+
+       # mqcopytestapp 2
+
+       To see the test app output, run sloginfo:
+       Jan 01 00:00:00    4    42     0 MessageQCopyApp sample application
+
+       Jan 01 00:00:00    4    42     0 Entered MessageQCopyApp_startup
+
+       Jan 01 00:00:00    4    42     0 Leaving MessageQCopyApp_startup. Status [0x0]
+
+       Jan 01 00:00:00    4    42     0 Entered MessageQCopyApp_execute
+
+       Jan 01 00:00:00    4    42     0 <1>mqcopy_client_test_cb 0 for handle 6141352 from 50 [hello world!]
+       Jan 01 00:00:00    4    42     0 <1>mqcopy_client_test_cb 1 for handle 6141352 from 51 [hello world!]
+       Jan 01 00:00:00    4    42     0 <1>mqcopy_client_test_cb 2 for handle 6141352 from 50 [hello world!]
+       Jan 01 00:00:00    4    42     0 <1>mqcopy_client_test_cb 3 for handle 6141352 from 51 [hello world!]
+       Jan 01 00:00:00    4    42     0 <1>mqcopy_client_test_cb 4 for handle 6141352 from 50 [hello world!]
+       Jan 01 00:00:00    4    42     0 <1>mqcopy_client_test_cb 5 for handle 6141352 from 51 [hello world!]
+
+       [...]
+
+       Jan 01 00:00:00    4    42     0 <1>mqcopy_client_test_cb 495 for handle 6141352 from 51 [hello world!]
+       Jan 01 00:00:00    4    42     0 <1>mqcopy_client_test_cb 496 for handle 6141352 from 50 [hello world!]
+       Jan 01 00:00:00    4    42     0 <1>mqcopy_client_test_cb 497 for handle 6141352 from 51 [hello world!]
+       Jan 01 00:00:00    4    42     0 <1>mqcopy_client_test_cb 498 for handle 6141352 from 50 [hello world!]
+       Jan 01 00:00:00    4    42     0 <1>mqcopy_client_test_cb 499 for handle 6141352 from 51 [hello world!]
+       Jan 01 00:00:00    4    42     0 <1>_MessageQCopy_callback_bufReady: no object for endpoint: 103
+
+       Jan 01 00:00:00    4    42     0 <1>_MessageQCopy_callback_bufReady: no object for endpoint: 103
+
+       Jan 01 00:00:00    4    42     0 Leaving MessageQCopyApp_execute. Status [0x0]
+
+       Jan 01 00:00:00    4    42     0 <1>_MessageQCopy_callback_bufReady: no object for endpoint: 103
+
+       Jan 01 00:00:00    4    42     0 Entered MessageQCopyApp_shutdown
+
+       Jan 01 00:00:00    4    42     0 Leaving MessageQCopyApp_shutdown. Status [0x0]
+
+    6) HwSpinLockTestApp:
+       Note: Use the test_omx_dsp to run this test.
+
+       # HwSpinLockTestApp
+
+       You will see output like below on the console:
+
+       # HwSpinLockTestApp
+       PROC=> HwSpinlock_create(0) CREATED
+
+       PROC=> lock (0) entered
+
+       PROC=> return from HwSpinlock_leave(0)
+       HwSpinlock_delete(token0): PASSED
+
+       PROC=> HwSpinlock_create(1) CREATED
+
+       PROC=> lock (1) entered
+
+       PROC=> return from HwSpinlock_leave(1)
+       HwSpinlock_delete(token1): PASSED
+
+       PROC=> HwSpinlock_create(1) CREATED
+
+       PROC=> lock (2) entered
+
+       PROC=> return from HwSpinlock_leave(2)
+       HwSpinlock_delete(token2): PASSED
+       #
+
+    Tiler Standalone Tests:
+    -----------------------
+
+    1) Setup the target
+
+       Copy the following to the target:
+
+       tiler
+       memmgr_test
+       tilerusr_test
+       utils_test
+       libmemmgr.so
+       libtilerusr.so
+       libmemmgr_utils.so
+
+    2) Start tiler from the terminal:
+       # tiler
+
+       You will see output like below on the console:
+       # tiler
+       configured grow size is 16
+       configured grow size is 16
+       tiler: Unable to register to low memory event: Function not implemented
+
+    3) memmgr_test (Note: this test takes a long time on Virtio)
+       # memmgr_test
+       TEST #  1 - alloc_1D_test(4096, 0)
+       TEST_DESC - Allocate & Free 4096b 1D buffer
+       ==> TEST OK
+       so far FAILED: 0, SUCCEEDED: 1, UNAVAILABLE: 0
+       TEST #  2 - alloc_2D_test(64, 64, PIXEL_FMT_8BIT)
+       TEST_DESC - Allocate & Free 64x64x1b 1D buffer
+       ==> TEST OK
+
+       [...]
+
+       TEST # 103 - star_test(1000, 10)
+       TEST_DESC - Random set of 1000 Allocs/Maps and Frees/UnMaps for 10 slots
+       ==> TEST OK
+       so far FAILED: 0, SUCCEEDED: 103, UNAVAILABLE: 0
+       so far FAILED: 0, SUCCEEDED: 103, UNAVAILABLE: 0
+       FAILED: 0, SUCCEEDED: 103, UNAVAILABLE: 0
+
+    4) tilerusr_test (Note: this test takes a long time on Virtio)
+       # tilerusr_test
+       TEST #  1 - alloc_1D_test(4096, 0)
+       TEST_DESC - Allocate & Free 4096b 1D buffer
+       ==> TEST OK
+       so far FAILED: 0, SUCCEEDED: 1, UNAVAILABLE: 0
+       TEST #  2 - alloc_2D_test(64, 64, PIXEL_FMT_8BIT)
+       TEST_DESC - Allocate & Free 64x64x1b 1D buffer
+       ==> TEST OK
+
+       [...]
+
+       TEST # 79 - star_test(1000, 10)
+       TEST_DESC - Random set of 1000 Allocs/Maps and Frees/UnMaps for 10 slots
+       ==> TEST OK
+       so far FAILED: 0, SUCCEEDED: 79, UNAVAILABLE: 0
+       so far FAILED: 0, SUCCEEDED: 79, UNAVAILABLE: 0
+       FAILED: 0, SUCCEEDED: 79, UNAVAILABLE: 0
+
+    5) utils_test
+       # utils_test
+       TEST #  1 - test_new()
+       TEST_DESC - ==> TEST OK
+       so far FAILED: 0, SUCCEEDED: 1, UNAVAILABLE: 0
+       TEST #  2 - test_list()
+       TEST_DESC - ==> TEST OK
+       so far FAILED: 0, SUCCEEDED: 2, UNAVAILABLE: 0
+
+       [...]
+
+       TEST #  7 - test_math()
+       TEST_DESC - ==> TEST OK
+       so far FAILED: 0, SUCCEEDED: 7, UNAVAILABLE: 0
+       so far FAILED: 0, SUCCEEDED: 7, UNAVAILABLE: 0
+       FAILED: 0, SUCCEEDED: 7, UNAVAILABLE: 0
diff --git a/qnx/src/ipc3x_dev/perfutils/Makefile b/qnx/src/ipc3x_dev/perfutils/Makefile
new file mode 100644 (file)
index 0000000..8160dcd
--- /dev/null
@@ -0,0 +1,32 @@
+#
+#   Copyright (c) 2013, Texas Instruments Incorporated
+#
+#   Redistribution and use in source and binary forms, with or without
+#   modification, are permitted provided that the following conditions
+#   are met:
+#
+#   *  Redistributions of source code must retain the above copyright
+#      notice, this list of conditions and the following disclaimer.
+#
+#   *  Redistributions in binary form must reproduce the above copyright
+#      notice, this list of conditions and the following disclaimer in the
+#      documentation and/or other materials provided with the distribution.
+#
+#   *  Neither the name of Texas Instruments Incorporated nor the names of
+#      its contributors may be used to endorse or promote products derived
+#      from this software without specific prior written permission.
+#
+#   THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+#   AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
+#   THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+#   PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
+#   CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+#   EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+#   PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
+#   OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
+#   WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
+#   OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
+#   EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+#
+
+include recurse.mk
diff --git a/qnx/src/ipc3x_dev/perfutils/PerfUtils.c b/qnx/src/ipc3x_dev/perfutils/PerfUtils.c
new file mode 100644 (file)
index 0000000..b7d9c85
--- /dev/null
@@ -0,0 +1,797 @@
+/**
+ *  @file   PerfUtils.c
+ *
+ *  @brief     This modules provides functions for measuring performance
+ *
+ *  ============================================================================
+ *
+ *  Copyright (c) 2009-2012, Texas Instruments Incorporated
+ *
+ *  Redistribution and use in source and binary forms, with or without
+ *  modification, are permitted provided that the following conditions
+ *  are met:
+ *
+ *  *  Redistributions of source code must retain the above copyright
+ *     notice, this list of conditions and the following disclaimer.
+ *
+ *  *  Redistributions in binary form must reproduce the above copyright
+ *     notice, this list of conditions and the following disclaimer in the
+ *     documentation and/or other materials provided with the distribution.
+ *
+ *  *  Neither the name of Texas Instruments Incorporated nor the names of
+ *     its contributors may be used to endorse or promote products derived
+ *     from this software without specific prior written permission.
+ *
+ *  THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+ *  AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
+ *  THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ *  PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
+ *  CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+ *  EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+ *  PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
+ *  OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
+ *  WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
+ *  OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
+ *  EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ *  Contact information for paper mail:
+ *  Texas Instruments
+ *  Post Office Box 655303
+ *  Dallas, Texas 75265
+ *  Contact information:
+ *  http://www-k.ext.ti.com/sc/technical-support/product-information-centers.htm?
+ *  DCMP=TIHomeTracking&HQS=Other+OT+home_d_contact
+ *  ============================================================================
+ *
+ */
+
+/* Linux specific header files */
+#include <sys/time.h>
+/* Standard headers */
+#include <stdlib.h>
+#include <string.h>
+
+/* OSAL & Utils headers */
+#include <PerfUtils.h>
+
+/* Linux specific header files */
+#include <sys/types.h>
+#include <sys/ioctl.h>
+#include <fcntl.h>
+#include <stdio.h>
+#include <unistd.h>
+#include <errno.h>
+#include <sys/mman.h>
+/* OSAL & Utils headers */
+#include <stdint.h>
+
+
+#define SYSM3_PROC 2
+#define APPM3_PROC 3
+/* PERF UTILS ERROR CODES  START        */
+/*Reserved index CML4 clock*/
+typedef enum perf_util_index{
+ PERF_UTIL_KERNEL_INDEX = 0,
+ PERF_UTIL_GPTIMER_INDEX,
+ PERF_UTIL_SYSCLK_INDEX,
+ PERF_UTILS_CML4_INDEX,
+ PERF_UTILS_MAX_IDENX ,
+ PERF_UTILS_RECORDS_INDEX = -2
+}perf_util_index;
+
+//#define PERF_UTILS_DEBUG_SUPPORT 1
+#define PERF_UTILS_SUCCESS             (0)
+#define PERF_UTILS_FAILURE             (-1)
+#define PERF_UTILS_INIT_FAILED         (-2)
+#define PERF_UTILS_GPTIMER_TEN         (10)
+//#define PERF_UTILS_DEBUG_SUPPORT 1
+#define SYSLINK_MEM_IPC_HEAP2_ADDR 0x97FAA000
+/* 6K memory mapping for perfutils*/
+#define SYSLINK_MEM_IPC_HEAP2_SIZE ((MAX_NUM_KERNELSPACE_RECORDS) * (sizeof(Perf_FunctionRecord)))
+//#define SYSLINK_MEM_IPC_HEAP2_SIZE 0x2900
+/* PERF UTILS ERROR CODES  END          */
+
+/* GENERIC MACROS TO ACCESS GPTIMER REGISTERS */
+#define REG(MODULE,MODULENO,NAME,BASEADDR) \
+        REG_OFFSET(MODULE##MODULENO, _##NAME,BASEADDR)
+//#define REG_OFFSET(CMODULE_NO,NAME) REG_ADDR(CMODULE_NO##NAME##REG_OFFSET,CMODULE_NO##_MODULE_BASE##_ADDR)
+#define REG_OFFSET(CMODULE_NO, NAME,BASEADDR) \
+        REG_ADDR(CMODULE_NO##NAME##REG_OFFSET,BASEADDR)
+
+#define REG_ADDR(OFFSET, BASE)   ((OFFSET) + (BASE))
+
+/* GP TIMER REGISTER ADDRESSES AND OFFSET           */
+#define GPTIMER_MODULE_REGSET_SIZE          0x00000058
+#define GPTIMER_CTRLREG_AR_BIT_POS          0x00000001
+#define GPTIMER_CTRLREG_PTV_BIT_POS         0x00000002
+#define GPTIMER_CTRLREG_PRE_BIT_POS         0x00000005
+#define GPTIMER_CTRLREG_ST_BIT_POS          0x00000000
+
+/* GP TIMER 10                                      */
+#define GPTIMER10_MODULE_BASE_ADDR          0x48086000
+#if defined (SYSLINK_PLATFORM_OMAP4430)
+#define GPTIMER10_CTRLREG_OFFSET            0x00000009
+#define GPTIMER10_CRRREG_OFFSET             0x0000000a
+#define GPTIMER10_LDRREG_OFFSET             0x0000000b
+#elif defined(SYSLINK_PLATFORM_OMAP5430)
+#define GPTIMER10_CTRLREG_OFFSET            0x0000000e
+#define GPTIMER10_CRRREG_OFFSET             0x0000000f
+#define GPTIMER10_LDRREG_OFFSET             0x00000010
+#endif
+
+/*GP TIMER 9                                        */
+#define GPTIMER9_MODULE_BASE_ADDR           0x4803E000
+#define GPIMER9_CLRREG_OFFSET               0x00000038
+#define GPTIMER9_CRRREG_OFFSET              0x0000003C
+#define GPTIMER9_LDRREG_OFFSET              0x00000040
+
+/* L4PER_CM2 registers  */
+#define CM_L4PER_GPTIMER_BASE_ADDR           0x4A009400
+#if defined(SYSLINK_PLATFORM_OMAP4430)
+#define CM_SYS_CLKSEL_REG                    0x4A306110
+#elif defined(SYSLINK_PLATFORM_OMAP5430)
+#define CM_SYS_CLKSEL_REG                    0x4AE06110
+#endif
+#define CM_L4PER_GPTIMER_REGSET_SIZE         0x00000030
+#define CM_L4PER_GPTIMER10_CLKCTRLREG_OFFSET 0x0000000A
+#define CM_L4PER_GPTIMER10_CLKCTRLREG        0x4A009428
+#define CM_L4PER_GPTIMER10_CLKCTRLREG_SIZE   0x00000004
+
+#define SYS_CLK_UNINITIALIZED                0x0000000
+#define SYS_CLK_12MHZ_FREQ                   0x0B71B00
+#define SYS_CLK_13MHZ_FREQ                   0x0C65D40
+#define SYS_CLK_16_8MHZ_FREQ                 0x1005900
+#define SYS_CLK_19_2MHZ_FREQ                 0x124F800
+#define SYS_CLK_26MHZ_FREQ                   0x18CBA80
+#define SYS_CLK_27MHZ_FREQ                   0x19BFCC0
+#define SYS_CLK_38_4MHZ_FREQ                 0x249F000
+#define CONV_FACTOR_SEC_TO_USEC              1000000
+
+// Must match struct definition on Ducati side
+#define MAX_NUM_USERSPACE_RECORDS   10
+#define MAX_NUM_KERNELSPACE_RECORDS 5
+
+typedef struct {
+    unsigned int numEntries;
+    unsigned int enterTimes[MAX_ENTRIES_PER_FUNCTION];
+    unsigned int exitTimes[MAX_ENTRIES_PER_FUNCTION];
+    char fxnName[128];
+    unsigned int client_proc;
+    unsigned int server_proc;
+    unsigned int msg_size;
+} Perf_FunctionRecord;
+
+typedef struct
+{
+    unsigned int numEntries;
+    struct timeval enterTimes[MAX_ENTRIES_PER_FUNCTION];
+    struct timeval exitTimes[MAX_ENTRIES_PER_FUNCTION];
+    char fxnName[128];
+    unsigned int client_proc;
+    unsigned int server_proc;
+    unsigned int msg_size;
+} Perf_LocalRecord;
+
+#ifdef USE_GPTIMER
+static Perf_FunctionRecord perfRecordsArr[MAX_NUM_USERSPACE_RECORDS];
+static Perf_FunctionRecord *perfRecordsUserSpace;
+#else
+static Perf_LocalRecord    perfRecordsArr[MAX_NUM_USERSPACE_RECORDS];
+static Perf_LocalRecord *perfRecordsUserSpace;
+#endif
+
+typedef struct
+{
+    unsigned int enablePrescale:1;
+    unsigned int enableautoReload:1;
+    unsigned int valuePrescalar:3;
+    unsigned int gpTimer:4;
+}Perf_GptimerConfig;
+
+typedef struct Memory_MapInfo_tag {
+    unsigned int   src;
+    /*!< Address to be mapped. */
+    unsigned int   size;
+    /*!< Size of memory region to be mapped. */
+    unsigned int   dst;
+    /*!< Mapped address. */
+} Memory_MapInfo ;
+
+static Memory_MapInfo memoryMap[PERF_UTILS_MAX_IDENX];
+
+static volatile unsigned int* addrGptimerCtrlReg;
+static volatile unsigned int* addrGptimerReadReg;
+static volatile unsigned int* addrGptimerLoadReg;
+static volatile unsigned int* addrGptimerBaseReg;
+static volatile unsigned int* addrCmSysClkSelReg;
+static volatile unsigned int* timeStampUserSpace;
+static volatile unsigned int* addrCmL4GptimerBaseReg;
+static volatile unsigned int* addrCmL4PGptimerCtrlReg;
+
+static unsigned int sysClockFreq;
+static unsigned int valuePrescalar;
+
+static unsigned int
+OsalDrv_ioMap (unsigned int addr, unsigned int size)
+{
+    unsigned int pageSize = getpagesize ();
+    unsigned int taddr;
+    unsigned int tsize;
+    uintptr_t * userAddr = NULL;
+
+       taddr = addr;
+       tsize = size;
+       /* Align the physical address to page boundary */
+       tsize = tsize + (taddr % pageSize);
+       taddr = taddr - (taddr % pageSize);
+       userAddr = (uintptr_t *)mmap_device_io(tsize, taddr);
+       if (userAddr == (uintptr_t *) MAP_FAILED) {
+               userAddr = NULL;
+               perror ("Failed to map memory to user space with mmap_device_io!");
+       }
+       else {
+               /* Change the user address to reflect the actual user address of
+                * memory block mapped. This is done since during mmap memory block
+                * was shifted (+-) so that it is aligned to page boundary.
+                */
+               taddr = (unsigned int)userAddr;
+               taddr = taddr + (addr % pageSize);
+       }
+
+    return taddr;
+}
+
+
+/*!
+ *  @brief  Function to unmap a memory region specific to the driver.
+ *
+ *  @sa     OsalDrv_close,OsalDrv_open,OsalDrv_map
+ */
+static void
+OsalDrv_ioUnmap (unsigned int addr, unsigned int size)
+{
+    unsigned int pageSize = getpagesize ();
+    unsigned int taddr;
+    unsigned int tsize;
+    unsigned int status;
+
+       taddr = addr;
+       tsize = size;
+
+       /* Get the actual user address and size. Since these are modified at the
+        * time of mmaping, to have memory block page boundary aligned.
+        */
+       tsize = tsize + (taddr % pageSize);
+       taddr = taddr - (taddr % pageSize);
+       status = munmap_device_io((uintptr_t) taddr, tsize);
+       if (status == -1) {
+               perror ("Failed to unmap memory with munmap_device_io! ");
+       }
+}
+
+/*========= PerfUtils_calcSysClkFreq============
+ * read the status from CM_SYS_CLK_REG
+ * and will map that value to sys freq
+ */
+static
+unsigned int PerfUtils_calcSysClkFreq (void)
+{
+    unsigned int reg;
+    unsigned int sysClkFreq;
+    static int statusInit = 0;
+    Memory_MapInfo *cmSysClkSel;
+
+    cmSysClkSel = &(memoryMap[PERF_UTIL_SYSCLK_INDEX]);
+    cmSysClkSel->src  = CM_SYS_CLKSEL_REG;
+    cmSysClkSel->size = 0x4;
+
+#ifdef PERF_UTILS_DEBUG_SUPPORT
+    printf ("PerfUtils_calcSysClkFreq :Enter\n");
+#endif
+    if (0 == statusInit) {
+
+       cmSysClkSel->dst = OsalDrv_ioMap (cmSysClkSel->src, cmSysClkSel->size);
+        if(cmSysClkSel->dst == NULL) {
+            printf("PerfUtils_calcSysClkFreq: Memory_map failed"
+                                         "returned [0x%x]\n", errno);
+            return -1;
+         }
+        statusInit = 1;
+    }
+
+    printf ("PerfUtils_calcSysClkFreq :Enter1\n");
+    addrCmSysClkSelReg = (unsigned int*)cmSysClkSel->dst;
+    printf ("PerfUtils_calcSysClkFreq :Enter2\n");
+    reg = (unsigned int)*addrCmSysClkSelReg;
+    printf ("PerfUtils_calcSysClkFreq :Enter3\n");
+    //reg &= 0x00000007;
+
+    printf ("PerfUtils_calcSysClkFreq :Enter4\n");
+#if 0
+    switch (reg) {
+        case 0 :
+                sysClkFreq = SYS_CLK_UNINITIALIZED;
+                break;
+        case 1 :
+                sysClkFreq = SYS_CLK_12MHZ_FREQ;
+                break;
+        case 2 :
+                sysClkFreq = SYS_CLK_13MHZ_FREQ;
+                break;
+        case 3 :
+                sysClkFreq = SYS_CLK_16_8MHZ_FREQ;
+                break;
+        case 4 :
+                sysClkFreq = SYS_CLK_19_2MHZ_FREQ;
+                break;
+        case 5 :
+                sysClkFreq = SYS_CLK_26MHZ_FREQ;
+                break;
+        case 6 :
+                sysClkFreq = SYS_CLK_27MHZ_FREQ;
+                break;
+        case 7 :
+                sysClkFreq = SYS_CLK_38_4MHZ_FREQ;
+                break;
+    }
+#endif
+                sysClkFreq = SYS_CLK_38_4MHZ_FREQ;
+
+    OsalDrv_ioUnmap(cmSysClkSel->dst, cmSysClkSel->size);
+#ifdef PERF_UTILS_DEBUG_SUPPORT
+    printf("SysClk is cloking @ [%d]\n",sysClkFreq);
+    printf ("PerfUtils_calcSysClkFreq :Leave\n");
+#endif
+    return sysClkFreq;
+}
+/*
+ *========= PerfUtils_setRegValue==============
+ * Generic function for writing value to register
+ */
+static inline
+void PerfUtils_setRegValue (volatile unsigned int *addrReg, unsigned int bitPos,
+                                        unsigned int noBits, unsigned int value)
+{
+    unsigned int valueTmp = 0xFFFFFFFF;
+    unsigned int valueMask = (0x1 << noBits);
+    unsigned int valueStore;
+
+#ifdef PERF_UTILS_DEBUG_SUPPORT
+    printf ("PerfUtils_setRegValue:Enter addrReg:[%x] *addrReg[%x] bitPos:[%x]\n"
+                  "noBits:[%x] value:[%x]\n", (unsigned int)addrReg, (unsigned int)*addrReg, bitPos, noBits, value);
+#endif
+    valueMask -= 1;
+
+    if (0 == value) {
+        valueTmp ^= ((valueMask << bitPos));
+        *(addrReg) &= valueTmp;
+    }
+    else {
+        valueStore =  (value << bitPos);
+#ifdef PERF_UTILS_DEBUG_SUPPORT
+        printf ("PerfUtils_setRegValue:Writing value [%x] to [%x]\n",
+                                                       valueStore,(unsigned int)addrReg);
+#endif
+        *(addrReg) |= valueStore;
+    }
+#ifdef PERF_UTILS_DEBUG_SUPPORT
+    printf ("PerfUtils_setRegValue:Leave addrReg:[%x] *addrReg[%x] bitPos:[%x]\n"
+                  "noBits:[%x] value:[%x]\n", (unsigned int)addrReg, (unsigned int)*addrReg, bitPos, noBits, value);
+#endif
+
+}
+/*
+ *============= PerfUtils_gptimerModuleConfig===========
+ * Configure the gptimer module for autoreload,prescalar
+ */
+static
+int PerfUtils_gptimerModuleConfig (Perf_GptimerConfig *gptimerConfig)
+{
+
+    Memory_MapInfo *gptimerModConf;
+    int status = PERF_UTILS_SUCCESS;
+    unsigned int valueTest;
+
+#ifdef PERF_UTILS_DEBUG_SUPPORT
+    printf ("PerfUtils_gptimerModuleConfig :Enter\n");
+#endif
+    if (NULL == gptimerConfig) {
+        printf ("Module cconfiguration parameted passed is NULL\n");
+        return PERF_UTILS_FAILURE;
+    }
+    gptimerModConf = &(memoryMap[PERF_UTIL_GPTIMER_INDEX]);
+    gptimerModConf->src = GPTIMER10_MODULE_BASE_ADDR;
+    gptimerModConf->size = GPTIMER_MODULE_REGSET_SIZE;
+
+    gptimerModConf->dst = OsalDrv_ioMap(gptimerModConf->src, gptimerModConf->size);
+    if (gptimerModConf->dst == NULL) {
+        printf ("PerfUtils_gptimerModuleConfig:Memory_map\
+                                   failed status [%x]\n", status);
+        return status;
+    }
+
+    addrGptimerBaseReg = (unsigned int*)gptimerModConf->dst;
+#ifdef PERF_UTILS_DEBUG_SUPPORT
+    printf ("PerfUtils_gptimerModuleConfig:addrGptimerBaseReg [%x]\n",
+                                                       (unsigned int)addrGptimerBaseReg);
+#endif
+    addrGptimerCtrlReg = REG(GPTIMER, 10, CTRL, addrGptimerBaseReg);
+#ifdef PERF_UTILS_DEBUG_SUPPORT
+    printf ("PerfUtils_gptimerModuleConfig:addrGptimerCtrlReg [%x]\n",
+                                                       (unsigned int)addrGptimerCtrlReg);
+#endif
+    addrGptimerReadReg = REG(GPTIMER, 10, CRR, addrGptimerBaseReg);
+
+#ifdef PERF_UTILS_DEBUG_SUPPORT
+    printf ("PerfUtils_gptimerModuleConfig:addrGptimerReadReg [%x]\n",
+                                                       (unsigned int)addrGptimerReadReg);
+#endif
+    addrGptimerLoadReg = REG(GPTIMER, 10, LDR, addrGptimerBaseReg);
+#ifdef PERF_UTILS_DEBUG_SUPPORT
+    printf ("PerfUtils_gptimerModuleConfig:addrGptimerLoadReg [%x]\n",
+                                                       (unsigned int)addrGptimerLoadReg);
+#endif
+
+    /*  Setting to Autoreload mode
+        0x0: One shot timer
+        0x1: Autoreload timer
+    */
+    if (gptimerConfig->enableautoReload) {
+        PerfUtils_setRegValue (addrGptimerCtrlReg,
+                                GPTIMER_CTRLREG_AR_BIT_POS, 1, 1);
+    }
+
+    /*The timer counter is prescaled with the value 2(PTV+1).
+    Example: PTV = 3, counter increases value (if started)
+    after 16 functional clock periods.
+    */
+    if (gptimerConfig->enablePrescale) {
+        PerfUtils_setRegValue (addrGptimerCtrlReg,GPTIMER_CTRLREG_PTV_BIT_POS,
+                                                gptimerConfig->valuePrescalar, 1);
+        valuePrescalar = (0x1 << 2);
+
+    /* Enabling prescalar
+    0x0: The TIMER clock input pin clocks the counter.
+    0x1: The divided input pin clocks the counter.
+    */
+        PerfUtils_setRegValue (addrGptimerCtrlReg,
+                                GPTIMER_CTRLREG_PRE_BIT_POS, 1, 0);
+    }
+#ifdef PERF_UTILS_DEBUG_SUPPORT
+    printf ("PerfUtils_gptimerModuleConfig:*addrGptimerCtrlReg [%x]\n",
+                                                       *addrGptimerCtrlReg);
+#endif
+    /*Initializing Timer Counter value to 0 */
+    *addrGptimerReadReg = 0x00000000;
+    /*Initializing Loader Register value to 0 */
+    *addrGptimerLoadReg = 0x00000000;
+
+    timeStampUserSpace = addrGptimerReadReg;
+    valueTest = *(timeStampUserSpace);
+
+#ifdef PERF_UTILS_DEBUG_SUPPORT
+    printf ("PerfUtils_gptimerModuleConfig :Leave\n");
+#endif
+    return status;
+}
+/*
+ *========= PerfUtils_startGpTimer======
+ *          To start the gptimer
+ */
+void PerfUtils_startGpTimer (int gpTimerNo)
+{
+#ifdef PERF_UTILS_DEBUG_SUPPORT
+    printf ("PerfUtils_startGpTimer :Enter GPTIMER[%x]\n", gpTimerNo);
+#endif
+#ifdef USE_GPTIMER
+    PerfUtils_setRegValue (addrGptimerCtrlReg,
+                            GPTIMER_CTRLREG_ST_BIT_POS, 1, 1);
+#endif
+#ifdef PERF_UTILS_DEBUG_SUPPORT
+    printf ("PerfUtils_startGpTimer :Leave GPTIMER[%x]\n", gpTimerNo);
+#endif
+}
+/*======= PerfUtils_stopGpTimer=========
+ *        To  Stop the gptimer
+ */
+
+void PerfUtils_stopGpTimer (int gpTimerNo)
+{
+#ifdef PERF_UTILS_DEBUG_SUPPORT
+    printf ("PerfUtils_stopGpTimer :Enter GPTIMER[%x]\n", gpTimerNo);
+#endif
+#ifdef USE_GPTIMER
+    PerfUtils_setRegValue (addrGptimerCtrlReg,
+                            GPTIMER_CTRLREG_ST_BIT_POS, 1, 0);
+
+    /* Resetting Read Register Value  */
+    *addrGptimerReadReg = 0x00000000;
+#endif
+#ifdef PERF_UTILS_DEBUG_SUPPORT
+    printf ("PerfUtils_stopGpTimer :Leave GPTIMER[%x]\n", gpTimerNo);
+#endif
+}
+/*
+ *============PerfUtils_selectClkSrc================
+ * Selecting the clock src  b/w 32Khz and system clock
+ */
+static
+int PerfUtils_selectClkSrc (int clkSrc)
+{
+    int status = PERF_UTILS_SUCCESS;
+    unsigned int readvalue;
+    Memory_MapInfo *clkMgmntL4Gptimer =
+                &(memoryMap[PERF_UTILS_CML4_INDEX]);
+
+    clkMgmntL4Gptimer->src = (CM_L4PER_GPTIMER_BASE_ADDR);
+    clkMgmntL4Gptimer->size = (CM_L4PER_GPTIMER_REGSET_SIZE);
+
+    clkMgmntL4Gptimer->dst = OsalDrv_ioMap(clkMgmntL4Gptimer->src, clkMgmntL4Gptimer->size);
+    if (clkMgmntL4Gptimer->dst == NULL) {
+        printf ("PerfUtils_selectClkSrc:Memory_map failed status[%x]\n", status);
+        return status;
+    }
+
+  addrCmL4GptimerBaseReg = (unsigned int*) (clkMgmntL4Gptimer->dst);
+  addrCmL4PGptimerCtrlReg = REG(CM_L4PER_GPTIMER, 10, CLKCTRL,
+                                             addrCmL4GptimerBaseReg);
+  readvalue  = *addrCmL4PGptimerCtrlReg;
+  while (!(readvalue & 0x02)) {
+        PerfUtils_setRegValue (addrCmL4PGptimerCtrlReg, 0, 2, 2);
+        readvalue = *addrCmL4PGptimerCtrlReg;
+    }
+
+  OsalDrv_ioUnmap(clkMgmntL4Gptimer->dst, clkMgmntL4Gptimer->size);
+    return status;
+}
+
+/*
+ * ========= PerfUtils_init ========
+ */
+int PerfUtils_init()
+{
+    int status;
+    unsigned int sysClkFreq;
+    Perf_GptimerConfig gpTimerConfig;
+
+    PerfUtils_selectClkSrc (10);
+#ifdef USE_GPTIMER
+    sysClkFreq = PerfUtils_calcSysClkFreq();
+    if (0 == sysClkFreq) {
+        printf("PerfUtils_init : SYSCLK not initialized in kernel\n"
+                     "can't  use  sys clk timer for profiling\n");
+        status = PERF_UTILS_INIT_FAILED;
+        return status;
+    }
+
+    sysClockFreq = sysClkFreq;
+    gpTimerConfig.enableautoReload = 1;
+    gpTimerConfig.enablePrescale = 0;
+    gpTimerConfig.valuePrescalar = 0;
+    gpTimerConfig.gpTimer =10;
+    status = PerfUtils_gptimerModuleConfig (&gpTimerConfig);
+    if (0 > status) {
+        printf ("PerfUtils_init:PerfUtils_gptimerModuleConfig"
+                                                "failed status[%x]\n", status);
+        return status;
+    }
+#endif
+
+    perfRecordsUserSpace = perfRecordsArr;
+
+    memset(perfRecordsUserSpace, 0, sizeof(perfRecordsUserSpace)
+        * MAX_NUM_USERSPACE_RECORDS);
+
+       return status;
+}
+
+/*
+ * ========PerfUtils_destroy========
+ * To destroy the gptimer module
+ */
+int PerfUtils_destroy (void)
+{
+    int status = 0;
+
+    OsalDrv_ioUnmap((unsigned int)addrGptimerBaseReg, GPTIMER_MODULE_REGSET_SIZE);
+
+    return status;
+}
+
+
+/*
+ * ======== PerfUtils_addFxn ========
+ * To add functions for profiling
+ */
+void PerfUtils_addFxn(unsigned int fxnIndex, char * fxnName, unsigned int clientproc, unsigned int serverproc, unsigned int msgsize)
+{
+#ifdef USE_GPTIMER
+    Perf_FunctionRecord *record = &(perfRecordsUserSpace[fxnIndex]);
+#else
+    Perf_LocalRecord    *record = &(perfRecordsUserSpace[fxnIndex]);
+#endif
+
+#ifdef PERF_UTILS_DEBUG_SUPPORT
+    printf("PerfUtils_addFxn: Enter\n");
+    printf("PerfUtils_addFxn: Adding function %s\n",fxnName);
+#endif
+
+    strcpy(record->fxnName, fxnName);
+    record->client_proc = clientproc;
+    record->server_proc = serverproc;
+    record->msg_size = msgsize;
+
+#ifdef PERF_UTILS_DEBUG_SUPPORT
+    printf("PerfUtils_addFxn: Leave\n");
+#endif
+}
+
+/*
+ * ============= PerfUtils_enter ============
+ * Record enter timing for the registered function
+ */
+int PerfUtils_enter(unsigned int fxnIndex)
+{
+    int status = 0;
+    int noEntry = 0;
+#ifdef USE_GPTIMER
+    Perf_FunctionRecord *record = (perfRecordsUserSpace + fxnIndex);
+#else
+    Perf_LocalRecord *record = (perfRecordsUserSpace + fxnIndex);
+#endif
+
+#ifdef PERF_UTILS_DEBUG_SUPPORT
+    printf ("PerfUtils_enter: Enter\n");
+#endif
+    noEntry = record->numEntries;
+
+
+    if(noEntry < MAX_ENTRIES_PER_FUNCTION) {
+#ifdef USE_GPTIMER
+        record->enterTimes[record->numEntries] = *(timeStampUserSpace);
+#else
+        status = gettimeofday(&(record->enterTimes[noEntry]),NULL);
+
+#ifdef PERF_UTILS_DEBUG_SUPPORT
+        printf("enter Timestamp sec [%d] usec [%d] \n",record->enterTimes[noEntry].tv_sec,
+                                                            record->enterTimes[noEntry].tv_usec);
+#endif
+        if (0 != status) {
+            printf("PerfUtils_enter:error in getimeofday\n");
+        }
+#endif
+    }
+
+#ifdef PERF_UTILS_DEBUG_SUPPORT
+   printf("PerfUtils_enter: Leave\n");
+#endif
+    return status;
+}
+
+/*
+ * ============= PerfUtils_exit ===============
+ * Record the exit timing for the registered function
+ */
+int PerfUtils_exit(unsigned int fxnIndex)
+{
+    int status = 0;
+    int noEntry = 0;
+#ifdef USE_GPTIMER
+    unsigned int exitTime = *(timeStampUserSpace);
+    Perf_FunctionRecord *record = (perfRecordsUserSpace + fxnIndex);
+#else
+    Perf_LocalRecord *record = (perfRecordsUserSpace + fxnIndex);
+#endif
+
+#ifdef PERF_UTILS_DEBUG_SUPPORT
+    printf("PerfUtils_exit: Enter\n");
+#endif
+
+    noEntry = record->numEntries;
+    if(noEntry < MAX_ENTRIES_PER_FUNCTION) {
+
+#ifdef USE_GPTIMER
+        record->exitTimes[record->numEntries] = exitTime;
+#else
+        status = gettimeofday(&(record->exitTimes[noEntry]),NULL);
+#endif
+
+#if defined(PERF_UTILS_DEBUG_SUPPORT) && !defined(USE_GPTIMER)
+        printf("exit Timestamp sec [%d] usec [%d] \n",record->exitTimes[noEntry].tv_sec,
+                                                            record->exitTimes[noEntry].tv_usec);
+#endif
+        if (0 != status) {
+            printf("PerfUtils_enter:error in getimeofday\n");
+        }
+
+        record->numEntries++;
+    }
+
+#ifdef PERF_UTILS_DEBUG_SUPPORT
+    printf("PerfUtils_exit: Leave\n");
+#endif
+
+    return status;
+}
+
+static
+void PerfUtils_printUserSpaceReport (void)
+{
+    unsigned int i, j;
+    unsigned int sysClkFreq;
+    unsigned int enterTime, exitTime;
+    unsigned int totalTimeuSec, diff;
+#if 0
+    FILE *fp;
+#endif
+#ifdef USE_GPTIMER
+    Perf_FunctionRecord *record;
+    sysClkFreq = sysClockFreq;
+    sysClkFreq = sysClkFreq/100000;
+#else
+    Perf_LocalRecord *record;
+#endif
+#if 0
+       fp  = fopen("Report.txt","w+");
+
+    if (NULL == fp){
+        printf("Opening file filed\n");
+        exit(0);
+     }
+#endif
+    printf("============UserSpace report============\n");
+
+    for(j = 0; j < MAX_NUM_USERSPACE_RECORDS; j++) {
+        record = (perfRecordsUserSpace + j);
+        for(i = 0; i < record->numEntries; i++) {
+            if (0 == i) {
+                printf("%s\n",record->fxnName);
+                printf("clientproc %u\n",record->client_proc);
+                printf("serverproc %u\n",record->server_proc);
+                printf("msgsize %u\n",record->msg_size);
+                printf("count  %u\n",record->numEntries);
+                totalTimeuSec = 0;
+            }
+#ifdef USE_GPTIMER
+            enterTime = record->enterTimes[i];
+            exitTime =  record->exitTimes[i];
+#else
+            enterTime = ((record->enterTimes[i].tv_sec * 1000000) + record->enterTimes[i].tv_usec);
+            exitTime = ((record->exitTimes[i].tv_sec * 1000000) + record->exitTimes[i].tv_usec);
+#endif
+            diff = (exitTime - enterTime);
+#ifdef USE_GPTIMER
+            /* Converting to usecs */
+            totalTimeuSec += (diff * 10 / sysClkFreq);
+            printf ("> %s took %u us or period %u\n", record->fxnName, diff * 10 / sysClkFreq, diff);
+#else
+            printf("record->enterTimes[i].tv_sec [%d] record->exitTimes[i].tv_sec [%d]\n",
+                        record->enterTimes[i].tv_sec,record->exitTimes[i].tv_sec);
+            printf("record->enterTimes[i].tv_usec [%d] record->exitTimes[i].tv_usec [%d]\n",
+                        record->enterTimes[i].tv_usec,record->exitTimes[i].tv_usec);
+            printf ("> %s took %u us\n", record->fxnName, diff);
+#endif
+
+        }
+        if (record->numEntries > 0) {
+            printf("========================================\n");
+            printf("AVG time: %u us\n", totalTimeuSec / record->numEntries);
+            printf("========================================\n");
+        }
+    }
+//    fclose(fp);
+    printf("===========End of UserSpace report======\n");
+}
+
+
+/*
+ * ======== PerfUtils_printReport ========
+ *          Print report to user
+ */
+
+void PerfUtils_printReport (int printLevel)
+{
+    if (printLevel == 1) {
+        PerfUtils_printUserSpaceReport ();
+    }
+}
+
diff --git a/qnx/src/ipc3x_dev/perfutils/PerfUtils.h b/qnx/src/ipc3x_dev/perfutils/PerfUtils.h
new file mode 100644 (file)
index 0000000..b31dee4
--- /dev/null
@@ -0,0 +1,101 @@
+/**
+ *  @file   PerfUtils.h
+ *
+ *  @brief      Performance functions
+ *
+ *              This will have the definitions for the performance measurement
+ *              functions.
+ *
+ *  ============================================================================
+ *
+ *  Copyright (c) 2009-2012, Texas Instruments Incorporated
+ *
+ *  Redistribution and use in source and binary forms, with or without
+ *  modification, are permitted provided that the following conditions
+ *  are met:
+ *
+ *  *  Redistributions of source code must retain the above copyright
+ *     notice, this list of conditions and the following disclaimer.
+ *
+ *  *  Redistributions in binary form must reproduce the above copyright
+ *     notice, this list of conditions and the following disclaimer in the
+ *     documentation and/or other materials provided with the distribution.
+ *
+ *  *  Neither the name of Texas Instruments Incorporated nor the names of
+ *     its contributors may be used to endorse or promote products derived
+ *     from this software without specific prior written permission.
+ *
+ *  THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+ *  AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
+ *  THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ *  PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
+ *  CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+ *  EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+ *  PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
+ *  OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
+ *  WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
+ *  OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
+ *  EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ *  Contact information for paper mail:
+ *  Texas Instruments
+ *  Post Office Box 655303
+ *  Dallas, Texas 75265
+ *  Contact information:
+ *  http://www-k.ext.ti.com/sc/technical-support/product-information-centers.htm?
+ *  DCMP=TIHomeTracking&HQS=Other+OT+home_d_contact
+ *  ============================================================================
+ *
+ */
+
+
+#ifndef PERFUTILS_H
+#define PERFUTILS_H
+
+/* Linux specific header files */
+#include <sys/time.h>
+
+/* Standard headers */
+#include <stdio.h>
+
+
+#if defined (__cplusplus)
+extern "C" {
+#endif
+
+
+#define SYSM3_PROC 2
+#define APPM3_PROC 3
+
+
+/* USING MEM_IPC_HEAP2 make sure that,not using the
+ * this address
+ */
+
+#define PERF_UTILS_GPTIMER_TEN         (10)
+#define TOTAL_PERF_BUFFER_SIZE         (SYSM3_PERF_BUFFER_SIZE \
+                                            + APPM3_PERF_BUFFER_SIZE)
+
+// Must match struct definition on Ducati side
+#define MAX_ENTRIES_PER_FUNCTION    200
+#define MAX_ENTRIES_PER_KERNEL_FUNC 64
+#define MAX_NUM_RECORDS             64
+#define GPTIMER10 10
+
+
+/* =============================================================================
+ *  APIs
+ * =============================================================================
+ */
+int PerfUtils_init(void);
+int PerfUtils_destroy (void);
+void PerfUtils_addFxn(unsigned int fxnIndex, char * fxnName, unsigned int clientproc, unsigned int serverproc, unsigned int msgsize);
+int PerfUtils_enter (unsigned int fxnIndex);
+int PerfUtils_exit (unsigned int fxnIndex);
+void PerfUtils_printReport (int printLevel);
+void PerfUtils_startGpTimer (int gpTimerNo);
+void PerfUtils_stopGpTimer (int gpTimerNo);
+#if defined (__cplusplus)
+}
+#endif /* defined (__cplusplus) */
+
+#endif /* ifndef PERFUTILS_H */
diff --git a/qnx/src/ipc3x_dev/perfutils/arm/Makefile b/qnx/src/ipc3x_dev/perfutils/arm/Makefile
new file mode 100644 (file)
index 0000000..84cd0b9
--- /dev/null
@@ -0,0 +1,39 @@
+#
+#   Copyright (c) 2013, Texas Instruments Incorporated
+#
+#   Redistribution and use in source and binary forms, with or without
+#   modification, are permitted provided that the following conditions
+#   are met:
+#
+#   *  Redistributions of source code must retain the above copyright
+#      notice, this list of conditions and the following disclaimer.
+#
+#   *  Redistributions in binary form must reproduce the above copyright
+#      notice, this list of conditions and the following disclaimer in the
+#      documentation and/or other materials provided with the distribution.
+#
+#   *  Neither the name of Texas Instruments Incorporated nor the names of
+#      its contributors may be used to endorse or promote products derived
+#      from this software without specific prior written permission.
+#
+#   THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+#   AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
+#   THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+#   PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
+#   CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+#   EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+#   PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
+#   OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
+#   WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
+#   OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
+#   EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+#
+
+LIST=VARIANT
+ifndef QRECURSE
+QRECURSE=recurse.mk
+ifdef QCONFIG
+QRDIR=$(dir $(QCONFIG))
+endif
+endif
+include $(QRDIR)$(QRECURSE)
diff --git a/qnx/src/ipc3x_dev/perfutils/arm/so.le.v7/Makefile b/qnx/src/ipc3x_dev/perfutils/arm/so.le.v7/Makefile
new file mode 100644 (file)
index 0000000..98debad
--- /dev/null
@@ -0,0 +1,32 @@
+#
+#   Copyright (c) 2013, Texas Instruments Incorporated
+#
+#   Redistribution and use in source and binary forms, with or without
+#   modification, are permitted provided that the following conditions
+#   are met:
+#
+#   *  Redistributions of source code must retain the above copyright
+#      notice, this list of conditions and the following disclaimer.
+#
+#   *  Redistributions in binary form must reproduce the above copyright
+#      notice, this list of conditions and the following disclaimer in the
+#      documentation and/or other materials provided with the distribution.
+#
+#   *  Neither the name of Texas Instruments Incorporated nor the names of
+#      its contributors may be used to endorse or promote products derived
+#      from this software without specific prior written permission.
+#
+#   THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+#   AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
+#   THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+#   PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
+#   CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+#   EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+#   PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
+#   OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
+#   WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
+#   OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
+#   EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+#
+
+include ../../common.mk
diff --git a/qnx/src/ipc3x_dev/perfutils/common.mk b/qnx/src/ipc3x_dev/perfutils/common.mk
new file mode 100644 (file)
index 0000000..fa70f69
--- /dev/null
@@ -0,0 +1,63 @@
+#
+#   Copyright (c) 2013, Texas Instruments Incorporated
+#
+#   Redistribution and use in source and binary forms, with or without
+#   modification, are permitted provided that the following conditions
+#   are met:
+#
+#   *  Redistributions of source code must retain the above copyright
+#      notice, this list of conditions and the following disclaimer.
+#
+#   *  Redistributions in binary form must reproduce the above copyright
+#      notice, this list of conditions and the following disclaimer in the
+#      documentation and/or other materials provided with the distribution.
+#
+#   *  Neither the name of Texas Instruments Incorporated nor the names of
+#      its contributors may be used to endorse or promote products derived
+#      from this software without specific prior written permission.
+#
+#   THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+#   AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
+#   THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+#   PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
+#   CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+#   EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+#   PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
+#   OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
+#   WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
+#   OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
+#   EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+#
+
+ifndef QCONFIG
+QCONFIG=qconfig.mk
+endif
+include $(QCONFIG)
+
+define PINFO
+PINFO DESCRIPTION=SysLink IPC PerfUtils Library
+endef
+
+NAME = ipc_perfutils
+INSTALLDIR = usr/lib
+
+ifeq ("$(SYSLINK_PLATFORM)", "")
+CCOPTS += -DSYSLINK_PLATFORM_OMAP4430
+endif # ifeq ("$(SYSLINK_PLATFORM)", "")
+
+ifeq ("$(SYSLINK_PLATFORM)", "omap4430")
+CCOPTS += -DSYSLINK_PLATFORM_OMAP4430
+endif # ifeq ("$(SYSLINK_PLATFORM)", "omap4430")
+
+ifeq ("$(SYSLINK_PLATFORM)", "omap5430")
+CCOPTS += -DSYSLINK_PLATFORM_OMAP5430
+endif # ifeq ("$(SYSLINK_PLATFORM)", "omap5430")
+
+include $(MKFILES_ROOT)/qtargets.mk
+
+CCOPTS += -DUSE_GPTIMER
+#CCOPTS += -g -O0
+CCFLAGS += $(COMPILE_FLAGS)
+CCFLAGS += -fPIC
+
+
diff --git a/qnx/src/ipc3x_dev/sharedmemallocator/Makefile b/qnx/src/ipc3x_dev/sharedmemallocator/Makefile
new file mode 100644 (file)
index 0000000..41d454d
--- /dev/null
@@ -0,0 +1,34 @@
+#
+#   Copyright (c) 2013, Texas Instruments Incorporated
+#
+#   Redistribution and use in source and binary forms, with or without
+#   modification, are permitted provided that the following conditions
+#   are met:
+#
+#   *  Redistributions of source code must retain the above copyright
+#      notice, this list of conditions and the following disclaimer.
+#
+#   *  Redistributions in binary form must reproduce the above copyright
+#      notice, this list of conditions and the following disclaimer in the
+#      documentation and/or other materials provided with the distribution.
+#
+#   *  Neither the name of Texas Instruments Incorporated nor the names of
+#      its contributors may be used to endorse or promote products derived
+#      from this software without specific prior written permission.
+#
+#   THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+#   AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
+#   THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+#   PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
+#   CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+#   EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+#   PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
+#   OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
+#   WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
+#   OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
+#   EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+#
+
+EARLY_DIRS=resmgr usr
+LATE_DIRS=samples
+include recurse.mk
diff --git a/qnx/src/ipc3x_dev/sharedmemallocator/resmgr/Makefile b/qnx/src/ipc3x_dev/sharedmemallocator/resmgr/Makefile
new file mode 100644 (file)
index 0000000..add07a0
--- /dev/null
@@ -0,0 +1,33 @@
+#   Copyright (c) 2013, Texas Instruments Incorporated
+#
+#   Redistribution and use in source and binary forms, with or without
+#   modification, are permitted provided that the following conditions
+#   are met:
+#
+#   *  Redistributions of source code must retain the above copyright
+#      notice, this list of conditions and the following disclaimer.
+#
+#   *  Redistributions in binary form must reproduce the above copyright
+#      notice, this list of conditions and the following disclaimer in the
+#      documentation and/or other materials provided with the distribution.
+#
+#   *  Neither the name of Texas Instruments Incorporated nor the names of
+#      its contributors may be used to endorse or promote products derived
+#      from this software without specific prior written permission.
+#
+#   THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+#   AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
+#   THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+#   PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
+#   CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+#   EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+#   PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
+#   OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
+#   WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
+#   OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
+#   EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+#
+
+LIST=CPU
+DEBUG_SHM=1
+include recurse.mk
diff --git a/qnx/src/ipc3x_dev/sharedmemallocator/resmgr/SharedMemoryAllocator.c b/qnx/src/ipc3x_dev/sharedmemallocator/resmgr/SharedMemoryAllocator.c
new file mode 100644 (file)
index 0000000..6c05e80
--- /dev/null
@@ -0,0 +1,760 @@
+/*
+ *  @file       SharedMemoryAllocator.c
+ *
+ *  ============================================================================
+ *
+ */
+/*
+ *  Copyright (c) 2012, Texas Instruments Incorporated
+ *
+ *  Redistribution and use in source and binary forms, with or without
+ *  modification, are permitted provided that the following conditions
+ *  are met:
+ *
+ *  *  Redistributions of source code must retain the above copyright
+ *     notice, this list of conditions and the following disclaimer.
+ *
+ *  *  Redistributions in binary form must reproduce the above copyright
+ *     notice, this list of conditions and the following disclaimer in the
+ *     documentation and/or other materials provided with the distribution.
+ *
+ *  *  Neither the name of Texas Instruments Incorporated nor the names of
+ *     its contributors may be used to endorse or promote products derived
+ *     from this software without specific prior written permission.
+ *
+ *  THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+ *  AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
+ *  THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ *  PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
+ *  CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+ *  EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+ *  PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
+ *  OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
+ *  WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
+ *  OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
+ *  EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ *  Contact information for paper mail:
+ *  Texas Instruments
+ *  Post Office Box 655303
+ *  Dallas, Texas 75265
+ *  Contact information:
+ *  http://www-k.ext.ti.com/sc/technical-support/product-information-centers.htm?
+ *  DCMP=TIHomeTracking&HQS=Other+OT+home_d_contact
+ *  ============================================================================
+ *
+ */
+
+#define SH_MEM_BLOCK1_START 0x9EB00000
+#define SH_MEM_BLOCK1_SIZE  0x1000000
+
+#define SH_MEM_BLOCK2_START 0x9DB00000
+#define SH_MEM_BLOCK2_SIZE  0x1000000
+
+#define SHM_PAGE_SIZE       0x1000
+struct _iofunc_attr;
+#define RESMGR_HANDLE_T struct _iofunc_attr
+#define THREAD_POOL_PARAM_T dispatch_context_t
+
+/*QNX specific header include */
+#include <errno.h>
+#include <unistd.h>
+#include <stdio.h>
+#include <malloc.h>
+#include <devctl.h>
+#include <sys/iofunc.h>
+#include <sys/dispatch.h>
+#include <sys/mman.h>
+#include <sys/select.h>
+#include <sys/procmgr.h>
+#include <sys/slog.h>
+
+/* Module headers */
+#include <ti/shmemallocator/SharedMemoryAllocator.h>
+#include <pthread.h>
+
+/** ============================================================================
+ *  Structs
+ *  ============================================================================
+ */
+struct sharedMemobj{
+    void *pa_shm;
+    void *va_shm;
+    int  size;
+    int  pid;
+    int blockID;
+    struct sharedMemobj *prev;
+    struct sharedMemobj *next;
+};
+typedef struct sharedMemobj SharedMem_Obj;
+
+struct {
+    ulong addr;
+    uint len;
+}blocks[MAX_BLOCKS_IDX+1] = {
+    {SH_MEM_BLOCK1_START, SH_MEM_BLOCK1_SIZE},
+    {SH_MEM_BLOCK2_START, SH_MEM_BLOCK2_SIZE}
+};
+
+pthread_mutex_t lock = PTHREAD_MUTEX_INITIALIZER;
+
+/** ============================================================================
+ *  Globals
+ *  ============================================================================
+ */
+static SharedMem_Obj *allocListHdr_blk[MAX_BLOCKS_IDX+1];
+static SharedMem_Obj *freeListHdr_blk[MAX_BLOCKS_IDX+1];
+static SharedMem_Obj *lastNode;
+
+/** ============================================================================
+ *  Function prototypes
+ *  ============================================================================
+ */
+void initSHM(void);
+void modifyFreeList(SharedMem_Obj *node, void *dstPtr, int size);
+void removeFromFreeList(SharedMem_Obj *node, int del);
+void addTofreeList(SharedMem_Obj *node);
+void addToAllocList(SharedMem_Obj *node);
+
+int removeFromAllocList(SharedMem_Obj *node, int unmap);
+int alloc_shm(int size, int blockID, uint alignment, int pid);
+void *getVAforPID(void *dstPtr, int size, int pid);
+int free_shm(void* argPtr, int blockID, uint pid, int unmap);
+void checkIntegrity(int blockID);
+void releaseSHMforPID(int pid);
+
+extern void * mmap_peer(pid_t pid, void *addr, size_t len, int prot, int flags, int fd, off_t off);
+extern int munmap_peer(pid_t pid, void *addr, size_t len);
+
+/** ============================================================================
+ *  Functions
+ *  ============================================================================
+ */
+
+void releaseSHMforPID(int pid)
+{
+    pthread_mutex_lock(&lock);
+
+    int i;
+    SharedMem_Obj *temp;
+    void* addr;
+    int blockID;
+
+    for(i=0; i<=MAX_BLOCKS_IDX; i++) {
+        temp = allocListHdr_blk[i];
+        while(temp) {
+            if(temp->pid == pid) {
+                addr = temp->va_shm;
+                blockID = temp->blockID;
+                temp = temp->next;
+                free_shm(addr, blockID, pid, 0);
+            }
+            else {
+                temp = temp->next;
+            }
+        }
+    }
+    pthread_mutex_unlock(&lock);
+}
+
+void *getVAforPID(void *dstPtr, int size, int pid)
+{
+    void *vaPTR = mmap_peer(pid, NULL, size, PROT_NOCACHE|PROT_READ|PROT_WRITE,
+                            MAP_SHARED|MAP_PHYS,
+                            NOFD,
+                            (off_t)dstPtr);
+    if(vaPTR == MAP_FAILED){
+        slogf (42, _SLOG_DEBUG1, "Mapping VA PTR failed %p\n",vaPTR);
+    }
+
+    return vaPTR;
+}
+
+void initSHM(void)
+{
+    int i;
+    for(i=0; i<=MAX_BLOCKS_IDX; i++) {
+        if(!freeListHdr_blk[i]) {
+            freeListHdr_blk[i]= malloc(sizeof(SharedMem_Obj));
+            freeListHdr_blk[i]->pa_shm = (void *)blocks[i].addr;
+            freeListHdr_blk[i]->va_shm = NULL;
+            freeListHdr_blk[i]->size = blocks[i].len;
+            freeListHdr_blk[i]->blockID = i;
+            freeListHdr_blk[i]->next = NULL;
+            freeListHdr_blk[i]->prev = NULL;
+            allocListHdr_blk[i] = NULL;
+        }
+    }
+}
+
+void deinitSHM(void)
+{
+    int i;
+    SharedMem_Obj *temp, *temp1;
+
+    for(i=0; i<MAX_BLOCKS_IDX; i++) {
+        if(freeListHdr_blk[i]) {
+            temp = freeListHdr_blk[i];
+            temp1 = freeListHdr_blk[i]->next;
+            while(temp1) {
+                free(temp);
+                temp = temp1;
+                temp1 = temp1->next;
+            }
+            free(temp);
+            freeListHdr_blk[i] = NULL;
+        }
+    }
+    for(i=0; i<MAX_BLOCKS_IDX; i++) {
+        if(allocListHdr_blk[i]) {
+            temp = allocListHdr_blk[i];
+            temp1 = allocListHdr_blk[i]->next;
+            while(temp1) {
+                free(temp);
+                temp = temp1;
+                temp1 = temp1->next;
+            }
+            free(temp);
+            allocListHdr_blk[i] = NULL;
+        }
+    }
+}
+
+void modifyFreeList(SharedMem_Obj *node, void *dstPtr, int size)
+{
+    SharedMem_Obj *newNode1 = NULL;
+    SharedMem_Obj *newNode2 = NULL;
+
+    if(dstPtr > node->pa_shm) {
+        newNode1 = malloc(sizeof(SharedMem_Obj));
+        newNode1->size = (dstPtr - node->pa_shm);
+        newNode1->pa_shm = node->pa_shm;
+        newNode1->blockID = node->blockID;
+    }
+    if((dstPtr - node->pa_shm)+size < node->size) {
+        newNode2 = malloc(sizeof(SharedMem_Obj));
+        newNode2->pa_shm = dstPtr+size;
+        newNode2->size = node->size - size - (dstPtr - node->pa_shm);
+        newNode2->blockID = node->blockID;
+    }
+    removeFromFreeList(node, 1);
+    if(newNode1)
+        addTofreeList(newNode1);
+    if(newNode2)
+        addTofreeList(newNode2);
+}
+
+void removeFromFreeList(SharedMem_Obj *node, int del)
+{
+    if(node == freeListHdr_blk[node->blockID]) {
+        freeListHdr_blk[node->blockID] = freeListHdr_blk[node->blockID]->next;
+        if(freeListHdr_blk[node->blockID])
+            freeListHdr_blk[node->blockID]->prev = NULL;
+    } else {
+        if(node->next) {
+            node->next->prev = node->prev;
+        }
+        node->prev->next = node->next;
+    }
+    if(del)
+        free(node);
+    return;
+}
+
+void addToAllocList(SharedMem_Obj *node)
+{
+    SharedMem_Obj *temp = allocListHdr_blk[node->blockID];
+    if(!temp) {
+        node->next = NULL;
+        node->prev = NULL;
+        allocListHdr_blk[node->blockID] = node;
+    } else {
+        while(temp->next) {
+            temp = temp->next;
+        }
+        temp->next = node;
+        node->next = NULL;
+        node->prev = temp;
+    }
+    lastNode = node;
+
+    return;
+}
+
+int removeFromAllocList(SharedMem_Obj *node, int unmap)
+{
+    int status = 0;
+    if(unmap) {
+        status = munmap_peer(node->pid, node->va_shm, node->size);
+        if(status < 0) {
+            slogf (42, _SLOG_DEBUG1, "##unmapping VA for PID failed, process %u alive?\n", node->pid);
+            return -1;
+        }
+    }
+    if(node->prev) {
+       node->prev->next = node->next;
+    }
+    if(node->next) {
+        node->next->prev = node->prev;
+    }
+    if(node == allocListHdr_blk[node->blockID]) {
+        allocListHdr_blk[node->blockID] = node->next;
+        if(allocListHdr_blk[node->blockID])
+            allocListHdr_blk[node->blockID]->prev = NULL;
+    }
+    addTofreeList(node);
+
+    return 0;
+}
+
+void addTofreeList(SharedMem_Obj *node)
+{
+    SharedMem_Obj* temp = freeListHdr_blk[node->blockID];
+    SharedMem_Obj* temp1 = NULL;
+    int added = 0;
+
+    if(!freeListHdr_blk[node->blockID]) {
+        freeListHdr_blk[node->blockID] = node;
+        freeListHdr_blk[node->blockID]->prev = NULL;
+        freeListHdr_blk[node->blockID]->next = NULL;
+        return;
+    }
+    if(node->pa_shm < freeListHdr_blk[node->blockID]->pa_shm) {
+        if((node->pa_shm + node->size) == freeListHdr_blk[node->blockID]->pa_shm) {
+            node->size = node->size + freeListHdr_blk[node->blockID]->size;
+            node->next = freeListHdr_blk[node->blockID]->next;
+            if(freeListHdr_blk[node->blockID]->next)
+               freeListHdr_blk[node->blockID]->next->prev = node;
+            free(freeListHdr_blk[node->blockID]);
+        }
+        else {
+            node->next = freeListHdr_blk[node->blockID];
+            freeListHdr_blk[node->blockID]->prev = node;
+        }
+        freeListHdr_blk[node->blockID] = node;
+        freeListHdr_blk[node->blockID]->prev = NULL;
+        return;
+    }
+    while(temp->next) {
+        if((temp->pa_shm + temp->size == node->pa_shm) && (temp->pa_shm + temp->size + node->size == temp->next->pa_shm)) {
+            temp1 = temp->next;
+            temp->size += (temp1->size + node->size);
+            temp->next = temp1->next;
+            if(temp1->next)
+                temp1->next->prev = temp;
+            free(node);
+            free (temp1);
+            return;
+        }
+
+        if(node->pa_shm < temp->next->pa_shm) {
+            if(temp->pa_shm + temp->size == node->pa_shm) {
+                added = 1;
+                temp->size = temp->size + node->size;
+            }
+            else if(node->pa_shm + node->size == temp->next->pa_shm) {
+                temp->next->pa_shm = node->pa_shm;
+                temp->next->size = temp->next->size + node->size;
+                added = 1;
+            }
+            if(added) {
+                free(node);
+            }
+            else {
+                temp->next->prev = node;
+                node->next = temp->next;
+                temp->next = node;
+                node->prev = temp;
+            }
+            return;
+        }
+        temp = temp->next;
+    }
+    if(temp->pa_shm + temp->size == node->pa_shm) {
+        temp->size += node->size;
+        free(node);
+    }
+    else {
+        temp->next = node;
+        node->prev = temp;
+        node->next = NULL;
+    }
+}
+
+int alloc_shm(int size, int blockID, uint alignment, int pid)
+{
+    void *phy_addr = NULL;
+    void *vir_addr = NULL;
+    SharedMem_Obj* temp = NULL;
+    SharedMem_Obj* node = NULL;
+    SharedMem_Obj* newNode = NULL;
+
+    if(!freeListHdr_blk[blockID]) {
+        slogf (42, _SLOG_DEBUG1, "\nalloc_shm failed:No free mem available in block{%d} !!!\n", blockID);
+        return -1;
+    }
+
+    temp  = freeListHdr_blk[blockID];
+    if(size%SHM_PAGE_SIZE)
+        size += (SHM_PAGE_SIZE - (size%SHM_PAGE_SIZE));
+    while (temp) {
+        if(alignment) {
+            phy_addr = (void*)(((uint)((temp->pa_shm + alignment-1))/alignment)*alignment);
+            if((phy_addr + size) == (temp->pa_shm + temp->size))
+                break;
+            else {
+                if((phy_addr + size) < (temp->pa_shm + temp->size)){
+                    if(!node || (node->size < temp->size)) {
+                        node = temp;
+                    }
+                }
+                phy_addr = NULL;
+            }
+        }
+        else if(temp->size == size) {
+            phy_addr = temp->pa_shm;
+            break;
+        }
+        else if(temp->size > size) {
+            if(!node || (node->size < temp->size)) {
+                node = temp;
+            }
+        }
+        temp = temp->next;
+    }
+    if(phy_addr) {
+        vir_addr = getVAforPID(phy_addr, size, pid);
+        if(vir_addr == MAP_FAILED)
+            return -1;
+        removeFromFreeList(temp, 0);
+        temp->va_shm = vir_addr;
+        temp->pid = pid;
+        addToAllocList(temp);
+        return 0;
+
+    }
+    else if(node){
+        if(alignment)
+            phy_addr = (void*)(((uint)((node->pa_shm + alignment-1))/alignment)*alignment);
+        else
+            phy_addr = node->pa_shm;
+
+        vir_addr = getVAforPID(phy_addr, size, pid);
+        if(vir_addr == MAP_FAILED)
+            return -1;
+        modifyFreeList(node, phy_addr, size);
+        newNode = malloc(sizeof(SharedMem_Obj));
+        newNode->va_shm = vir_addr;
+        newNode->pa_shm = phy_addr;
+        newNode->pid = pid;
+        newNode->blockID = blockID;
+        newNode->size = size;
+        addToAllocList(newNode);
+
+        return 0;
+    }
+    else {
+        slogf (42, _SLOG_DEBUG1, "\nalloc_shm failed:buf of size(%d) not available !!!\n", size);
+        return -1;
+    }
+}
+
+int free_shm(void* argPtr, int blockId, uint pid, int unmap)
+{
+    int ret = 0;
+    SharedMem_Obj* temp = allocListHdr_blk[blockId];
+
+    while(temp) {
+        if((temp->va_shm == argPtr) && temp->pid == pid) {
+            ret = removeFromAllocList(temp, unmap);
+            if(ret < 0)
+                return -1;
+            break;
+        }
+        temp = temp->next;
+    }
+    if(temp == NULL)
+        ret = -1;
+
+    return ret;
+}
+
+void checkIntegrity(int blockID)
+{
+    SharedMem_Obj *t_alloc = allocListHdr_blk[blockID];
+    SharedMem_Obj *t_free = freeListHdr_blk[blockID];
+    int size = blocks[blockID].len;
+
+    slogf (42, _SLOG_DEBUG1, "\n## checkIntegrity ##\n");
+    while(t_alloc && t_free) {
+        if(t_alloc->pa_shm > t_free->pa_shm) {
+            while(t_free && t_free->pa_shm < t_alloc->pa_shm) {
+                slogf (42, _SLOG_DEBUG1, "## FL(0x%0x - 0x%0x)\n",
+                       (unsigned int)t_free->pa_shm,
+                       t_free->size);
+
+                size -= t_free->size;
+                t_free = t_free->next;
+            }
+        }
+        else {
+            while(t_alloc && t_alloc->pa_shm < t_free->pa_shm) {
+                slogf (42, _SLOG_DEBUG1, "## AL(0x%0x - 0x%0x)\n",
+                       (unsigned int)t_alloc->pa_shm,
+                       t_alloc->size);
+
+                size -= t_alloc->size;
+                t_alloc = t_alloc->next;
+            }
+        }
+    }
+    while(t_alloc) {
+        slogf (42, _SLOG_DEBUG1, "## AL(0x%0x - 0x%0x)\n",
+               (unsigned int)t_alloc->pa_shm,
+               t_alloc->size);
+
+        size -= t_alloc->size;
+        t_alloc = t_alloc->next;
+    }
+    while(t_free) {
+        slogf (42, _SLOG_DEBUG1, "## FL(0x%0x - 0x%0x)\n",
+               (unsigned int)t_free->pa_shm,
+               t_free->size);
+
+        size -= t_free->size;
+        t_free = t_free->next;
+    }
+    slogf (42, _SLOG_DEBUG1, "##checkIntegrity - size = 0x%0x\n", size);
+}
+
+typedef struct shmem_ocb {
+    iofunc_ocb_t       ocb;
+    pid_t              pid;
+} shmem_ocb_t;
+
+IOFUNC_OCB_T *
+ocb_calloc (resmgr_context_t * ctp, IOFUNC_ATTR_T * device)
+{
+    shmem_ocb_t *ocb = NULL;
+
+    /* Allocate the OCB */
+    ocb = (shmem_ocb_t *) calloc (1, sizeof (shmem_ocb_t));
+    if (ocb == NULL){
+        errno = ENOMEM;
+        return (NULL);
+    }
+
+    ocb->pid = ctp->info.pid;
+
+    return (IOFUNC_OCB_T *)(ocb);
+}
+
+void
+ocb_free (IOFUNC_OCB_T * i_ocb)
+{
+    shmem_ocb_t * ocb = (shmem_ocb_t *)i_ocb;
+
+    if (ocb) {
+        releaseSHMforPID(ocb->pid);
+        free (ocb);
+    }
+}
+
+int
+SharedMemAllDrv_devctl(resmgr_context_t * ctp, io_devctl_t * msg,
+                        iofunc_ocb_t * ocb)
+{
+    pthread_mutex_lock(&lock);
+
+    int status = _RESMGR_ERRNO (EOK);
+    int dcmd = msg->i.dcmd;
+    msg->o.ret_val = EOK;
+    SHMAllocatorDrv_CmdArgs *cargs       =
+                             (SHMAllocatorDrv_CmdArgs *)(_DEVCTL_DATA (msg->i));
+    SHMAllocatorDrv_CmdArgs *output      =
+                             (SHMAllocatorDrv_CmdArgs *)(_DEVCTL_DATA (msg->o));
+    switch (dcmd)
+    {
+        case CMD_SHMALLOCATOR_ALLOC:
+        {
+            status = alloc_shm(cargs->size, cargs->blockID, cargs->alignment, ctp->info.pid);
+
+            if(status == -1) {
+                output->result.blockID = -1;
+                output->result.phy_addr = NULL;
+                output->result.vir_addr = NULL;
+                output->apiStatus = -1;
+            }
+            else {
+                output->result.blockID = cargs->blockID;
+                output->result.phy_addr = (unsigned long)lastNode->pa_shm;
+                output->result.vir_addr = (unsigned long)lastNode->va_shm;
+                output->result.size = lastNode->size;
+                output->apiStatus = 0;
+            }
+        }
+        break;
+        case CMD_SHMALLOCATOR_RELEASE:
+        {
+            status = free_shm((void *)cargs->result.vir_addr, cargs->blockID,
+                              ctp->info.pid, 1);
+            if(status == 0) {
+                output->apiStatus = 0;
+            }
+            else {
+                output->apiStatus = -1;
+            }
+
+            break;
+        }
+        default:
+        {
+            slogf (42, _SLOG_DEBUG1, "SharedMemAllDrv_devctl: Bad request!!\n");
+            status = -1;
+        }
+        break;
+    }
+#ifdef DEBUG_SHM
+            checkIntegrity(cargs->blockID);
+#endif
+
+    pthread_mutex_unlock(&lock);
+    return (_RESMGR_PTR (ctp, &msg->o,
+                         sizeof (msg->o) + sizeof(SHMAllocatorDrv_CmdArgs)));
+}
+
+static resmgr_connect_funcs_t    connect_funcs;
+static resmgr_io_funcs_t         io_funcs;
+static iofunc_mount_t            mattr;
+static iofunc_funcs_t            ocb_funcs;
+static iofunc_attr_t             attr;
+
+int
+main(int argc, char *const argv[])
+{
+    /* declare variables we'll be using */
+    resmgr_attr_t        resmgr_attr;
+    dispatch_t           *dpp;
+    int                  id;
+    int                  ret = 0;
+    struct stat          sbuf;
+    thread_pool_attr_t   tattr;
+    thread_pool_t        *tpool;
+    sigset_t             set;
+
+    /* Obtain I/O privity */
+    ret = ThreadCtl_r (_NTO_TCTL_IO, 0);
+    if (ret)
+    {
+        fprintf(stderr, "Unable to obtain I/O privity");
+        return -1;
+    }
+
+    /* Only let one run. */
+    if (-1 != stat("/dev/shmemallocator", &sbuf)) {
+        return -1;
+    }
+
+    initSHM();
+
+    /* initialize dispatch interface */
+    if((dpp = dispatch_create()) == NULL) {
+        fprintf(stderr,
+                "%s: Unable to allocate dispatch handle.\n",
+                argv[0]);
+        return -1;
+    }
+
+    /* Initialize the thread pool */
+    memset (&tattr, 0x00, sizeof (thread_pool_attr_t));
+    tattr.handle = dpp;
+    tattr.context_alloc = dispatch_context_alloc;
+    tattr.context_free = dispatch_context_free;
+    tattr.block_func = dispatch_block;
+    tattr.unblock_func = dispatch_unblock;
+    tattr.handler_func = dispatch_handler;
+    tattr.lo_water = 2;
+    tattr.hi_water = 8;
+    tattr.increment = 1;
+    tattr.maximum = 50;
+
+    /* initialize resource manager attributes */
+    memset(&resmgr_attr, 0, sizeof resmgr_attr);
+    resmgr_attr.nparts_max = 10;
+    resmgr_attr.msg_max_size = 16384;
+    memset(&mattr, 0, sizeof(iofunc_mount_t));
+    mattr.flags = 0;
+    mattr.conf = IOFUNC_PC_CHOWN_RESTRICTED | IOFUNC_PC_NO_TRUNC | IOFUNC_PC_SYNC_IO;
+    mattr.dev = 0;
+    mattr.blocksize=0;
+    mattr.funcs = &ocb_funcs;
+    memset(&ocb_funcs, 0, sizeof(iofunc_funcs_t));
+    ocb_funcs.nfuncs = _IOFUNC_NFUNCS;
+    ocb_funcs.ocb_calloc = ocb_calloc;
+    ocb_funcs.ocb_free = ocb_free;
+    memset(&io_funcs, 0, sizeof(resmgr_io_funcs_t));
+    iofunc_func_init(_RESMGR_CONNECT_NFUNCS, &connect_funcs, _RESMGR_IO_NFUNCS, &io_funcs);
+    io_funcs.devctl = SharedMemAllDrv_devctl;
+
+    iofunc_attr_init(&attr, S_IFNAM | 0777 , 0, 0);
+    attr.mount = &mattr;
+
+    if ( ( tpool = thread_pool_create(&tattr,0) ) == NULL )
+        return -1;
+
+    if (-1 != stat("/dev/shmemallocator", &sbuf)) {
+        return -1;
+    }
+
+    /* attach our device name */
+    id = resmgr_attach(
+            dpp,            /* dispatch handle        */
+            &resmgr_attr,   /* resource manager attrs */
+            "/dev/shmemallocator",   /* device name            */
+            _FTYPE_ANY,     /* open type              */
+            0,              /* flags                  */
+            &connect_funcs, /* connect routines       */
+            &io_funcs,      /* I/O routines           */
+            &attr);         /* handle                 */
+    if(id == -1) {
+        fprintf(stderr, "%s: Unable to attach name.\n", argv[0]);
+        return -1;
+    }
+
+    /* background the process */
+    procmgr_daemon(0, PROCMGR_DAEMON_NOCLOSE|PROCMGR_DAEMON_NODEVNULL);
+    thread_pool_start( tpool );
+
+    /* Mask out unecessary signals */
+    sigfillset (&set);
+    sigdelset (&set, SIGINT);
+    sigdelset (&set, SIGTERM);
+    pthread_sigmask (SIG_BLOCK, &set, NULL);
+
+    /* Wait for one of these signals */
+    sigemptyset (&set);
+    sigaddset (&set, SIGINT);
+    sigaddset (&set, SIGQUIT);
+    sigaddset (&set, SIGTERM);
+
+    /* Wait for a signal */
+    while (1)
+    {
+        switch (SignalWaitinfo (&set, NULL))
+        {
+            case SIGTERM:
+            case SIGQUIT:
+            case SIGINT:
+                goto done;
+            default:
+                break;
+        }
+    }
+
+done:
+    /* Received SIGTERM: clean up */
+    resmgr_detach(dpp, id, _RESMGR_DETACH_ALL);
+
+    deinitSHM();
+
+    return 0;
+}
diff --git a/qnx/src/ipc3x_dev/sharedmemallocator/resmgr/arm/Makefile b/qnx/src/ipc3x_dev/sharedmemallocator/resmgr/arm/Makefile
new file mode 100644 (file)
index 0000000..84cd0b9
--- /dev/null
@@ -0,0 +1,39 @@
+#
+#   Copyright (c) 2013, Texas Instruments Incorporated
+#
+#   Redistribution and use in source and binary forms, with or without
+#   modification, are permitted provided that the following conditions
+#   are met:
+#
+#   *  Redistributions of source code must retain the above copyright
+#      notice, this list of conditions and the following disclaimer.
+#
+#   *  Redistributions in binary form must reproduce the above copyright
+#      notice, this list of conditions and the following disclaimer in the
+#      documentation and/or other materials provided with the distribution.
+#
+#   *  Neither the name of Texas Instruments Incorporated nor the names of
+#      its contributors may be used to endorse or promote products derived
+#      from this software without specific prior written permission.
+#
+#   THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+#   AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
+#   THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+#   PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
+#   CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+#   EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+#   PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
+#   OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
+#   WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
+#   OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
+#   EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+#
+
+LIST=VARIANT
+ifndef QRECURSE
+QRECURSE=recurse.mk
+ifdef QCONFIG
+QRDIR=$(dir $(QCONFIG))
+endif
+endif
+include $(QRDIR)$(QRECURSE)
diff --git a/qnx/src/ipc3x_dev/sharedmemallocator/resmgr/arm/le.v7/Makefile b/qnx/src/ipc3x_dev/sharedmemallocator/resmgr/arm/le.v7/Makefile
new file mode 100644 (file)
index 0000000..98debad
--- /dev/null
@@ -0,0 +1,32 @@
+#
+#   Copyright (c) 2013, Texas Instruments Incorporated
+#
+#   Redistribution and use in source and binary forms, with or without
+#   modification, are permitted provided that the following conditions
+#   are met:
+#
+#   *  Redistributions of source code must retain the above copyright
+#      notice, this list of conditions and the following disclaimer.
+#
+#   *  Redistributions in binary form must reproduce the above copyright
+#      notice, this list of conditions and the following disclaimer in the
+#      documentation and/or other materials provided with the distribution.
+#
+#   *  Neither the name of Texas Instruments Incorporated nor the names of
+#      its contributors may be used to endorse or promote products derived
+#      from this software without specific prior written permission.
+#
+#   THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+#   AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
+#   THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+#   PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
+#   CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+#   EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+#   PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
+#   OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
+#   WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
+#   OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
+#   EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+#
+
+include ../../common.mk
diff --git a/qnx/src/ipc3x_dev/sharedmemallocator/resmgr/common.mk b/qnx/src/ipc3x_dev/sharedmemallocator/resmgr/common.mk
new file mode 100644 (file)
index 0000000..fa4e64a
--- /dev/null
@@ -0,0 +1,50 @@
+#
+#   Copyright (c) 2013, Texas Instruments Incorporated
+#
+#   Redistribution and use in source and binary forms, with or without
+#   modification, are permitted provided that the following conditions
+#   are met:
+#
+#   *  Redistributions of source code must retain the above copyright
+#      notice, this list of conditions and the following disclaimer.
+#
+#   *  Redistributions in binary form must reproduce the above copyright
+#      notice, this list of conditions and the following disclaimer in the
+#      documentation and/or other materials provided with the distribution.
+#
+#   *  Neither the name of Texas Instruments Incorporated nor the names of
+#      its contributors may be used to endorse or promote products derived
+#      from this software without specific prior written permission.
+#
+#   THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+#   AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
+#   THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+#   PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
+#   CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+#   EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+#   PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
+#   OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
+#   WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
+#   OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
+#   EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+#
+
+ifndef QCONFIG
+QCONFIG=qconfig.mk
+endif
+include $(QCONFIG)
+
+define PINFO
+PINFO DESCRIPTION=Shared Memory Allocator driver
+endef
+
+NAME = shmemallocator
+INSTALLDIR = bin
+
+CCOPTS+=-g -O0
+
+ifeq ("$(VERBOS_SHM)", "1")
+CCOPTS+=-DDEBUG_SHM
+endif
+
+include $(MKFILES_ROOT)/qtargets.mk
diff --git a/qnx/src/ipc3x_dev/sharedmemallocator/resmgr/mmap_peer.c b/qnx/src/ipc3x_dev/sharedmemallocator/resmgr/mmap_peer.c
new file mode 100644 (file)
index 0000000..88fe4b5
--- /dev/null
@@ -0,0 +1,228 @@
+/*
+ * $QNXLicenseC$
+*/
+/*
+ * Copyright (c) 2010, Texas Instruments Incorporated
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ *
+ * *  Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ *
+ * *  Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
+ *
+ * *  Neither the name of Texas Instruments Incorporated nor the names of
+ *    its contributors may be used to endorse or promote products derived
+ *    from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+ * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
+ * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
+ * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+ * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+ * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
+ * OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
+ * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
+ * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
+ * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ * */
+/*
+* mmap_peer/munmap_peer implementation PR47400
+*/
+
+#include <unistd.h>
+#include <errno.h>
+#include <inttypes.h>
+#include <sys/mman.h>
+#include <sys/memmsg.h>
+
+
+int memmgr_peer_sendnc( pid_t pid, int coid, void *smsg, size_t sbytes, void *rmsg, size_t rbytes )
+{
+       mem_peer_t      peer;
+       iov_t           siov[2];
+
+       peer.i.type = _MEM_PEER;
+       peer.i.peer_msg_len = sizeof(peer);
+       peer.i.pid = pid;
+
+       SETIOV(siov + 0, &peer, sizeof peer);
+       SETIOV(siov + 1, smsg, sbytes);
+       return MsgSendvsnc( coid, siov, 2, rmsg, rbytes );
+}
+
+void *
+_mmap2_peer(pid_t pid, void *addr, size_t len, int prot, int flags, int fd, off64_t off,
+               unsigned align, unsigned pre_load, void **base, size_t *size) {
+       mem_map_t                                               msg;
+
+       msg.i.type = _MEM_MAP;
+       msg.i.zero = 0;
+       msg.i.addr = (uintptr_t)addr;
+       msg.i.len = len;
+       msg.i.prot = prot;
+       msg.i.flags = flags;
+       msg.i.fd = fd;
+       msg.i.offset = off;
+       msg.i.align = align;
+       msg.i.preload = pre_load;
+       msg.i.reserved1 = 0;
+       if(memmgr_peer_sendnc(pid, MEMMGR_COID, &msg.i, sizeof msg.i, &msg.o, sizeof msg.o) == -1) {
+               return MAP_FAILED;
+       }
+       if(base) {
+               *base = (void *)(uintptr_t)msg.o.real_addr;
+       }
+       if(size) {
+               *size = msg.o.real_size;
+       }
+       return (void *)(uintptr_t)msg.o.addr;
+}
+
+
+void *
+mmap64_peer(pid_t pid, void *addr, size_t len, int prot, int flags, int fd, off64_t off) {
+       return _mmap2_peer(pid, addr, len, prot, flags, fd, off, 0, 0, 0, 0);
+}
+
+
+// Make an unsigned version of the 'off_t' type so that we get a zero
+// extension down below.
+#if __OFF_BITS__ == 32
+       typedef _Uint32t uoff_t;
+#elif __OFF_BITS__ == 64
+       typedef _Uint64t uoff_t;
+#else
+       #error Do not know what size to make uoff_t
+#endif
+
+void *
+mmap_peer(pid_t pid, void *addr, size_t len, int prot, int flags, int fd, off_t off) {
+       return _mmap2_peer(pid, addr, len, prot, flags, fd, (uoff_t)off, 0, 0, 0, 0);
+}
+
+int
+munmap_flags_peer(pid_t pid, void *addr, size_t len, unsigned flags) {
+       mem_ctrl_t                                              msg;
+
+       msg.i.type = _MEM_CTRL;
+       msg.i.subtype = _MEM_CTRL_UNMAP;
+       msg.i.addr = (uintptr_t)addr;
+       msg.i.len = len;
+       msg.i.flags = flags;
+       return memmgr_peer_sendnc(pid, MEMMGR_COID, &msg.i, sizeof msg.i, 0, 0);
+}
+
+int
+munmap_peer(pid_t pid, void *addr, size_t len) {
+       return munmap_flags_peer(pid, addr, len, 0);
+}
+
+int
+mem_offset64_peer(pid_t pid, const uintptr_t addr, size_t len,
+                               off64_t *offset, size_t *contig_len) {
+       struct _peer_mem_off {
+               struct _mem_peer peer;
+               struct _mem_offset msg;
+       };
+       typedef union {
+               struct _peer_mem_off i;
+               struct _mem_offset_reply o;
+       } memoffset_peer_t;
+       memoffset_peer_t msg;
+
+       msg.i.peer.type = _MEM_PEER;
+       msg.i.peer.peer_msg_len = sizeof(msg.i.peer);
+       msg.i.peer.pid = pid;
+       msg.i.peer.reserved1 = 0;
+
+       msg.i.msg.type = _MEM_OFFSET;
+       msg.i.msg.subtype = _MEM_OFFSET_PHYS;
+       msg.i.msg.addr = addr;
+       msg.i.msg.reserved = -1;
+       msg.i.msg.len = len;
+       if(MsgSendnc(MEMMGR_COID, &msg.i, sizeof msg.i, &msg.o, sizeof msg.o) == -1) {
+               return -1;
+       }
+       *offset = msg.o.offset;
+       *contig_len = msg.o.size;
+       return(0);
+}
+
+
+#if defined(__X86__)
+#define CPU_VADDR_SERVER_HINT 0x30000000u
+#elif defined(__ARM__)
+#define CPU_VADDR_SERVER_HINT 0x20000000u
+#else
+#error NO CPU SOUP FOR YOU!
+#endif
+
+/*
+ * map the object into both client and server at the same virtual address
+ */
+void *
+mmap64_join(pid_t pid, void *addr, size_t len, int prot, int flags, int fd, off64_t off) {
+       void *svaddr, *cvaddr = MAP_FAILED;
+       uintptr_t hint = (uintptr_t)addr;
+       uintptr_t start_hint = hint;
+
+       if ( hint == 0 ) hint = (uintptr_t)CPU_VADDR_SERVER_HINT;
+
+       do {
+               svaddr = mmap64( (void *)hint, len, prot, flags, fd, off );
+               if ( svaddr == MAP_FAILED ) {
+                       break;
+               }
+               if ( svaddr == cvaddr ) {
+                       return svaddr;
+               }
+
+               cvaddr = mmap64_peer( pid, svaddr, len, prot, flags, fd, off );
+               if ( cvaddr == MAP_FAILED ) {
+                       break;
+               }
+               if ( svaddr == cvaddr ) {
+                       return svaddr;
+               }
+
+               if ( munmap( svaddr, len ) == -1 ) {
+                       svaddr = MAP_FAILED;
+                       break;
+               }
+
+               svaddr = mmap64( cvaddr, len, prot, flags, fd, off );
+               if ( svaddr == MAP_FAILED ) {
+                       break;
+               }
+               if ( svaddr == cvaddr ) {
+                       return svaddr;
+               }
+
+               if ( munmap( svaddr, len ) == -1 ) {
+                       svaddr = MAP_FAILED;
+                       break;
+               }
+               if ( munmap_peer( pid, cvaddr, len ) == -1 ) {
+                       cvaddr = MAP_FAILED;
+                       break;
+               }
+
+               hint += __PAGESIZE;
+
+       } while(hint != start_hint); /* do we really want to wrap all the way */
+
+       if ( svaddr != MAP_FAILED ) {
+               munmap( svaddr, len );
+       }
+       if ( cvaddr != MAP_FAILED ) {
+               munmap_peer( pid, cvaddr, len );
+       }
+       return MAP_FAILED;
+}
diff --git a/qnx/src/ipc3x_dev/sharedmemallocator/resmgr/public/ti/shmemallocator/SharedMemoryAllocator.h b/qnx/src/ipc3x_dev/sharedmemallocator/resmgr/public/ti/shmemallocator/SharedMemoryAllocator.h
new file mode 100644 (file)
index 0000000..955ec14
--- /dev/null
@@ -0,0 +1,112 @@
+/*
+ *  @file   SharedMemoryAllocator.h
+ *
+ *  @brief      User side Shared Memory Allocator
+ *
+ *  ============================================================================
+ *
+ */
+/*
+ *  Copyright (c) 2012, Texas Instruments Incorporated
+ *
+ *  Redistribution and use in source and binary forms, with or without
+ *  modification, are permitted provided that the following conditions
+ *  are met:
+ *
+ *  *  Redistributions of source code must retain the above copyright
+ *     notice, this list of conditions and the following disclaimer.
+ *
+ *  *  Redistributions in binary form must reproduce the above copyright
+ *     notice, this list of conditions and the following disclaimer in the
+ *     documentation and/or other materials provided with the distribution.
+ *
+ *  *  Neither the name of Texas Instruments Incorporated nor the names of
+ *     its contributors may be used to endorse or promote products derived
+ *     from this software without specific prior written permission.
+ *
+ *  THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+ *  AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
+ *  THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ *  PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
+ *  CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+ *  EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+ *  PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
+ *  OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
+ *  WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
+ *  OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
+ *  EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ *  Contact information for paper mail:
+ *  Texas Instruments
+ *  Post Office Box 655303
+ *  Dallas, Texas 75265
+ *  Contact information:
+ *  http://www-k.ext.ti.com/sc/technical-support/product-information-centers.htm?
+ *  DCMP=TIHomeTracking&HQS=Other+OT+home_d_contact
+ *  ============================================================================
+ *
+ */
+
+#include <sys/ioctl.h>
+
+struct shm_req_params {
+    int size;
+    int blockID;
+    struct {
+        int req;
+        int alignment;
+    }alignReq;
+};
+
+typedef struct {
+    unsigned long phy_addr;
+    unsigned long vir_addr;
+    int size;
+    int blockID;
+}shm_buf;
+
+typedef enum {
+    SHMALLOCATOR_CMD_ALLOC = 1,
+    SHMALLOCATOR_CMD_RELEASE = 2,
+} SHMAllocator_cmd_types;
+
+typedef struct SHMAllocatorDrv_CmdArgs_Tag {
+    struct {
+        unsigned long phy_addr;
+        unsigned long vir_addr;
+        int blockID;
+        int size;
+    } result;
+    int size;
+    unsigned int alignment;
+    int blockID;
+    int apiStatus;
+
+} SHMAllocatorDrv_CmdArgs;
+
+/*!
+ *  @brief  Command for SHM_alloc
+ */
+#define SHMALLOCATORDRV_BASE_CMD                 (0x1C)
+
+#define CMD_SHMALLOCATOR_ALLOC            _IOWR(SHMALLOCATORDRV_BASE_CMD,\
+                                            SHMALLOCATOR_CMD_ALLOC,\
+                                            SHMAllocatorDrv_CmdArgs)
+/*!
+ *  @brief  Command for SHM_release
+ */
+#define CMD_SHMALLOCATOR_RELEASE            _IOWR(SHMALLOCATORDRV_BASE_CMD,\
+                                            SHMALLOCATOR_CMD_RELEASE,\
+                                            SHMAllocatorDrv_CmdArgs)
+
+enum {
+    MIN_BLOCKS_IDX=0,
+    MAX_BLOCKS_IDX,
+};
+
+/*  ----------------------------------------------------------------------------
+ *  Command arguments for SharedMemAllocator
+ *  ----------------------------------------------------------------------------
+ */
+/*!
+ *  @brief  Command arguments for SharedMemAllocator
+ */
diff --git a/qnx/src/ipc3x_dev/sharedmemallocator/resmgr/shmemallocator.use b/qnx/src/ipc3x_dev/sharedmemallocator/resmgr/shmemallocator.use
new file mode 100644 (file)
index 0000000..986e425
--- /dev/null
@@ -0,0 +1,8 @@
+Tiler - TILER Resource Manager
+
+Tiler [-SLU]
+Options:
+ -S <page_grow_size> Size to grow tiler page allocations at a time (Default:16)
+ -L <lowmem_limit>   Limit (in Mbytes) below which to free any cached pages
+                     held by Tiler (Default:128M)
+ -U <user_param>     User param to use to set uid/gid (Default:NULL)
diff --git a/qnx/src/ipc3x_dev/sharedmemallocator/samples/Makefile b/qnx/src/ipc3x_dev/sharedmemallocator/samples/Makefile
new file mode 100644 (file)
index 0000000..40d941e
--- /dev/null
@@ -0,0 +1,31 @@
+#   Copyright (c) 2013, Texas Instruments Incorporated
+#
+#   Redistribution and use in source and binary forms, with or without
+#   modification, are permitted provided that the following conditions
+#   are met:
+#
+#   *  Redistributions of source code must retain the above copyright
+#      notice, this list of conditions and the following disclaimer.
+#
+#   *  Redistributions in binary form must reproduce the above copyright
+#      notice, this list of conditions and the following disclaimer in the
+#      documentation and/or other materials provided with the distribution.
+#
+#   *  Neither the name of Texas Instruments Incorporated nor the names of
+#      its contributors may be used to endorse or promote products derived
+#      from this software without specific prior written permission.
+#
+#   THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+#   AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
+#   THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+#   PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
+#   CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+#   EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+#   PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
+#   OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
+#   WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
+#   OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
+#   EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+#
+
+include recurse.mk
diff --git a/qnx/src/ipc3x_dev/sharedmemallocator/samples/sharedMemAllocator/Makefile b/qnx/src/ipc3x_dev/sharedmemallocator/samples/sharedMemAllocator/Makefile
new file mode 100644 (file)
index 0000000..cca3e9e
--- /dev/null
@@ -0,0 +1,33 @@
+#
+#   Copyright (c) 2013, Texas Instruments Incorporated
+#
+#   Redistribution and use in source and binary forms, with or without
+#   modification, are permitted provided that the following conditions
+#   are met:
+#
+#   *  Redistributions of source code must retain the above copyright
+#      notice, this list of conditions and the following disclaimer.
+#
+#   *  Redistributions in binary form must reproduce the above copyright
+#      notice, this list of conditions and the following disclaimer in the
+#      documentation and/or other materials provided with the distribution.
+#
+#   *  Neither the name of Texas Instruments Incorporated nor the names of
+#      its contributors may be used to endorse or promote products derived
+#      from this software without specific prior written permission.
+#
+#   THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+#   AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
+#   THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+#   PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
+#   CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+#   EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+#   PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
+#   OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
+#   WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
+#   OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
+#   EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+#
+
+LIST=SAMPLES
+include recurse.mk
diff --git a/qnx/src/ipc3x_dev/sharedmemallocator/samples/sharedMemAllocator/usr/Makefile b/qnx/src/ipc3x_dev/sharedmemallocator/samples/sharedMemAllocator/usr/Makefile
new file mode 100644 (file)
index 0000000..788f516
--- /dev/null
@@ -0,0 +1,33 @@
+#
+#   Copyright (c) 2013, Texas Instruments Incorporated
+#
+#   Redistribution and use in source and binary forms, with or without
+#   modification, are permitted provided that the following conditions
+#   are met:
+#
+#   *  Redistributions of source code must retain the above copyright
+#      notice, this list of conditions and the following disclaimer.
+#
+#   *  Redistributions in binary form must reproduce the above copyright
+#      notice, this list of conditions and the following disclaimer in the
+#      documentation and/or other materials provided with the distribution.
+#
+#   *  Neither the name of Texas Instruments Incorporated nor the names of
+#      its contributors may be used to endorse or promote products derived
+#      from this software without specific prior written permission.
+#
+#   THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+#   AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
+#   THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+#   PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
+#   CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+#   EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+#   PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
+#   OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
+#   WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
+#   OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
+#   EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+#
+
+LIST=CPU
+include recurse.mk
diff --git a/qnx/src/ipc3x_dev/sharedmemallocator/samples/sharedMemAllocator/usr/SharedMemAllocator.c b/qnx/src/ipc3x_dev/sharedmemallocator/samples/sharedMemAllocator/usr/SharedMemAllocator.c
new file mode 100644 (file)
index 0000000..200977c
--- /dev/null
@@ -0,0 +1,425 @@
+/*
+ *  @file       SharedMemAllocator.c
+ *
+ *  @brief      Shared Memory Allocator.
+ *
+ *  ============================================================================
+ *
+ *  Copyright (c) 2012, Texas Instruments Incorporated
+ *
+ *  Redistribution and use in source and binary forms, with or without
+ *  modification, are permitted provided that the following conditions
+ *  are met:
+ *
+ *  *  Redistributions of source code must retain the above copyright
+ *     notice, this list of conditions and the following disclaimer.
+ *
+ *  *  Redistributions in binary form must reproduce the above copyright
+ *     notice, this list of conditions and the following disclaimer in the
+ *     documentation and/or other materials provided with the distribution.
+ *
+ *  *  Neither the name of Texas Instruments Incorporated nor the names of
+ *     its contributors may be used to endorse or promote products derived
+ *     from this software without specific prior written permission.
+ *
+ *  THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+ *  AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
+ *  THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ *  PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
+ *  CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+ *  EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+ *  PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
+ *  OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
+ *  WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
+ *  OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
+ *  EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ *  Contact information for paper mail:
+ *  Texas Instruments
+ *  Post Office Box 655303
+ *  Dallas, Texas 75265
+ *  Contact information:
+ *  http://www-k.ext.ti.com/sc/technical-support/product-information-centers.htm?
+ *  DCMP=TIHomeTracking&HQS=Other+OT+home_d_contact
+ *  ============================================================================
+ *
+ */
+
+#include <stdio.h>
+#include <stdlib.h>
+
+#include "ti/shmemallocator/SharedMemoryAllocatorUsr.h"
+
+shm_buf bufs[100];
+int shmblocks[2] = {0x1000000, 0x1000000};
+
+void printMenu()
+{
+    printf("\n================================\n");
+    printf("\n1 : req buffer(size, block, alignment)\n");
+    printf("\n2 : req buffer(size, block)\n");
+    printf("\n3 : req buffer(size, alignment)\n");
+    printf("\n4 : req buffer(size)\n");
+    printf("\n0 : release buffer\n");
+    printf("\nC : release all buffers\n");
+    printf("\n# : print allocated bufs\n");
+    printf("\nR : RANDOM test\n");
+    printf("\nT : MONKEY test\n");
+    printf("\nM/m : print Menu\n");
+    printf("\nE/e : EXIT\n");
+    printf("\n================================\n");
+}
+
+void printAllocBufs()
+{
+    int i;
+    for(i=0; i<100; i++)
+        if(bufs[i].size)
+            printf("%d)VA=0x%0x bl=%d size=0x%0x\n", i, (unsigned)bufs[i].vir_addr, bufs[i].blockID, bufs[i].size);
+}
+
+void clearSHM()
+{
+    int i;
+    int status;
+    for(i=0; i<100; i++)
+        if(bufs[i].size) {
+            status = SHM_release(&bufs[i]);
+            if(!status) {
+                shmblocks[bufs[i].blockID] += bufs[i].size;
+                bufs[i].size = 0;
+                bufs[i].vir_addr = NULL;
+                bufs[i].phy_addr = NULL;
+                bufs[i].blockID = -1;
+            }
+            else
+                printf("\nclearSHM: cloudn't release buf(%d) 0x%x)\n", i, (unsigned)bufs[i].vir_addr);
+        }
+}
+
+void monkeyTest()
+{
+    int i;
+    int size;
+    int blockID;
+    int alignment;
+    int status;
+
+    for(i=0; i<100; i++) {
+        switch(rand()%8) {
+            case 0:
+                size = rand();
+                alignment = rand();
+                status = SHM_alloc_aligned(size, alignment, &bufs[i]);
+                printf("\n[APP] : SHM_alloc_aligned(%d, 0x%x): %s\n", size, alignment, status?"FAILED":"PASSED");
+                if(!status)
+                    shmblocks[bufs[i].blockID] -= bufs[i].size;
+                if(rand()%2) {
+                    status = SHM_release(&bufs[i]);
+                    printf("\n[APP] : SHM_release(0x%x, %d): %s\n", (unsigned)bufs[i].vir_addr, bufs[i].blockID, status?"FAILED":"PASSED");
+                    if(!status) {
+                        shmblocks[bufs[i].blockID] += bufs[i].size;
+                        bufs[i].size = 0;
+                        bufs[i].vir_addr = NULL;
+                        bufs[i].phy_addr = NULL;
+                        bufs[i].blockID = -1;
+                    }
+
+                }
+                break;
+            case 1:
+                size = rand()%0x1000;
+                alignment = rand()%10000;
+                status = SHM_alloc_aligned(size, alignment, &bufs[i]);
+                printf("\n[APP] : SHM_alloc_aligned(%d, 0x%x): %s\n", size, alignment, status?"FAILED":"PASSED");
+                if(!status)
+                    shmblocks[bufs[i].blockID] -= bufs[i].size;
+                if(rand()%2) {
+                    status = SHM_release(&bufs[i]);
+                    printf("\n[APP] : SHM_release(0x%x, %d): %s\n", (unsigned)bufs[i].vir_addr, bufs[i].blockID, status?"FAILED":"PASSED");
+                    if(!status) {
+                        shmblocks[bufs[i].blockID] += bufs[i].size;
+                        bufs[i].size = 0;
+                        bufs[i].vir_addr = NULL;
+                        bufs[i].phy_addr = NULL;
+                        bufs[i].blockID = -1;
+                    }
+                }
+                break;
+            case 2:
+                size = rand();
+                blockID = rand();
+                alignment = rand();
+                status = SHM_alloc_aligned_fromBlock(size, alignment, blockID, &bufs[i]);
+                if(!status)
+                    shmblocks[bufs[i].blockID] -= bufs[i].size;
+                printf("\n[APP] : SHM_alloc_aligned_fromBlock(%d, 0x%x, %d): %s\n", size, alignment, blockID, status?"FAILED":"PASSED");
+                if(rand()%2) {
+                    status = SHM_release(&bufs[i]);
+                    printf("\n[APP] : SHM_release(0x%x, %d): %s\n", (unsigned)bufs[i].vir_addr, bufs[i].blockID, status?"FAILED":"PASSED");
+                    if(!status) {
+                        shmblocks[bufs[i].blockID] += bufs[i].size;
+                        bufs[i].size = 0;
+                        bufs[i].vir_addr = NULL;
+                        bufs[i].phy_addr = NULL;
+                        bufs[i].blockID = -1;
+                    }
+                }
+                break;
+            case 3:
+                size = rand()%0x1000;
+                blockID = rand()%2;
+                alignment = rand()%0xFFF;
+                status = SHM_alloc_aligned_fromBlock(size, alignment, blockID, &bufs[i]);
+                if(!status)
+                    shmblocks[bufs[i].blockID] -= bufs[i].size;
+                printf("\n[APP] : SHM_alloc_aligned_fromBlock(%d, 0x%x, %d): %s\n", size, alignment, blockID, status?"FAILED":"PASSED");
+                if(rand()%2) {
+                    status = SHM_release(&bufs[i]);
+                    printf("\n[APP] : SHM_release(0x%x, %d): %s\n", (unsigned)bufs[i].vir_addr, bufs[i].blockID, status?"FAILED":"PASSED");
+                    if(!status) {
+                        shmblocks[bufs[i].blockID] += bufs[i].size;
+                        bufs[i].size = 0;
+                        bufs[i].vir_addr = NULL;
+                        bufs[i].phy_addr = NULL;
+                        bufs[i].blockID = -1;
+                    }
+                }
+                break;
+            case 4:
+                size = rand();
+                blockID = rand();
+                status = SHM_alloc_fromBlock(size, blockID, &bufs[i]);
+                if(!status)
+                    shmblocks[bufs[i].blockID] -= bufs[i].size;
+                printf("\n[APP] : SHM_alloc_fromBlock(%d, %d): %s\n", size, blockID, status?"FAILED":"PASSED");
+                if(rand()%2) {
+                    status = SHM_release(&bufs[i]);
+                    printf("\n[APP] : SHM_release(0x%x, %d): %s\n", (unsigned)bufs[i].vir_addr, bufs[i].blockID, status?"FAILED":"PASSED");
+                    if(!status) {
+                        shmblocks[bufs[i].blockID] += bufs[i].size;
+                        bufs[i].size = 0;
+                        bufs[i].vir_addr = NULL;
+                        bufs[i].phy_addr = NULL;
+                        bufs[i].blockID = -1;
+                    }
+                }
+                break;
+            case 5:
+                size = rand()%0x1000;
+                blockID = rand()%2;
+                status = SHM_alloc_fromBlock(size, blockID, &bufs[i]);
+                printf("\n[APP] : SHM_alloc_fromBlock(%d, %d): %s\n", size, blockID, status?"FAILED":"PASSED");
+                if(!status)
+                    shmblocks[bufs[i].blockID] -= bufs[i].size;
+                if(rand()%2) {
+                    status = SHM_release(&bufs[i]);
+                    printf("\n[APP] : SHM_release(0x%x, %d): %s\n", (unsigned)bufs[i].vir_addr, bufs[i].blockID, status?"FAILED":"PASSED");
+                    if(!status) {
+                        shmblocks[bufs[i].blockID] += bufs[i].size;
+                        bufs[i].size = 0;
+                        bufs[i].vir_addr = NULL;
+                        bufs[i].phy_addr = NULL;
+                        bufs[i].blockID = -1;
+                    }
+                }
+                break;
+            case 6:
+                size = rand();
+                blockID = rand();
+                status = SHM_alloc(size, &bufs[i]);
+                printf("\n[APP] : SHM_alloc(%d): %s\n", size, status?"FAILED":"PASSED");
+                if(!status)
+                    shmblocks[bufs[i].blockID] -= bufs[i].size;
+                if(rand()%2) {
+                    status = SHM_release(&bufs[i]);
+                    printf("\n[APP] : SHM_release(0x%x, %d): %s\n", (unsigned)bufs[i].vir_addr, bufs[i].blockID, status?"FAILED":"PASSED");
+                    if(!status) {
+                        shmblocks[bufs[i].blockID] += bufs[i].size;
+                        bufs[i].size = 0;
+                        bufs[i].vir_addr = NULL;
+                        bufs[i].phy_addr = NULL;
+                        bufs[i].blockID = -1;
+                    }
+                }
+                break;
+            case 7:
+                size = rand()%0x1000;
+                blockID = rand()%2;
+                status = SHM_alloc(size, &bufs[i]);
+                printf("\n[APP] : SHM_alloc(%d): %s\n", size, status?"FAILED":"PASSED");
+                if(!status)
+                    shmblocks[bufs[i].blockID] -= bufs[i].size;
+                if(rand()%2) {
+                    status = SHM_release(&bufs[i]);
+                    printf("\n[APP] : SHM_release(0x%x, %d): %s\n", (unsigned)bufs[i].vir_addr, bufs[i].blockID, status?"FAILED":"PASSED");
+                    if(!status) {
+                        shmblocks[bufs[i].blockID] += bufs[i].size;
+                        bufs[i].size = 0;
+                        bufs[i].vir_addr = NULL;
+                        bufs[i].phy_addr = NULL;
+                        bufs[i].blockID = -1;
+                    }
+                }
+                break;
+        }
+    }
+}
+
+void randomTest()
+{
+    int i;
+    int size;
+    int blockID;
+    int alignment;
+    int status;
+    shm_buf buf;
+
+    for(i=1; i<3; i++) {
+        size = rand();
+        blockID = rand();
+        alignment = rand();
+        status = SHM_alloc_aligned(size, alignment, &buf);
+        printf("\n[APP] : SHM_alloc_aligned(%d, 0x%x): %s\n", size, alignment, status?"FAILED":"PASSED");
+        status = SHM_release(&buf);
+        printf("\n[APP] : SHM_release(0x%x, %d): %s\n", (unsigned)buf.vir_addr, buf.blockID, status?"FAILED":"PASSED");
+        status = SHM_alloc_fromBlock(size, blockID, &buf);
+        printf("\n[APP] : SHM_alloc_fromBlock(%d, %d): %s\n", size, blockID, status?"FAILED":"PASSED");
+        status = SHM_release(&buf);
+        printf("\n[APP] : SHM_release(0x%x, %d): %s\n", (unsigned)buf.vir_addr, buf.blockID, status?"FAILED":"PASSED");
+        status = SHM_alloc_aligned_fromBlock(size, alignment, blockID, &buf);
+        printf("\n[APP] : SHM_alloc_aligned_fromBlock(%d, 0x%x, %d): %s\n", size, alignment, blockID, status?"FAILED":"PASSED");
+        status = SHM_release(&buf);
+        printf("\n[APP] : SHM_release(0x%x, %d): %s\n", (unsigned)buf.vir_addr, buf.blockID, status?"FAILED":"PASSED");
+        status = SHM_alloc(size, &buf);
+        printf("\n[APP] : SHM_alloc(%d): %s\n", size, status?"FAILED":"PASSED");
+        status = SHM_release(&buf);
+        printf("\n[APP] : SHM_release(0x%x, %d): %s\n", (unsigned)buf.vir_addr, buf.blockID, status?"FAILED":"PASSED");
+        size = rand()%4096;
+        blockID = rand()%2;
+        alignment = rand()%(i*1000);
+        status = SHM_alloc_aligned(size, alignment, &buf);
+        printf("\n[APP] : SHM_alloc_aligned(%d, 0x%x): %s\n", size, alignment, status?"FAILED":"PASSED");
+        status = SHM_release(&buf);
+        printf("\n[APP] : SHM_release(0x%x, %d): %s\n", (unsigned)buf.vir_addr, buf.blockID, status?"FAILED":"PASSED");
+        status = SHM_alloc_fromBlock(size, blockID, &buf);
+        printf("\n[APP] : SHM_alloc_fromBlock(%d, %d): %s\n", size, blockID, status?"FAILED":"PASSED");
+        status = SHM_release(&buf);
+        printf("\n[APP] : SHM_release(0x%x, %d): %s\n", (unsigned)buf.vir_addr, buf.blockID, status?"FAILED":"PASSED");
+        status = SHM_alloc_aligned_fromBlock(size, alignment, blockID, &buf);
+        printf("\n[APP] : SHM_alloc_aligned_fromBlock(%d, 0x%x, %d): %s\n", size, alignment, blockID, status?"FAILED":"PASSED");
+        status = SHM_release(&buf);
+        printf("\n[APP] : SHM_release(0x%x, %d): %s\n", (unsigned)buf.vir_addr, buf.blockID, status?"FAILED":"PASSED");
+        status = SHM_alloc(size, &buf);
+        printf("\n[APP] : SHM_alloc(%d): %s\n", size, status?"FAILED":"PASSED");
+        status = SHM_release(&buf);
+        printf("\n[APP] : SHM_release(0x%x, %d): %s\n", (unsigned)buf.vir_addr, buf.blockID, status?"FAILED":"PASSED");
+    }
+}
+
+int main()
+{
+    int status, i;
+    int size, alignment, blockID;
+    char ch;
+    int ip = 1;
+    printMenu();
+    while(ip) {
+        ch = getchar();
+        switch(ch) {
+            case '#':
+                printAllocBufs();
+                break;
+            case 'R':
+                randomTest();
+                break;
+            case 'T':
+                monkeyTest();
+                break;
+            case 'E':
+            case 'e':
+                ip = 0;
+                 break;
+            case 'M':
+            case 'm':
+                printMenu();
+                break;
+            case 'C':
+                clearSHM();
+                break;
+            case '1':
+            case '2':
+            case '3':
+            case '4':
+                for(i=0; i<100; i++) {
+                    if(!bufs[i].vir_addr) {
+                        printf("BUF[%d] selected\n", i);
+                        break;
+                    }
+                }
+                if(i==100) {
+                    printf("\n###buf list full\n");
+                    break;
+                }
+                if(ch == '1') {
+                    printf("\nenter size(0x), alignment(0x), block(0x)\n");
+                    scanf("%x, %x, %x", &size, &alignment, &blockID);
+                    printf("\n0x%x, 0x%x, 0x%x\n", size, blockID, alignment);
+                    fflush(stdin);
+                    status = SHM_alloc_aligned_fromBlock(size, alignment, blockID, &(bufs[i]));
+                } else if(ch == '2') {
+                    printf("\nenter size(0x), block(0x)\n");
+                    scanf("%x, %x", &size, &blockID);
+                    printf("\n0x%x, 0x%x\n", size, blockID);
+                    fflush(stdin);
+                    status = SHM_alloc_fromBlock(size, blockID, &(bufs[i]));
+                } else if(ch == '3') {
+                    printf("\nenter size(0x), alignment(0x)\n");
+                    scanf("%x, %x", &size, &alignment);
+                    printf("\n0x%x, 0x%x\n", size, alignment);
+                    fflush(stdin);
+                    status = SHM_alloc_aligned(size, alignment, &(bufs[i]));
+                } else {
+                    printf("\nenter size(0x)\n");
+                    scanf("%x", &size);
+                    printf("\n%0x\n", size);
+                    fflush(stdin);
+                    status = SHM_alloc(size, &(bufs[i]));
+                }
+                if(!status) {
+                    printf("\n[APP] : ALLOC REQ PASSED\n");
+                    printf("\nsize=0x%x, addr=0x%x\n", bufs[i].size, (unsigned)bufs[i].vir_addr);
+                    shmblocks[bufs[i].blockID] -= bufs[i].size;
+                    printf("\nremainng block[0] = 0x%0x", shmblocks[0]);
+                    printf("\nremainng block[1] = 0x%0x", shmblocks[1]);
+                }
+                else
+                    printf("\n[APP] : ALLOC REQ FAILED\n");
+                break;
+            case '0':
+                printAllocBufs();
+                printf("\nEnter which buffer to be released:\n");
+                scanf("%d", &i);
+                if(i < 0 || i > 100)
+                    printf("\nWRONG RELEASE ENTRY\n");
+                else {
+                    status = SHM_release(&bufs[i]);
+                    if(!status) {
+                        printf("\n[APP] : RELEASED REQ PASSED\n");
+                        shmblocks[bufs[i].blockID] += bufs[i].size;
+                        bufs[i].size = 0;
+                        bufs[i].vir_addr = NULL;
+                        bufs[i].phy_addr = NULL;
+                        bufs[i].blockID = -1;
+                        printf("\nremainng block[0] = 0x%0x", shmblocks[0]);
+                        printf("\nremainng block[1] = 0x%0x", shmblocks[1]);
+                    }
+                    else
+                        printf("\n[APP] : RELEASE REQ FAILED\n");
+                }
+                break;
+        }
+        if(ch != '\n' && ch != 'e' && ch != 'E')
+            printMenu();
+    }
+    return 0;
+}
diff --git a/qnx/src/ipc3x_dev/sharedmemallocator/samples/sharedMemAllocator/usr/SharedMemoryAllocatorTestApp.use b/qnx/src/ipc3x_dev/sharedmemallocator/samples/sharedMemAllocator/usr/SharedMemoryAllocatorTestApp.use
new file mode 100644 (file)
index 0000000..f056b70
--- /dev/null
@@ -0,0 +1,7 @@
+SharedMemAllocator Test for Syslink SharedMemAllocator
+
+Syntax:
+sharedmemallocator
+
+Examples:
+  sharedmemallocator
\ No newline at end of file
diff --git a/qnx/src/ipc3x_dev/sharedmemallocator/samples/sharedMemAllocator/usr/arm/Makefile b/qnx/src/ipc3x_dev/sharedmemallocator/samples/sharedMemAllocator/usr/arm/Makefile
new file mode 100644 (file)
index 0000000..84cd0b9
--- /dev/null
@@ -0,0 +1,39 @@
+#
+#   Copyright (c) 2013, Texas Instruments Incorporated
+#
+#   Redistribution and use in source and binary forms, with or without
+#   modification, are permitted provided that the following conditions
+#   are met:
+#
+#   *  Redistributions of source code must retain the above copyright
+#      notice, this list of conditions and the following disclaimer.
+#
+#   *  Redistributions in binary form must reproduce the above copyright
+#      notice, this list of conditions and the following disclaimer in the
+#      documentation and/or other materials provided with the distribution.
+#
+#   *  Neither the name of Texas Instruments Incorporated nor the names of
+#      its contributors may be used to endorse or promote products derived
+#      from this software without specific prior written permission.
+#
+#   THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+#   AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
+#   THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+#   PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
+#   CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+#   EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+#   PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
+#   OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
+#   WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
+#   OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
+#   EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+#
+
+LIST=VARIANT
+ifndef QRECURSE
+QRECURSE=recurse.mk
+ifdef QCONFIG
+QRDIR=$(dir $(QCONFIG))
+endif
+endif
+include $(QRDIR)$(QRECURSE)
diff --git a/qnx/src/ipc3x_dev/sharedmemallocator/samples/sharedMemAllocator/usr/arm/le.v7/Makefile b/qnx/src/ipc3x_dev/sharedmemallocator/samples/sharedMemAllocator/usr/arm/le.v7/Makefile
new file mode 100644 (file)
index 0000000..98debad
--- /dev/null
@@ -0,0 +1,32 @@
+#
+#   Copyright (c) 2013, Texas Instruments Incorporated
+#
+#   Redistribution and use in source and binary forms, with or without
+#   modification, are permitted provided that the following conditions
+#   are met:
+#
+#   *  Redistributions of source code must retain the above copyright
+#      notice, this list of conditions and the following disclaimer.
+#
+#   *  Redistributions in binary form must reproduce the above copyright
+#      notice, this list of conditions and the following disclaimer in the
+#      documentation and/or other materials provided with the distribution.
+#
+#   *  Neither the name of Texas Instruments Incorporated nor the names of
+#      its contributors may be used to endorse or promote products derived
+#      from this software without specific prior written permission.
+#
+#   THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+#   AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
+#   THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+#   PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
+#   CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+#   EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+#   PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
+#   OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
+#   WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
+#   OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
+#   EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+#
+
+include ../../common.mk
diff --git a/qnx/src/ipc3x_dev/sharedmemallocator/samples/sharedMemAllocator/usr/common.mk b/qnx/src/ipc3x_dev/sharedmemallocator/samples/sharedMemAllocator/usr/common.mk
new file mode 100644 (file)
index 0000000..b98afa3
--- /dev/null
@@ -0,0 +1,53 @@
+#
+#   Copyright (c) 2013, Texas Instruments Incorporated
+#
+#   Redistribution and use in source and binary forms, with or without
+#   modification, are permitted provided that the following conditions
+#   are met:
+#
+#   *  Redistributions of source code must retain the above copyright
+#      notice, this list of conditions and the following disclaimer.
+#
+#   *  Redistributions in binary form must reproduce the above copyright
+#      notice, this list of conditions and the following disclaimer in the
+#      documentation and/or other materials provided with the distribution.
+#
+#   *  Neither the name of Texas Instruments Incorporated nor the names of
+#      its contributors may be used to endorse or promote products derived
+#      from this software without specific prior written permission.
+#
+#   THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+#   AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
+#   THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+#   PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
+#   CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+#   EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+#   PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
+#   OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
+#   WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
+#   OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
+#   EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+#
+
+ifndef QCONFIG
+QCONFIG=qconfig.mk
+endif
+include $(QCONFIG)
+
+define PINFO
+PINFO DESCRIPTION=shared memory allocator app
+endef
+
+NAME = SharedMemoryAllocatorTestApp
+INSTALLDIR = bin
+
+#Add extra include path
+EXTRA_INCVPATH+=$(PROJECT_ROOT)/../../../resmgr/public \
+               $(PROJECT_ROOT)/../../../usr/public
+
+CCOPTS+=-g -O0
+
+EXTRA_LIBVPATH += $(PROJECT_ROOT)/../../../usr/arm/so.le.v7
+LDOPTS+= -lsharedmemallocator
+
+include $(MKFILES_ROOT)/qtargets.mk
diff --git a/qnx/src/ipc3x_dev/sharedmemallocator/usr/Makefile b/qnx/src/ipc3x_dev/sharedmemallocator/usr/Makefile
new file mode 100644 (file)
index 0000000..8160dcd
--- /dev/null
@@ -0,0 +1,32 @@
+#
+#   Copyright (c) 2013, Texas Instruments Incorporated
+#
+#   Redistribution and use in source and binary forms, with or without
+#   modification, are permitted provided that the following conditions
+#   are met:
+#
+#   *  Redistributions of source code must retain the above copyright
+#      notice, this list of conditions and the following disclaimer.
+#
+#   *  Redistributions in binary form must reproduce the above copyright
+#      notice, this list of conditions and the following disclaimer in the
+#      documentation and/or other materials provided with the distribution.
+#
+#   *  Neither the name of Texas Instruments Incorporated nor the names of
+#      its contributors may be used to endorse or promote products derived
+#      from this software without specific prior written permission.
+#
+#   THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+#   AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
+#   THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+#   PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
+#   CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+#   EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+#   PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
+#   OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
+#   WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
+#   OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
+#   EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+#
+
+include recurse.mk
diff --git a/qnx/src/ipc3x_dev/sharedmemallocator/usr/SharedMemoryAllocator.c b/qnx/src/ipc3x_dev/sharedmemallocator/usr/SharedMemoryAllocator.c
new file mode 100644 (file)
index 0000000..a78757f
--- /dev/null
@@ -0,0 +1,331 @@
+/*
+ *  @file       SharedMemoryAllocator.c
+ *
+ *  ============================================================================
+ *
+ */
+/*
+ *  Copyright (c) 2012, Texas Instruments Incorporated
+ *
+ *  Redistribution and use in source and binary forms, with or without
+ *  modification, are permitted provided that the following conditions
+ *  are met:
+ *
+ *  *  Redistributions of source code must retain the above copyright
+ *     notice, this list of conditions and the following disclaimer.
+ *
+ *  *  Redistributions in binary form must reproduce the above copyright
+ *     notice, this list of conditions and the following disclaimer in the
+ *     documentation and/or other materials provided with the distribution.
+ *
+ *  *  Neither the name of Texas Instruments Incorporated nor the names of
+ *     its contributors may be used to endorse or promote products derived
+ *     from this software without specific prior written permission.
+ *
+ *  THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+ *  AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
+ *  THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ *  PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
+ *  CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+ *  EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+ *  PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
+ *  OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
+ *  WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
+ *  OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
+ *  EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ *  Contact information for paper mail:
+ *  Texas Instruments
+ *  Post Office Box 655303
+ *  Dallas, Texas 75265
+ *  Contact information:
+ *  http://www-k.ext.ti.com/sc/technical-support/product-information-centers.htm?
+ *  DCMP=TIHomeTracking&HQS=Other+OT+home_d_contact
+ *  ============================================================================
+ *
+ */
+
+#include "ti/shmemallocator/SharedMemoryAllocator.h"
+#include <sys/select.h>
+#include <sys/types.h>
+#include <sys/stat.h>
+#include <sys/ioctl.h>
+#include <sys/mman.h>
+#include <sys/slog.h>
+#include <fcntl.h>
+#include <errno.h>
+#include <stdio.h>
+#include <string.h>
+#include <stdlib.h>
+#include <unistd.h>
+#include <pthread.h>
+#include <time.h>
+
+#define SHAREDMEMALLOCATOR_DRIVER_NAME         "/dev/shmemallocator"
+
+#if defined (__cplusplus)
+extern "C" {
+#endif /* defined (__cplusplus) */
+
+static pthread_mutex_t mutex = PTHREAD_MUTEX_INITIALIZER;
+static int shmHandler = -1;
+static int ref_cnt = 0;
+
+int initSHMHandler(int *SHMAllocatorDrv_handle)
+{
+    int status = 0;
+
+    pthread_mutex_lock(&mutex);
+    if (ref_cnt++ == 0) {
+        *SHMAllocatorDrv_handle = open (SHAREDMEMALLOCATOR_DRIVER_NAME,
+                                        O_SYNC | O_RDWR);
+        if (*SHMAllocatorDrv_handle < 0) {
+            slogf (42, _SLOG_DEBUG1, "\ninitSHMHandler: couldn't open shmemallocator device\n");
+            ref_cnt--;
+            status = -errno;
+        } else {
+            status = fcntl (*SHMAllocatorDrv_handle, F_SETFD, FD_CLOEXEC);
+            if (status != 0) {
+                slogf (42, _SLOG_DEBUG1, "\ninitSHMHandler: Failed to set file descriptor flags\n");
+                status = -errno;
+            }
+        }
+    }
+
+    pthread_mutex_unlock(&mutex);
+    return status;
+}
+
+void deinitSHMHandler(int SHMAllocatorDrv_handle)
+{
+    if(SHMAllocatorDrv_handle < 0){
+        slogf (42, _SLOG_DEBUG1, "invalid SHMAllocatorDrv_handle value %d",SHMAllocatorDrv_handle);
+        return;
+    }
+
+    pthread_mutex_lock(&mutex);
+
+    if (--ref_cnt == 0) {
+        close (SHMAllocatorDrv_handle);
+    }
+    pthread_mutex_unlock(&mutex);
+}
+
+int SHM_alloc(int size, shm_buf *buf)
+{
+    int status = 0;
+    SHMAllocatorDrv_CmdArgs     cmdArgs;
+
+    if(buf == NULL || size <= 0){
+        slogf (42, _SLOG_DEBUG1, "\nSHM_alloc: Invalid arguments\n");
+        return -1;
+    }
+    buf->phy_addr = NULL;
+    buf->vir_addr = NULL;
+    buf->blockID =  -1;
+    buf->size = 0;
+
+    status = initSHMHandler(&shmHandler);
+
+    if (status < 0) {
+        slogf (42, _SLOG_DEBUG1, "\nSHM_alloc: initSHMHandler Failed\n");
+        return status;
+    }
+
+    cmdArgs.size = size;
+    cmdArgs.blockID = 0;
+    cmdArgs.alignment = 0;
+    cmdArgs.result.phy_addr = 0;
+    cmdArgs.result.vir_addr = 0;
+
+    ioctl (shmHandler, CMD_SHMALLOCATOR_ALLOC, &cmdArgs);
+    status = cmdArgs.apiStatus;
+    if (status < 0) {
+        slogf (42, _SLOG_DEBUG1, "\nSHM_alloc: IOCTL Failed \n");
+        deinitSHMHandler(shmHandler);
+        return status;
+    }
+    else {
+        buf->phy_addr = cmdArgs.result.phy_addr;
+        buf->vir_addr = cmdArgs.result.vir_addr;
+        buf->blockID =  cmdArgs.result.blockID;
+        buf->size = cmdArgs.result.size;
+    }
+
+    return (status);
+}
+
+int SHM_alloc_aligned(int size, uint alignment, shm_buf *buf)
+{
+    int status = 0;
+    SHMAllocatorDrv_CmdArgs     cmdArgs;
+
+    if(buf == NULL || size <= 0 || alignment == 0){
+        slogf (42, _SLOG_DEBUG1, "\nSHM_alloc: Invalid arguments\n");
+        return -1;
+    }
+    buf->phy_addr = NULL;
+    buf->vir_addr = NULL;
+    buf->blockID =  -1;
+    buf->size = 0;
+
+    status = initSHMHandler(&shmHandler);
+
+    if (status < 0) {
+        slogf (42, _SLOG_DEBUG1, "\nSHM_alloc_aligned: initSHMHandler Failed\n");
+        return status;
+    }
+
+    cmdArgs.size = size;
+    cmdArgs.blockID = 0;
+    cmdArgs.alignment = alignment;
+    cmdArgs.result.phy_addr = 0;
+    cmdArgs.result.vir_addr = 0;
+
+    ioctl (shmHandler, CMD_SHMALLOCATOR_ALLOC, &cmdArgs);
+    status = cmdArgs.apiStatus;
+    if (status < 0) {
+        slogf (42, _SLOG_DEBUG1, "\nSHM_alloc_aligned: IOCTL Failed \n");
+        deinitSHMHandler(shmHandler);
+        return status;
+    }
+    else {
+        buf->phy_addr = cmdArgs.result.phy_addr;
+        buf->vir_addr = cmdArgs.result.vir_addr;
+        buf->blockID =  cmdArgs.result.blockID;
+        buf->size = cmdArgs.result.size;
+    }
+
+    return (status);
+}
+
+int SHM_alloc_fromBlock(int size, int blockID, shm_buf *buf)
+{
+    int status = 0;
+    SHMAllocatorDrv_CmdArgs     cmdArgs;
+
+    buf->phy_addr = NULL;
+    buf->vir_addr = NULL;
+    buf->blockID =  -1;
+    buf->size = 0;
+
+    if(buf == NULL || size <= 0 || blockID < MIN_BLOCKS_IDX || blockID > MAX_BLOCKS_IDX){
+        slogf (42, _SLOG_DEBUG1, "\nSHM_alloc: Invalid arguments\n");
+        return -1;
+    }
+
+    status = initSHMHandler(&shmHandler);
+
+    if (status < 0) {
+        slogf (42, _SLOG_DEBUG1, "\nSHM_alloc_fromBlock: initSHMHandler Failed\n");
+        return status;
+    }
+
+    cmdArgs.size = size;
+    cmdArgs.blockID = blockID;
+    cmdArgs.alignment = 0;
+    cmdArgs.result.phy_addr = 0;
+    cmdArgs.result.vir_addr = 0;
+
+    ioctl (shmHandler, CMD_SHMALLOCATOR_ALLOC, &cmdArgs);
+    status = cmdArgs.apiStatus;
+    if (status < 0) {
+        slogf (42, _SLOG_DEBUG1, "\nSHM_alloc_fromBlock: IOCTL Failed \n");
+        deinitSHMHandler(shmHandler);
+        return status;
+    }
+    else {
+        buf->phy_addr = cmdArgs.result.phy_addr;
+        buf->vir_addr = cmdArgs.result.vir_addr;
+        buf->blockID =  cmdArgs.result.blockID;
+        buf->size = cmdArgs.result.size;
+    }
+
+    return (status);
+}
+
+int SHM_alloc_aligned_fromBlock(int size, uint alignment, int blockID,
+                                shm_buf *buf)
+{
+    int status = 0;
+    SHMAllocatorDrv_CmdArgs     cmdArgs;
+
+    buf->phy_addr = NULL;
+    buf->vir_addr = NULL;
+    buf->blockID =  -1;
+    buf->size = 0;
+
+    if(buf == NULL || size <= 0 || alignment == 0 || blockID < MIN_BLOCKS_IDX || blockID > MAX_BLOCKS_IDX){
+        slogf (42, _SLOG_DEBUG1, "\nSHM_alloc: Invalid arguments\n");
+        return -1;
+    }
+
+    status = initSHMHandler(&shmHandler);
+
+    if (status < 0) {
+        slogf (42, _SLOG_DEBUG1, "\nSHM_alloc_aligned_fromBlock: initSHMHandler Failed\n");
+        return status;
+    }
+
+    cmdArgs.size = size;
+    cmdArgs.blockID = blockID;
+    cmdArgs.alignment = alignment;
+    cmdArgs.result.phy_addr = 0;
+    cmdArgs.result.vir_addr = 0;
+
+    ioctl (shmHandler, CMD_SHMALLOCATOR_ALLOC, &cmdArgs);
+    status = cmdArgs.apiStatus;
+    if (status < 0) {
+        slogf (42, _SLOG_DEBUG1, "\nSHM_alloc: IOCTL Failed \n");
+        deinitSHMHandler(shmHandler);
+        return status;
+    }
+    buf->phy_addr = cmdArgs.result.phy_addr;
+    buf->vir_addr = cmdArgs.result.vir_addr;
+    buf->blockID =  cmdArgs.result.blockID;
+    buf->size = cmdArgs.result.size;
+
+    return (status);
+}
+
+/*!
+ *  @brief      This function triggers the buffer release  in the kernel.
+ *
+ *  @param    buf   Pointer to the buffer address information
+ *
+ *  @return     0       Success.
+ *                 -1     Failure in ioctl call.
+ *
+ */
+int SHM_release(shm_buf *buf)
+
+{
+    int                       status      = 0;
+    SHMAllocatorDrv_CmdArgs     cmdArgs;
+
+    if(buf == NULL){
+        slogf (42, _SLOG_DEBUG1, "\nSHM_release: Invalid arguments\n");
+        return -1;
+    }
+    if(buf->blockID < MIN_BLOCKS_IDX || buf->blockID > MAX_BLOCKS_IDX || buf->vir_addr == NULL){
+        slogf (42, _SLOG_DEBUG1, "\nSHM_release: Invalid arguments\n");
+        return -1;
+    }
+    cmdArgs.result.phy_addr = buf->phy_addr;
+    cmdArgs.result.vir_addr = buf->vir_addr;
+    cmdArgs.blockID = buf->blockID;
+
+    ioctl (shmHandler, CMD_SHMALLOCATOR_RELEASE, &cmdArgs);
+    status = cmdArgs.apiStatus;
+
+    if (status < 0) {
+        slogf (42, _SLOG_DEBUG1, "\nRELEASE IOCTL failed\n");
+    }
+
+    deinitSHMHandler (shmHandler);
+
+    return (status);
+}
+
+#if defined (__cplusplus)
+}
+#endif /* defined (__cplusplus) */
diff --git a/qnx/src/ipc3x_dev/sharedmemallocator/usr/arm/Makefile b/qnx/src/ipc3x_dev/sharedmemallocator/usr/arm/Makefile
new file mode 100644 (file)
index 0000000..84cd0b9
--- /dev/null
@@ -0,0 +1,39 @@
+#
+#   Copyright (c) 2013, Texas Instruments Incorporated
+#
+#   Redistribution and use in source and binary forms, with or without
+#   modification, are permitted provided that the following conditions
+#   are met:
+#
+#   *  Redistributions of source code must retain the above copyright
+#      notice, this list of conditions and the following disclaimer.
+#
+#   *  Redistributions in binary form must reproduce the above copyright
+#      notice, this list of conditions and the following disclaimer in the
+#      documentation and/or other materials provided with the distribution.
+#
+#   *  Neither the name of Texas Instruments Incorporated nor the names of
+#      its contributors may be used to endorse or promote products derived
+#      from this software without specific prior written permission.
+#
+#   THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+#   AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
+#   THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+#   PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
+#   CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+#   EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+#   PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
+#   OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
+#   WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
+#   OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
+#   EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+#
+
+LIST=VARIANT
+ifndef QRECURSE
+QRECURSE=recurse.mk
+ifdef QCONFIG
+QRDIR=$(dir $(QCONFIG))
+endif
+endif
+include $(QRDIR)$(QRECURSE)
diff --git a/qnx/src/ipc3x_dev/sharedmemallocator/usr/arm/so.le.v7/Makefile b/qnx/src/ipc3x_dev/sharedmemallocator/usr/arm/so.le.v7/Makefile
new file mode 100644 (file)
index 0000000..98debad
--- /dev/null
@@ -0,0 +1,32 @@
+#
+#   Copyright (c) 2013, Texas Instruments Incorporated
+#
+#   Redistribution and use in source and binary forms, with or without
+#   modification, are permitted provided that the following conditions
+#   are met:
+#
+#   *  Redistributions of source code must retain the above copyright
+#      notice, this list of conditions and the following disclaimer.
+#
+#   *  Redistributions in binary form must reproduce the above copyright
+#      notice, this list of conditions and the following disclaimer in the
+#      documentation and/or other materials provided with the distribution.
+#
+#   *  Neither the name of Texas Instruments Incorporated nor the names of
+#      its contributors may be used to endorse or promote products derived
+#      from this software without specific prior written permission.
+#
+#   THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+#   AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
+#   THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+#   PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
+#   CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+#   EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+#   PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
+#   OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
+#   WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
+#   OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
+#   EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+#
+
+include ../../common.mk
diff --git a/qnx/src/ipc3x_dev/sharedmemallocator/usr/common.mk b/qnx/src/ipc3x_dev/sharedmemallocator/usr/common.mk
new file mode 100644 (file)
index 0000000..385e311
--- /dev/null
@@ -0,0 +1,51 @@
+#
+#   Copyright (c) 2013, Texas Instruments Incorporated
+#
+#   Redistribution and use in source and binary forms, with or without
+#   modification, are permitted provided that the following conditions
+#   are met:
+#
+#   *  Redistributions of source code must retain the above copyright
+#      notice, this list of conditions and the following disclaimer.
+#
+#   *  Redistributions in binary form must reproduce the above copyright
+#      notice, this list of conditions and the following disclaimer in the
+#      documentation and/or other materials provided with the distribution.
+#
+#   *  Neither the name of Texas Instruments Incorporated nor the names of
+#      its contributors may be used to endorse or promote products derived
+#      from this software without specific prior written permission.
+#
+#   THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+#   AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
+#   THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+#   PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
+#   CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+#   EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+#   PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
+#   OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
+#   WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
+#   OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
+#   EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+#
+
+ifndef QCONFIG
+QCONFIG=qconfig.mk
+endif
+include $(QCONFIG)
+
+define PINFO
+PINFO DESCRIPTION=Shared Memory Allocator Library
+endef
+
+NAME = sharedmemallocator
+INSTALLDIR = usr/lib
+
+#Add extra include path
+EXTRA_INCVPATH+=$(PROJECT_ROOT)/../resmgr/public
+
+include $(MKFILES_ROOT)/qtargets.mk
+
+#CCOPTS += -g -O0
+CCFLAGS += $(COMPILE_FLAGS)
+CCFLAGS += -fPIC
diff --git a/qnx/src/ipc3x_dev/sharedmemallocator/usr/public/ti/shmemallocator/SharedMemoryAllocatorUsr.h b/qnx/src/ipc3x_dev/sharedmemallocator/usr/public/ti/shmemallocator/SharedMemoryAllocatorUsr.h
new file mode 100644 (file)
index 0000000..449b81c
--- /dev/null
@@ -0,0 +1,57 @@
+/*
+ *  @file   SharedMemoryAllocatorUsr.h
+ *
+ *  @brief      User side Shared Memory Allocator
+ *
+ *  ============================================================================
+ *
+ */
+/*
+ *  Copyright (c) 2012, Texas Instruments Incorporated
+ *
+ *  Redistribution and use in source and binary forms, with or without
+ *  modification, are permitted provided that the following conditions
+ *  are met:
+ *
+ *  *  Redistributions of source code must retain the above copyright
+ *     notice, this list of conditions and the following disclaimer.
+ *
+ *  *  Redistributions in binary form must reproduce the above copyright
+ *     notice, this list of conditions and the following disclaimer in the
+ *     documentation and/or other materials provided with the distribution.
+ *
+ *  *  Neither the name of Texas Instruments Incorporated nor the names of
+ *     its contributors may be used to endorse or promote products derived
+ *     from this software without specific prior written permission.
+ *
+ *  THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+ *  AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
+ *  THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ *  PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
+ *  CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+ *  EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+ *  PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
+ *  OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
+ *  WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
+ *  OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
+ *  EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ *  Contact information for paper mail:
+ *  Texas Instruments
+ *  Post Office Box 655303
+ *  Dallas, Texas 75265
+ *  Contact information:
+ *  http://www-k.ext.ti.com/sc/technical-support/product-information-centers.htm?
+ *  DCMP=TIHomeTracking&HQS=Other+OT+home_d_contact
+ *  ============================================================================
+ *
+ */
+
+#include "ti/shmemallocator/SharedMemoryAllocator.h"
+
+// Vidhya - Is it better to have 4 APIs or a single API?
+
+int SHM_alloc(int size, shm_buf *buf);
+int SHM_alloc_aligned(int size, uint alignment, shm_buf *buf);
+int SHM_alloc_fromBlock(int size, int blockID, shm_buf *buf);
+int SHM_alloc_aligned_fromBlock(int size, uint alignment, int blockID, shm_buf *buf);
+int SHM_release(shm_buf *buf);
diff --git a/qnx/src/ipc3x_dev/ti/Makefile b/qnx/src/ipc3x_dev/ti/Makefile
new file mode 100644 (file)
index 0000000..8160dcd
--- /dev/null
@@ -0,0 +1,32 @@
+#
+#   Copyright (c) 2013, Texas Instruments Incorporated
+#
+#   Redistribution and use in source and binary forms, with or without
+#   modification, are permitted provided that the following conditions
+#   are met:
+#
+#   *  Redistributions of source code must retain the above copyright
+#      notice, this list of conditions and the following disclaimer.
+#
+#   *  Redistributions in binary form must reproduce the above copyright
+#      notice, this list of conditions and the following disclaimer in the
+#      documentation and/or other materials provided with the distribution.
+#
+#   *  Neither the name of Texas Instruments Incorporated nor the names of
+#      its contributors may be used to endorse or promote products derived
+#      from this software without specific prior written permission.
+#
+#   THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+#   AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
+#   THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+#   PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
+#   CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+#   EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+#   PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
+#   OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
+#   WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
+#   OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
+#   EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+#
+
+include recurse.mk
diff --git a/qnx/src/ipc3x_dev/ti/syslink/Makefile b/qnx/src/ipc3x_dev/ti/syslink/Makefile
new file mode 100644 (file)
index 0000000..3353283
--- /dev/null
@@ -0,0 +1,42 @@
+#
+#   Copyright (c) 2013, Texas Instruments Incorporated
+#
+#   Redistribution and use in source and binary forms, with or without
+#   modification, are permitted provided that the following conditions
+#   are met:
+#
+#   *  Redistributions of source code must retain the above copyright
+#      notice, this list of conditions and the following disclaimer.
+#
+#   *  Redistributions in binary form must reproduce the above copyright
+#      notice, this list of conditions and the following disclaimer in the
+#      documentation and/or other materials provided with the distribution.
+#
+#   *  Neither the name of Texas Instruments Incorporated nor the names of
+#      its contributors may be used to endorse or promote products derived
+#      from this software without specific prior written permission.
+#
+#   THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+#   AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
+#   THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+#   PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
+#   CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+#   EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+#   PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
+#   OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
+#   WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
+#   OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
+#   EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+#
+
+LIST=TOPLEVEL
+EXCLUDE_OSLIST=ipc procmgr utils
+EARLY_DIRS=build
+LATE_DIRS=samples
+
+SYSLINK_ROOT=$(CURDIR)
+
+include recurse.mk
+
+bin:
+       rm -rf ../install
diff --git a/qnx/src/ipc3x_dev/ti/syslink/ProcMgr.h b/qnx/src/ipc3x_dev/ti/syslink/ProcMgr.h
new file mode 100644 (file)
index 0000000..9a5be03
--- /dev/null
@@ -0,0 +1,1232 @@
+/**
+ *  @file   ProcMgr.h
+ *
+ *  @brief      The Processor Manager on a master processor provides control
+ *              functionality for a slave device.<br>
+ *
+ *              The ProcMgr module provides the following services for the
+ *              slave processor:<br>
+ *
+ *              -Slave processor boot-loading<br>
+ *              -Read from or write to slave processor memory<br>
+ *              -Slave processor power management<br>
+ *              -Slave processor error handling<br>
+ *              -Dynamic Memory Mapping<br>
+ *
+ *              The Device Manager (Processor module) shall have interfaces for:<br>
+ *
+ *              -Loader: There may be multiple implementations of the Loader
+ *                        interface within a single Processor instance.
+ *                        For example, COFF, ELF, dynamic loader, custom types
+ *                        of loaders may be written and plugged in.<br>
+ *
+ *              -Power Manager: The Power Manager implementation can be a
+ *                        separate module that is plugged into the Processor
+ *                        module. This allows the Processor code to remain
+ *                        generic, and the Power Manager may be written and
+ *                        maintained either by a separate team, or by customer.<br>
+ *
+ *              -Processor: The implementation of this interface provides all
+ *                        other functionality for the slave processor, including
+ *                        setup and initialization of the Processor module,
+ *                        management of slave processor MMU (if available),
+ *                        functions to write to and read from slave memory etc.<br>
+ *
+ *              All processors in the system shall be identified by unique
+ *              processor ID. The management of this processor ID is done by the
+ *              MultiProc module.<br>
+ *
+ *
+ *  @ver        02.00.00.46_alpha1
+ *
+ *  ============================================================================
+ *
+ *  Copyright (c) 2008-2009, Texas Instruments Incorporated
+ *
+ *  Redistribution and use in source and binary forms, with or without
+ *  modification, are permitted provided that the following conditions
+ *  are met:
+ *
+ *  *  Redistributions of source code must retain the above copyright
+ *     notice, this list of conditions and the following disclaimer.
+ *
+ *  *  Redistributions in binary form must reproduce the above copyright
+ *     notice, this list of conditions and the following disclaimer in the
+ *     documentation and/or other materials provided with the distribution.
+ *
+ *  *  Neither the name of Texas Instruments Incorporated nor the names of
+ *     its contributors may be used to endorse or promote products derived
+ *     from this software without specific prior written permission.
+ *
+ *  THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+ *  AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
+ *  THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ *  PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
+ *  CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+ *  EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+ *  PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
+ *  OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
+ *  WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
+ *  OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
+ *  EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ *  Contact information for paper mail:
+ *  Texas Instruments
+ *  Post Office Box 655303
+ *  Dallas, Texas 75265
+ *  Contact information:
+ *  http://www-k.ext.ti.com/sc/technical-support/product-information-centers.htm?
+ *  DCMP=TIHomeTracking&HQS=Other+OT+home_d_contact
+ *  ============================================================================
+ *
+ */
+
+
+#ifndef ProcMgr_H_0xf2ba
+#define ProcMgr_H_0xf2ba
+
+#if defined (__cplusplus)
+extern "C" {
+#endif
+
+
+/* =============================================================================
+ *  All success and failure codes for the module
+ * =============================================================================
+ */
+/*!
+ *  @def    ProcMgr_S_CANCELED
+ *  @brief  The function was successfully canceled.
+ */
+#define ProcMgr_S_CANCELED         7
+
+/*!
+ *  @def    ProcMgr_S_REPLYLATER
+ *  @brief  The function will send the reply later.
+ */
+#define ProcMgr_S_REPLYLATER       6
+
+/*!
+ *  @def    ProcMgr_S_OPENHANDLE
+ *  @brief  Other ProcMgr clients have still setup the ProcMgr module.
+ */
+#define ProcMgr_S_SETUP            5
+
+/*!
+ *  @def    ProcMgr_S_OPENHANDLE
+ *  @brief  Other ProcMgr handles are still open in this process.
+ */
+#define ProcMgr_S_OPENHANDLE       4
+
+/*!
+ *  @def    ProcMgr_S_ALREADYEXISTS
+ *  @brief  The ProcMgr instance has already been created/opened in this process
+ */
+#define ProcMgr_S_ALREADYEXISTS    3
+/*!
+ *  @def    ProcMgr_S_BUSY
+ *  @brief  The resource is still in use
+ */
+#define ProcMgr_S_BUSY             2
+
+/*!
+ *  @def    ProcMgr_S_ALREADYSETUP
+ *  @brief  The module has been already setup
+ */
+#define ProcMgr_S_ALREADYSETUP     1
+
+/*!
+ *  @def    ProcMgr_S_SUCCESS
+ *  @brief  Operation is successful.
+ */
+#define ProcMgr_S_SUCCESS          0
+
+/*!
+ *  @def    ProcMgr_E_FAIL
+ *  @brief  Generic failure.
+ */
+#define ProcMgr_E_FAIL             -1
+
+/*!
+ *  @def    ProcMgr_E_INVALIDARG
+ *  @brief  Argument passed to function is invalid.
+ */
+#define ProcMgr_E_INVALIDARG       -2
+
+/*!
+ *  @def    ProcMgr_E_MEMORY
+ *  @brief  Operation resulted in memory failure.
+ */
+#define ProcMgr_E_MEMORY           -3
+
+/*!
+ *  @def    ProcMgr_E_ALREADYEXISTS
+ *  @brief  The specified entity already exists.
+ */
+#define ProcMgr_E_ALREADYEXISTS    -4
+
+/*!
+ *  @def    ProcMgr_E_NOTFOUND
+ *  @brief  Unable to find the specified entity.
+ */
+#define ProcMgr_E_NOTFOUND         -5
+
+/*!
+ *  @def    ProcMgr_E_TIMEOUT
+ *  @brief  Operation timed out.
+ */
+#define ProcMgr_E_TIMEOUT          -6
+
+/*!
+ *  @def    ProcMgr_E_INVALIDSTATE
+ *  @brief  Module is not initialized.
+ */
+#define ProcMgr_E_INVALIDSTATE     -7
+
+/*!
+ *  @def    ProcMgr_E_OSFAILURE
+ *  @brief  A failure occurred in an OS-specific call
+ */
+#define ProcMgr_E_OSFAILURE        -8
+
+/*!
+ *  @def    ProcMgr_E_RESOURCE
+ *  @brief  Specified resource is not available
+ */
+#define ProcMgr_E_RESOURCE         -9
+
+/*!
+ *  @def    ProcMgr_E_RESTART
+ *  @brief  Operation was interrupted. Please restart the operation
+ */
+#define ProcMgr_E_RESTART          -10
+
+/*!
+ *  @def    ProcMgr_E_HANDLE
+ *  @brief  Invalid object handle specified
+ */
+#define ProcMgr_E_HANDLE           -11
+
+/*!
+ *  @def    ProcMgr_E_ACCESSDENIED
+ *  @brief  The operation is not permitted in this process.
+ */
+#define ProcMgr_E_ACCESSDENIED     -12
+
+/*!
+ *  @def    ProcMgr_E_TRANSLATE
+ *  @brief  An address translation error occurred.
+ */
+#define ProcMgr_E_TRANSLATE        -13
+
+/*!
+ *  @def    ProcMgr_E_SYMBOLNOTFOUND
+ *  @brief  Could not find the specified symbol in the loaded file
+ */
+#define ProcMgr_E_SYMBOLNOTFOUND   -14
+
+/*!
+ *  @def    ProcMgr_E_MAP
+ *  @brief  Failed to map/unmap an address range
+ */
+#define ProcMgr_E_MAP              -15
+
+
+/* =============================================================================
+ *  Macros and types
+ * =============================================================================
+ */
+/*!
+ *  @brief  Maximum number of memory regions supported by ProcMgr module.
+ */
+#define ProcMgr_MAX_MEMORY_REGIONS  32u
+
+/*!
+ *  @def    IS_VALID_PROCID
+ *  @brief  Checks if the Processor ID is valid
+ */
+#define IS_VALID_PROCID(id)   (id < MultiProc_MAXPROCESSORS)
+
+/*!
+ *  @brief  Defines ProcMgr object handle
+ */
+typedef struct ProcMgr_Object * ProcMgr_Handle;
+
+
+/*!
+ *  @brief  Enumerations to indicate Processor states.
+ */
+typedef enum {
+    ProcMgr_State_Unknown     = 0u,
+    /*!< Unknown Processor state (e.g. at startup or error). */
+    ProcMgr_State_Powered     = 1u,
+    /*!< Indicates the Processor is powered up. */
+    ProcMgr_State_Reset       = 2u,
+    /*!< Indicates the Processor is reset. */
+    ProcMgr_State_Loaded      = 3u,
+    /*!< Indicates the Processor is loaded. */
+    ProcMgr_State_Running     = 4u,
+    /*!< Indicates the Processor is running. */
+    ProcMgr_State_Suspended   = 5u,
+    /*!< Indicates the Processor is suspended. */
+    ProcMgr_State_Unavailable = 6u,
+    /*!< Indicates the Processor is unavailable to the physical transport. */
+    ProcMgr_State_Error       = 7u,
+    /*!< Indicates the Processor is in an error state (general error). */
+    ProcMgr_State_Watchdog    = 8u,
+    /*!< Indicates the Processor is in an error state (Watchdog error). */
+    ProcMgr_State_Mmu_Fault   = 9u,
+    /*!< Indicates the Processor is in an error state (MMU fault error). */
+    ProcMgr_State_EndValue    = 10u
+    /*!< End delimiter indicating start of invalid values for this enum */
+} ProcMgr_State ;
+/*!
+ *  @brief  Enumerations to identify the Processor
+ */
+typedef enum {
+    PROC_DSP = 0,
+    PROC_CORE1 = 1,
+    PROC_CORE0 = 2,
+    PROC_MPU   = 3,
+    PROC_END   = 4
+} ProcMgr_ProcId;
+
+/*!
+ *  @brief  Enumerations to indicate different types of slave boot modes.
+ */
+typedef enum {
+    ProcMgr_BootMode_Boot     = 0u,
+    /*!< ProcMgr is responsible for loading the slave and its reset control. */
+    ProcMgr_BootMode_NoLoad_Pwr     = 1u,
+    /*!< ProcMgr is not responsible for loading the slave. It is responsible
+         for reset control of the slave. */
+    ProcMgr_BootMode_NoLoad_NoPwr   = 2u,
+    /*!< ProcMgr is not responsible for loading the slave. It is partial responsible
+         for reset control of the slave. It doesn't put in reset while procMgr_attach
+         but release reset while procMgr_start operation. */
+    ProcMgr_BootMode_NoBoot         = 3u,
+    /*!< ProcMgr is not responsible for loading or reset control of the slave.
+         The slave either self-boots, or this is done by some entity outside of
+         the ProcMgr module. */
+    ProcMgr_BootMode_EndValue       = 4u
+    /*!< End delimiter indicating start of invalid values for this enum */
+} ProcMgr_BootMode ;
+
+/*!
+ *  @brief  Enumerations to indicate address types used for translation
+ */
+typedef enum {
+    ProcMgr_AddrType_MasterKnlVirt = 0u,
+    /*!< Kernel Virtual address on master processor */
+    ProcMgr_AddrType_MasterUsrVirt = 1u,
+    /*!< User Virtual address on master processor */
+    ProcMgr_AddrType_MasterPhys    = 2u,
+    /*!< Physical address on master processor */
+    ProcMgr_AddrType_SlaveVirt     = 3u,
+    /*!< Virtual address on slave processor */
+    ProcMgr_AddrType_SlavePhys     = 4u,
+    /*!< Physical address on slave processor */
+    ProcMgr_AddrType_EndValue      = 5u
+    /*!< End delimiter indicating start of invalid values for this enum */
+} ProcMgr_AddrType;
+
+/**
+ *  @brief      Address Map Mask type
+ */
+typedef UInt32 ProcMgr_MapMask;
+
+/**
+ *  @brief      Kernel virtual address on master processor
+ */
+#define ProcMgr_MASTERKNLVIRT   (ProcMgr_MapMask)(1 << 0)
+
+/**
+ *  @brief      User virtual address on master processor
+ */
+#define ProcMgr_MASTERUSRVIRT   (ProcMgr_MapMask)(1 << 1)
+
+/**
+ *  @brief      Virtual address on slave processor
+ */
+#define ProcMgr_SLAVEVIRT       (ProcMgr_MapMask)(1 << 2)
+
+/**
+ *  @brief      Tiler address on slave processor
+ */
+#define ProcMgr_TILER           (ProcMgr_MapMask)(1 << 3)
+/*!
+ *  @brief  Event types
+ */
+typedef enum {
+    PROC_MMU_FAULT = 0u,
+    /*!< MMU fault event */
+    PROC_ERROR = 1u,
+    /*!< Proc Error event */
+    PROC_STOP     = 2u,
+    /*!< Proc Stop event */
+    PROC_START      = 3u,
+    /*!< Proc start event */
+    PROC_WATCHDOG   = 4u,
+    /*!< Proc WatchDog Timer event */
+} ProcMgr_EventType;
+
+/*!
+ *  @brief  Enumerations to indicate the available device address memory pools
+ */
+typedef enum {
+    ProcMgr_DMM_MemPool    = 0u,
+     /*!< Map/unmap to virtual address space (user) */
+    ProcMgr_TILER_MemPool    = 1u,
+    /*!< Map/unmap to Tiler address space */
+    ProcMgr_NONE_MemPool   = -1,
+    /*!< Provide valid Device address as input*/
+} ProcMgr_MemPoolType;
+
+/*!
+ *  @brief  Configuration parameters specific to the slave ProcMgr instance.
+ */
+typedef struct ProcMgr_AttachParams_tag {
+    ProcMgr_BootMode bootMode;
+    /*!< Boot mode for the slave processor. */
+    Ptr              bootParams;
+    /*!< Params for dependent processors like IVHD for netra. */
+} ProcMgr_AttachParams ;
+
+/*!
+ *  @brief  Configuration parameters to be provided while starting the slave
+ *          processor.
+ */
+typedef struct ProcMgr_StartParams_tag {
+    UInt32 reserved;
+    /*!< Reserved for future params. */
+} ProcMgr_StartParams ;
+
+
+/*!
+ *  @brief  This structure defines information about memory regions mapped by
+ *          the ProcMgr module.
+ */
+typedef struct ProcMgr_AddrInfo_tag {
+    UInt32    addr [ProcMgr_AddrType_EndValue];
+    /*!< Addresses for each type of address space */
+    UInt32    size;
+    /*!< Size of the memory region in bytes */
+    Bool      isCached;
+    /*!< Region cached? */
+    Bool            isMapped;
+    /*!< tells whether the entry is mapped */
+    ProcMgr_MapMask mapMask;
+    /*!< map type needed for default entries in translation table */
+    UInt16          refCount;
+    /*!< To ensure entry is added/removed only in appropriate map/unmap
+     */
+} ProcMgr_AddrInfo;
+
+/*!
+ *  @brief Structure containing information of mapped memory regions
+ */
+typedef struct ProcMgr_MappedMemEntry {
+    ProcMgr_AddrInfo info;
+    /*!< Address information */
+    ProcMgr_AddrType srcAddrType;
+    /*!< Source address type used for mapping */
+    ProcMgr_MapMask  mapMask;
+    /*!< Mapping type */
+    Bool             inUse;
+    /*!< Entry index is in use? */
+} ProcMgr_MappedMemEntry;
+
+/*!
+ *  @brief  Characteristics of the slave processor
+ */
+typedef struct ProcMgr_ProcInfo_tag {
+    ProcMgr_BootMode       bootMode;
+    /*!< Boot mode of the processor. */
+    UInt16                 maxMemoryRegions;
+    /*!< Value of ProcMgr_Object.maxMemoryRegions */
+    UInt16                 numMemEntries;
+    /*!< Number of valid memory entries */
+    ProcMgr_MappedMemEntry memEntries [ProcMgr_MAX_MEMORY_REGIONS];
+    /*!< Configuration of memory regions */
+} ProcMgr_ProcInfo;
+
+
+/*!
+ *  @brief  Characteristics of sections in executable
+ */
+typedef struct ProcMgr_SectionInfo_tag {
+   UInt32    physicalAddress;
+   /*!< Requested/returned section's physicalAddress */
+   UInt32    virtualAddress;
+   /*!< Requested/returned section's vitualAddress */
+   UInt16    sectId;
+   /*!< Requested/returned section id */
+   UInt32    size;
+   /*!< Section size */
+} ProcMgr_SectionInfo;
+
+/*!
+ *  @brief  Enumerations to indicate Callback Event Status.
+ */
+typedef enum {
+    ProcMgr_EventStatus_Event         = 0u,
+    /*!< Indicates the requested event has occurred. */
+    ProcMgr_EventStatus_Canceled      = 1u,
+    /*!< Indicates the request was canceled. */
+    ProcMgr_EventStatus_Timeout       = 2u,
+    /*!< Indicates the request has timed out. */
+} ProcMgr_EventStatus ;
+
+/*!
+ *  @brief      Function pointer type that is passed to the
+ *              ProcMgr_registerNotify function
+ *
+ *  @param      procId    Processor ID for the processor that is undergoing the
+ *                        state change.
+ *  @param      handle    Handle to the processor instance.
+ *  @param      fromState Previous processor state
+ *  @param      toState   New processor state
+ *  @param      status    Indicates the status of the event.
+ *
+ *  @sa         ProcMgr_registerNotify
+ */
+typedef Int (*ProcMgr_CallbackFxn) (UInt16                 procId,
+                                    ProcMgr_Handle         handle,
+                                    ProcMgr_State          fromState,
+                                    ProcMgr_State          toState,
+                                    ProcMgr_EventStatus    status,
+                                    Ptr                    args);
+
+/* =============================================================================
+ *  APIs
+ * =============================================================================
+ */
+/*!
+ *  @brief      Function to open a handle to an existing ProcMgr object handling
+ *              the procId.
+ *
+ *              This function returns a handle to an existing ProcMgr instance
+ *              created for this procId. It enables other entities to access
+ *              and use this ProcMgr instance.
+ *
+ *  @param      handlePtr   Return Parameter: Handle to the ProcMgr instance
+ *  @param      procId      Processor ID represented by this ProcMgr instance
+ *
+ *  @retval     ProcMgr_S_SUCCESS       Operation successful
+ *  @retval     ProcMgr_E_INVALIDARG    Invalid parameter specified
+ *  @retval     ProcMgr_E_INVALIDSTATE  Module was not initialized
+ *  @retval     ProcMgr_S_ALREADYEXISTS Object is already created/opened in this
+ *                                      process
+ *  @retval     ProcMgr_E_MAP           Failed to map address range to host OS
+ *  @retval     ProcMgr_E_OSFAILURE     Failed in an OS-specific call
+ *  @retval     ProcMgr_E_MEMORY        Memory allocation failed
+ *
+ *  @sa         ProcMgr_close, Memory_calloc
+ */
+Int ProcMgr_open (ProcMgr_Handle * handlePtr, UInt16 procId);
+
+/*!
+ *  @brief      Function to close this handle to the ProcMgr instance.
+ *
+ *              This function closes the handle to the ProcMgr instance
+ *              obtained through ProcMgr_open call made earlier. The handle in
+ *              the passed pointer is reset on success.
+ *
+ *  @param      handlePtr    Pointer to the ProcMgr handle
+ *
+ *  @retval     ProcMgr_S_SUCCESS       Operation successful
+ *  @retval     ProcMgr_E_INVALIDARG    Invalid parameter specified
+ *  @retval     ProcMgr_E_INVALIDSTATE  Module was not initialized
+ *  @retval     ProcMgr_E_ACCESSDENIED  All open handles to this ProcMgr object
+ *                                      are already closed
+ *  @retval     ProcMgr_S_OPENHANDLE    Other threads in this process have
+ *                                      already opened handles to this ProcMgr
+ *                                      instance.
+ *  @retval     ProcMgr_E_OSFAILURE     Failed in an OS-specific call
+ *
+ *  @sa         ProcMgr_open, Memory_free
+ */
+Int ProcMgr_close (ProcMgr_Handle * handlePtr);
+
+/*!
+ *  @brief      Function to initialize the parameters for the ProcMgr attach
+ *              function.
+ *
+ *              This function can be called by the application to get their
+ *              configuration parameter to #ProcMgr_attach filled in by the
+ *              ProcMgr module with the default parameters. If the user does
+ *              not wish to make any change in the default parameters, this API
+ *              is not required to be called.
+ *
+ *  @param      handle   Handle to the ProcMgr object. If specified as NULL,
+ *                       the default global configuration values are returned.
+ *  @param      params   Pointer to the ProcMgr attach params structure in
+ *                       which the default params is to be returned.
+ *
+ *  @sa         ProcMgr_attach
+ */
+Void ProcMgr_getAttachParams (ProcMgr_Handle         handle,
+                              ProcMgr_AttachParams * params);
+
+/*!
+ *  @brief      Function to attach the client to the specified slave and also
+ *              initialize the slave (if required).
+ *
+ *              This function attaches to an instance of the ProcMgr module and
+ *              performs any hardware initialization required to power up the
+ *              slave device. This function also performs the required state
+ *              transitions for this ProcMgr instance to ensure that the local
+ *              object representing the slave device correctly indicates the
+ *              state of the slave device. Depending on the slave boot mode
+ *              being used, the slave may be powered up, in reset, or even
+ *              running state.
+ *              In typical scenarios, after calling ProcMgr_attach, the
+ *              application should call ProcMgr_detach during shutdown to
+ *              detach the client from the slave and perform any hardware
+ *              finalization needed. However, there may be cases
+ *              (e.g. in a slave loader application) when it is desirable to
+ *              leave the hardware initialized and ready upon exiting the
+ *              application. In such cases it is fine to defer the
+ *              ProcMgr_detach call to a later point in time.
+ *
+ *              Configuration parameters need to be provided to this
+ *              function. If the user wishes to change some specific config
+ *              parameters, then #ProcMgr_getAttachParams can be called to get
+ *              the configuration filled with the default values. After this,
+ *              only the required configuration values can be changed. If the
+ *              user does not wish to make any change in the default parameters,
+ *              the application can simply call ProcMgr_attach with NULL
+ *              parameters.
+ *              The default parameters would get automatically used.
+ *
+ *  @param      handle   Handle to the ProcMgr object.
+ *  @param      params   Optional ProcMgr attach parameters. If provided as
+ *                       NULL, default configuration is used.
+ *
+ *  @retval     ProcMgr_S_SUCCESS       Operation successful
+ *  @retval     ProcMgr_E_INVALIDARG    Invalid parameter specified
+ *  @retval     ProcMgr_E_INVALIDSTATE  Module was not initialized
+ *  @retval     ProcMgr_E_HANDLE        Invalid NULL handle specified
+ *  @retval     ProcMgr_E_MAP           Failed to map address range to host OS
+ *  @retval     ProcMgr_E_OSFAILURE     Failed in an OS-specific call
+ *
+ *  @sa         ProcMgr_detach()
+ *  @sa         ProcMgr_getAttachParams()
+ */
+Int ProcMgr_attach (ProcMgr_Handle handle, ProcMgr_AttachParams * params);
+
+/*!
+ *  @brief      Function to detach the client from the specified slave and also
+ *              finalze the slave (if required).
+ *
+ *              This function detaches from an instance of the ProcMgr module
+ *              and performs any hardware finalization required to power down
+ *              the slave device. This function also performs the required state
+ *              transitions for this ProcMgr instance to ensure that the local
+ *              object representing the slave device correctly indicates the
+ *              state of the slave device. Depending on the slave boot mode
+ *              being used, the slave may be powered down, in reset, or left in
+ *              its original state.
+ *
+ *  @param      handle     Handle to the ProcMgr object
+ *
+ *  @retval     ProcMgr_S_SUCCESS       Operation successful
+ *  @retval     ProcMgr_E_INVALIDARG    Invalid parameter specified
+ *  @retval     ProcMgr_E_INVALIDSTATE  Module was not initialized
+ *  @retval     ProcMgr_E_HANDLE        Invalid NULL handle specified
+ *  @retval     ProcMgr_E_OSFAILURE     Failed in an OS-specific call
+ *
+ *  @sa         ProcMgr_attach
+ */
+Int ProcMgr_detach (ProcMgr_Handle handle);
+
+/*!
+ *  @brief      Function to load the specified slave executable on the slave
+ *              Processor.
+ *
+ *              This function allows usage of different types of loaders. The
+ *              loader specified when creating this instance of the ProcMgr
+ *              is used for loading the slave executable. Depending on the type
+ *              of loader, the imagePath parameter may point to the path of the
+ *              file in the host file system, or it may be NULL. Some loaders
+ *              may require specific parameters to be passed. This function
+ *
+ * @remarks     This function returns a fileId, which can be used for further
+ *              function calls that reference a specific file that has been
+ *              loaded on the slave processor.
+ *
+ * @remarks     Some loaders may not support all features.  For example, the
+ *              ELF loader may not support passing argc/argv to the slave.
+ *
+ *  @param      handle     Handle to the ProcMgr object
+ *  @param      imagePath  Full file path
+ *  @param      argc       Number of arguments
+ *  @param      argv       String array of arguments
+ *  @param      params     Loader specific parameters
+ *  @param      fileId     Return parameter: ID of the loaded file
+ *
+ *  @retval     ProcMgr_S_SUCCESS       Operation successful
+ *  @retval     ProcMgr_E_INVALIDARG    Invalid parameter specified
+ *  @retval     ProcMgr_E_INVALIDSTATE  Module was not initialized
+ *  @retval     ProcMgr_E_HANDLE        Invalid NULL handle specified
+ *  @retval     ProcMgr_E_OSFAILURE     Failed in an OS-specific call
+ *
+ *  @sa         ProcMgr_unload
+ */
+Int ProcMgr_load (ProcMgr_Handle handle,
+                  String         imagePath,
+                  UInt32         argc,
+                  String *       argv,
+                  Ptr            params,
+                  UInt32 *       fileId);
+
+/*!
+ *  @brief      Function to unload the previously loaded file on the slave
+ *              processor.
+ *
+ *              This function unloads the file that was previously loaded on the
+ *              slave processor through the #ProcMgr_load API. It frees up any
+ *              resources that were allocated during ProcMgr_load for this file.
+ *
+ *              The fileId received from the load function must be passed to
+ *              this function.
+ *
+ *  @param      handle     Handle to the ProcMgr object
+ *  @param      fileId     ID of the loaded file to be unloaded
+ *
+ *  @retval     ProcMgr_S_SUCCESS       Operation successful
+ *  @retval     ProcMgr_E_INVALIDARG    Invalid parameter specified
+ *  @retval     ProcMgr_E_INVALIDSTATE  Module was not initialized
+ *  @retval     ProcMgr_E_HANDLE        Invalid NULL handle specified
+ *  @retval     ProcMgr_E_OSFAILURE     Failed in an OS-specific call
+ *
+ *  @sa         ProcMgr_load
+ */
+Int ProcMgr_unload (ProcMgr_Handle handle, UInt32 fileId);
+
+/*!
+ *  @brief      Function to initialize the parameters for the ProcMgr start
+ *              function.
+ *
+ *              This function can be called by the application to get their
+ *              configuration parameter to #ProcMgr_start filled in by the
+ *              ProcMgr module with the default parameters. If the user does
+ *
+ *              not wish to make any change in the default parameters, this API
+ *              is not required to be called.
+ *
+ *  @param      handle   Handle to the ProcMgr object. If specified as NULL,
+ *                       the default global configuration values are returned.
+ *  @param      params   Pointer to the ProcMgr start params structure in
+ *                       which the default params is to be returned.
+ *
+ *  @sa         ProcMgr_start
+ */
+Void ProcMgr_getStartParams (ProcMgr_Handle        handle,
+                             ProcMgr_StartParams * params);
+
+/*!
+ *  @brief      Function to start the slave processor running.
+ *
+ *              Function to start execution of the loaded code on the slave
+ *              from the entry point specified in the slave executable loaded
+ *              earlier by call to #ProcMgr_load ().
+ *
+ *              After successful completion of this function, the ProcMgr
+ *              instance is expected to be in the #ProcMgr_State_Running state.
+ *
+ *  @param      handle   Handle to the ProcMgr object
+ *  @param      params   Optional ProcMgr start parameters. If provided as NULL,
+ *                       default parameters are used.
+ *
+ *  @retval     ProcMgr_S_SUCCESS       Operation successful
+ *  @retval     ProcMgr_E_INVALIDARG    Invalid parameter specified
+ *  @retval     ProcMgr_E_INVALIDSTATE  Module was not initialized
+ *  @retval     ProcMgr_E_HANDLE        Invalid NULL handle specified
+ *  @retval     ProcMgr_E_SYMBOLNOTFOUND Entry ponit symbol not found in loaded
+ *                                       file
+ *  @retval     ProcMgr_E_OSFAILURE     Failed in an OS-specific call
+ *
+ *  @sa         ProcMgr_stop
+ */
+Int ProcMgr_start (ProcMgr_Handle handle, ProcMgr_StartParams * params);
+
+/*!
+ *  @brief      Function to stop the slave processor.
+ *
+ *              Depending on the boot mode, after successful completion of this
+ *              function, the ProcMgr instance may be in the
+ *              #ProcMgr_State_Reset state.
+ *
+ *  @param      handle   Handle to the ProcMgr object
+ *
+ *  @retval     ProcMgr_S_SUCCESS       Operation successful
+ *  @retval     ProcMgr_E_INVALIDARG    Invalid parameter specified
+ *  @retval     ProcMgr_E_INVALIDSTATE  Module was not initialized
+ *  @retval     ProcMgr_E_HANDLE        Invalid NULL handle specified
+ *  @retval     ProcMgr_E_OSFAILURE     Failed in an OS-specific call
+ *
+ *  @sa         ProcMgr_start
+ */
+Int ProcMgr_stop (ProcMgr_Handle handle);
+
+/*!
+ *  @brief      Function to get the current state of the slave Processor.
+ *
+ *              This function gets the state of the slave processor as
+ *              maintained on the master Processor state machine. It does not
+ *              go to the slave processor to get its actual state at the time
+ *              when this API is called.
+ *
+ *  @param      handle   Handle to the ProcMgr object
+ *
+ *  @retval     Processor-state       Operation successful
+ */
+ProcMgr_State ProcMgr_getState (ProcMgr_Handle handle);
+
+/*!
+ *  @brief      Function to set the current state of the slave Processor.
+ *
+ *              This function sets the state of the slave processor as
+ *              maintained on the master Processor state machine. It does not
+ *              go to the slave processor to set its actual state at the time
+ *              when this API is called.
+ *
+ *  @param      handle   Handle to the ProcMgr object
+ *  @param      state    State to set
+ *
+ *  @retval     None
+ *
+ *  @sa
+ */
+Void ProcMgr_setState (ProcMgr_Handle handle, ProcMgr_State state);
+
+/*!
+ *  @brief      Function to read from the slave processor's memory.
+ *
+ *              This function reads from the specified address in the
+ *              processor's address space and copies the required number of
+ *              bytes into the specified buffer.
+ *
+ *              It returns the number of bytes actually read in the numBytes
+ *              parameter.
+ *
+ *  @param      handle     Handle to the ProcMgr object
+ *  @param      procAddr   Address in space processor's address space of the
+ *                         memory region to read from.
+ *  @param      numBytes   IN/OUT parameter. As an IN-parameter, it takes in the
+ *                         number of bytes to be read. When the function
+ *                         returns, this parameter contains the number of bytes
+ *                         actually read.
+ *  @param[in,out]  buffer User-provided buffer in which the slave processor's
+ *                         memory contents are to be copied.
+ *
+ *  @pre        @c handle is a valid (non-NULL) ProcMgr handle.
+ *
+ *  @retval     ProcMgr_S_SUCCESS       Operation successful
+ *  @retval     ProcMgr_E_INVALIDARG    Invalid parameter specified
+ *  @retval     ProcMgr_E_INVALIDSTATE  Module was not initialized
+ *  @retval     ProcMgr_E_HANDLE        Invalid NULL handle specified
+ *  @retval     ProcMgr_E_TRANSLATE     Address is not mapped
+ *  @retval     ProcMgr_E_OSFAILURE     Failed in an OS-specific call
+ *
+ *  @sa         ProcMgr_write
+ */
+Int ProcMgr_read (ProcMgr_Handle handle,
+                  UInt32         procAddr,
+                  UInt32 *       numBytes,
+                  Ptr            buffer);
+
+/*!
+ *  @brief      Function to write into the slave processor's memory.
+ *
+ *              This function writes into the specified address in the
+ *              processor's address space and copies the required number of
+ *              bytes from the specified buffer.
+ *              It returns the number of bytes actually written in the numBytes
+ *              parameter.
+ *
+ *  @param      handle     Handle to the ProcMgr object
+ *  @param      procAddr   Address in space processor's address space of the
+ *                         memory region to write into.
+ *  @param      numBytes   IN/OUT parameter. As an IN-parameter, it takes in the
+ *                         number of bytes to be written. When the function
+ *                         returns, this parameter contains the number of bytes
+ *                         actually written.
+ *  @param      buffer     User-provided buffer from which the data is to be
+ *                         written into the slave processor's memory.
+ *
+ *  @retval     ProcMgr_S_SUCCESS       Operation successful
+ *  @retval     ProcMgr_E_INVALIDARG    Invalid parameter specified
+ *  @retval     ProcMgr_E_INVALIDSTATE  Module was not initialized
+ *  @retval     ProcMgr_E_HANDLE        Invalid NULL handle specified
+ *  @retval     ProcMgr_E_TRANSLATE     Address is not mapped
+ *  @retval     ProcMgr_E_OSFAILURE     Failed in an OS-specific call
+ *
+ *  @sa         ProcMgr_read
+ */
+Int ProcMgr_write (ProcMgr_Handle handle,
+                   UInt32         procAddr,
+                   UInt32 *       numBytes,
+                   Ptr            buffer);
+
+/*!
+ *  @brief      Function to perform device-dependent operations.
+ *
+ *              This function performs control operations supported by the
+ *              as exposed directly by the specific implementation of the
+ *              Processor interface. These commands and their specific argument
+ *              types are used with this function.
+ *
+ *  @param      handle     Handle to the ProcMgr object
+ *  @param      cmd        Device specific processor command
+ *  @param      arg        Arguments specific to the type of command.
+ *
+ *  @retval     ProcMgr_S_SUCCESS       Operation successful
+ *  @retval     ProcMgr_E_INVALIDARG    Invalid parameter specified
+ *  @retval     ProcMgr_E_INVALIDSTATE  Module was not initialized
+ *  @retval     ProcMgr_E_HANDLE        Invalid NULL handle specified
+ *  @retval     ProcMgr_E_OSFAILURE     Failed in an OS-specific call
+ *
+ *  @sa
+ */
+Int ProcMgr_control (ProcMgr_Handle handle, Int32 cmd, Ptr arg);
+
+/*!
+ *  @brief      Function to translate between two types of address spaces.
+ *
+ *              This function translates addresses between two types of address
+ *              spaces. The destination and source address types are indicated
+ *              through parameters specified in this function.
+ *
+ *  @param      handle      Handle to the ProcMgr object
+ *  @param      dstAddr     Return parameter: Pointer to receive the translated
+ *                          address.
+ *  @param      dstAddrType Destination address type requested
+ *  @param      srcAddr     Source address in the source address space
+ *  @param      srcAddrType Source address type
+ *
+ *  @retval     ProcMgr_S_SUCCESS       Operation successful
+ *  @retval     ProcMgr_E_INVALIDARG    Invalid parameter specified
+ *  @retval     ProcMgr_E_INVALIDSTATE  Module was not initialized
+ *  @retval     ProcMgr_E_HANDLE        Invalid NULL handle specified
+ *  @retval     ProcMgr_E_TRANSLATE     Failed to translate address.
+ *  @retval     ProcMgr_E_OSFAILURE     Failed in an OS-specific call
+ *
+ *  @sa         ProcMgr_AddrType
+ */
+Int ProcMgr_translateAddr (ProcMgr_Handle   handle,
+                           Ptr *            dstAddr,
+                           ProcMgr_AddrType dstAddrType,
+                           Ptr              srcAddr,
+                           ProcMgr_AddrType srcAddrType);
+
+/*!
+ *  @brief      Function to retrieve the target address of a symbol from the
+ *              specified file.
+ *
+ *  @param      handle     Handle to the ProcMgr object
+ *  @param      fileId     ID of the file received from the load function
+ *  @param      symbolName Name of the symbol
+ *  @param      symValue   Return parameter: Symbol address
+ *
+ *  @retval     ProcMgr_S_SUCCESS        Operation successful
+ *  @retval     ProcMgr_E_INVALIDARG     Invalid parameter specified
+ *  @retval     ProcMgr_E_INVALIDSTATE   Module was not initialized
+ *  @retval     ProcMgr_E_HANDLE         Invalid NULL handle specified
+ *  @retval     ProcMgr_E_SYMBOLNOTFOUND Symbol not found in loaded file
+ *  @retval     ProcMgr_E_OSFAILURE      Failed in an OS-specific call
+ *
+ *  @sa
+ */
+Int ProcMgr_getSymbolAddress (ProcMgr_Handle handle,
+                              UInt32         fileId,
+                              String         symbolName,
+                              UInt32 *       symValue);
+
+/*!
+ *  @brief      Function to map address to specified destination type(s).
+ *
+ *              This function maps the provided address of specified srcAddrType
+ *              to one or more destination address types, and returns the mapped
+ *              addresses and size in the same addrInfo structure.
+ *
+ *  @param      handle      Handle to the Processor object
+ *  @param      mapType     Mask of destination types of mapping to be
+ *                          performed. One or more types may be ORed together.
+ *  @param      addrInfo    Structure containing map info. When this API is
+ *                          called, user must provide a valid address for the
+ *                          address of srcAddrType. On successful completion of
+ *                          this function, this same structure shall contain
+ *                          valid addresses for destination address types given
+ *                          in mapType.
+ *  @param      srcAddrType Source address type.
+ *
+ *  @retval     ProcMgr_S_SUCCESS       Operation successful
+ *  @retval     ProcMgr_E_INVALIDARG    Invalid parameter specified
+ *  @retval     ProcMgr_E_INVALIDSTATE  Module was not initialized
+ *  @retval     ProcMgr_E_HANDLE        Invalid NULL handle specified
+ *  @retval     ProcMgr_E_MAP           Failed to map address range to host OS
+ *  @retval     ProcMgr_E_OSFAILURE     Failed in an OS-specific call
+ *
+ *  @sa         ProcMgr_unmap, ProcMgr_MapMask, ProcMgr_AddrInfo
+ */
+Int ProcMgr_map (ProcMgr_Handle     handle,
+                 ProcMgr_MapMask    mapMask,
+                 ProcMgr_AddrInfo * addrInfo,
+                 ProcMgr_AddrType   srcAddrType);
+
+/*!
+ *  @brief      Function to map address to slave address space.
+ *
+ *              This function unmaps the provided address(es) of specified
+ *              one or more destination address types. The srcAddrType indicates
+ *              the source address with which the entry for the mapping is to be
+ *              identified. It must be the same address that was specified as
+ *              the src address when the corresponding mapping was performed.
+ *
+ *  @param      handle      Handle to the Processor object
+ *  @param      mapType     Mask of destination types of unmapping to be
+ *                          performed. One or more types may be ORed together.
+ *  @param      addrInfo    Structure containing map info. When this API is
+ *                          called, user must provide a valid address for the
+ *                          address of srcAddrType, as well as each of the
+ *                          destination types given in the mapType mask. On
+ *                          successful completion of this function, the
+ *                          specified destination mappings are unmapped.
+ *  @param      srcAddrType Source address type.
+ *
+ *  @retval     ProcMgr_S_SUCCESS       Operation successful
+ *  @retval     ProcMgr_E_INVALIDARG    Invalid parameter specified
+ *  @retval     ProcMgr_E_INVALIDSTATE  Module was not initialized
+ *  @retval     ProcMgr_E_HANDLE        Invalid NULL handle specified
+ *  @retval     ProcMgr_E_NOTFOUND      Info provided does not match with any
+ *                                      mapped entry
+ *  @retval     ProcMgr_E_MAP           Failed to unmap address range from host
+ *                                      OS
+ *  @retval     ProcMgr_E_OSFAILURE     Failed in an OS-specific call
+ *
+ *  @sa         ProcMgr_map, ProcMgr_MapMask, ProcMgr_AddrInfo
+ */
+Int ProcMgr_unmap (ProcMgr_Handle     handle,
+                   ProcMgr_MapMask    mapMask,
+                   ProcMgr_AddrInfo * addrInfo,
+                   ProcMgr_AddrType   srcAddrType);
+
+
+/*!
+ *  @brief      Function that registers for notification when the slave
+ *              processor transitions to any of the states specified.
+ *
+ *              This function allows the user application to register for
+ *              changes in processor state and take actions accordingly.
+ *
+ *  @param      handle      Handle to the ProcMgr object
+ *  @param      fxn         Handling function to be registered.
+ *  @param      args        Optional arguments associated with the handler fxn.
+ *  @param      state       Array of target states for which registration is
+ *                          required.
+ *
+ *  @retval     ProcMgr_S_SUCCESS       Operation successful
+ *  @retval     ProcMgr_E_INVALIDARG    Invalid parameter specified
+ *  @retval     ProcMgr_E_INVALIDSTATE  Module was not initialized
+ *  @retval     ProcMgr_E_HANDLE        Invalid NULL handle specified
+ *  @retval     ProcMgr_E_OSFAILURE     Failed in an OS-specific call
+ *
+ *  @sa         ProcMgr_State, ProcMgr_CallbackFxn, ProcMgr_unregisterNotify
+ */
+Int ProcMgr_registerNotify (ProcMgr_Handle      handle,
+                            ProcMgr_CallbackFxn fxn,
+                            Ptr                 args,
+                            Int32               timeout,
+                            ProcMgr_State       state []);
+
+
+/*!
+ *  @brief      Get the maximum number of memory entries
+ *
+ *  @param[in]  handle      Handle to the ProcMgr object
+ *
+ *  @remarks    The kernel objects contain tables of size
+ *              ProcMgr_MAX_MEMORY_REGIONS, this function retrieves that value
+ *              for dynamically-sized arrays.
+ *
+ *  @retval     Number of max memory entries
+ */
+UInt32 ProcMgr_getMaxMemoryRegions(ProcMgr_Handle handle);
+
+
+/*!
+ *  @brief      Retrieve information about the slave processor
+ *
+ *  @param[in]  handle      Handle to the ProcMgr object
+ *  @param[out] procInfo    Pointer to the ProcInfo object to be populated.
+ *
+ *  @retval     ProcMgr_S_SUCCESS       Operation successful
+ *  @retval     ProcMgr_E_INVALIDARG    Invalid parameter specified
+ *  @retval     ProcMgr_E_INVALIDSTATE  Module was not initialized
+ *  @retval     ProcMgr_E_HANDLE        Invalid NULL handle specified
+ *  @retval     ProcMgr_E_OSFAILURE     Failed in an OS-specific call
+ */
+Int ProcMgr_getProcInfo (ProcMgr_Handle     handle,
+                         ProcMgr_ProcInfo * procInfo);
+
+
+/*!
+ *  @brief      Function that returns section information given the name of
+ *              section and number of bytes to read
+ *
+ *  @param      handle      Handle to the ProcMgr object
+ *  @param      fileId      ID of the file received from the load function
+ *  @param      sectionName Name of section to be retrieved
+ *  @param      sectionInfo Return parameter: Section information
+ *
+ *  @retval     ProcMgr_S_SUCCESS       Operation successful
+ *  @retval     ProcMgr_E_INVALIDARG    Invalid parameter specified
+ *  @retval     ProcMgr_E_INVALIDSTATE  Module was not initialized
+ *  @retval     ProcMgr_E_HANDLE        Invalid NULL handle specified
+ *  @retval     ProcMgr_E_OSFAILURE     Failed in an OS-specific call
+ *
+ *  @sa         ProcMgr_SectionInfo
+ */
+Int ProcMgr_getSectionInfo (ProcMgr_Handle        handle,
+                            UInt32                fileId,
+                            String                sectionName,
+                            ProcMgr_SectionInfo * sectionInfo);
+
+/*!
+ *  @brief      Function that returns section data in a buffer given section id
+ *              and size to be read
+ *
+ *  @param      handle      Handle to the ProcMgr object
+ *  @param      fileId      ID of the file received from the load function
+ *  @param      sectionInfo Structure filled by ProcMgr_getSectionInfo.
+ *  @param      buffer      Return parameter
+ *
+ *  @retval     ProcMgr_S_SUCCESS       Operation successful
+ *  @retval     ProcMgr_E_INVALIDARG    Invalid parameter specified
+ *  @retval     ProcMgr_E_INVALIDSTATE  Module was not initialized
+ *  @retval     ProcMgr_E_HANDLE        Invalid NULL handle specified
+ *  @retval     ProcMgr_E_OSFAILURE     Failed in an OS-specific call
+ *
+ *  @sa         ProcMgr_SectionInfo, ProcMgr_getSectionInfo
+ */
+Int ProcMgr_getSectionData (ProcMgr_Handle        handle,
+                            UInt32                fileId,
+                            ProcMgr_SectionInfo * sectionInfo,
+                            Ptr                   buffer);
+
+
+/*!
+ *  @brief      Function that returns section data in a buffer given section id
+ *              and size to be read
+ *
+ *  @param      handle      Handle to the ProcMgr object
+ *
+ *  @retval     fileId                  Operation successful
+ *
+ *  @sa         ProcMgr_load
+ */
+UInt32 ProcMgr_getLoadedFileId (ProcMgr_Handle handle);
+
+/*!
+ *  @brief      Function that allows the caller to wait on the specified event
+ *
+ *  @param      procId      Id of the processor on which to wait
+ *  @param      eventType   Event type on which to wait
+ *  @param      timeout     Amount of time to wait for the event
+ *
+ *  @retval     ProcMgr_S_REPLYLATER  Operation successful, reply will be sent when
+ *                                    the event happens.
+ *
+ *  @sa         ProcMgr_WaitForEventCancel
+ */
+Int32 ProcMgr_waitForEvent (ProcMgr_ProcId    procId,
+                            ProcMgr_EventType eventType,
+                            Int               timeout);
+
+/*!
+ *  @brief      Function that allows the caller to wait on the specified event
+ *
+ *  @param      procId      Id of the processor on which to wait
+ *  @param      eventType   Array of event type on which to wait
+ *  @param      size        Number of events in eventType array
+ *  @param      timeout     Amount of time to wait for the event
+ *  @param      index       Index of the event which occurred.  Output param.
+ *
+ *  @retval     ProcMgr_S_REPLYLATER  Operation successful, reply will be sent when
+ *                                    the event happens.
+ *
+ *  @sa         ProcMgr_WaitForEventCancel
+ */
+Int
+ProcMgr_waitForMultipleEvents (ProcMgr_ProcId      procId,
+                               ProcMgr_EventType * eventType,
+                               UInt32              size,
+                               Int                 timeout,
+                               UInt *              index);
+
+/*!
+ *  @brief      Function that allows the caller to cancel a wait on the specified event
+ *
+ *  @param      procId      procId on which to cancel wait
+ *  @param      eventType   Event type on which to cancel the wait
+ *
+ *  @retval     ProcMgr_S_SUCCESS     Operation successful.
+ *
+ *  @sa         ProcMgr_WaitForEvent
+ */
+Int32 ProcMgr_waitForEventCancel (ProcMgr_ProcId    procId,
+                                  ProcMgr_EventType eventType);
+
+/*!
+ *  @brief      Function that un-registers for notification when the slave
+ *              processor transitions to any of the states specified.
+ *
+ *              This function allows the user application to un-register for
+ *              changes in processor state and take actions accordingly.
+ *
+ *  @param      handle      Handle to the ProcMgr object
+ *  @param      fxn         Handling function to be un-registered.
+ *  @param      args        Optional arguments associated with the handler fxn.
+ *  @param      state       Array of target states for which un-registration is
+ *                          required.
+ *
+ *  @retval     ProcMgr_S_SUCCESS       Operation successful
+ *  @retval&