]> Gitweb @ Texas Instruments - Open Source Git Repositories - git.TI.com/gitweb - ipc/ipcdev.git/log
ipc/ipcdev.git
8 years agoExport file ti_ipc.h for use with TiIpcFxns module in QNX
vwan@ti.com [Wed, 6 May 2015 18:10:37 +0000 (11:10 -0700)]
Export file ti_ipc.h for use with TiIpcFxns module in QNX

This commit adds ti_ipc.h to the list of files to be exported by 'make install'
in QNX.

Signed-off-by: VW <vwan@ti.com>
8 years agoLinux/Tests: Fix freeing up of messages in MessageQApp
Suman Anna [Fri, 1 May 2015 15:56:19 +0000 (10:56 -0500)]
Linux/Tests: Fix freeing up of messages in MessageQApp

Fix the freeing up of message in MessageQApp sample when
MessageQ_get fails. This otherwise prints out a following
error trace from glibc
"*** glibc detected *** ./MessageQApp: double free or corruption"

This was found during testing of remoteproc error-recovery,
and also failed to execute the sample when launched again
as it doesn't perform a Ipc_detach.

Signed-off-by: Suman Anna <s-anna@ti.com>
8 years agoLinux/TransportRpmsg: Shutdown only on MessageQ_E_SHUTDOWN
Suman Anna [Fri, 1 May 2015 00:23:41 +0000 (19:23 -0500)]
Linux/TransportRpmsg: Shutdown only on MessageQ_E_SHUTDOWN

The transportGet() function returns a specific error code
MessageQ_E_SHUTDOWN to denote that a remote processor has
crashed. Revise the logic in rpmsgThreadFxn to perform the
receive socket cleanup and passing on the message to MessageQ
clients _only_ on this error code. The MessageQ shutdown behavior
was introduced in commit 067ad27 ("Add fault tolerance for
TransportRpmsg socket failure"), and caused the shutdown to
be executed for all other error codes on transportGet() as
well.

Fixes: 067ad27 ("Add fault tolerance for TransportRpmsg socket failure")
Signed-off-by: Suman Anna <s-anna@ti.com>
8 years agoLinux/TransportRpmsg: Change ESHUTDOWN to ENOLINK in transportGet
Suman Anna [Fri, 1 May 2015 00:26:17 +0000 (19:26 -0500)]
Linux/TransportRpmsg: Change ESHUTDOWN to ENOLINK in transportGet

The ESHUTDOWN error code translates to the error string,
"Cannot send after transport endpoint shutdown", and this is
not really meaningful on a socket recvfrom() call. Instead,
use ENOLINK which translates as "Link has been severed". This
is to be matched with the corresponding change in the kernel
rpmsg-proto driver. This error code is specifically used to
detect a crashed remote processor, and to allow the MessageQ
transport to pass on the status to MessageQ client applications.

Signed-off-by: Suman Anna <s-anna@ti.com>
8 years agoBind message queue to new remote processor 3.36.00.06_eng
Ramsey Harris [Tue, 28 Apr 2015 18:50:24 +0000 (11:50 -0700)]
Bind message queue to new remote processor

The rpmsgproto driver requires a message queue to explicitly
bind to every remote processor. To work around this issue,
both MessageQ_create and Ipc_attach must invoke the bind method
at the appropriate time. This hack should be removed when the
rpmsgproto driver is fixed such that only one bind is required.

8 years agoMessageQ_put returns MessageQ_E_SHUTDOWN when transport fails
Robert Tivy [Thu, 30 Apr 2015 17:37:07 +0000 (10:37 -0700)]
MessageQ_put returns MessageQ_E_SHUTDOWN when transport fails

After calling the transport's "put" function, MessageQ_put() checks
errno for ESHUTDOWN, and if set MessageQ_put() returns MessageQ_E_SHUTDOWN.

8 years agoIncorrect reference count management in NameServer_detach
Ramsey Harris [Wed, 29 Apr 2015 16:25:10 +0000 (09:25 -0700)]
Incorrect reference count management in NameServer_detach

Decrement the reference count only once, it was being decremented
twice. Do this regardless of the success/failure status of the
function.

8 years agoAdd Deh & Watchdog config for Vayu DSP1 and IPU1 in tests config
Robert Tivy [Tue, 28 Apr 2015 18:05:25 +0000 (11:05 -0700)]
Add Deh & Watchdog config for Vayu DSP1 and IPU1 in tests config

8 years agoPower: Add the suspend hooks properly for IPUs
Suman Anna [Fri, 24 Apr 2015 22:35:20 +0000 (17:35 -0500)]
Power: Add the suspend hooks properly for IPUs

The IpcPower logic is inherited from the sysbios-rpmsg tree, on
which the suspend/resume hooks were properly plugged in as the
only supported platforms were OMAP4 and OMAP5 (built in M3
compatible mode). The IpcPower suspend/resume callback functions
were not hooked into the SYS/BIOS Power module for IPUs on current
platforms, as the IPUs are built for v7M4 ISA, so fix the same
by properly checking for the ISA and the BIOS SMP-enabled mode,
while also retaining the check for the Platform name.

Signed-off-by: Suman Anna <s-anna@ti.com>
8 years agoPower: Fixup idleCount for IPU running SMP
Suman Anna [Wed, 22 Apr 2015 22:50:11 +0000 (17:50 -0500)]
Power: Fixup idleCount for IPU running SMP

The SMP-mode IPUs will have the PM Idle function running on each
core, with the Core1 in idle mode more often than not when there
is only one task running. A single debug counter is used at present
to track PM idle function executions on both cores, but this doesn't
track the counters per core. Make the IpcPower_idleCount an array,
and use different index elements for each core.

Signed-off-by: Suman Anna <s-anna@ti.com>
8 years agoGenerated Makefile.in for previous commit 3.36.00.05_eng
Robert Tivy [Sat, 25 Apr 2015 00:18:31 +0000 (17:18 -0700)]
Generated Makefile.in for previous commit

8 years agoAdd fault tolerance for TransportRpmsg socket failure
Robert Tivy [Sat, 25 Apr 2015 00:09:07 +0000 (17:09 -0700)]
Add fault tolerance for TransportRpmsg socket failure

Modify TransportRpmsg to detect and handle underlying socket failures.
A socket failure will typically be caused by a crashed/reloaded remote
core executable.  TransportRpmsg will now alert the MessageQ layer of
its failure, allowing MessageQ to return back to the user application
with a specific error code, allowing the user application to clean up
and re-establish IPC with the newly loaded remote core (without having
to exit the app and/or restart LAD).

Add a fault generation test based on MessageQApp.

8 years agoAdd missing pthread_mutex_destroy() calls
vwan@ti.com [Thu, 23 Apr 2015 19:18:33 +0000 (12:18 -0700)]
Add missing pthread_mutex_destroy() calls

pthread_mutex_destroy() is not called at various places in the code base where
pthread_mutex_init() is used to initialize a mutex. We are now adding the
necessary calls to pthread_mutex_destroy().

This addresses SDOCM00114783.

Signed-off-by: VW <vwan@ti.com>
8 years agoExport contents of directory qnx/include/ti/ipc/interfaces
vwan@ti.com [Wed, 22 Apr 2015 18:15:17 +0000 (11:15 -0700)]
Export contents of directory qnx/include/ti/ipc/interfaces

The contents of directory qnx/include/ti/ipc/interfaces are now exported
to <DESTDIR>/usr/include/ti/ipc/interfaces when 'make -f ipc-qnx.mak install'
is invoked.

This addresses SDOCM00115958.

Signed-off-by: VW <vwan@ti.com>
8 years agoNew MultiProc API to update processor mapping
Ramsey Harris [Thu, 23 Apr 2015 22:23:25 +0000 (15:23 -0700)]
New MultiProc API to update processor mapping

On Keystone 2, when loading DSP processors in ad hoc order,
the VirtIO channel assignment is non-deterministic. This
requires a run-time way to update the mapping of processor
to VirtIO channel. When the VirtIO channel assignment becomes
invariant, this new API will be removed.

8 years agoFix check of return value from DLOAD_get_section_offset() in QNX
vwan@ti.com [Mon, 20 Apr 2015 18:54:31 +0000 (11:54 -0700)]
Fix check of return value from DLOAD_get_section_offset() in QNX

The return value of DLOAD_get_section_offset() is a boolean, and should
be handled as such for the IPC driver to exit cleanly when the resource table
is not found in an executable to be loaded.

This addresses SDOCM00114083.

Signed-off-by: VW <vwan@ti.com>
8 years agoAdd GateHWSpinlock configuration into qnx/src/cfg
vwan@ti.com [Tue, 14 Apr 2015 21:51:00 +0000 (14:51 -0700)]
Add GateHWSpinlock configuration into qnx/src/cfg

This commit adds a configuration structure for GateHWSpinlock into the
qnx/src/cfg directory. Some refactoring of the GateHWSpinlock implementation
is necessary to allow both the user library and the resource manager to
share this common configuration. ipc3x_dev/ti/syslink/Std.h is cleaned up to
eliminate duplication with respect to ti/ipc/Std.h and to fix resulting
build errors.

Signed-off-by: VW <vwan@ti.com>
9 years agoMove MultiProc configuration into qnx/src/cfg directory 3.36.00.04_eng
vwan@ti.com [Wed, 1 Apr 2015 17:51:43 +0000 (10:51 -0700)]
Move MultiProc configuration into qnx/src/cfg directory

Signed-off-by: VW <vwan@ti.com>
9 years agoAdd support for watchdog timers for DSP1 and IPU1 in QNX
vwan@ti.com [Tue, 31 Mar 2015 19:59:33 +0000 (12:59 -0700)]
Add support for watchdog timers for DSP1 and IPU1 in QNX

This commit refactors the code that manages the GP Timers to allow more
timers to be used as watchdog timers. Namely, interrupts from timers
7, 8 and 10 all trigger recovery, being used as watchdog timers for IPU1
and DSP1.

The list of watchdog timers to CPU assignment can now be configured in
qnx/src/cfg/dra7xx/GptCfg.c.

Signed-off-by: VW <vwan@ti.com>
9 years agoAdd new LOG4 macro to lad daemon header file
Ramsey Harris [Thu, 16 Apr 2015 00:11:34 +0000 (17:11 -0700)]
Add new LOG4 macro to lad daemon header file

Clean up some log statements in NameServer_daemon.c. Combine
multiple consecutive log statements using new LOG4 macro. This
removes the embedded timestamp which made it hard to read the logs.

9 years agoSDOCM00115768 Incorrect check for invalid pointer in Ipc_detach
Ramsey Harris [Thu, 16 Apr 2015 00:00:37 +0000 (17:00 -0700)]
SDOCM00115768 Incorrect check for invalid pointer in Ipc_detach

When checking for invalid pointers in 'struct Reserved', use
SharedRegion_INVALIDSRPTR instead of implicit check for NULL.

9 years agoAndroid: Refactored Makefiles into a single Android.mk file
Arnie Reynoso [Wed, 15 Apr 2015 22:08:33 +0000 (15:08 -0700)]
Android: Refactored Makefiles into a single Android.mk file

All Android makefiles were refactored into a single file. This results
in the object files being placed correctly in the modules output directory
structure.  This also addresses build issue related to shared sources.

9 years agoSDOCM00115769 Ipc_attach should not call Task_setPri
Ramsey Harris [Tue, 14 Apr 2015 23:45:05 +0000 (16:45 -0700)]
SDOCM00115769 Ipc_attach should not call Task_setPri

Remove the calls to change task priority. Only the application
has the privilege to do this. In addition, example ex46_graph
calls Ipc_attach from the idle task, were it is illegal to
change the task priority.

9 years agoAndroid: Added new files for Ipc_attach phase
Arnie Reynoso [Tue, 14 Apr 2015 17:28:55 +0000 (10:28 -0700)]
Android: Added new files for Ipc_attach phase

Due to refactoring, a needed Ipc_getConfig function was added to LAD.
Also removed unnecessary dependency to libtiipc.

9 years agoAndroid: Added a definition for EFD_SEMAPHORE
Arnie Reynoso [Tue, 14 Apr 2015 17:59:52 +0000 (10:59 -0700)]
Android: Added a definition for EFD_SEMAPHORE

A define of EFD_SEMAPHORE was added to the local files since Android bionic
headers don't currently define it.

9 years agoAdd capability to specify specific Watchdog timer for Deh
Robert Tivy [Thu, 2 Apr 2015 21:34:02 +0000 (14:34 -0700)]
Add capability to specify specific Watchdog timer for Deh

Previous to this change the user was basically stuck using the GPTimer
that was hardcoded to their device (although they could change the
timer by changing the device's timer settings, which was cumbersome).

The user can now specify a particular GPTimer by setting it in the .cfg
file.  For DRA7XX's IPU2, the Watchdog timers (one for each SMP core)
can be set with:
    Watchdog.timerIds.length = 2;
    Watchdog.timerIds[0] = "GPTimer9";
    Watchdog.timerIds[1] = "GPTimer4";

Each supported device has default GPTimer settings appropriate to that
device (the snippet above actually assigns the current defaults for
Vayu, so it is actually a no-op).

The "GPTimer<n>" specification encapsulates timer settings such as
intNum and eventId.  Many GPTimer specifications in Watchdog.xs have
-1 in these fields if they don't have a hardcoded wirings for them, yet
they can still be used if the user explicitly defines the value in the
.cfg file and somehow sets up the hardware to generate that intNum or
eventId (e.g., through the crossbar on Vayu).

9 years agoSDOCM00115098 New MultiProc cdoc links for "See Also" are garbled 3.36.00.03_eng
Ramsey Harris [Fri, 27 Mar 2015 00:14:12 +0000 (17:14 -0700)]
SDOCM00115098 New MultiProc cdoc links for "See Also" are garbled

Fix syntax for using the @see markup XDCspec documentation tag.
Also fixed similar usage in Build module.

9 years agoSDOCM00115428 Incorrect return status from NameServer_delete
Ramsey Harris [Thu, 26 Mar 2015 23:36:28 +0000 (16:36 -0700)]
SDOCM00115428 Incorrect return status from NameServer_delete

Fix incorrect union references in both LAD command loop and
client API unmarshal code. Verified all references to 'status'.

9 years agoSDOCM00115373 NameServer local get methods are missing on Linux
Ramsey Harris [Wed, 25 Mar 2015 23:59:11 +0000 (16:59 -0700)]
SDOCM00115373 NameServer local get methods are missing on Linux

Add enum entries for missing API methods. Add union members
in the command object only, reuse existing union members in
the response object. Add API stub calls in LAD command loop.
No logging in LAD command loop because some transports use this
method for each message (would generate too many log events).

9 years agoSDOCM00115434 NameServer_delete in LAD daemon leaks memory
Ramsey Harris [Wed, 25 Mar 2015 23:22:47 +0000 (16:22 -0700)]
SDOCM00115434 NameServer_delete in LAD daemon leaks memory

Remove invalid assertion that name list must be empty. This
is not true and instance might still be in use by another
client (object is reference counted). Add while loop to delete
each entry on the name list. Destroy the object's gate (was not
being done). Remove macro to destruct a list object (not needed).

9 years agoIgnore cluster members which are not running
Ramsey Harris [Wed, 25 Mar 2015 15:00:49 +0000 (08:00 -0700)]
Ignore cluster members which are not running

To maintain backwards compatibility, return success when Ipc_attach
fails if the Ipc module is configured with Ipc_ProcSync_ALL.

9 years agoRemove DSP2 from invalid list and improve error handling for non-existing core
vwan@ti.com [Fri, 20 Mar 2015 18:47:12 +0000 (11:47 -0700)]
Remove DSP2 from invalid list and improve error handling for non-existing core

This commit removes DSP2 from the invalid processor list, and improves
error handling in case the IPC driver is asked to load DSP2
when it does not exist (e.g. on J6 Eco)

Signed-off-by: VW <vwan@ti.com>
9 years agoSupport a seperate address translation table for DSP2
vwan@ti.com [Mon, 23 Mar 2015 17:59:42 +0000 (10:59 -0700)]
Support a seperate address translation table for DSP2

Updated to the DSP proc module (VayuDSPProc.c) to
support 2 seperate Address translation tables for DSP1 and DSP2.

Cleaned-up version of the original commit from Praveen Rao.

Signed-off-by: VW <vwan@ti.com>
9 years agoAdd support to load DSP2 and communicate with it.
vwan@ti.com [Fri, 13 Mar 2015 20:55:38 +0000 (13:55 -0700)]
Add support to load DSP2 and communicate with it.

Cleaned-up version of original commit from Praveen Rao.

Signed-off-by: VW <vwan@ti.com>
9 years agoCombine .gitignore from ipc3x_dev into the global .gitignore file
vwan@ti.com [Fri, 20 Mar 2015 23:45:06 +0000 (16:45 -0700)]
Combine .gitignore from ipc3x_dev into the global .gitignore file

Signed-off-by: VW <vwan@ti.com>
9 years agoFix build warning regarding strict aliasing when building QNX IPC in Windows
vwan@ti.com [Fri, 20 Mar 2015 23:03:33 +0000 (16:03 -0700)]
Fix build warning regarding strict aliasing when building QNX IPC in Windows

Signed-off-by: VW <vwan@ti.com>
9 years agoInitialize apiStatus field in all NameServer devctl calls
vwan@ti.com [Fri, 20 Mar 2015 22:53:30 +0000 (15:53 -0700)]
Initialize apiStatus field in all NameServer devctl calls

Upon the return from Nameserver's internal devctl calls, the apiStatus field
in the returned CmdArgs structure for some APIs (NameServer_create,
NameServer_add, NameServer_addUInt32, NameServer_Params_init) is left
uninitialized. This commit ensures that the field is correctly set, so that
sporadic failures do not occur due to the uninitialized apiStatus field being
negative.

This addresses SDOCM00115294/SDOCM00115308/SDOCM00115309/SDOCM00115310.

Signed-off-by: VW <vwan@ti.com>
9 years agoGenerated makefile for previous commit (Ipc attach) 3.36.00.02_eng
Ramsey Harris [Fri, 20 Mar 2015 00:25:48 +0000 (17:25 -0700)]
Generated makefile for previous commit (Ipc attach)

9 years agoAdd Ipc attach phase to Linux implementation
Ramsey Harris [Fri, 20 Mar 2015 00:23:16 +0000 (17:23 -0700)]
Add Ipc attach phase to Linux implementation

Refactor the Ipc startup code to separate work done during
setup and during attach. Previous attach mode always assumed
Ipc_ProcSync_ALL, so all work was always done during startup
phase. Add new Ipc config file to LAD for specifying attach
mode. Add new NameServer and TransportRpmsg attach API.
Significant rework of the TransportRpmsg module.

9 years agoRemove MAX #define from Linux Std.h
Robert Tivy [Wed, 18 Mar 2015 21:04:54 +0000 (14:04 -0700)]
Remove MAX #define from Linux Std.h

The MAX() macro that is #defined in Std.h for Linux can either conflict
or be a duplicate of other MAX() macro definitions.  GCC's glibc defines
MAX in sys/param.h, and code builds will either warn abour or error on
a duplicate or conflicting definition.

Remove the usage of MAX completely to avoid this.  Use a locally-defined,
differently-named macro in C file if appropriate.

9 years agoCorrect the argument name in MessageQ_openQueueId
Ramsey Harris [Mon, 16 Mar 2015 16:22:30 +0000 (09:22 -0700)]
Correct the argument name in MessageQ_openQueueId

Replace the incorrect remoteProcId argument with procId in the
doxygen description. Fix macro spelling error. Minor word smithing.

9 years agoFix doxygen comment (@Returns -> @return)
Robert Tivy [Sat, 14 Mar 2015 01:06:04 +0000 (18:06 -0700)]
Fix doxygen comment (@Returns -> @return)

9 years agoTurn TiIpcFxns.h into a public header for QNX 3.36.00.01_eng
vwan@ti.com [Thu, 12 Mar 2015 23:12:38 +0000 (16:12 -0700)]
Turn TiIpcFxns.h into a public header for QNX

This commit makes TiIpcFxns.h into a public header that is exported
to the target filesystem during 'make install'.

This is in reference to enhancement SDOCM00115106.

Signed-off-by: VW <vwan@ti.com>
9 years agoSDOCM00115143 Improper timeout handling in MessageQ_get (Linux)
Ramsey Harris [Fri, 13 Mar 2015 00:44:09 +0000 (17:44 -0700)]
SDOCM00115143 Improper timeout handling in MessageQ_get (Linux)

Split the given timeout value into seconds and microseconds.
Add these to the current time of day. Check for rollover on
the microseconds.

9 years agoSDOCM00114745 Ipc_transportConfig has race window
Ramsey Harris [Fri, 13 Mar 2015 00:29:52 +0000 (17:29 -0700)]
SDOCM00114745 Ipc_transportConfig has race window

Regardless of the Ipc module reference count, any subsequent
caller to Ipc_transportConfig must use the same factory as
the first caller. Otherwise, it is an error.

9 years agoAdd $(JOBS) to XDC command definition, intended set to -j by user
Robert Tivy [Thu, 5 Mar 2015 23:40:32 +0000 (15:40 -0800)]
Add $(JOBS) to XDC command definition, intended set to -j by user

9 years agoIncrease default value ProcMgr_MAX_MEMORY_REGIONS in QNX
vwan@ti.com [Fri, 6 Mar 2015 01:54:09 +0000 (17:54 -0800)]
Increase default value ProcMgr_MAX_MEMORY_REGIONS in QNX

This commit increases the default value of ProcMgr_MAX_MEMORY_REGIONS to
match what we used to support in SysLink 2 (SDOCM00115108), so that real
applications that require many ProcMgr address mappings do not easily
run into this limit.

Signed-off-by: VW <vwan@ti.com>
9 years agoRevert MessageQCopy_MAXMQS back to original value in QNX
vwan@ti.com [Thu, 5 Mar 2015 23:47:40 +0000 (15:47 -0800)]
Revert MessageQCopy_MAXMQS back to original value in QNX

In a previous commit, we had to increase MessageQCopy_MAXMQS to accommodate for
a base reserved queue port value of 2048. However, this has since been moved
to 0x80, so we no longer need to support high queue port values.

Signed-off-by: VW <vwan@ti.com>
9 years agoSDOCM00115110 GateMP_open crashes on Keystone 2 3.35 ipc-3.35-next 3.35.01.06_eng 3.35.01.07
Ramsey Harris [Fri, 6 Mar 2015 00:51:08 +0000 (16:51 -0800)]
SDOCM00115110 GateMP_open crashes on Keystone 2

NameServer_get takes an array of procIds. The last element in the
array must be MultiProc_INVALIDID (the array size is not known).
However, several places in IPC call this function and pass an array
which does not have the last entry marker. NameServer_get had a check
to stop iterating when the number of processors in the cluster had
been reached. I removed this check. I'm now restoring this check.

9 years agoMerge branch '3.30' into ipc-next 3.35.00.05 3.36.00.00_eng
Robert Tivy [Fri, 27 Feb 2015 19:21:00 +0000 (11:21 -0800)]
Merge branch '3.30' into ipc-next

9 years agoAvoid changing the entry point on cores not loaded by remoteproc
vwan@ti.com [Fri, 27 Feb 2015 19:06:37 +0000 (11:06 -0800)]
Avoid changing the entry point on cores not loaded by remoteproc

This commit prevents the template packages/ti/ipc/remoteproc/linkcmd.xdt
from changing the entry point on cores that are not loaded by remoteproc,
such as on a Tomahawk.

Signed-off-by: VW <vwan@ti.com>
9 years agoFix incorrect generation of --diags option usage
Robert Tivy [Fri, 27 Feb 2015 17:38:16 +0000 (09:38 -0800)]
Fix incorrect generation of --diags option usage

A --diags option is being thrown to suppress a warning about an entry
point other than _c_int00, but it was being thrown even when the -e
entry point option was not used.  Changed to throw the --diags only
when we throw the -e.

9 years agoAdd new IpcMgr.h header file to package release
Ramsey Harris [Thu, 26 Feb 2015 22:03:54 +0000 (14:03 -0800)]
Add new IpcMgr.h header file to package release

Added header file to release because it is not a generated file.

9 years agoReduced MessageQ port offset from 0x800 to 0x80
Ramsey Harris [Thu, 26 Feb 2015 19:04:11 +0000 (11:04 -0800)]
Reduced MessageQ port offset from 0x800 to 0x80

The larger port offset was causing a failure in the Linux driver
(rpmsg_proto I think) which caused a back-to-back run of any IPC
application to fail. RPMessage has a maximum reserved port of 100.
Message queue port numbers will still be above the reserved ports.

9 years agoRemove code references to non-SMP mode on DRA7xx/Vayu QNX
vwan@ti.com [Wed, 25 Feb 2015 19:10:43 +0000 (11:10 -0800)]
Remove code references to non-SMP mode on DRA7xx/Vayu QNX

Some cleanup to help address SDOCM00108142, since we do not support non-SMP
mode on IPUs in QNX.

Signed-off-by: VW <vwan@ti.com>
9 years agoSDOCM00114985 Macro to extract destination address from header
Ramsey Harris [Wed, 25 Feb 2015 20:23:38 +0000 (12:23 -0800)]
SDOCM00114985 Macro to extract destination address from header

Modified the existing MessageQ_getDstQueue macro to extract both
the destination queue index and procId from the message header.
It was calling MultiProc_self to acquire the destination procId,
but this only works when invoked on the actual destination processor.

9 years agoSDOCM00114354 IPC Manager needs a public header file
Ramsey Harris [Wed, 25 Feb 2015 18:33:21 +0000 (10:33 -0800)]
SDOCM00114354 IPC Manager needs a public header file

Added header file IpcMgr.h. The module is meta-only, so there is
no generated header file which might collide with this one. Added
two functions typically called by the application: rpmsgStartup,
and ipcStartup. Omitted callIpcStart because this is only used from
config script, not application source file.

9 years agoRename IPC_DEBUG_TRACE_LEVEL to IPC_DEBUG_SLOG_LEVEL
vwan@ti.com [Wed, 25 Feb 2015 01:02:29 +0000 (17:02 -0800)]
Rename IPC_DEBUG_TRACE_LEVEL to IPC_DEBUG_SLOG_LEVEL

This commit renames the environment variable IPC_DEBUG_TRACE_LEVEL to
IPC_DEBUG_SLOG_LEVEL in QNX.

Signed-off-by: VW <vwan@ti.com>
9 years agoSDOCM00114964 Processor data array size should match cluster size
Ramsey Harris [Wed, 25 Feb 2015 00:58:00 +0000 (16:58 -0800)]
SDOCM00114964 Processor data array size should match cluster size

Added new config param: MultiProc.procAddrMode. This is used to
specify which processors require dedicated resources. This config
param is used by MessageQ and NameServer to control the size of
resource arrays. When using ProcAddrMode_Cluster, the resource array
size matches the number of members in the cluster. Modified
TransportRpmsgSetup and TransportShmNotify to always use the cluster
size because that is the only mode they support. These changes are
needed to minimize memory usage in large processor systems.

9 years agoAdd support for IPC_DEBUG in QNX
vwan@ti.com [Wed, 25 Feb 2015 00:19:03 +0000 (16:19 -0800)]
Add support for IPC_DEBUG in QNX

This commit adds support to allow end users to more easily see the trace from
IPC's user libraries. Tracing is enabled via an environment variable
(IPC_DEBUG). Setting IPC_DEBUG=1 enables 'some' trace, setting IPC_DEBUG to 2
(or 3) enables more.

Signed-off-by: VW <vwan@ti.com>
9 years agoAdd reserved queue support for QNX
vwan@ti.com [Fri, 20 Feb 2015 23:54:37 +0000 (15:54 -0800)]
Add reserved queue support for QNX

This commit adds support for reserved queues on QNX (SDOCM00114908).

Signed-off-by: VW <vwan@ti.com>
9 years agoRe-work MessageQ_put to eliminate transport recursion
Ramsey Harris [Thu, 19 Feb 2015 22:56:44 +0000 (14:56 -0800)]
Re-work MessageQ_put to eliminate transport recursion

On Linux, when delivering an inbound message sent from another process
on the same processor, the logic in MessageQ_put caused a transport
infinite recursion. In other words, the message was given back to the
transport instead of being delivered to the queue. The new logic is to
attempt the local message deliver first; if it fails, then give it to
the transport for delivery instead of failing back to the caller.

9 years agoSDOCM00114478 Incorrect thread safety in MessageQ_setup (Linux)
Ramsey Harris [Fri, 20 Feb 2015 02:03:00 +0000 (18:03 -0800)]
SDOCM00114478 Incorrect thread safety in MessageQ_setup (Linux)

Statically initialize the mutex object; removed the dynamic init
call. Protect the entire MessageQ_setup function inside the gate.
Added gate protection to MessageQ_destroy. Decrement the reference
count (this was missing).

9 years agoAdd autoconf generated file
vwan@ti.com [Tue, 17 Feb 2015 21:56:57 +0000 (13:56 -0800)]
Add autoconf generated file

Signed-off-by: VW <vwan@ti.com>
9 years agoSimplify configuration of maximum name length in NameServer
vwan@ti.com [Mon, 16 Feb 2015 22:45:58 +0000 (14:45 -0800)]
Simplify configuration of maximum name length in NameServer

This commit cleans up how the maximum name length is configured in NameServer.
Now the user only needs to configure it during instance creation, and to
configure it at the remote level in
packages/ti/ipc/namesrv/_NameServerRemoteRpmsg.h.

When a name passed to the NameServer remote exceeds the length it can support,
it now returns NameServer_E_NAMETOOLONG.

The NameServerApp is updated to test for long names that exceed the
maximum length.

This commit addresses SDOCM00111686.

Signed-off-by: VW <vwan@ti.com>
9 years agoSDOCM00103540 Incorrect number of hardware spin locks on DRA7XX
Ramsey Harris [Tue, 17 Feb 2015 21:38:35 +0000 (13:38 -0800)]
SDOCM00103540 Incorrect number of hardware spin locks on DRA7XX

Set the number of hardware spin locks to 256 in spinlockDelegate.

9 years agoSet default reserved messages queues to zero
Ramsey Harris [Tue, 17 Feb 2015 00:11:28 +0000 (16:11 -0800)]
Set default reserved messages queues to zero

The default value for reserved message queues in the LAD
configuration should be zero. I accidentally checked-in
my test copy. This commit corrects that mistake.

9 years agoSpecify Address Family for RPMessage in products.mak
Ramsey Harris [Mon, 16 Feb 2015 23:44:55 +0000 (15:44 -0800)]
Specify Address Family for RPMessage in products.mak

We use the Linux kernel version to make a guess at the value
of AF_RPMSG. However, depending on the kernel configuration,
this guess could be wrong. In this case, you must specify the
AF_RPMSG value directly. This had been done in ipc-linux.mak,
but this was too obscure. So, I moved it to products.mak.

9 years agoAndroid: Update to LADs makefile after cfg file move
Arnie Reynoso [Fri, 13 Feb 2015 16:37:55 +0000 (08:37 -0800)]
Android: Update to LADs makefile after cfg file move

LAD config files were moved into a cfg folder. Updated the Android.mk
file to reflect the move and included the addition of a MessageQCfg.c
file.

9 years agoAdded comment to explain hazards of enabling debug trace 3.35.00.04_eng
Ramsey Harris [Fri, 13 Feb 2015 01:59:26 +0000 (17:59 -0800)]
Added comment to explain hazards of enabling debug trace

SocketFxns.c is used by both LAD and TransportRpmsg. When debug
trace is enabled in LAD, it can cause data corruption. I explain
this in the comment and provide advice.

9 years agoGenerated makefile to follow up the previous commit.
Ramsey Harris [Fri, 13 Feb 2015 01:52:08 +0000 (17:52 -0800)]
Generated makefile to follow up the previous commit.

9 years agoSDOCM00114730 Reserved message queues on Linux/Keystone II
Ramsey Harris [Fri, 13 Feb 2015 01:47:46 +0000 (17:47 -0800)]
SDOCM00114730 Reserved message queues on Linux/Keystone II

Added numReservedEntries to MessageQ_Config structure; defines
how many queues to reserve. Moved all LAD config files into cfg
folder to separate configuration data from implementation code.
Added MessageQCfg.c file so users could specify MessageQ config
(such as reserved queues). New concept of queue port number: this
is computed by adding an offset to the queue index. Needed to
avoid collisions with port numbers reserved by services (such as
RPMessage, NameServer). Queue port number is embedded in queueId
and used to address messages. New macro MessageQ_getQueueIndex to
extract queue index from QID. Implemented MessageQ_openQueueId on
Linux. Added port number management to ti.sdo.ipc.MessageQ module.

LAD daemon: removed slot zero reservation for NameServer; added
queue index logic to manage reserved queues; use port number in
queueId construction; reference new MessageQ_cfg object.

TransportRpmsg: replaced queue index references with queue port.

9 years agoFix build warnings from rpmsg-rpc-stress test in QNX
vwan@ti.com [Fri, 13 Feb 2015 00:02:26 +0000 (16:02 -0800)]
Fix build warnings from rpmsg-rpc-stress test in QNX

Signed-off-by: VW <vwan@ti.com>
9 years agoClean up exported contents in QNX
vwan@ti.com [Wed, 11 Feb 2015 01:44:00 +0000 (17:44 -0800)]
Clean up exported contents in QNX

This commit modifies 'make install' to export only tests that we run. It also
puts all tests into the 'tests' subdirectory and builds them all in debug and
release modes for consistency.

Signed-off-by: VW <vwan@ti.com>
9 years agoGenerated script and makefiles to follow up the previous commit.
Ramsey Harris [Tue, 10 Feb 2015 23:50:26 +0000 (15:50 -0800)]
Generated script and makefiles to follow up the previous commit.

9 years agoAdded AF_RPMSG to products.mak to improve ease-of-use
Ramsey Harris [Tue, 10 Feb 2015 23:42:27 +0000 (15:42 -0800)]
Added AF_RPMSG to products.mak to improve ease-of-use

When you don't have access to your Linux kernel source, or you
need to override the Address Family (AF) configuration, you can
now define the AF for RPMSG in your products.mak file. Relaxed
the requirement to specify KERNEL_INSTALL_DIR for TCI6638. Fixed
up the include path to put the kernel include folder ahead of our
IPC linux/include folder.

9 years agoEliminate build warnings in QNX build
vwan@ti.com [Thu, 5 Feb 2015 19:32:48 +0000 (11:32 -0800)]
Eliminate build warnings in QNX build

This commit eliminates all build warnings in the QNX IPC build process.
It addresses SDOCM00113501.

Signed-off-by: VW <vwan@ti.com>
9 years agoReduce QNX build output verbosity
vwan@ti.com [Tue, 27 Jan 2015 22:54:59 +0000 (14:54 -0800)]
Reduce QNX build output verbosity

This commit reduces the build output verbosity, and allows it to be configured
in the qnx/quiet.mk file.

This helps address SDOCM00113501.

Signed-off-by: VW <vwan@ti.com>
9 years agoRework MessageQ_put to prioritize transport if given
Ramsey Harris [Thu, 5 Feb 2015 22:46:20 +0000 (14:46 -0800)]
Rework MessageQ_put to prioritize transport if given

In MessageQ_put, use secondary transport (if given) regardless
of destination queue. For processor local deliver, verify that
destination queue is process local, otherwise give error. Changed
secondary transport array to base interface type. Added interface
casting as needed.

9 years agoFixed run-time configuration of cluster baseId 3.35.00.03_eng
Ramsey Harris [Wed, 4 Feb 2015 03:20:17 +0000 (19:20 -0800)]
Fixed run-time configuration of cluster baseId

New method to encapsulate the run-time configuration of IPC
cluster baseId: Ipc_clusterConfig. Call this method from a
startup first function after setting the cluster baseId. Set
Ipc.entry array with valid procId when cluster baseId is known,
otherwise set to INVALIDID. Set MultiProc.clusterProcList array
as above.

9 years agoNew method for run-time configuration of cluster baseId
Ramsey Harris [Wed, 4 Feb 2015 03:07:06 +0000 (19:07 -0800)]
New method for run-time configuration of cluster baseId

Added MultiProc_setBaseIdOfCluster(). Only supported on SYS/BIOS.
This method should be called from a startup first function.

9 years agoLinux: Added option to set base cluster id in LAD
Arnie Reynoso [Tue, 3 Feb 2015 19:40:20 +0000 (11:40 -0800)]
Linux: Added option to set base cluster id in LAD

An option (-b) has been added to LAD to set the cluster's base id when
launching LAD.

9 years agoSDOCM00114696 Add method to return address of shared region entry
Ramsey Harris [Tue, 3 Feb 2015 17:40:54 +0000 (09:40 -0800)]
SDOCM00114696 Add method to return address of shared region entry

Added method to return the address of the in-memory shared region
entry structure; SharedRegion_getEntryPtr. Use this method from
a pre-startup hook function to configure the entry.

9 years agoSDOCM00114392 Interrupt module on tci6638 does not support clusters
Ramsey Harris [Tue, 3 Feb 2015 16:29:37 +0000 (08:29 -0800)]
SDOCM00114392 Interrupt module on tci6638 does not support clusters

Added segmentSize to MultiProcSetup to define the number of
processors on the device. Needed for sending interrupts to
processors in a different cluster but still on the local device.
Added cluster awareness. Added cluster support to the tci6638
package. Cleaned up Log_print statements. Replaced interface
IInterrupt references with Interrupt module references.

9 years agoFixed QNX build error due to transport header file changes
Ramsey Harris [Tue, 3 Feb 2015 18:48:45 +0000 (10:48 -0800)]
Fixed QNX build error due to transport header file changes

Updated the location of the transport header files to match
what is expected by MessageQ.h.

9 years agoAdd IPC cluster support to socket utility functions
Ramsey Harris [Tue, 3 Feb 2015 01:50:29 +0000 (17:50 -0800)]
Add IPC cluster support to socket utility functions

The socket connect and bind functions need to map procId
to clusterId in order to correctly index into the rprocList[]
and assign the correct vproc_id.

9 years agoGenerated makefiles to follow up on the previous commit.
Ramsey Harris [Wed, 28 Jan 2015 17:31:03 +0000 (09:31 -0800)]
Generated makefiles to follow up on the previous commit.

9 years agoAdd missing transport header files to Linux install command
Ramsey Harris [Wed, 28 Jan 2015 17:14:27 +0000 (09:14 -0800)]
Add missing transport header files to Linux install command

Added new transport interface header files to top-level install
goal. Promoted Std.h to top-level install goal. Also added
TransportRpmsg.h because application needs to call the create
method. Moved location of interface files and transport files to
respective folders under ti/ipc for better name recognition.

9 years agoRemove references to SysLink in QNX code base
vwan@ti.com [Tue, 27 Jan 2015 00:06:37 +0000 (16:06 -0800)]
Remove references to SysLink in QNX code base

This commit removes all references to "SysLink" in the QNX IPC code base, with
the exception that it preserves the file and directory names. The decision was
made to preserve the path names to avoid breaking any existing apps that may
be including headers and/or libraries based on the existing directory
structure, and to ease git history lookup going forward.

Note that this does introduce a break in the naming of internal features such
as SYSLINK_DEBUG and SYSLINK_DEBUG_TRACE_LEVEL.

This helps address SDOCM00108142.

Signed-off-by: VW <vwan@ti.com>
9 years agoAndroid: GateMP uses mmap64 calls to map inUse array 3.30 ipc-3.30-next 3.30.03.14
Arnie Reynoso [Tue, 27 Jan 2015 19:13:42 +0000 (11:13 -0800)]
Android: GateMP uses mmap64 calls to map inUse array

Android's Lollipop filesystem (64-bit) has an issue with mmap() calls.
The offset (off_t type) is incorrectly casted and sign extended.
Using mmap64() and off64_t type explicitly on Android to avoid the issue.

9 years agoChange max threads to 25 in both MessageQMulti app and documentation in QNX
vwan@ti.com [Thu, 22 Jan 2015 01:09:19 +0000 (17:09 -0800)]
Change max threads to 25 in both MessageQMulti app and documentation in QNX

This helps address SDOCM00104833.

Signed-off-by: VW <vwan@ti.com>
9 years agodocs: Remove BIOS-only comment from GateMP
Chris Ring [Thu, 22 Jan 2015 00:26:58 +0000 (16:26 -0800)]
docs: Remove BIOS-only comment from GateMP

GateMP is now supported on HLOS's (for some devices), so remove the
errant note that it's only supported on SYS/BIOS.

Signed-off-by: Chris Ring <cring@ti.com>
9 years agoUpdate QNX IPC loader to RIDL 2.1.0
vwan@ti.com [Wed, 21 Jan 2015 19:37:27 +0000 (11:37 -0800)]
Update QNX IPC loader to RIDL 2.1.0

This commit updates the loader in QNX IPC to the latest codebase in RIDL 2.1.0,
which can be found at https://gforge.ti.com/gf/project/ridl_oss. It also brings
in any relevant differences between SysLink 2 and RIDL 2.0.

This addresses SDOCM00101007.

Signed-off-by: VW <vwan@ti.com>
9 years agoMove 'ret' declaration inside XDC %if to avoid 'unused' warning
Robert Tivy [Fri, 23 Jan 2015 21:40:22 +0000 (13:40 -0800)]
Move 'ret' declaration inside XDC %if to avoid 'unused' warning

9 years agoGenerated new autoreconf makefile 3.35.00.02_eng
Ramsey Harris [Wed, 21 Jan 2015 01:24:43 +0000 (17:24 -0800)]
Generated new autoreconf makefile

These are the new generated autoreconf makefiles from the previous
commit which modified two makefiles.

9 years agoAndroid: Added makefile to build transportrpmsg library
Arnie Reynoso [Wed, 21 Jan 2015 19:46:29 +0000 (11:46 -0800)]
Android: Added makefile to build transportrpmsg library

Added an Android.mak file to build newly separated transportRpmsg library.
Updated the corresponding host-side test examples to link with the library.

9 years agoAdded transport factory to remove circular dependency
Ramsey Harris [Wed, 21 Jan 2015 01:14:27 +0000 (17:14 -0800)]
Added transport factory to remove circular dependency

There was a circular dependency between the ipc and transport
libraries. To break this circle, moved the transport create
method into a factory. Ipc invokes the factory methods through
a function table configured with a new Ipc_transportConfig
method called by the application. Renamed transport library to
follow our naming conventions: libtitransportrpmsg.

9 years agoSDOCM00114391 IPC cluster support is missing on Linux
Ramsey Harris [Sat, 17 Jan 2015 00:58:24 +0000 (16:58 -0800)]
SDOCM00114391 IPC cluster support is missing on Linux

Added cluster support on IPC Linux implementation. Added two new
fields to the MultiProc_Config structure: numProcsInCluster, and
baseIdOfCluster. Updated all LAD config files with new fields.
Made changes to iterate over processors in cluster instead of
iterating over all processors in the system. Mapped procId to
clusterId as needed. Added LOG3 macro to LAD.

Added new cluster fields to MultiProc config struct

Linux and QNX share the same MultiProc API implementation
but different MultiProc configuration definitions. I needed
to add the new cluster fields to the QNX config struct. This
does not add cluster support to QNX.

9 years agoCode formatting. Broke long lines into short ones.
Ramsey Harris [Fri, 16 Jan 2015 01:48:12 +0000 (17:48 -0800)]
Code formatting. Broke long lines into short ones.

9 years agoSDOCM00114518 MessageQ_setMsgPri overwrites entire flags field
Ramsey Harris [Thu, 15 Jan 2015 22:52:01 +0000 (14:52 -0800)]
SDOCM00114518 MessageQ_setMsgPri overwrites entire flags field

The macro was simply assigning the new message priority to the
flags field in the message header. Fixed macro to read, clear,
then update only the priority bits of the flags field ([1:0]).