]> Gitweb @ Texas Instruments - Open Source Git Repositories - git.TI.com/gitweb - ipc/ipcdev.git/log
ipc/ipcdev.git
5 years agoping_rpmsg: OMAPL138: Add program section for tracebuf
Sam Nelson [Wed, 22 Aug 2018 14:22:54 +0000 (10:22 -0400)]
ping_rpmsg: OMAPL138: Add program section for tracebuf

This is needed when you use ti.trace.SysMin

Signed-off-by: Sam Nelson <sam.nelson@ti.com>
5 years agorsc_table: am65xx: Update trace buffer size to 0x8000 3.50.01.00B
Sam Nelson [Tue, 21 Aug 2018 21:34:10 +0000 (17:34 -0400)]
rsc_table: am65xx: Update trace buffer size to 0x8000

Given availability of DDR, expanding to better size

Signed-off-by: Sam Nelson <sam.nelson@ti.com>
5 years agorsc_table: Remove unused carveout definitions
Sam Nelson [Tue, 21 Aug 2018 20:09:26 +0000 (16:09 -0400)]
rsc_table: Remove unused carveout definitions

This is leftover from previous code. Not used anymore.

Signed-off-by: Sam Nelson <sam.nelson@ti.com>
5 years agoResource: Handle AM65xx case correctly
Sam Nelson [Mon, 20 Aug 2018 20:06:32 +0000 (16:06 -0400)]
Resource: Handle AM65xx case correctly

The previous modification handled addressed the backward compatibility
concern, but reverted fix for am65xx

Signed-off-by: Sam Nelson <sam.nelson@ti.com>]
5 years agorpmsg: Fix to handle Keystone 2 correctly
Sam Nelson [Tue, 21 Aug 2018 18:54:19 +0000 (14:54 -0400)]
rpmsg: Fix to handle Keystone 2 correctly

xdc_Fxn is used only by OMAPL138, TCI6638

Signed-off-by: Sam Nelson <sam.nelson@ti.com>
5 years agotracebuf: Update trace buffer size to 0x2000 3.50.01.00A
Sam Nelson [Mon, 20 Aug 2018 20:56:07 +0000 (16:56 -0400)]
tracebuf: Update trace buffer size to 0x2000

Given tracebuf is circular buffer 0x2000 should be sufficient.
Need to reduce number of buffers for K2E to fix compilation issues

Also remove unused carveout definitions

Signed-off-by: Sam Nelson <sam.nelson@ti.com>
5 years agoResource: Fix backward compatibility issue
Sam Nelson [Mon, 20 Aug 2018 20:06:32 +0000 (16:06 -0400)]
Resource: Fix backward compatibility issue

Need to still handle case where no load segment is defined and the
.resource table need to be created a noninit section

Signed-off-by: Sam Nelson <sam.nelson@ti.com>
5 years agorpmsg: Fix compilation warning
Sam Nelson [Fri, 17 Aug 2018 15:41:23 +0000 (11:41 -0400)]
rpmsg: Fix compilation warning

xdc_Fxn is used only by OMAPL138

Signed-off-by: Sam Nelson <sam.nelson@ti.com>
5 years agotransports: Add TransportRpmsg.c to package for AM65XX 3.50.01.00
Sam Nelson [Sat, 11 Aug 2018 02:22:00 +0000 (22:22 -0400)]
transports: Add TransportRpmsg.c to package for AM65XX

Without the fix , TransportRpmsg.c not included in package for AM65XX

Signed-off-by: Sam Nelson <sam.nelson@ti.com>
---
Change from previous verison
Update typo in commit title
---

5 years agoqnx: Add 64 bit defines
Sam Nelson [Sun, 5 Aug 2018 22:13:22 +0000 (18:13 -0400)]
qnx: Add 64 bit defines

This is needed for MessageQ API updates to handle processors with 64 bit
support

Signed-off-by: Sam Nelson <sam.nelson@ti.com>
5 years agotests: Update tracebuf sections for K2 and omapl138
Sam Nelson [Fri, 3 Aug 2018 21:15:40 +0000 (17:15 -0400)]
tests: Update tracebuf sections for K2 and omapl138

- It is needed now that ti.trace.SysMin is used

Signed-off-by: Sam Nelson <sam.nelson@ti.com>
5 years agoTEMP: smp: Disable SMP for now for A53
Sam Nelson [Thu, 2 Aug 2018 02:15:52 +0000 (22:15 -0400)]
TEMP: smp: Disable SMP for now for A53

BIOS currently does not support SMP for A53
Disabling SMP configuration for now

Signed-off-by: Sam Nelson <sam.nelson@ti.com>
5 years agodaemon: Update debug print with more clear information
Sam Nelson [Mon, 30 Jul 2018 20:34:35 +0000 (16:34 -0400)]
daemon: Update debug print with more clear information

Helps to debug if the AF_RPMSG is not the expected value

Signed-off-by: Sam Nelson <sam.nelson@ti.com>
5 years agoBuild.xs: Cleanup item identified
Sam Nelson [Wed, 9 Aug 2017 13:34:13 +0000 (09:34 -0400)]
Build.xs: Cleanup item identified

Added TODO to mark change needed

Signed-off-by: Sam Nelson <sam.nelson@ti.com>
5 years agoTEMP: Tests: ping_rpmsg: Override checkFrequency flags
Suman Anna [Wed, 30 May 2018 01:18:59 +0000 (20:18 -0500)]
TEMP: Tests: ping_rpmsg: Override checkFrequency flags

This is a work around to avoid issues with dmtimer.
TODO: Need to check with updated build target.

Signed-off-by: Suman Anna <s-anna@ti.com>
Signed-off-by: Sam Nelson <sam.nelson@ti.com>
5 years agoremoteproc: Use ti.trace.SysMin instead of xdc.runtime.SysMin
Suman Anna [Wed, 4 Apr 2018 19:59:59 +0000 (14:59 -0500)]
remoteproc: Use ti.trace.SysMin instead of xdc.runtime.SysMin

ti.trace.SysMin is needed to have the trace handled as a circular buffer
Updating this for omapl138 and K2 platforms.

Signed-off-by: Suman Anna <s-anna@ti.com>
Signed-off-by: Sam Nelson <sam.nelson@ti.com>
5 years agoSysMin: Remove error check against CPU memory map
Suman Anna [Wed, 4 Apr 2018 19:55:17 +0000 (14:55 -0500)]
SysMin: Remove error check against CPU memory map

Moving forward new platforms does not capture the cpu memory map, so
remove this error check for AM65X only

Signed-off-by: Suman Anna <s-anna@ti.com>
Signed-off-by: Sam Nelson <sam.nelson@ti.com>
5 years agoTMP: listMP: Add Cache operation for v8A
Sam Nelson [Tue, 27 Mar 2018 12:43:34 +0000 (08:43 -0400)]
TMP: listMP: Add Cache operation for v8A

Ideally with the coherence working between A53 and R5F, there is no
cache operations required from A53 side. But the coherence operations
requires the ISC registers configured for R5F transactions to be non-
secure.
Adding this as temporary workaround.

Signed-off-by: Sam Nelson <sam.nelson@ti.com>
5 years agoBuild.xs: Remove -mapcs-frame for A53F
Sam Nelson [Tue, 24 Oct 2017 14:43:51 +0000 (10:43 -0400)]
Build.xs: Remove -mapcs-frame for A53F

This option is deprecated in gcc for A53F target

Signed-off-by: Sam Nelson <sam.nelson@ti.com>
5 years agoBuild.xs: Update GCC compile option mapcs-frame
Sam Nelson [Wed, 4 Oct 2017 23:59:46 +0000 (19:59 -0400)]
Build.xs: Update GCC compile option mapcs-frame

mapcs is deprecated with new version of gcc tools but identical to
mapcs-frame

Signed-off-by: Sam Nelson <sam.nelson@ti.com>
5 years agotests: Cleanup for observed compiler warnings
Sam Nelson [Sat, 28 Jul 2018 04:17:15 +0000 (00:17 -0400)]
tests: Cleanup for observed compiler warnings

Removed typecast forcing pointer to UInt. With 64 bit pointer need to
print with appropriate formatting
- added type casts where needed

Signed-off-by: Sam Nelson <sam.nelson@ti.com>
5 years agodaemon: Add error check form read and write calls.
Sam Nelson [Sat, 28 Jul 2018 04:13:13 +0000 (00:13 -0400)]
daemon: Add error check form read and write calls.

Added error check of return values from read and write functions.
This also clears compiler warnings

Signed-off-by: Sam Nelson <sam.nelson@ti.com>
5 years agotransport: Add error check for read and write function calls
Sam Nelson [Fri, 7 Jul 2017 21:31:43 +0000 (17:31 -0400)]
transport: Add error check for read and write function calls

Added error check of return values from read and write functions.
This also clears compiler warnings

Signed-off-by: Sam Nelson <sam.nelson@ti.com>
5 years agoBuild.xs: remove unused utilsSources
Sam Nelson [Fri, 30 Jun 2017 15:48:07 +0000 (11:48 -0400)]
Build.xs: remove unused utilsSources

Sources for utils are already captured in packages/ti/sdo/utils/Build.xs

Signed-off-by: Sam Nelson <sam.nelson@ti.com>
5 years agoMessageQ: Update MesssageQ header for 64 bit addresses
Sam Nelson [Sat, 13 Jan 2018 15:11:31 +0000 (10:11 -0500)]
MessageQ: Update MesssageQ header for 64 bit addresses

The reserved fields are expected to hold the next and previous pointers
which needs to work with 64 bit pointers.
Redefined to be Bits64 to accomodate this.

Signed-off-by: Sam Nelson <sam.nelson@ti.com>
5 years agoautotools: Update autotools generated files with K3 AM65XX support
Sam Nelson [Wed, 28 Jun 2017 19:56:32 +0000 (15:56 -0400)]
autotools: Update autotools generated files with K3 AM65XX support

- autoreconf used to generate makefiles

Signed-off-by: Sam Nelson <sam.nelson@ti.com>
5 years agoK3: Add support for K3 AM65XX device
Sam Nelson [Fri, 23 Jun 2017 21:17:19 +0000 (17:17 -0400)]
K3: Add support for K3 AM65XX device

- Adds support for A53 and R5F cores

- Adds IPC VirtQueue, Interrupt & Notity drivers for AM65XX platform.

- gates: Add V7R and v8A support

Signed-off-by: Sam Nelson <sam.nelson@ti.com>
5 years agoResource: Update to handle resource table area using linker symbol
Sam Nelson [Wed, 11 Apr 2018 20:49:30 +0000 (16:49 -0400)]
Resource: Update to handle resource table area using linker symbol

- Modified to  place memory only if loadSegment is defined
- For new platforms, SYSBIOS will not handle platform memory map.
So the linker command file is external. Only way to get the
start address is using the external linker symbol.
- Added new variable loadSymbol to allow setting the tableptr using
symbol

Signed-off-by: Sam Nelson <sam.nelson@ti.com>
5 years agoSharedRegion: Update to use linker symbols instead of platform map
Sam Nelson [Thu, 5 Oct 2017 01:07:58 +0000 (21:07 -0400)]
SharedRegion: Update to use linker symbols instead of platform map

The Keystone3 platform in sysbios does not support memory maps. The
memory map needs to be done using the custom linker command file.
And hence changed Shared Region module to optionally accept
linker symbols for base and length of shared region.

platform.dataMemory is no longer supported. Need to use linker.cmd
to place sections

Update types to generic types: Previous code assumed UInt32 for Pointer

Signed-off-by: Sam Nelson <sam.nelson@ti.com>
5 years agoStd.h: Add definition of 64 bit types
Sam Nelson [Wed, 4 Apr 2018 19:24:14 +0000 (15:24 -0400)]
Std.h: Add definition of 64 bit types

This is needed for supporting new devices with 64 bit pointers

Signed-off-by: Sam Nelson <sam.nelson@ti.com>
5 years agolad: Add Timeout waiting for Response FIFO
Angela Stegmaier [Tue, 5 Jun 2018 19:57:01 +0000 (14:57 -0500)]
lad: Add Timeout waiting for Response FIFO

Add a timeout to the logic which opens the client response FIFO
in the LAD daemon during LAD_CONNECT. There are some corner cases
that might result in this hanging forever waiting for the response
FIFO, in which case, all other LAD communication will be blocked
forever.

Such cases might be:
- Client application crashes after sending LAD_connect request
- Communication with LAD through the LADCMDS fifo takes too long
  and the Client times out waiting for the response FIFO (5 seconds).
  If this happens, Client will never try to open the FIFO again due
  to failing when doing the stat() on the FIFO.

With this patch, if the FIFO connection is not established within the
timeout, the FIFO will be unlinked and the original state restored so
that the connection can be attempted again.

The timeout is chosen as 1 second so as not to block all other LAD
communication for a long period of time. 1 second should (hopefully) be
sufficient time for the Client and LAD to both open the FIFO.

Signed-off-by: Angela Stegmaier <angelabaker@ti.com>
5 years agoResource: Rename the IpcMemory name in Resource.xs 3.47 ipc-3.47-next 3.47.02.00
Suman Anna [Tue, 1 May 2018 22:33:27 +0000 (17:33 -0500)]
Resource: Rename the IpcMemory name in Resource.xs

The Resource module is derived from the IpcMemory module within
the sysbios-rpmsg codebase originally, but the Resource.xs file
is still using the IpcMemory name and so the config processing of
this module will print erroneous names on any misconfiguration.
Rename the variable IpcMemory to Resource like is normally done
with .xs files.

Signed-off-by: Suman Anna <s-anna@ti.com>
5 years agoipc: static analysis issues on NULL pointer access
Sam Nelson [Mon, 23 Apr 2018 18:04:01 +0000 (14:04 -0400)]
ipc: static analysis issues on NULL pointer access

Added null check to avoid direct crash and return error or assert.

Signed-off-by: Sam Nelson <sam.nelson@ti.com>
5 years agoAndroid: Remove use of LOCAL_MODULE_PATH to allow Multilib build
Andrew F. Davis [Fri, 20 Apr 2018 17:25:20 +0000 (12:25 -0500)]
Android: Remove use of LOCAL_MODULE_PATH to allow Multilib build

LOCAL_MODULE_PATH is not multilib safe, the recommended alternative
is LOCAL_MODULE_RELATIVE_PATH, but we don't need that either as
using LOCAL_VENDOR_MODULE will get our output deployed to the
correct spot without needing to hard-code paths.

Signed-off-by: Andrew F. Davis <afd@ti.com>
5 years agotests: DRA7XX: Fix clock configuration in gatempapp.cfg
Angela Stegmaier [Thu, 19 Apr 2018 18:27:52 +0000 (13:27 -0500)]
tests: DRA7XX: Fix clock configuration in gatempapp.cfg

The gatempapp.cfg was not selecting the proper clock
config for DSP1. This patch fixes the gatempapp.cfg
file to use the same common Dsp_vayu.cfg and Dsp_vayu_power.cfg
files to do the common configurations including clock
configuration.

Without this, the watchdog will not be proper and will
result in unexpected watchdog timings for the messageq_fault
tests for DSP1.

Reported-by: Suman Anna <s-anna@ti.com>
Signed-off-by: Angela Stegmaier <angelabaker@ti.com>
Tested-by: Suman Anna <s-anna@ti.com>
6 years agoLinux: Cleanup on Failure in Ipc_start
Angela Stegmaier [Wed, 7 Mar 2018 19:41:08 +0000 (13:41 -0600)]
Linux: Cleanup on Failure in Ipc_start

Add the appropriate cleanup calls when Ipc_start fails, so
that Ipc_start can be called again in a clean state. This
allows retry of Ipc_start in case of failure due to various
conditions including if reponses are delayed from the remote
core for some reason.

Signed-off-by: Angela Stegmaier <angelabaker@ti.com>
6 years agoLinux: GateMP: Fix Error Handling When defaultGate Not Found Due to Timeout
Angela Stegmaier [Wed, 7 Mar 2018 19:39:54 +0000 (13:39 -0600)]
Linux: GateMP: Fix Error Handling When defaultGate Not Found Due to Timeout

In a corner case where remote NameServer requests take too long and
time out, it is possible that remoteSystemGate may be de-referenced
in GateMP_start when it wasn't allocated during GateMP_attach.

This patch improves error checking in GateMP_start to avoid the potential
NULL pointer de-reference. Before trying to access the remoteSystemGates
pointer during GateMP_start, we should first make sure that the pointer is
valid. Also check to make sure that the gate number does not exceed the
number of allocated gates.

If the corner case has been hit where the GateMP_attach failed but GateMP_open
later passes during GateMP_start, GateMP_start will now return an error,
resulting in Ipc_start returning an error. The application can then call
Ipc_start again.

Signed-off-by: Angela Stegmaier <angelabaker@ti.com>
6 years agoipc-bios.mak: Update to allow use of top level Rule.mak 3.47.01.00 3.47.01.00_eng
Sam Nelson [Sun, 7 Jan 2018 04:09:03 +0000 (23:09 -0500)]
ipc-bios.mak: Update to allow use of top level Rule.mak

Products.mak sets variables to point to external products.
Allowing RULES_MAKE variable to be overriden, helps in building in a SDK
context.
This is to help with build with SDKs bundling IPC.
Should not affect stand alone IPC builds

Signed-off-by: Sam Nelson <sam.nelson@ti.com>
6 years agoGateMP: Add cache operation to make sure the SR0 contents are synced up
Sam Nelson [Fri, 15 Dec 2017 18:36:40 +0000 (13:36 -0500)]
GateMP: Add cache operation to make sure the SR0 contents are synced up

Before opening the shared region, make sure the cache is
invalidated. Even though the memory was not accessed before, because of
speculative execution the memory may be in the cache line already.

Signed-off-by: Sam Nelson <sam.nelson@ti.com>
6 years agoListMP: Add barrier to ensure write backs complete
Sam Nelson [Tue, 14 Nov 2017 04:03:39 +0000 (23:03 -0500)]
ListMP: Add barrier to ensure write backs complete

The call to barrier function is needed to ensure the intended changes
are already written back to memory before leaving the gate to avoid
issues.

Signed-off-by: Sam Nelson <sam.nelson@ti.com>
6 years agoAndroid: Fix compilation warnings
Angela Stegmaier [Wed, 1 Nov 2017 16:52:54 +0000 (11:52 -0500)]
Android: Fix compilation warnings

Fix compilation warnings seen with Android build.

Signed-off-by: Angela Stegmaier <angelabaker@ti.com>
6 years agoLinux: Update user AF_RPMSG define for 4.11+ kernels
Suman Anna [Wed, 18 Oct 2017 21:11:13 +0000 (16:11 -0500)]
Linux: Update user AF_RPMSG define for 4.11+ kernels

IPC's Linux user space support contains a copy of a few
kernel-defined structs and definitions including the socket
address family used for rpmsg-based sockets - AF_RPMSG. This
driver is currently out-of-tree and so it's definition is
always 'one more' than the last address family defined by
the mainline kernel's socket.h.

A new address family was introduced in 4.11 (AF_SMC), and as
a result, the AF_RPMSG macro needs to be set to 44 post 4.11
kernel. The user space header has been updated to reflect on
the kernel version and appropriately assign the value of
AF_RPMSG.

Do note that a specific value of AF_RPMSG can always be provided
through the products.mak when KERNEL_INSTALL_DIR is not set.

Signed-off-by: Suman Anna <s-anna@ti.com>
6 years agoLinux: LAD_client: Fix Race Condition with Command FIFO
Angela Stegmaier [Fri, 6 Oct 2017 18:38:07 +0000 (13:38 -0500)]
Linux: LAD_client: Fix Race Condition with Command FIFO

With the current implementation, there is a small window
where the FIFO is closed by the client for writing while it is
still open by the LAD daemon for reading. In this small window,
if the LAD daemon attempts to do a read on the FIFO, it will get
EOF and the LAD daemon will close it's own FIFO and re-open it.

If the client then is able to open the FIFO again after
the LAD daemon has received EOF from the read call, but before
the LAD daemon has closed the FIFO, then there is now a situation
where the client has a handle to a stale FIFO. If all these
things happen, then when the client tries to write/flush to the
FIFO, a SIGPIPE signal will happen, resulting in the client
crash.

To avoid this race condition, we must close the window where
the FIFO is not open for writing by the client while it is already
open for reading by the daemon.

This patch closes the window by modifiying the client code to
delay closing it's non-blocking FIFO handle (used for handshaking)
until after it has successfully opened the regular FIFO.

Signed-off-by: Angela Stegmaier <angelabaker@ti.com>
6 years agoAndroid: Makefile: move IPC libraries/binaries to vendor partition 3.47.00.00 3.47.00.00_eng
Vishal Mahaveer [Thu, 14 Sep 2017 21:25:52 +0000 (16:25 -0500)]
Android: Makefile: move IPC libraries/binaries to vendor partition

Updating Android makefile to generate IPC userspace binaries and
libraries in /vendor location instead of /system.

This change requires the lad_dra7xx service definition in init.*.rc
files to be updated accordingly

-service lad_dra7xx /system/bin/lad_dra7xx -g
+service lad_dra7xx /vendor/bin/lad_dra7xx -g

Signed-off-by: Vishal Mahaveer <vishalm@ti.com>
6 years agoVayu: NotifySetup: Incorrect Index in NotifySetup_unplugHwi
Angela Stegmaier [Wed, 13 Sep 2017 21:42:59 +0000 (16:42 -0500)]
Vayu: NotifySetup: Incorrect Index in NotifySetup_unplugHwi

When checking the reference count before deleting the Hwi,
the code was always checking against index 0, instead of
the mbxIdx. This lead to the Hwi being deleted, even when
there were still references. Then, even if NotifySetup_plugHwi
was called again, the reference count was greater than 1,
and the Hwi would never be plugged again.

This issue manifests when Ipc_detach is called followed by
Ipc_attach.

This patch fixes the issue by checking against the appropriate
refcount for the mbxIdx.

Signed-off-by: Angela Stegmaier <angelabaker@ti.com>
6 years agoAndroid: update version.h include path for AF_RPMSG handling
Vishal Mahaveer [Wed, 13 Sep 2017 21:32:22 +0000 (16:32 -0500)]
Android: update version.h include path for AF_RPMSG handling

Update include path of version.h for current Android setup.
Previously (before O) we used to update the socket.h bionic header with
AF_RPMSG definitions, so the KERNEL_VERSION check was not exercized.

Now the kernel-headers of dra7xx in Android repo is updated to
reflect the correct Kernel version and can be used to check
the kernel version.

For older Android versions that do not have version.h in
kernel-headers, AF_RPMSG can still be taken from the socket.h
bionic header if it is updated to include AF_RPMSG.

Signed-off-by: Vishal Mahaveer <vishalm@ti.com>
Signed-off-by: Angela Stegmaier <angelabaker@ti.com>
6 years agoLinux: TransportRpmsg: Fix Mutex Deadlock Issue
Angela Stegmaier [Thu, 3 Aug 2017 21:16:01 +0000 (16:16 -0500)]
Linux: TransportRpmsg: Fix Mutex Deadlock Issue

In an error recovery situation, it is possible that a
mutex deadlock could occur when MessageQ_delete happened
at the same time that an fd was being signaled about the
remote core error in the same process. This error could
occur if there are multiple MessageQs in the same process
communicating with the remote core that is doing recovery.

When MessageQ_delete grabs the lock, it then tries to
communicate with rpmsgThreadFxn, sending a message and
then waiting for a response. If at the same time, the thread
is processing a shutdown notification for an fd, it will
also try to grab the mutex, but will be blocked because
MessageQ_delete is holding the mutex. The rpmsgThreadFxn
will not continue until it gets the mutex, leading to the
deadlock.

The fix is to change the mutex_lock to a trylock when
handling shutdown notifications in rpmsgThreadFxn. If the
thread fails to acquire the lock, it continues processing
commands and will try again later to process the shutdown
request at a time when the lock is no longer being held.

Signed-off-by: Angela Stegmaier <angelabaker@ti.com>
6 years agoMmRpc: Fix Compilation Warnings
Angela Stegmaier [Wed, 9 Aug 2017 21:56:32 +0000 (16:56 -0500)]
MmRpc: Fix Compilation Warnings

Fix compilation warnings introduced with commit
6736bb2b9b060cf37d3e6728e21509b24ec12da8,
"MmRpc: Add Input Paramter Checking to APIs".

Signed-off-by: Angela Stegmaier <angelabaker@ti.com>
6 years agoTransportRpmsg: Fix Check for Invalid Socket
Angela Stegmaier [Thu, 29 Sep 2016 21:14:55 +0000 (16:14 -0500)]
TransportRpmsg: Fix Check for Invalid Socket

A check for sock in TransportRpmsg was incorrectly checking
for sock != 0, when it should have been checking against
INVALIDSOCKET (the value uninitialized socket are set to).

This patch fixes the check.

Signed-off-by: Angela Stegmaier <angelabaker@ti.com>
6 years agoLinux: LAD_client: Avoid hang in fopen during connect
Angela Stegmaier [Wed, 26 Jul 2017 14:57:00 +0000 (09:57 -0500)]
Linux: LAD_client: Avoid hang in fopen during connect

If the application is started and calls Ipc_start before
the LAD is started and created/opened the fifo, then
the application can block in the fopen trying to connect
to the command FIFO.

This patch makes the sequence more robust by first checking
if the fifo exists, then trying to open it as non-blocking,
thereby getting an immediate success or error instead of
blocking until it has been opened for reading by LAD. Once
the non-blocking open returns successfully, the regular
connect sequence can continue. If it returns with a failure,
it will sleep and then try again for a period of time,
eventually returning a timeout failure if it is unable
to connect. This should prevent the application from hanging
if LAD is not started before it calls Ipc_start.

Signed-off-by: Angela Stegmaier <angelabaker@ti.com>
6 years agoMmRpc: Add Input Paramter Checking to APIs
Angela Stegmaier [Wed, 12 Jul 2017 21:33:09 +0000 (16:33 -0500)]
MmRpc: Add Input Paramter Checking to APIs

This patch adds input paramter checking to the MmRpc_* APIs,
specifically checking for NULL pointers, in order to prevent
a crash due to NULL-pointer de-reference in the case that the
user sends a bad (NULL) pointer.

Signed-off-by: Angela Stegmaier <angelabaker@ti.com>
6 years agoQNX: NameServer_daemon: Initialize mutex_attr 3.46 ipc-3.46-next 3.46.02.04 3.46.02.04_eng
Angela Stegmaier [Fri, 16 Jun 2017 19:41:21 +0000 (14:41 -0500)]
QNX: NameServer_daemon: Initialize mutex_attr

Initialize mutex_attr before using it. Otherwise, it could
contain some uninitialized values.

This patch is ported from commit id
7b3a739876e46d3194861a2d93077ff95954affb

Signed-off-by: Angela Stegmaier <angelabaker@ti.com>
6 years agoQNX: Tests: Add NameServer and GateMP to Fault Test
Angela Stegmaier [Mon, 5 Jun 2017 19:42:25 +0000 (14:42 -0500)]
QNX: Tests: Add NameServer and GateMP to Fault Test

Add NameServer and GatemP to fault recovery test in
order to test error recovery of these modules.

Signed-off-by: Angela Stegmaier <angelabaker@ti.com>
6 years agoQNX: NameServer Daemon: Check that Handles passed from User are Valid
Angela Stegmaier [Mon, 5 Jun 2017 21:01:18 +0000 (16:01 -0500)]
QNX: NameServer Daemon: Check that Handles passed from User are Valid

Check that the handle being passed from the user is a valid
handle that the daemon has previously allocated. This prevents
the resource manager from crashing by accessing a stale handle
that the user has passed (for instance in some error recovery
scenarios).

This patch adds the checking for function calls which are accessible
through a devctl call.

Signed-off-by: Angela Stegmaier <angelabaker@ti.com>
6 years agoQNX: Tests: Add error/cleanup tests to NameServer test
Angela Stegmaier [Mon, 27 Mar 2017 17:03:54 +0000 (12:03 -0500)]
QNX: Tests: Add error/cleanup tests to NameServer test

Signed-off-by: Angela Stegmaier <angelabaker@ti.com>
6 years agoQNX: NameServer_delete in NameServer daemon leaks memory
Angela Stegmaier [Fri, 24 Mar 2017 21:57:37 +0000 (16:57 -0500)]
QNX: NameServer_delete in NameServer daemon leaks memory

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

[Ported from commits 8a52a6a5fa20ac028158a3ad346da46555ce45b7
    "SDOCM00115434 NameServer_delete in LAD daemon leaks memory"
    and 6c4799151327f2c83b9f253ea25c52bef4e10803
    "Remove NameServer instance from module list in NameServer_delete()"]

Signed-off-by: Angela Stegmaier <angelabaker@ti.com>
6 years agoMakefile: Include GATE related sources for all platforms.
Sam Nelson [Fri, 23 Jun 2017 00:05:34 +0000 (20:05 -0400)]
Makefile: Include GATE related sources for all platforms.

Want all the sources to be part of IPC package irrespective of platform

Signed-off-by: Sam Nelson <sam.nelson@ti.com>
6 years agoLinux: NameServer_daemon: Initialize mutex_attr before using it 3.46.01.03 3.46.01.03_eng
Falk Tristram [Fri, 26 May 2017 15:23:54 +0000 (10:23 -0500)]
Linux: NameServer_daemon: Initialize mutex_attr before using it

Initialize mutex_attr before using it. Otherwise, it could
contain some uninitialized values.

Also, initialize nsMsg to zero before using it.

Signed-off-by: Falk Tristram <falk.tristram@cognex.com>
Signed-off-by: Angela Stegmaier <angelabaker@ti.com>
6 years agoQNX: ProcMgr: Fix Compilation Warnings
Angela Stegmaier [Mon, 22 May 2017 21:04:39 +0000 (16:04 -0500)]
QNX: ProcMgr: Fix Compilation Warnings

Fix compilation warnings discovered when compiling with
newer QNX versions.

Signed-off-by: Angela Stegmaier <angelabaker@ti.com>
6 years agoQNX: Osal: Fix Compilation Warnings
Angela Stegmaier [Mon, 22 May 2017 21:04:38 +0000 (16:04 -0500)]
QNX: Osal: Fix Compilation Warnings

Fix compilation warnings discovered when compiling with
newer QNX versions.

Signed-off-by: Angela Stegmaier <angelabaker@ti.com>
6 years agoQNX: Resmgr: Fix Compilation Warnings
Angela Stegmaier [Mon, 22 May 2017 21:04:37 +0000 (16:04 -0500)]
QNX: Resmgr: Fix Compilation Warnings

Fix compilation warnings discovered when compiling
with newer QNX versions.

Signed-off-by: Angela Stegmaier <angelabaker@ti.com>
6 years agoQNX: tests: Fix Compilation Warnings
Angela Stegmaier [Mon, 22 May 2017 21:04:36 +0000 (16:04 -0500)]
QNX: tests: Fix Compilation Warnings

Fix compilation warnings discovered when compiling with
newer QNX versions.

Signed-off-by: Angela Stegmaier <angelabaker@ti.com>
6 years agoQNX: Samples: Fix Compilation Warnings
Angela Stegmaier [Mon, 22 May 2017 21:04:35 +0000 (16:04 -0500)]
QNX: Samples: Fix Compilation Warnings

Fix compilation warnings discovered when building with
newer QNX versions.

Signed-off-by: Angela Stegmaier <angelabaker@ti.com>
6 years agoQNX: Loader: Fix Compilation Warnings
Angela Stegmaier [Mon, 22 May 2017 21:04:34 +0000 (16:04 -0500)]
QNX: Loader: Fix Compilation Warnings

Fix compilation warnings discovered when building with
newer QNX version.

Signed-off-by: Angela Stegmaier <angelabaker@ti.com>
6 years agoQNX: DRA7XX: Fix Compilation Warnings
Angela Stegmaier [Mon, 22 May 2017 21:04:33 +0000 (16:04 -0500)]
QNX: DRA7XX: Fix Compilation Warnings

This patch fixes compilation warnings in the DRA7XX-specific
files that were introduced with the newer QNX version build.

Signed-off-by: Angela Stegmaier <angelabaker@ti.com>
6 years agoQNX: Trace Daemon: Fix Compilation Warnings
Angela Stegmaier [Mon, 22 May 2017 21:04:32 +0000 (16:04 -0500)]
QNX: Trace Daemon: Fix Compilation Warnings

This patch fixes compilation warnings introduced with
the newer QNX version.

Signed-off-by: Angela Stegmaier <angelabaker@ti.com>
6 years agoQNX: Shmemallocator: Fix Compilation Warnings
Angela Stegmaier [Mon, 22 May 2017 21:04:31 +0000 (16:04 -0500)]
QNX: Shmemallocator: Fix Compilation Warnings

This patch fixes compilation warnings introduced with
the newer QNX version.

Signed-off-by: Angela Stegmaier <angelabaker@ti.com>
6 years agoQNX: Mx: Fix Compilation Warnings
Angela Stegmaier [Mon, 22 May 2017 21:04:30 +0000 (16:04 -0500)]
QNX: Mx: Fix Compilation Warnings

This patch fixes compilation warnings introduced with
newer QNX version build.

Signed-off-by: Angela Stegmaier <angelabaker@ti.com>
6 years agoQNX: Build: Fix Build for Newer QNX Versions on Windows
Angela Stegmaier [Mon, 22 May 2017 21:04:29 +0000 (16:04 -0500)]
QNX: Build: Fix Build for Newer QNX Versions on Windows

When building on Windows, the overriding of the usemsg
command in quiet.mk was causing the build to fail. It
appears that usemsg isn't always defined when building
with newer QNX versions and the overriding of the command should
be done conditionally.

This patch changes quiet.mk to only update the usemsg
command if it is defined.

Signed-off-by: Angela Stegmaier <angelabaker@ti.com>
6 years agoExamples: DRA7XX: Enable PM for DSP test images 3.46.00.02 3.46.00.02_eng
Angela Stegmaier [Thu, 20 Apr 2017 21:36:41 +0000 (16:36 -0500)]
Examples: DRA7XX: Enable PM for DSP test images

Enable the DSP PM for the test images also.

Signed-off-by: Angela Stegmaier <angelabaker@ti.com>
6 years agoWatchdog: Add Watchdog_restore for DRA7XX DSP
Angela Stegmaier [Thu, 20 Apr 2017 21:33:06 +0000 (16:33 -0500)]
Watchdog: Add Watchdog_restore for DRA7XX DSP

Watchdog code is not currently adding the Watchdog_restore
callback for DRA7XX DSP. When power management (suspend/resume)
is enabled for the DSP, the restore hook should be added
so that the values of the timer are proper upon resume.

Without this patch, when power management is enabled for the DSP,
the watchdog timeout is not proper after resuming from suspend.

Signed-off-by: Angela Stegmaier <angelabaker@ti.com>
7 years agoRemoteproc: OMAP-L138: Fix up resource table 3.46.00.01_eng
Suman Anna [Tue, 11 Apr 2017 21:04:22 +0000 (16:04 -0500)]
Remoteproc: OMAP-L138: Fix up resource table

The OMAP-L138 resource table structure definitions are incorrect,
the offset variable was defined to be an array of 13, whereas the
real valid entries are 3, thereby mis-representing the offsets of
the resources in the actual resource table when compared to the
resource structure definition. Fix this properly by adjusting the
array length.

While at this, also replace the name IPU with DSP in various macros.
The SoC only has a DSP, and has no IPU, and the IPU name can be
misleading for users even though there is no difference functionally.

Signed-off-by: Suman Anna <s-anna@ti.com>
7 years agoautotools: Update Linux tests Makefile.in for fault app name change
Angela Stegmaier [Mon, 10 Apr 2017 16:03:37 +0000 (11:03 -0500)]
autotools: Update Linux tests Makefile.in for fault app name change

Update the Makefile.in to account for the fault app name
change.

Signed-off-by: Angela Stegmaier <angelabaker@ti.com>
7 years agoAndroid: Makefile: Update Name of Fault Test Source File
Angela Stegmaier [Mon, 10 Apr 2017 16:03:36 +0000 (11:03 -0500)]
Android: Makefile: Update Name of Fault Test Source File

A recent change was made to rename the fault.c file to
MessageQFaultApp.c. This patch updates the Android.mk
file with the new source file name.

Signed-off-by: Angela Stegmaier <angelabaker@ti.com>
7 years agofault: Linux: Renamed test application fault to MessageQFaultApp 3.46.00.00_eng
Sam Nelson [Fri, 31 Mar 2017 13:41:41 +0000 (09:41 -0400)]
fault: Linux: Renamed test application fault to MessageQFaultApp

Updated Makefile.am accordingly

Signed-off-by: Sam Nelson <sam.nelson@ti.com>
7 years agofault: BIOS: Renamed test application fault to messageq_fault
Sam Nelson [Thu, 30 Mar 2017 18:56:44 +0000 (14:56 -0400)]
fault: BIOS: Renamed test application fault to messageq_fault

Updated package.bld accordingly

Signed-off-by: Sam Nelson <sam.nelson@ti.com>
7 years agorpmsg: Add Rpmsg NS 2.0 to OmapL138 platform
Sam Nelson [Thu, 30 Mar 2017 18:39:19 +0000 (14:39 -0400)]
rpmsg: Add Rpmsg NS 2.0 to OmapL138 platform

Additional of OMAPL138 in upcoming SDK releases will require support of
NS_2.0
( Note: The default will break compatibility with Upstream kernel which
does not support NS_2.0
The Non-NS_2.0 libraries are also created for customer to use, in case
if customer is using upstream kernel, but this will not fully tested)

Signed-off-by: Sam Nelson <sam.nelson@ti.com>
7 years agoLinux: GateHWSpinlock: Fix Compiler Warnings
Angela Stegmaier [Mon, 27 Mar 2017 18:42:29 +0000 (13:42 -0500)]
Linux: GateHWSpinlock: Fix Compiler Warnings

Fix the following compiler warnings in the Linux GateHWSpinlock
module:

../../../linux/src/api/gates/GateHWSpinlock.c: In function 'GateHWSpinlock_enter':
../../../linux/src/api/gates/GateHWSpinlock.c:346:23: warning: implicit declaration of function 'ioctl' [-Wimplicit-function-declaration]
             locked = !ioctl(Mod->fd, HWSPINLOCK_USER_LOCK, &data);

GateHWSpinlock.c: In function 'GateHWSpinlock_enter':
GateHWSpinlock.c:283:23: warning: implicit declaration of function 'ioctl' [-Wimplicit-function-declaration]
             locked = !ioctl(Mod->fd, HWSPINLOCK_USER_LOCK, &data);
                       ^
GateHWSpinlock_daemon.c: In function 'GateHWSpinlock_getConfig':
GateHWSpinlock_daemon.c:61:9: warning: unused variable 'i' [-Wunused-variable]
     int i;
         ^

Signed-off-by: Angela Stegmaier <angelabaker@ti.com>
7 years agoLinux/Android: MessageQ - Fix Implicit Declaration Warning
Angela Stegmaier [Mon, 27 Mar 2017 18:42:28 +0000 (13:42 -0500)]
Linux/Android: MessageQ - Fix Implicit Declaration Warning

This patch fixes the following compiler warning:

    lad.c:685:17: warning: implicit declaration of function 'MessageQ_announce'

This patch adds the MessageQ_announce prototype to MessageQ.h so
that MessageQ_announce is no longer implicitly declared.

Signed-off-by: Angela Stegmaier <angelabaker@ti.com>
7 years agoMessageQ: Remove Error declaration with local MessageQ object not available
Sam Nelson [Wed, 8 Mar 2017 19:01:31 +0000 (14:01 -0500)]
MessageQ: Remove Error declaration with local MessageQ object not available

There are cases where there is a MessageQ created on a different
process, in which case the local queue obj will be NULL.
The declaration of fail need to be removed.

Signed-off-by: Sam Nelson <sam.nelson@ti.com>
7 years agoLinux: Fix Static Analysis Reported Issues in IPC 3.45 3.45.00.00 3.45.00.00_eng
Angela Stegmaier [Wed, 18 Jan 2017 20:01:13 +0000 (14:01 -0600)]
Linux: Fix Static Analysis Reported Issues in IPC

This patch addresses the following static analysis reported
issues:

In linux/src/api/gates/GateMP.c:
Possible Null Pointer Dereference in GateMP_Instance_finalize

In linux/src/api/gates/GateMutex.c:
Possible Null Pointer Dereference in GateMutex_delete

In linux/src/api/MessageQ.c:
Uninitialized Variable in MessageQ_free

Signed-off-by: Angela Stegmaier <angelabaker@ti.com>
7 years agoQNX: rpmsg-rpc: Add MAP_SHARED to mmap64 Call
Angela Stegmaier [Thu, 19 Jan 2017 16:52:36 +0000 (10:52 -0600)]
QNX: rpmsg-rpc: Add MAP_SHARED to mmap64 Call

With newer QNX kernels, there are issues unless the MAP_SHARED/MAP_PRIVATE
flag is added to the mmap64 call alongside the MAP_PHYS parameter
in rpmsg-rpc.

This patch adds the MAP_SHARED flag to address the issues.

Signed-off-by: Angela Stegmaier <angelabaker@ti.com>
7 years agoDeh: DRA7XX: Add DEH and Watchdog to DSP2 tests
Angela Stegmaier [Tue, 17 Jan 2017 22:46:31 +0000 (16:46 -0600)]
Deh: DRA7XX: Add DEH and Watchdog to DSP2 tests

Add the DEH and Watchdog module to the DSP2 tests for DRA7XX.

Signed-off-by: Angela Stegmaier <angelabaker@ti.com>
7 years agoWatchdog: Add Config to disable Watchdog
Angela Stegmaier [Tue, 17 Jan 2017 22:45:38 +0000 (16:45 -0600)]
Watchdog: Add Config to disable Watchdog

Add a new module config to the Watchdog module that
allows to disable the module. The Watchdog
module is automatically included when Deh module is
included in an image. This parameter allows the user
to disable the watchdog while still using the Deh
module and allows this to be done from a config param
at the application level on the BIOS-side application.

The following can be added to the application config
file to disable Watchdog module (if desired) when including
Deh module.

    WD = xdc.useModule('ti.deh.Watchdog');
    WD.disableWatchdog = true;

There are other ways to disable the watchdog from Linux/Android
that already exist. This method just provides additional
flexibility to the user.

The default value is false if this parameter is not set.
So, if this parameter is not set, the behavior is the same as
before this patch.

Signed-off-by: Angela Stegmaier <angelabaker@ti.com>
7 years agoTests: ping_tasks: Use different description names for each channel
Suman Anna [Tue, 17 Jan 2017 21:33:33 +0000 (15:33 -0600)]
Tests: ping_tasks: Use different description names for each channel

The RPMSG_NS_2.0 feature was introduced to distinguish multiple channels of
the same service type to the host OS. The ping_tasks example however has been
using the same descriptor name for both the services. Use unique names for
each channel so that it conforms to the NS_2.0 design. Also, fixed some minor
incorrect whitespace indentation issues.

Issue found with the recent changes on upstream Linux 4.9 kernel.

Signed-off-by: Suman Anna <s-anna@ti.com>
7 years agoLinux: Update user AF_RPMSG define for 4.7+ kernels
Suman Anna [Thu, 12 Jan 2017 19:20:27 +0000 (13:20 -0600)]
Linux: Update user AF_RPMSG define for 4.7+ kernels

IPC's Linux user space support contains a copy of a few
kernel-defined structs and definitions including the socket
address family used for rpmsg-based sockets - AF_RPMSG. This
definition is always 'one more' than the last address family
defined by the mainline kernel's socket.h.

Prior to Linux 3.9, this was aways 40. Couple of new address
families were introduced in 4.6 (AF_KCM) and 4.7 (AF_QIPCRTR),
and as a result, we needed to set AF_RPMSG to 43 post 4.7 kernel.
The user space header has been updated to reflect on the kernel
version and appropriately assign the value of AF_RPMSG.

Do note that a specific value of AF_RPMSG can always be provided
through the products.mak when KERNEL_INSTALL_DIR is not set.

Signed-off-by: Suman Anna <s-anna@ti.com>
7 years agowatchdog: enable __FAR__ for static variable
Sam Nelson [Thu, 5 Jan 2017 22:18:51 +0000 (17:18 -0500)]
watchdog: enable __FAR__ for static variable

This allows freedom in memory placement of data memory sections.

Signed-off-by: Sam Nelson <sam.nelson@ti.com>
7 years agolad: Skip daemon running check in Android
Misael Lopez Cruz [Wed, 7 Dec 2016 22:38:31 +0000 (16:38 -0600)]
lad: Skip daemon running check in Android

The Android service start already takes care of checking
if the service is already running, so it's not required
to check again if the daemon is running or not.

It's recommended to add an Android service in the init.rc
script file for the lad_dra7xx.  For instance:

  service lad_dra7xx /system/bin/lad_dra7xx -g
      class main
      user media
      group system
      oneshot

The service can be set up to automatically launch when
Android boots or manually started later:

  $ start lad_dra7xx

Directly running the lad_dra7xx executable in Android is
discouraged as the capability to enforce that only one
instance is running is lost.

Signed-off-by: Misael Lopez Cruz <misael.lopez@ti.com>
7 years agolad: Compile lad_dra7xx as app for Android
Misael Lopez Cruz [Wed, 7 Dec 2016 22:38:30 +0000 (16:38 -0600)]
lad: Compile lad_dra7xx as app for Android

lad_dra7xx is being launched as an Android service. The
service status is tracked based on the pid of the binary
run when the service is launched.

In daemon mode, the pid that Android keeps track of is that
of the parent process that started the daemon.  So, the
lad_dra7xx service status is not properly shown.

The lad_dra7xx will be compiled in app mode for Android to
avoid the problem described above.  The lad_dra7xx will
continue as a daemon for Linux.

Signed-off-by: Misael Lopez Cruz <misael.lopez@ti.com>
7 years agomake: Update to build interfaces first 3.44 ipc-3.44-next 3.44.01.01
Sam Nelson [Mon, 12 Dec 2016 16:48:53 +0000 (11:48 -0500)]
make: Update to build interfaces first

This change is aimed to avoid parallel build issues, due to interfaces
not built.

Signed-off-by: Sam Nelson <sam.nelson@ti.com>
7 years agoautotools: Update of autogenerated files
Sam Nelson [Sun, 27 Nov 2016 13:58:48 +0000 (08:58 -0500)]
autotools: Update of autogenerated files

Captures change with subdir-objects removed

Signed-off-by: Sam Nelson <sam.nelson@ti.com>
7 years agoautotools: Update to remove subdir-objects
Sam Nelson [Sun, 27 Nov 2016 13:57:08 +0000 (08:57 -0500)]
autotools: Update to remove subdir-objects

automake has a bug handling subdir-objects.
Removing subdir-objects for now and live with warning to avoid build
issue.

Signed-off-by: Sam Nelson <sam.nelson@ti.com>
7 years agoautoreconf: Linux: Update autotools generated files
Sam Nelson [Wed, 16 Nov 2016 22:22:56 +0000 (17:22 -0500)]
autoreconf: Linux: Update autotools generated files

Check in autoreconf generated files after update to Makefile.am files

Signed-off-by: Sam Nelson <sam.nelson@ti.com>
7 years agoconfigure.ac: Update to avoid warnings with auroreconf 3.44.00.00
Sam Nelson [Sat, 5 Nov 2016 15:37:07 +0000 (11:37 -0400)]
configure.ac: Update to avoid warnings with auroreconf

Without these fixes, the following warnings were seen and now fixed

configure.ac:54: warning: Unknown LT_INIT option `gcc'
linux/src/api/Makefile.am:61: warning: source file
'$(top_srcdir)/linux/src/heaps/HeapStd.c' is in a subdirectory,
linux/src/api/Makefile.am:61: but option 'subdir-objects' is disabled

Signed-off-by: Sam Nelson <sam.nelson@ti.com>
7 years agoMakefile.am: Update to use -pthread
Sam Nelson [Sat, 5 Nov 2016 15:36:20 +0000 (11:36 -0400)]
Makefile.am: Update to use -pthread

Based on gcc documentation and other discussions online, looks like
"-pthread" is required in compile options.
Needed to add -pthread with CFLAGS

Signed-off-by: Sam Nelson <sam.nelson@ti.com>
7 years agoLinux: Add pthread dependency for transport
Karthik Ramanan [Mon, 31 Oct 2016 06:51:59 +0000 (12:21 +0530)]
Linux: Add pthread dependency for transport

On Poky based builds, the ti-ipc compilation results in the below
error:

.libs/libtitransportrpmsg.so: undefined reference to `pthread_join'
                              ~~~~~~~~~~~~~~~~~~~

Signed-off-by: Karthik Ramanan <a0393906@ti.com>
7 years agoBuild scripts: Add far model for ipc data
Sam Nelson [Fri, 28 Oct 2016 15:31:41 +0000 (11:31 -0400)]
Build scripts: Add far model for ipc data

This helps to relocate and place data sections without any restrictions.

Signed-off-by: Sam Nelson <sam.nelson@ti.com>
7 years agoBuild.xs: Add missing files for building A15 libraries in release
Sam Nelson [Fri, 28 Oct 2016 01:49:24 +0000 (21:49 -0400)]
Build.xs: Add missing files for building A15 libraries in release

Without this fix the NonInstrumented example builds fail for K2
platforms with IPC configured for Build.LibType_NonInstrumented

Signed-off-by: Sam Nelson <sam.nelson@ti.com>
7 years agoLinux/Android: Refactor MessageQ_create to Register Later with NameServer
Angela Stegmaier [Thu, 29 Sep 2016 20:47:00 +0000 (15:47 -0500)]
Linux/Android: Refactor MessageQ_create to Register Later with NameServer

In the current MessageQ_create implementation, the NameServer
registration is done early, before local creation in the user
library is done. It is therefore possible that a remote core
could open a MessageQ that is still being created and put a
message to that MessageQ. This can result in dropped messages
or in the worst case a crash.

This patch moves the NameServer registration to the end of
the creation sequence so that the MessageQ cannot be opened
before it is fully created.

A new LAD command called MESSAGEQ_ANNOUNCE is added that is specifically
for registering a previously created MessageQ with the NameServer.

Once all creation is completed and the MessageQ is ready to
receive messages, the MessageQ_create api makes the call to LAD
MESSAGEQ_ANNOUNCE to register with the NameServer.

Signed-off-by: Angela Stegmaier <angelabaker@ti.com>
7 years agoQNX: NameServer: Fix Debug Trace in NameServer_add 3.43 ipc-3.43-next 3.43.03.05
Angela Stegmaier [Wed, 28 Sep 2016 22:02:44 +0000 (17:02 -0500)]
QNX: NameServer: Fix Debug Trace in NameServer_add

Fix a trace in NameServer_add which was assuming a 32-bit aligned
pointer, but the pointer may not be aligned. So, print only the
first byte, as the size of the entry is varaible anyway.

Signed-off-by: Angela Stegmaier <angelabaker@ti.com>