]> Gitweb @ Texas Instruments - Open Source Git Repositories - git.TI.com/gitweb - ipc/ipcdev.git/log
ipc/ipcdev.git
8 years agoMultiproc: Remove internal API MultiProc_rprocSetId
Sam Nelson [Fri, 13 Nov 2015 23:32:44 +0000 (18:32 -0500)]
Multiproc: Remove internal API MultiProc_rprocSetId

- MultiProc_rprocSetId and LAD_RPROC_SETID are no longer needed
  as the out of order download issue is taken care in the
  Remoteproc/RPMSG kernel driver

Signed-off-by: Sam Nelson <sam.nelson@ti.com>
8 years agoLinux: Update autotools generated files
Sam Nelson [Fri, 13 Nov 2015 00:01:35 +0000 (19:01 -0500)]
Linux: Update autotools generated files

- Check in autoreconf-generated files for 66AK2G support.

Signed-off-by: Sam Nelson <sam.nelson@ti.com>
8 years ago66AK2G: Linux: Add support for K2G
Sam Nelson [Fri, 13 Nov 2015 20:36:55 +0000 (15:36 -0500)]
66AK2G: Linux: Add support for K2G

    The C66AK2G device is an A15 + C66 DSP, similar in hardware
    to the TCI663X family of devices.  This commit adds Linux-side
    support.

    Note that this commit doesn't update the autotools-generated
    files.  That will be done in a separate commit.

Signed-off-by: Sam Nelson <sam.nelson@ti.com>
8 years agoRemoteproc: TCI66xx: Fix up resource tables 3.41.00.02_eng
Suman Anna [Fri, 30 Oct 2015 16:37:13 +0000 (11:37 -0500)]
Remoteproc: TCI66xx: Fix up resource tables

The TCI6638/TCI6614 resource table structure definitions are
incorrect - the offset variable was defined to be an array
of 13, whereas the real valid entries are either 2 or 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 remove the current TYPE_CARVEOUT entry as
well, Keystone family of SoCs do not have an MMU, so can not
really support dynamically allocated addresses for text or
data sections.

Signed-off-by: Suman Anna <s-anna@ti.com>
8 years agoQNX: GateMP: Check Number of Resources for Gates Before Mapping
Angela Stegmaier [Thu, 22 Oct 2015 22:00:05 +0000 (17:00 -0500)]
QNX: GateMP: Check Number of Resources for Gates Before Mapping

A recent change to the BIOS-side GateMPSupportNull exposed an issue in
the GateMP module in which it may attempt to map an address of 0x0.
Previously, when GateMPSupportNull was used, the number of resources
was set as 1 and a valid address was obtained. With the update,
the number of resources for GateMPSupportNull is now 0. In this case,
the GateMP code will attempt to map an address of 0x0, of size 0,
which will fail.

This patch fixes the code to first check that the number of resources
is not 0, and only then proceed with the mapping. If the number of
resources is 0, then we skip the mapping for that remote gate.

This patch also makes a minor update to the LOGs for the failure
cases for mapping remoteCustom1InUse and remoteCustom2InUse to
print the proper remote InUse array.

Signed-off-by: Angela Stegmaier <angelabaker@ti.com>
8 years agoipc: transport: Add TCI6638 to use _rpmsg2 library 3.41.00.01_eng
Sam Nelson [Wed, 16 Sep 2015 17:29:03 +0000 (13:29 -0400)]
ipc: transport: Add TCI6638 to use _rpmsg2 library

- RPMSG2 supports RPMSG_NS_2_0 which is default for
  remoteproc driver in kernel version 4.1

Signed-off-by: Sam Nelson <sam.nelson@ti.com>
8 years agotci6638: rpmsg: Add define RPMSG_NS_2_0 for Keystone2 RPMSG
Sam Nelson [Sat, 1 Aug 2015 15:15:54 +0000 (11:15 -0400)]
tci6638: rpmsg: Add define RPMSG_NS_2_0 for Keystone2 RPMSG

- Note this will break backward compatiblity with keystone2 remoteproc driver
  based on kernel version 3.10.x
- RPMSG_NS_2_0 is default for keystone2 remoteproc driver
  based on kernel version 4.1

Signed-off-by: Sam Nelson <sam.nelson@ti.com>
8 years agotci6638: VirtQueue: Remove per core patch of the vring address
Sam Nelson [Sat, 1 Aug 2015 15:14:58 +0000 (11:14 -0400)]
tci6638: VirtQueue: Remove per core patch of the vring address

- Update VirtQueue driver to remove the per core patching of Vring address
- This patch was required with the keystone 2 remoteproc driver
  based on kernel version 3.10.x
- No longer needed for kernel drivers added on the 4.1 2015 LTS kernel
  for keystone2
- Currently putting under #ifdef in case customer wants use it to use
  with older kernel

Signed-off-by: Sam Nelson <sam.nelson@ti.com>
8 years agoEnable Examples Compilation with C++ Compiler
Angela Stegmaier [Wed, 23 Sep 2015 20:56:31 +0000 (15:56 -0500)]
Enable Examples Compilation with C++ Compiler

Attempting to compile the examples and tests in Linux with
the c++ compiler resulted in the following errors:

In file included from MessageQApp.c:46:0:
../../../packages/ti/ipc/Ipc.h:148:22: error: ‘<anonymous>’ has incomplete type
../../../packages/ti/ipc/Ipc.h:148:26: error: invalid use of ‘Void {aka void}’

In file included from ../../../linux/include/_lad.h:50:0,
                 from ../../../linux/include/ladclient.h:58,
                 from LAD_client.c:48:
../../../linux/include/_GateMP.h:78:3: error: conflicting declaration 'typedef struct GateMP_Object GateMP_Object'
In file included from ../../../linux/include/_lad.h:49:0,
                 from ../../../linux/include/ladclient.h:58,
                 from LAD_client.c:48:
../../../packages/ti/ipc/GateMP.h:222:16: error: 'struct GateMP_Object' has a previous declaration as 'struct GateMP_Object

This patch fixes these compilation issues so that the Linux examples can
be compiled with c++. Note that this patch does not have complete
changes to allow IPC to be compiled using the c++ compiler, but only
the examples.

Signed-off-by: Angela Stegmaier <angelabaker@ti.com>
8 years agoDisable entry/exit trace in some List_* functions in QNX
vwan@ti.com [Mon, 24 Aug 2015 17:07:46 +0000 (10:07 -0700)]
Disable entry/exit trace in some List_* functions in QNX

Some functions in the List module are called with interrupts disabled. When
these functions write to the slog (IPC_DEBUG_SLOG_LEVEL=7), a hard hang
is occasionally observed. This patch disables the entry/exit trace in these
functions to prevent the system from entering the deadlock state.

Signed-off-by: VW <vwan@ti.com>
8 years agoImprove MessageQ recovery on DRA7xx QNX
vwan@ti.com [Mon, 24 Aug 2015 16:59:45 +0000 (09:59 -0700)]
Improve MessageQ recovery on DRA7xx QNX

Previously, after recovery, an application using MessageQ is expected to
terminate. We are now improving this by having MessageQ_get/put return
MessageQ_E_SHUTDOWN after recovery is performed, upon which the application
can cleanup, and call Ipc_stop and Ipc_start to "restart" IPC. After that the
application can use IPC again.

This commit also adds a Fault test to validate this behavior.

This is to address CQ SDOCM00116175.

Signed-off-by: VW <vwan@ti.com>
Signed-off-by: Angela Stegmaier <angelabaker@ti.com>
8 years agoMerge remote-tracking branch 'origin/ipc-3.40-next' into ipc-next
Angela Stegmaier [Mon, 5 Oct 2015 18:07:14 +0000 (13:07 -0500)]
Merge remote-tracking branch 'origin/ipc-3.40-next' into ipc-next

8 years agoTests: ping_rpmsg: Update Test with Proper Socket Usage
Angela Stegmaier [Fri, 4 Sep 2015 15:58:40 +0000 (10:58 -0500)]
Tests: ping_rpmsg: Update Test with Proper Socket Usage

This test was incorrectly using a socket that was connected
to a remote endpoint to receive messages on the HOST. The
remote core was using the source address to send the response
when communicating with an rpmsg-proto channel, which is not
a valid use of the rpmsg-proto channel. Only sockets which
have been bound to a local endpoint by the application should
be used to receive messages.

When the remote core sends a message to an endpoint that
is associated with a channel, there is a kernel crash because
the private data for that endpoint is not as expected.

Update the test case to properly use rpmsg-proto. With these
updates, the test case now passes and there is no kernel
crash.

Signed-off-by: Angela Stegmaier <angelabaker@ti.com>
8 years agoQNX: Fix Trace Dump Core ID Bug
Angela Stegmaier [Tue, 29 Sep 2015 21:24:27 +0000 (16:24 -0500)]
QNX: Fix Trace Dump Core ID Bug

During error recovery, the IPC resource manager will dump
the current traces for each remote core to a log file, if
a log file was specified when launching the IPC. At the
beginning of each core's trace dump, a header is printed
to identify which core's traces were being printed. This
trace was incorrectly using "i" instead of "id" to index
the firmware array, resulting in an incorrect remote core
id being printed in the header. This could even index the
array beyond the valid range and cause a crash in IPC.

This patch fixes the index so that it uses the proper
variable ("id"), and also modifies the header to print
the more user-friendly remote proc name instead of the
remote proc ID.

Signed-off-by: Angela Stegmaier <angelabaker@ti.com>
8 years agoMove Interrupt and NotifyCircSetup modules into tci663x
Ramsey Harris [Fri, 25 Sep 2015 23:19:51 +0000 (16:19 -0700)]
Move Interrupt and NotifyCircSetup modules into tci663x

Consolidate Interrupt and NotifyCircSetup modules from package
ti.ipc.family.tci6638 into package ti.sdo.ipc.family.tci663x.
This package is now able to support both Linux and non-Linux
configurations. Replace Interrupt binding in VirtQueue with a
proxy. Existing configurations will receive a warning when using
the deprecated modules. The Interrupt module snoops for VirtQueue
and NotifyCircSetup to avoid host conflict. Remove deprecated
modules from custom build flow.

8 years agoFix test dual_transports to comply with MessageQApp
Ramsey Harris [Fri, 25 Sep 2015 22:55:58 +0000 (15:55 -0700)]
Fix test dual_transports to comply with MessageQApp

The host program MessageQApp was modified to pass the message Id
in the payload instead of the message header. Update DSP program
with SyncMsg data type to access message Id in payload.

8 years agoSDOCM00115347 Keystone 2 Interrupt module doesn't validate HOST
Ramsey Harris [Tue, 15 Sep 2015 17:51:11 +0000 (10:51 -0700)]
SDOCM00115347 Keystone 2 Interrupt module doesn't validate HOST

Add config validate function to ensure host processor is first
in the MultiProc name list array. The Interrupt module makes
this assumption; it will fail otherwise.

8 years agoQNX: Fix in trace buffer dump during recovery
Buddy Liong [Tue, 19 May 2015 14:11:23 +0000 (09:11 -0500)]
QNX: Fix in trace buffer dump during recovery

During the recovery, in deinit_ipc(), the IPC resource manager will
try to dump the remote core trace information to a file. There is a
possibility that the trace buffer may have become corrupted as a result
of the crash on the remote core and that the write index, which resides
in the trace buffer, has become corrupted as well. In this situation,
there is a potential that the trace dump code will read beyond the mapped
buffer for the TRACE BUF memory, causing the system to crash and be
unable to recover. At this point a system restart is required to
recover the system.

There should be a check to make sure that the trace dump code is not
indexing beyond the end of the trace buffer.

Signed-off-by: Buddy Liong <buddy.budiono@ti.com>
Signed-off-by: Angela Stegmaier <angelabaker@ti.com>
8 years agoInitial Keystone 2 Galileo build support on DSP
Ramsey Harris [Mon, 14 Sep 2015 23:30:54 +0000 (16:30 -0700)]
Initial Keystone 2 Galileo build support on DSP

Add new device name 66AK2G to top-level products.mak file. Add
device TCI66AK2G02 alias to ti.sdo.ipc.family.Settings.

8 years agoSDOCM00115293 Linux transport interfaces need documentation
Ramsey Harris [Mon, 14 Sep 2015 17:34:22 +0000 (10:34 -0700)]
SDOCM00115293 Linux transport interfaces need documentation

Add documentation to Linux transport interface header files.

8 years agoRemove transport network interface hack
Ramsey Harris [Fri, 11 Sep 2015 22:45:41 +0000 (15:45 -0700)]
Remove transport network interface hack

Delete the INetworkTransportDummy interface. This file was
overlooked when removing the transport network hack.

8 years agoEliminate config warning raised by ti.sdo.ipcmgr
Ramsey Harris [Fri, 11 Sep 2015 21:14:04 +0000 (14:14 -0700)]
Eliminate config warning raised by ti.sdo.ipcmgr

Replace xdc.loadPackage of ti.sdo.ipcmgr with xdc.useModule
of ti.sdo.ipcmgr.IpcMgr.

8 years agoRemove references to package ti.sdo.ipc.family.f28m35x
Ramsey Harris [Fri, 11 Sep 2015 17:20:36 +0000 (10:20 -0700)]
Remove references to package ti.sdo.ipc.family.f28m35x

Support has been removed for the f28 device. Remove old references.

8 years agoSDOCM00077054 NameServer UG needs to document calling contexts
Ramsey Harris [Wed, 9 Sep 2015 22:47:09 +0000 (15:47 -0700)]
SDOCM00077054 NameServer UG needs to document calling contexts

Document the fact that NameServer_get cannot be called from Hwi
or Swi context. This was the main point of the bug report.

8 years agoFor custom builds, add missing package dependencies
Ramsey Harris [Tue, 8 Sep 2015 22:13:48 +0000 (15:13 -0700)]
For custom builds, add missing package dependencies

When using the custom IPC build option, the link order of
some packages is pseudo-random. This results in linker errors.
In ti.sdo.ipc.close(), add a package dependency to modules
participating in the custom build flow.

8 years agoc28: remove c28 support
Chris Ring [Wed, 9 Sep 2015 18:25:49 +0000 (11:25 -0700)]
c28: remove c28 support

Delete C28-related packages, and remove build-related support.

Signed-off-by: Chris Ring <cring@ti.com>
8 years agoQNX: Modification for QNX 6.5 compilation 3.40.01.07_eng 3.40.01.08
Buddy Liong [Fri, 7 Aug 2015 21:16:01 +0000 (16:16 -0500)]
QNX: Modification for QNX 6.5 compilation

This patch introduces the changes needed so that
the QNX IPC can be compiled against QNX SDP 6.5.0.

Where needed, a check is made to make one call
when compiling against QNX SDP 6.6 and another
call when compiling against QNX SDP 6.5 in order
to take advantage of the newer functionality of
QNX SDP 6.6.

Signed-off-by: Buddy Liong <a0270631@ti.com>
Signed-off-by: Angela Stegmaier <angelabaker@ti.com>
8 years agoSDOCM00118895 Missing access qualifier FAR in RPMessage module
Ramsey Harris [Fri, 4 Sep 2015 20:37:55 +0000 (13:37 -0700)]
SDOCM00118895 Missing access qualifier FAR in RPMessage module

Add missing __FAR__ access qualifier to extern symbol declarations.

8 years agoSDOCM00118574 Remove interface hack from transport package
Ramsey Harris [Fri, 4 Sep 2015 20:56:48 +0000 (13:56 -0700)]
SDOCM00118574 Remove interface hack from transport package

Remove the module TransportNetworkDummy from the transports package
and remove reference to the module in MessageQ.

8 years agoSDOCM00118895 Missing access qualifier FAR in RPMessage module
Ramsey Harris [Fri, 4 Sep 2015 20:37:55 +0000 (13:37 -0700)]
SDOCM00118895 Missing access qualifier FAR in RPMessage module

Add missing __FAR__ access qualifier to extern symbol declarations.

8 years agoSDOCM00069628 GateMPSupportNull.getNumResources should return '0'
Ramsey Harris [Wed, 2 Sep 2015 17:23:53 +0000 (10:23 -0700)]
SDOCM00069628 GateMPSupportNull.getNumResources should return '0'

Fix metaonly module function to return zero instead of one.

8 years agoSDOCM00114683 Display QueueId in ROV for reserved queues
Ramsey Harris [Wed, 26 Aug 2015 21:59:52 +0000 (14:59 -0700)]
SDOCM00114683 Display QueueId in ROV for reserved queues

Add a column to the queue view to indicate reserved status. Render
name as '<null>' for anonymous queues. Remove old debug messages.

8 years agoEnable PM in test_omx test executables on DRA7xx DSPs 3.40.00.05_eng 3.40.00.06 3.41.00.00_eng
vwan@ti.com [Wed, 19 Aug 2015 00:52:47 +0000 (17:52 -0700)]
Enable PM in test_omx test executables on DRA7xx DSPs

This commit enables power management on DRA7xx DSPs in test_omx test
executables for the LCPD SDK.

Signed-off-by: VW <vwan@ti.com>
8 years agoExport source files of ti.pm package
vwan@ti.com [Fri, 7 Aug 2015 17:53:26 +0000 (10:53 -0700)]
Export source files of ti.pm package

Signed-off-by: VW <vwan@ti.com>
8 years agoAdd power management support to DRA7xx DSP (part 3)
vwan@ti.com [Mon, 10 Aug 2015 23:02:28 +0000 (16:02 -0700)]
Add power management support to DRA7xx DSP (part 3)

Some additional changes that were inadvertently left out of the previous PM
patch are added back here:

- Change tests to turn off PM on DSPs by default for build to proceed without
requiring the workaround
- Minor cleanup (copyright, spacing, file name changes)

This is towards addressing CQ SDOCM00117446.

Signed-off-by: VW <vwan@ti.com>
8 years agoReset heapId after reading socket in TransportRpmsg
Ramsey Harris [Fri, 7 Aug 2015 21:26:26 +0000 (14:26 -0700)]
Reset heapId after reading socket in TransportRpmsg

TransportRpmsg is a copy based transport. All inbound messages are
allocated from HeapStd. After reading message header, must reset the
heapId to match the registered heapId for HeapStd.

8 years agoFix memory allocation for L2 translation tables in QNX for DRA7xx DSP 3.40.00.04_eng
vwan@ti.com [Fri, 7 Aug 2015 17:14:17 +0000 (10:14 -0700)]
Fix memory allocation for L2 translation tables in QNX for DRA7xx DSP

This commit fixes the memory allocation for L2 translation tables so
that no memory corruption occur when multiple L2 table entries are
required for mapping the memory specified in a custom resource table.

This addresses CQ SDOCM00117156.

Signed-off-by: VW <vwan@ti.com>
8 years agoAdd power management support to DRA7xx DSP (part 2)
vwan@ti.com [Mon, 3 Aug 2015 21:40:27 +0000 (14:40 -0700)]
Add power management support to DRA7xx DSP (part 2)

This commit ties up a few loose ends that were introduced in a previous commit
to add PM support for the DSP:

- Add a workaround for a silicon bug in which the DSP would hang when the idle
instruction is invoked while it is placed in external memory and prefetch is
enabled
- Remove unnecessary Swi thread and call IpcPower_suspend in Task context
- Add support for DSP2
- Add a null implementation for IpcPower that is compiled in when BIOS Power
module is not used. This is simply to satisfy all existing call sites that
are calling into IpcPower regardless if PM is enabled. It also prevents the
BIOS Power module from being unnecessarily linked in when it is not needed.
A possible future enhancement would be to look into compiling out these
call sites when PM is not enabled.

This is towards addressing CQ SDOCM00117446.

Signed-off-by: VW <vwan@ti.com>
8 years agoSDOCM00114069 IPC custom build does not include files from ti/ipc
Ramsey Harris [Thu, 30 Jul 2015 00:02:50 +0000 (17:02 -0700)]
SDOCM00114069 IPC custom build does not include files from ti/ipc

Update packages in ti.ipc to either contribute to IPC product libraries
or build package product libraries. Participate in custom build flow.
Make ti.sdo.ipc.Build aware of ti.ipc packages. Use full package name
for all source files.

8 years agoLinux: tests - Clear Fault Request After Processing
Angela Stegmaier [Thu, 30 Jul 2015 21:05:31 +0000 (16:05 -0500)]
Linux: tests - Clear Fault Request After Processing

Once the requested fault has been processed, the fault
id should be cleared so that the next time the loop runs,
further input is not required from the user to continue
the test.

Signed-off-by: Angela Stegmaier <angelabaker@ti.com>
8 years agoAndroid: tests - Add the Fault Test App to Android Makefile
Angela Stegmaier [Thu, 30 Jul 2015 17:53:36 +0000 (12:53 -0500)]
Android: tests - Add the Fault Test App to Android Makefile

Add the Fault test app to the Android makefile so that
it can be built for testing on Android.

Signed-off-by: Angela Stegmaier <angelabaker@ti.com>
8 years agoAndroid: Build: Add HeapStd to Android Build
Angela Stegmaier [Thu, 30 Jul 2015 22:01:15 +0000 (17:01 -0500)]
Android: Build: Add HeapStd to Android Build

Since HeapStd is now referenced from the Ipc module,
the HeapStd source file needs to be added to the Android
build also.

Signed-off-by: Angela Stegmaier <angelabaker@ti.com>
8 years agoAdd Linux fault test to git-ignore list
Ramsey Harris [Thu, 30 Jul 2015 16:37:55 +0000 (09:37 -0700)]
Add Linux fault test to git-ignore list

8 years agoRemove NameServer instance from module list in NameServer_delete() 3.40.00.03_eng
Robert Tivy [Tue, 21 Jul 2015 23:56:43 +0000 (16:56 -0700)]
Remove NameServer instance from module list in NameServer_delete()

NameServer_delete() frees the memory for the NameServer instance
(NameServer_Handle), and if the instance is not removed from the
module objList then a subsequent NameServer_getHandle() call will
crash LAD due to a corrupt list (since one of the elements in the
list was free()d).

8 years agoGenerated makefiles for IHeap support
Ramsey Harris [Thu, 23 Jul 2015 21:44:37 +0000 (14:44 -0700)]
Generated makefiles for IHeap support

These generated makefiles compliment the Makefile.am changes needed
to support the IHeap interface.

8 years agoSDOCM00115093 Multiple heap support for MessageQ
Ramsey Harris [Wed, 22 Jul 2015 21:19:07 +0000 (14:19 -0700)]
SDOCM00115093 Multiple heap support for MessageQ

Add IHeap interface to support heap abstraction within IPC.
MessageQ uses interface handle to invoke heap alloc and free
methods. Add HeapStd implementation as default heap instance
on Linux. New idHeapStd config param in Ipc module to specify
heapId when registering default heap with MessageQ. Not
supported on QNX.

8 years agoMerge remote-tracking branch 'origin/3.36' into ipc-next
Robert Tivy [Fri, 24 Jul 2015 20:48:41 +0000 (13:48 -0700)]
Merge remote-tracking branch 'origin/3.36' into ipc-next

8 years agoAdd missing copyright header to file
Ramsey Harris [Wed, 22 Jul 2015 23:12:56 +0000 (16:12 -0700)]
Add missing copyright header to file

8 years agoAdd log events to NameServer and NameMap
Ramsey Harris [Mon, 20 Jul 2015 22:54:22 +0000 (15:54 -0700)]
Add log events to NameServer and NameMap

Add attach and detach log events to NameServer (look in LAD log).
NameMap runs on slave processor. Add log event for name announcement
message sent to host processor.

8 years agoInclude RPMessage in the configuration model 3.36 ipc-3.36-next 3.36.02.13
Ramsey Harris [Thu, 9 Jul 2015 17:06:55 +0000 (10:06 -0700)]
Include RPMessage in the configuration model

The real fix is to have the user config script pull in the
IpcMgr module and to set the tansportCombo config param.
Then the IpcMgr would bring in RPMessage if needed.

8 years agoAdd support for device TMS320C66AK2H12
Robert Tivy [Wed, 8 Jul 2015 22:37:43 +0000 (15:37 -0700)]
Add support for device TMS320C66AK2H12

Equate TMS320C66AK2H12 with TMS320TCI6634

Since there is no platform yet that contains this device, a top-level
tree build won't build any tests in <ipc>/packages/ti/ipc/tests when
using a custom platform that contains the TMS320C66AK2H12 device.

Addresses SDOCM00117546

8 years agoSDOCM00115097 RPMessage (Linux) has large data footprint
Ramsey Harris [Wed, 8 Jul 2015 21:40:50 +0000 (14:40 -0700)]
SDOCM00115097 RPMessage (Linux) has large data footprint

Replace dynamic creation of message pool with static creation
using config params. This allows for the configuration of the
pool size from the application config script. Make RPMessage
into a meta-only module. Add module template file to generate
a C symbol for the config param.

8 years agoPrevent %-by-0 in Assert_isTrue() expressions 3.40.00.02_eng
Robert Tivy [Sat, 27 Jun 2015 00:29:48 +0000 (17:29 -0700)]
Prevent %-by-0 in Assert_isTrue() expressions

A few "assert" expressions were using
    <var> % SharedRegion_getCacheLineSize(obj->regionId)
which will generate a "modulo-by-0" error if
    SharedRegion_getCacheLineSize(obj->regionId)
evaluates to (returns) 0.

Fix this by prefacing that expresssion with
    SharedRegion_getCacheLineSize(obj->regionId) == 0 || <expr>

Addresses SDOCM00117013

8 years agoChange error-related printf()s to fprintf(stderr)
Robert Tivy [Fri, 26 Jun 2015 22:45:51 +0000 (15:45 -0700)]
Change error-related printf()s to fprintf(stderr)

Addresses SDOCM00115404.

8 years agoAdd Power module to gatempapp.cfg
Robert Tivy [Fri, 26 Jun 2015 01:19:39 +0000 (18:19 -0700)]
Add Power module to gatempapp.cfg

8 years agoAdd power management support to DRA7xx DSP
vwan@ti.com [Thu, 25 Jun 2015 05:13:55 +0000 (22:13 -0700)]
Add power management support to DRA7xx DSP

This commit adds support for power management in IPC, by adding an IpcPower
module for the DRA7xx DSP. It also modifies the tests to build with
the BIOS Power module. However, the IpcPower_idle function is not plugged in by
default, so auto-suspend will not take place.

Currently only DSP1 is supported, with the caveat that CCS needs to be used
to first connect to the DSP and 'kick' the device out of idle before
auto-suspend would work. Also the DSP may go into a 'hung state' after
a large number of messages has been exchanged when IpcPower_idle is plugged
in.

This is a first step towards addressing CQ SDOCM00117446.

Signed-off-by: VW <vwan@ti.com>
8 years agoAdd FD_CLOEXEC flag for sockets, /dev/mem and LAD pipes 3.36.02.12_eng 3.40.00.01_eng
Robert Tivy [Thu, 18 Jun 2015 22:28:56 +0000 (15:28 -0700)]
Add FD_CLOEXEC flag for sockets, /dev/mem and LAD pipes

If a user application calls system() to launch another Ipc application
then that launched application will inherit open file descriptors from
its parent application, which is not desired (except maybe for stdin/
stdout/stderr).  This happens because of the underlying fork() & exec()
calls performed by the system() API.

8 years agoMerge branch '3.36' into ipc-next
Robert Tivy [Fri, 19 Jun 2015 18:11:05 +0000 (11:11 -0700)]
Merge branch '3.36' into ipc-next

8 years agoFix Linux GateMP bug by introducing new GateMP_attach(procId) API 3.36.01.10_eng 3.36.01.11
Robert Tivy [Wed, 20 May 2015 01:17:21 +0000 (18:17 -0700)]
Fix Linux GateMP bug by introducing new GateMP_attach(procId) API

Previous to the introduction of Linux Ipc_attach() and NameServer_attach(),
LAD would effectively "attach" to GateMP via NameServer_setup() and
GateMP_setup(), all before opening the command FIFO and accepting commands
from clients.  This worked because NameServer_setup() had internal code
that would perform the "attach" functionality, allowing GateMP_setup() to
proceed.

Now that NameServer_attach() has been introduced, NameServer_setup() no
longer performs the "attach" functionality.  But Ipc_start() now needs to
call Ipc_attach() which, in turn, calls NameServer_attach(), but before
doing so Ipc_start must connect and communicate with LAD.  However, LAD
gets stuck in the pre-FIFO GateMP_setup() since NameServer has not yet
attached, which caused Ipc_start() to hang waiting to connect to LAD
(since there was no command FIFO yet).  In a nutshell, a deadlock.

This is fixed by introducing GateMP_attach(procId), which is called by
Ipc_attach().  GateMP_attach() performs the functionality that was
getting stuck in GateMP_setup() (and GateMP_setup() is pared down to not
need to "attach").

GateMP_detach(procId) is also introduced and called by Ipc_detach().
While these APIs can be called by the advanced user, they are considered
to be "internal" APIs.

8 years agoSDOCM00116544 Cache management for ARM speculative execution
Ramsey Harris [Wed, 20 May 2015 15:08:24 +0000 (08:08 -0700)]
SDOCM00116544 Cache management for ARM speculative execution

The ARM Cortex-A15 processor performs speculative execution on
the instruction stream. This might pull unwanted data into the
cache. The ListMP module expects shared data to be absent from
the cache. However, when running on ARM, we cannot count on the
data to be absent from the cache. A cache invalidate operation
is required.

8 years agoFix compiler warning when asserts are disabled
Ramsey Harris [Sat, 16 May 2015 00:28:24 +0000 (17:28 -0700)]
Fix compiler warning when asserts are disabled

Removed the use of a temporary variable which becomes set but
never used when asserts are disabled.

8 years agoSilence unused variable warning when asserts disabled
Ramsey Harris [Mon, 18 May 2015 15:29:16 +0000 (08:29 -0700)]
Silence unused variable warning when asserts disabled

8 years agoChange default polling interval for default gate in QNX to 10 ms
vwan@ti.com [Thu, 14 May 2015 18:56:13 +0000 (11:56 -0700)]
Change default polling interval for default gate in QNX to 10 ms

This commit decreases the default polling interval for the default gate during
GateMP_setup to 10 ms. This is so that slave executables that may take a bit
longer to boot up and create the default gate do not cause the IPC driver to
wait for a full second before retrying the poll, reducing the driver
startup time in such cases.

Signed-off-by: VW <vwan@ti.com>
8 years agoUpdate help text in QNX IPC driver to show support for DSP2 3.36.01.08_eng 3.36.01.09_eng
vwan@ti.com [Thu, 14 May 2015 17:21:29 +0000 (10:21 -0700)]
Update help text in QNX IPC driver to show support for DSP2

Signed-off-by: VW <vwan@ti.com>
8 years agoFix typo in error message 3.40.00.00_eng
vwan@ti.com [Mon, 11 May 2015 22:13:53 +0000 (15:13 -0700)]
Fix typo in error message

Signed-off-by: VW <vwan@ti.com>
8 years agoWrap the ARM assembly statement in a check for GNU compiler and ARM architecture... 3.36.00.07
Ramsey Harris [Fri, 8 May 2015 16:16:45 +0000 (09:16 -0700)]
Wrap the ARM assembly statement in a check for GNU compiler and ARM architecture version 7.

8 years agoAdded recursive mutex initializer for Android
Robert Tivy [Fri, 8 May 2015 03:20:18 +0000 (20:20 -0700)]
Added recursive mutex initializer for Android

8 years agoDon't build test package when building only libraries
Ramsey Harris [Fri, 8 May 2015 00:30:44 +0000 (17:30 -0700)]
Don't build test package when building only libraries

8 years agoAdd data memory barrier to transport swi function
Ramsey Harris [Fri, 8 May 2015 00:16:17 +0000 (17:16 -0700)]
Add data memory barrier to transport swi function

On ARM processor, observed stale data in cache when attempting
to deliver an inbound message. This resulted in undelivered
message. Adding the DMB instruction seems to help, but I'm
unable to explain the exact failure details.

8 years agoGeneral cleanup in fault test
Robert Tivy [Fri, 8 May 2015 00:08:21 +0000 (17:08 -0700)]
General cleanup in fault test

8 years agoAdd new command-line options to LAD to override static defaults
Robert Tivy [Thu, 7 May 2015 23:53:51 +0000 (16:53 -0700)]
Add new command-line options to LAD to override static defaults

Add -n <nprocs> support for overriding the total number of processors
in the system (not to be confused with number of processors in cluster).

Add -r <nreserve> support for overriding the number of reserved
MessageQ queues.

Add -s <synctype> support for overriding the Ipc_ProcSync_* type (can
be -s ALL|PAIR|NONE).

8 years agoThrow error if configured device not found in Watchdog deviceTable
Robert Tivy [Thu, 7 May 2015 23:23:14 +0000 (16:23 -0700)]
Throw error if configured device not found in Watchdog deviceTable

Previously Watchdog.xs would cryptically error out if an unsupported
device tried to use Deh.  This change produces a clean error statement.

8 years agoCreate specialized gates to prevent deadlock on general gate
Robert Tivy [Thu, 7 May 2015 22:09:08 +0000 (15:09 -0700)]
Create specialized gates to prevent deadlock on general gate

The MessageQ module was using a single gate for all critical sections.
Since MessageQ functions are called by TransportRpmsg's listener
thread while another thread is inside the general gate, it's necessary
to have finer-grained gating in MessageQ.

Create a seqNumGate to protect the module's seqNum modifications, so
that MessagQ_alloc can be called by the transport's thread.

Create a msgListGate to protect a MessageQ_Object's msgList, so that
MessageQ_put can be called by the transport's thread.

Change module's general gate to be recursive, so that _MessageQ_grow
can be called from within MessageQ_create's gated community.

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.