]> Gitweb @ Texas Instruments - Open Source Git Repositories - git.TI.com/gitweb - ipc/ipcdev.git/log
ipc/ipcdev.git
9 years agoUse core-specific WUGEN masks for suspend on OMAP 3.23.00.01
Robert Tivy [Wed, 13 Aug 2014 23:42:38 +0000 (16:42 -0700)]
Use core-specific WUGEN masks for suspend on OMAP

The WUGEN event masks for each core are set to values appropriate
for the architecture and core.

A new API is added that allows the application to control the WUGEN
event mask (IpcPower_{get,set}WugenEvtMask()).

Addresses CQ SDOCM00108585.

9 years agoUpdate QNX Makefile to setup environment for QNX 6.6.0
vwan@ti.com [Tue, 12 Aug 2014 23:27:54 +0000 (16:27 -0700)]
Update QNX Makefile to setup environment for QNX 6.6.0

Signed-off-by: VW <vwan@ti.com>
9 years agoLinux: GameMP inUse arrays had invalid address mappings
Arnie Reynoso [Wed, 13 Aug 2014 18:14:22 +0000 (11:14 -0700)]
Linux: GameMP inUse arrays had invalid address mappings

The GameMP address for the inUse arrays were being assigned incorrectly.
A page alignment was originally needed to properly map the arrays in
user space. After mapping, the alignment difference wasn't being taken
into consideration.

9 years agoAdd late-attach support for IPUs in QNX
vwan@ti.com [Thu, 14 Aug 2014 00:31:23 +0000 (17:31 -0700)]
Add late-attach support for IPUs in QNX

This commit addresses CQ SDOCM00108582.

Signed-off-by: VW <vwan@ti.com>
9 years agoFixed bad array reference in IPU ducati interrupt handler.
Ramsey Harris [Fri, 8 Aug 2014 23:04:22 +0000 (16:04 -0700)]
Fixed bad array reference in IPU ducati interrupt handler.

The ducati ISR was still using the vayu virtual processor IDs
instead of the new tda3xx ones.

9 years agoFixed incorrect mailbox table entry for tda3xx 3.30.00.03_eng
Ramsey Harris [Fri, 8 Aug 2014 19:57:10 +0000 (12:57 -0700)]
Fixed incorrect mailbox table entry for tda3xx

For TDA3xx, the IPU1-0 to EVE1 entry in the mailbox table was
incorrect. User should be 0 instead of 4.

9 years agoAdded TDA3XX device support. 3.30.00.02_eng
Ramsey Harris [Thu, 7 Aug 2014 20:48:34 +0000 (13:48 -0700)]
Added TDA3XX device support.

Added new family package for tda3xx device. Shared memory notify
driver is working but mailbox driver is not. Minimal testing with
ex11_ping example.

9 years agoAdded TDA3X device to ipc delegate table.
Ramsey Harris [Wed, 6 Aug 2014 00:06:04 +0000 (17:06 -0700)]
Added TDA3X device to ipc delegate table.

9 years agoAdded new TDA3xx platform.
Ramsey Harris [Wed, 6 Aug 2014 00:04:06 +0000 (17:04 -0700)]
Added new TDA3xx platform.

9 years agoPrevent responses to timed-out NameServer requests from disrupting later reqs 3.23.00.00_eng
vwan@ti.com [Tue, 22 Jul 2014 20:07:20 +0000 (13:07 -0700)]
Prevent responses to timed-out NameServer requests from disrupting later reqs

This commit fixes the issue in SDOCM00112106 in QNX and BIOS. It adds a
sequence number to each NameServer message, so that when responses come
back this number can be used to identify the relevant response and ignore
the stale ones.

Signed-off-by: VW <vwan@ti.com>
9 years agoLinux: Addresses timed-out NameServer requests in LAD
Arnie Reynoso [Wed, 23 Jul 2014 20:37:40 +0000 (13:37 -0700)]
Linux: Addresses timed-out NameServer requests in LAD

    This commit fixes the issue in SDOCM00112106 on the Linux side. It
    adds a sequence number to NameServer message so that responses can
    be properly identified.

9 years agoFix MultiProc_self() in QNX to return the correct value
vwan@ti.com [Tue, 22 Jul 2014 22:23:51 +0000 (15:23 -0700)]
Fix MultiProc_self() in QNX to return the correct value

This commit fixes MultiProc_getConfig, so that its returned data structure
does not get corrupted. This in turn fixes MultiProc_self(), which
was returning the corrupted id.

This addresses CQ SDOCM00108594.

Signed-off-by: VW <vwan@ti.com>
9 years agoAdd option to provide a valid path to crash dump file in QNX
vwan@ti.com [Fri, 27 Jun 2014 20:37:52 +0000 (13:37 -0700)]
Add option to provide a valid path to crash dump file in QNX

This commit fixes an error that occurs during the recovery process when
an invalid path is used to store the contents of the remote core logs.
The -c flag can now be passed to the resource manager to specify a valid
path for the file.

This also changes a few instances where error messages were referring to
"syslink".

It addresses SDOCM00108056.

Signed-off-by: VW <vwan@ti.com>
9 years agoMerge tag '3.22.02.11' into ipc-next
Chris Ring [Tue, 22 Jul 2014 23:31:37 +0000 (16:31 -0700)]
Merge tag '3.22.02.11' into ipc-next

3.22.02.11

9 years agoAdd MmServiceMgr_getId() to allow retrieval of service instance id 3.22 ipc-3.22-next 3.22.02.10_eng 3.22.02.11
vwan@ti.com [Wed, 16 Jul 2014 01:08:45 +0000 (18:08 -0700)]
Add MmServiceMgr_getId() to allow retrieval of service instance id

This commit adds MmServiceMgr_getId() to allow skeleton functions and service
deletion functions to retrieve the instance id it is acting upon. It also
reverts previous support for MmRpc_getId() and MmServiceMgr_register2.

Signed-off-by: VW <vwan@ti.com>
9 years agoMerge remote-tracking branch 'origin/3.22' into ipc-next
Chris Ring [Fri, 11 Jul 2014 05:19:11 +0000 (22:19 -0700)]
Merge remote-tracking branch 'origin/3.22' into ipc-next

9 years agoReduce sizes of data footprint heavy hitters for benefit of K2E 3.22.02.09_eng
Robert Tivy [Wed, 25 Jun 2014 00:36:57 +0000 (17:36 -0700)]
Reduce sizes of data footprint heavy hitters for benefit of K2E

Since K2E has "only" 512 KB of L2SRAM (other Keystone devices have
1024 KB or more), and since Keystone is modeled to put everything in
L2SRAM, reduce the size of BIOS heap, SysMin buffer, and MessageQ heap.

Also remove NameServerApp from K2E's tests since it is still blowing
its memory budget (will fix later).

9 years agoUpdate help text of rpmsg-rpc-stress test for new options
vwan@ti.com [Tue, 24 Jun 2014 18:41:39 +0000 (11:41 -0700)]
Update help text of rpmsg-rpc-stress test for new options

Signed-off-by: VW <vwan@ti.com>
9 years agoSupport in QNX MmRpc/MmServiceMgr to identify deleted instance during cleanup
vwan@ti.com [Fri, 20 Jun 2014 17:24:48 +0000 (10:24 -0700)]
Support in QNX MmRpc/MmServiceMgr to identify deleted instance during cleanup

This commit adds the MmRpc_getId API on host to return a unique id for
each MmRpc instance of a service. This id is passed to the cleanup function
registered in the newly introduced MmServiceMgr_register2() so that it can
clean up after a given MmRpc instance.

This commit addresses SDOCM00108138

Signed-off-by: VW <vwan@ti.com>
9 years agoSet Hwi.excHandlerFunc earlier, before it's sealed
Robert Tivy [Fri, 6 Jun 2014 18:18:53 +0000 (11:18 -0700)]
Set Hwi.excHandlerFunc earlier, before it's sealed

One of the newly-used SYS/BIOS or XDC releases introduced a change
that caused the setting of Hwi.excHandlerFunc in module$static$init()
to fail, due to it being "sealed" at that time.  Moving it to an
earlier-invoked module method solves this issue, albeit with a caveat
that is mentioned above where the Hwi delegate is retrieved.

This issue was seen when moving from
xdctools_3_25_05_94 -> xdctools_3_30_01_25
bios_6_37_02_27 -> bios_6_40_01_15

9 years agoFix QNX build issue in Windows when QNX_CFLAGS is empty 3.22.01.08
vwan@ti.com [Thu, 5 Jun 2014 17:51:24 +0000 (10:51 -0700)]
Fix QNX build issue in Windows when QNX_CFLAGS is empty

This commit fixes the error where recurse.mk is not found on Windows if
QNX_CFLAGS is left empty in products.mak

Signed-off-by: VW <vwan@ti.com>
9 years agoSDOCM00108167 Uninitialized variable in notify driver template file
Ramsey Harris [Thu, 5 Jun 2014 13:08:20 +0000 (06:08 -0700)]
SDOCM00108167 Uninitialized variable in notify driver template file

When building for a single processor (i.e. MultiProc has only one
processor), the generated function NotifySetup_sharedMemReq did
not initialize memReq. This is a special use-case for Vision SDK.

9 years agoSDOCM00108149 Incorrect index computation in NotifySetup for v7M and v7A 3.22.01.07_eng
Ramsey Harris [Wed, 4 Jun 2014 18:54:42 +0000 (11:54 -0700)]
SDOCM00108149 Incorrect index computation in NotifySetup for v7M and v7A

When computing the mailbox table index in NotifySetup_plugHwi, the local
MultiProcID was used. It should have been using the local virtual ID. The
same bug was in NotifySetup_unplugHwi.

9 years agoAdd option IPC_DISABLE_WATCHDOG to prevent plug of watchdog interrupt handlers 3.22.01.06_eng
vwan@ti.com [Wed, 4 Jun 2014 16:30:34 +0000 (09:30 -0700)]
Add option IPC_DISABLE_WATCHDOG to prevent plug of watchdog interrupt handlers

This commit adds a compile option, IPC_DISABLE_WATCHDOG, that allows non-deh
users in need of GP timers to prevent watchdog interrupt handlers to be
plugged on the host in QNX. This option can be specified via the variable
QNX_CFLAGS in products.mak.

Signed-off-by: VW <vwan@ti.com>
9 years agoSDOCM00108114 Link error when building with DCE on IPU/Vayu
Ramsey Harris [Tue, 3 Jun 2014 17:44:38 +0000 (10:44 -0700)]
SDOCM00108114 Link error when building with DCE on IPU/Vayu

The notify setup module for vayu was unconditionally pulling in the
notify shared memory driver which, in turn, pulled in the ti.sdo.ipc
package. This caused undefined references when building an executable
for DCE because it was not supposed to use any IPC modules. The notify
driver now has a check to see if it should pull in IPC modules or not.

9 years agoFix error from calling MultiProc_getId with non-SMP IPU core name on OMAP5 QNX 3.22.00.05 3.30.00.00_eng
vwan@ti.com [Fri, 30 May 2014 01:40:00 +0000 (18:40 -0700)]
Fix error from calling MultiProc_getId with non-SMP IPU core name on OMAP5 QNX

Code in ipu_pm.c that was not previously exercised is now giving an error
when a watchdog timer interrupt is caught. This commit provides a fix.

Signed-off-by: VW <vwan@ti.com>
9 years agoStop watchdog timers when shutting down VAYU IPU
vwan@ti.com [Fri, 30 May 2014 01:35:56 +0000 (18:35 -0700)]
Stop watchdog timers when shutting down VAYU IPU

This commit stops the timers when shutting down the IPU, and ensures
clean-up is performed properly when the resource manager is terminated.

Signed-off-by: VW <vwan@ti.com>
9 years agoFix wrong OMAP5 #define
vwan@ti.com [Thu, 29 May 2014 01:33:15 +0000 (18:33 -0700)]
Fix wrong OMAP5 #define

This commit corrects a typo to use SYSLINK_QNX_OMAP5430
instead of SYSLINK_QNX_OMAP5, which caused watchdog interrupts to
not be caught on the host OMAP5.

Signed-off-by: VW <vwan@ti.com>
9 years agoMissing dependency on NotifySetup module.
Ramsey Harris [Tue, 27 May 2014 23:58:01 +0000 (16:58 -0700)]
Missing dependency on NotifySetup module.

The InterruptIpu and InterruptHost modules call into the NotifySetup
module but failed to declare a dependency on it during configuration.
Cleaned up use of local variables, removed unused variables.

9 years agoAdd support for watchdog timer interrupts on DRA7xx IPU
vwan@ti.com [Wed, 28 May 2014 20:21:48 +0000 (13:21 -0700)]
Add support for watchdog timer interrupts on DRA7xx IPU

This commit adds QNX support for watchdog timer interrupts. The resource
manager schedules recovery whenever an interrupt from GPTimer 4 or 9
is received.

Only one of IPU1 or IPU2 can use watchdog timers.

Signed-off-by: VW <vwan@ti.com>
9 years agoSDOCM00107743 Optimization flags not removed for debug builds
Ramsey Harris [Mon, 26 May 2014 19:47:13 +0000 (12:47 -0700)]
SDOCM00107743 Optimization flags not removed for debug builds

This was an GNU template bug. The template incorrectly referenced the
BIOS build module instead of the IPC build module.

9 years agoSDOCM00106584 Notify mailbox driver support on DRA7xx (IPU, HOST) - Part 3
Ramsey Harris [Mon, 26 May 2014 19:03:50 +0000 (12:03 -0700)]
SDOCM00106584 Notify mailbox driver support on DRA7xx (IPU, HOST) - Part 3

Added documentation to NotifySetup module explaining how to use and
configure the notify drivers. Used nodoc tag to hide functions which are
only to be used by other driver modules. Final commit for this feature.

9 years agoSDOCM00106584 Notify mailbox driver support on DRA7xx (IPU, HOST) - Part 2
Ramsey Harris [Mon, 26 May 2014 16:54:53 +0000 (09:54 -0700)]
SDOCM00106584 Notify mailbox driver support on DRA7xx (IPU, HOST) - Part 2

Added notify mailbox driver support for HOST. This implementation is
very similar to the IPU version. Removed startup function. Interrupt
ISR re-write to match InterruptIpu module. Moved HOST MMU setup from
InterruptHost to NotifySetup.

Code cleanup in NotifyDriverMbx module. All processors now use the
same implementation. Fixed include files. Removed dead code from
InterruptArp32 and InterruptIpu modules. Code cleanup in InterruptDsp
and NotifySetup modules.

Added NotifyDriverMbx to Build.xs file list for A15g.

9 years agoSDOCM00106584 Notify mailbox driver support on DRA7xx (IPU, HOST) - Part 1
Ramsey Harris [Sat, 24 May 2014 18:46:31 +0000 (11:46 -0700)]
SDOCM00106584 Notify mailbox driver support on DRA7xx (IPU, HOST) - Part 1

Added notify mailbox driver support for IPU. The InterruptIpu module
uses the NotifySetup module to dispatch interrupt to the correct notify
driver. The InterruptIpu ISR no longer checks all mailboxes for new
messages because the NotifySetup dispatch ISR already did this. Added
IPU support to the NotifySetup module.

The NotifyDriverMbx module now supports IPU. The code is the same as for
DSP and EVE. Added the module to product library builds for M3 and M4.

Added two new sub-mailboxes to the mailbox table. These are needed for
IPU1-0 to IPU1-1 communication when using the mailbox driver. For shared
memory driver, they did not use a mailbox for interrupt. They used
internal IPU interrupt.

Removed module startup method from InterruptDsp and InterruptIpu modules.
Consolidated startup code in NotifySetup. The NotifyDriverMbx startup
method was also consolidated (but not yet removed).

Removed interruptTable from InterruptDsp, InterruptIpu and NotifyDriverMbx
modules. Consolidated in NotifySetup. Added access method to NotifySetup
to fetch interrupt number from table.

Added new mailboxes to TableInit.xs: generateTable() method.

9 years agoAdd new flag to resource manager to disable recovery
vwan@ti.com [Fri, 23 May 2014 21:58:58 +0000 (14:58 -0700)]
Add new flag to resource manager to disable recovery

This commit adds a new flag to disable the recovery mechanism in the QNX
resource manager. This is useful for debugging the slave processors and
prevents their state from being wiped in the event of a crash. (SDOCM00107765)

Signed-off-by: VW <vwan@ti.com>
9 years agoModify rpmsg-rpc-stress test to generate exceptions and watchdog timeouts
vwan@ti.com [Fri, 23 May 2014 21:40:15 +0000 (14:40 -0700)]
Modify rpmsg-rpc-stress test to generate exceptions and watchdog timeouts

9 years agoFix Deh/Watchdog packaging issues, move StackDbg to ti/deh
Robert Tivy [Thu, 22 May 2014 22:27:46 +0000 (15:27 -0700)]
Fix Deh/Watchdog packaging issues, move StackDbg to ti/deh

Fixes various packaging problems, including moving StackDbg from
ti/trace to ti/deh.

Fix IpuSmp.cfg to use correct Timer index for GPTimer3 (for OMAP5 IPU).

Cleaned up test configs wrt/ using Deh.  Config files for slaves that
have Deh/Watchdog but are not officially supported have commented-out
Deh/Watchdog config (OMAP5 IPU & DRA7XX IPU2 are the only slaves that
are officially supported).

9 years agoCode cleanup to remove unused VirtQueue functions on QNX
vwan@ti.com [Wed, 21 May 2014 17:01:31 +0000 (10:01 -0700)]
Code cleanup to remove unused VirtQueue functions on QNX

Signed-off-by: VW <vwan@ti.com>
9 years agoUpdate MessageQMulti test to support up to 55 threads
vwan@ti.com [Tue, 20 May 2014 22:06:14 +0000 (15:06 -0700)]
Update MessageQMulti test to support up to 55 threads

Signed-off-by: VW <vwan@ti.com>
9 years agoAdd INTMEM resource type support in QNX
vwan@ti.com [Mon, 19 May 2014 17:20:20 +0000 (10:20 -0700)]
Add INTMEM resource type support in QNX

This commit adds support for the new INTMEM resource type (SDOCM00107479).

For this resource type, we map the entry only for the loader on the host,
without mapping it to the slave MMU.

This commit also removes support of the hard-coded static entries defined
in the address translation table, which was originally there to ensure
slave internal memories are always mapped. To match up with the Linux
implementation we'll now rely on the INTMEM resource type instead.

Note that this does break compatibility with slave executables that were
previously built without the INTMEM resource entries but were relying
on the hard-coded internal memory definitions in the ipc resource manager.

Signed-off-by: VW <vwan@ti.com>
9 years agoAdd subtest into rpmsg-rpc-stress test to trigger program-access MMU fault
vwan@ti.com [Fri, 16 May 2014 18:56:20 +0000 (11:56 -0700)]
Add subtest into rpmsg-rpc-stress test to trigger program-access MMU fault

This commit enhances the rpmsg-rpc-stress test to allow it to trigger MMU
fault via instruction fetch.

Signed-off-by: VW <vwan@ti.com>
9 years agoLinux/Android: Option to set LAD working dir permissions
Arnie Reynoso [Thu, 15 May 2014 16:46:59 +0000 (09:46 -0700)]
Linux/Android: Option to set LAD working dir permissions

Added an optional flag (-p) to LAD, to allow users to set the permissions
of LAD's working directory at launch.

This is critical, if applications using IPC stack (MessageQ) are executed
in user-space while LAD is started as root.  Without proper directory
permissions the user application will be unable to talk to the LAD daemon.

9 years agoAdd Deh/Watchdog support for OMAP5 & DRA7XX remote cores
Robert Tivy [Wed, 16 Apr 2014 00:51:15 +0000 (17:51 -0700)]
Add Deh/Watchdog support for OMAP5 & DRA7XX remote cores

The ti/deh package supports DSPs and IPUs, although the DSP support
needs some further work (Exception "dump" from SYS/BIOS when watchdog
fires is not valid, all zeroes for now).

The ti/ipc/tests have Deh/Watchdog enabled for IPU on OMAP5 and IPU2
on DRA7XX.

The new content contained herein originally came from:
http://git.omapzoom.org/?p=repo/sysbios-rpmsg.git;a=summary
The repo HEAD at the time of copying was:
commit 18c2b758f0674ee0baf95603248c6303afd9c854
This repo supported Deh/Watchdog for OMAP4/5.

9 years agoNotifySetup_plugHwi() - initialize restore ier mask
Ramsey Harris [Mon, 28 Apr 2014 17:21:59 +0000 (10:21 -0700)]
NotifySetup_plugHwi() - initialize restore ier mask

On ARP32, when plugging a Hwi, specify the restore ier mask. This is
needed because we use a custom bit mask for the disable ier mask.

9 years agoFixed minor typo in comment.
Ramsey Harris [Mon, 28 Apr 2014 17:17:21 +0000 (10:17 -0700)]
Fixed minor typo in comment.

9 years agoFix MessageQ to support more than 52 instances in QNX
vwan@ti.com [Wed, 16 Apr 2014 22:36:35 +0000 (15:36 -0700)]
Fix MessageQ to support more than 52 instances in QNX

This fix changes MessageQ to obtain a port number assignment from MessageQCopy
and use it as local queue id as opposed to having MessageQ manage the ids
itself. This ensures the port number to be above 1024, so that it does not
collide with any reserved port such as the one for the Name Service.

This addresses CQ SDOCM00104834.

Signed-off-by: VW <vwan@ti.com>
10 years agoDRA7XX: Remove hard-coded vring addrs 3.22.00.04_eng
Chris Ring [Mon, 14 Apr 2014 15:22:33 +0000 (08:22 -0700)]
DRA7XX: Remove hard-coded vring addrs

Replace hard-coded vring addrs with runtime addrs read from
the resource table.  This reduces the number of things to change
if the memory map moves around.

10 years agoBIOS: Remove dead DRA7XX VirtQueue code
Chris Ring [Mon, 14 Apr 2014 15:12:48 +0000 (08:12 -0700)]
BIOS: Remove dead DRA7XX VirtQueue code

Because BIOS-side virtqueue-based processors never run as the 'host',
half of the protocol is unused.  This commit removes that dead code
for the BIOS-side DRA7XX VirtQueue driver.

10 years agoOMAP5: Remove hard-coded vring addrs
Chris Ring [Fri, 11 Apr 2014 18:16:02 +0000 (11:16 -0700)]
OMAP5: Remove hard-coded vring addrs

Replace hard-coded vring addrs with runtime addrs read from
the resource table.  This reduces the number of things to change
if the memory map moves around.

10 years agoBIOS: Remove dead OMAP5 VirtQueue code
Chris Ring [Fri, 11 Apr 2014 18:05:09 +0000 (11:05 -0700)]
BIOS: Remove dead OMAP5 VirtQueue code

Because BIOS-side virtqueue-based processors never run as the 'host',
half of the protocol is unused.  This commit removes that dead code
for the BIOS-side OMAP5 VirtQueue driver.

10 years agoUpdate resource table with physical device address of vrings in QNX
vwan@ti.com [Tue, 15 Apr 2014 00:27:00 +0000 (17:27 -0700)]
Update resource table with physical device address of vrings in QNX

The physical device address of vrings needs to be updated in the
resource table in QNX, after memory has been allocated for these
vrings. This is so that Resource_getVringDA() on the slave side
can return the correct physical device address.

Signed-off-by: VW <vwan@ti.com>
10 years agoLinux: Use DESTDIR as configure --prefix option
Chris Ring [Tue, 8 Apr 2014 20:58:53 +0000 (13:58 -0700)]
Linux: Use DESTDIR as configure --prefix option

If the user sets DESTDIR (e.g. in products.mak), pass that value
via the --prefix= option to ./configure.

Also relocate the DESTDIR variable definition in products.mak to
reflect it's used outside of QNX.

10 years agoCreate Keystone platform instances with no external DDR defined
Robert Tivy [Tue, 8 Apr 2014 23:11:20 +0000 (16:11 -0700)]
Create Keystone platform instances with no external DDR defined

On MAR-based cores (i.e., C6x), SYS/BIOS will, by default, set the
"cacheable" bit for any external memory that it "sees", i.e., any
external memory that is defined for the platform.  This happens regardless
of whether or not that memory is used for program placement.  This
cacheable-ness is somewhat hidden to the programmer.

In order to offer better control of this, Keystone platform instances are
created with no external memory defined.  This allows all MAR pages to be
tagged "non-cached" by default, and the programmer is free to set MAR bits
to their liking.

10 years agoMultiProc: API Guide updates (doxygen)
Chris Ring [Tue, 8 Apr 2014 19:34:11 +0000 (12:34 -0700)]
MultiProc: API Guide updates (doxygen)

Clarified OS-specific configuration details.

Added some use case descriptions for when
MultiProc_setLocalId() might be used.

10 years agoLinux: Tracing ease of use
Chris Ring [Wed, 15 Jan 2014 20:34:45 +0000 (12:34 -0800)]
Linux: Tracing ease of use

Allow end users to enable userspace tracing via an environment
variable (IPC_DEBUG).  Setting IPC_DEBUG=1 enables 'some' trace,
setting IPC_DEBUG to 2 (or 3) enables more.

This imitates a popular feature from Codec Engine, details here:
http://processors.wiki.ti.com/index.php/CE_DEBUG

10 years agoLinux: Fix a few build warnings
Chris Ring [Mon, 7 Apr 2014 23:31:46 +0000 (16:31 -0700)]
Linux: Fix a few build warnings

Added a missing header, deleted an unused variable.

10 years agoRemove dead code used for support of slaves with MMU disabled in QNX 3.22.00.03_eng
vwan@ti.com [Thu, 3 Apr 2014 23:21:00 +0000 (16:21 -0700)]
Remove dead code used for support of slaves with MMU disabled in QNX

This commit removes the SysLink_Override_Params mechanism that is used
to turn on support for slaves with MMU disabled. This mode was never
tested, nor do we anticipate supporting this in the future, given
the benefits of an MMU.

Signed-off-by: VW <vwan@ti.com>
10 years agoQNX: Remove dead virtio-related macros
Chris Ring [Thu, 3 Apr 2014 23:57:00 +0000 (16:57 -0700)]
QNX: Remove dead virtio-related macros

Note virtio in this case is the virtualized platform, not the
protocol rpmsg is built on.

We no longer support OMAP5 or DRA7XX-based virtio platforms,
this commit removes related preprocessor defines set in makefiles
and used throughout the code base.

10 years agoQNX: Stop building early for unsupported platforms
Chris Ring [Thu, 3 Apr 2014 20:47:24 +0000 (13:47 -0700)]
QNX: Stop building early for unsupported platforms

Catch an unsupported platform sooner with a simple check.

Without this check, the build proceeds and fails halfway through with
a confusing error - in my case it was when the loader was being built
and some of the required preprocessor defines weren't set.

10 years agoFixed 'use' help text to add new -t option in ipc_trace_daemon for QNX
vwan@ti.com [Thu, 3 Apr 2014 18:27:41 +0000 (11:27 -0700)]
Fixed 'use' help text to add new -t option in ipc_trace_daemon for QNX

Minor update of the help text to add the option, in case the user uses the
'use' command for help.

This addresses CQ SDOCM00107256.

Signed-off-by: VW <vwan@ti.com>
10 years agoAdd new resource type and corresponding struct for internal memory
Robert Tivy [Fri, 21 Mar 2014 00:03:41 +0000 (17:03 -0700)]
Add new resource type and corresponding struct for internal memory

A new resource type TYPE_INTMEM is added that allows specifying internal
memory resources that the kernel will map and later on load ELF file
sections.

This new type replaces TYPE_CRASHDUMP, which is not used or supported.

10 years agoFix VirtQueue_getAvailBuf on QNX to avoid race condition
vwan@ti.com [Tue, 1 Apr 2014 23:20:27 +0000 (16:20 -0700)]
Fix VirtQueue_getAvailBuf on QNX to avoid race condition

This is to address SDOCM00106156.

In commit c98d2c5624aac20bcdd738f5a54fbddca045fd69, we have fixed a race
condition on the BIOS side by clearing the VRING_USED_F_NO_NOTIFY flag
prior to checking whether there are remaining buffers. We are now doing
the same on the host side.

Note that this code is not currently exercised on the host, but is simply
maintained to ensure that the VirtQueue module is complete in functionality.

Signed-off-by: VW <vwan@ti.com>
10 years agoLinux: Quiet "unused variable" build warning
Chris Ring [Tue, 1 Apr 2014 23:40:14 +0000 (16:40 -0700)]
Linux: Quiet "unused variable" build warning

For Linux-based devices without GateMP support (e.g. OMAP5, TCI6638),
remove an unused variable declaration.

10 years agoDocs: Minor spec clarifications for MmRpc
Chris Ring [Thu, 20 Mar 2014 23:04:06 +0000 (16:04 -0700)]
Docs: Minor spec clarifications for MmRpc

Clarify that the 'handle' parameter for various MmRpc APIs must
be valid.

10 years agoBuild: Removed unused ti.sdo.ipc.build pkg 3.22.00.01_eng 3.22.00.02_eng
Chris Ring [Mon, 17 Mar 2014 18:14:52 +0000 (11:14 -0700)]
Build: Removed unused ti.sdo.ipc.build pkg

This package is no longer used and can be removed.

10 years agoSDOCM00106949 IPC interrupt preempts itself on ARP32 (EVE)
Ramsey Harris [Fri, 14 Mar 2014 22:19:09 +0000 (15:19 -0700)]
SDOCM00106949 IPC interrupt preempts itself on ARP32 (EVE)

Changed default interrupt vector to actual values. When creating Hwi
instances, compute a mask which blocks both interrupt vectors. Set
the mask in Hwi create params.

10 years agoSDOCM00106428 Notify mailbox driver support on DRA7xx (DSP, EVE)
Ramsey Harris [Mon, 17 Feb 2014 22:14:54 +0000 (14:14 -0800)]
SDOCM00106428 Notify mailbox driver support on DRA7xx (DSP, EVE)

New NotifyDriverMbx module; initial implementation of notify mailbox
driver on dsp and eve only. Added support for multiple notify driver
configs in NotifySetup; requires new dispatch isr for notify events.
The isr will dispatch to the appropriate driver (shm or mbx). Improved
the NotifyDriverShm performance because it checks only the mailboxes
which might have raised the given event instead of always checking all
mailboxes. Added ROV view of NotifyDriverMbx. Added a mailbox tab
which shows inbound and outbound mailbox status. Better ISA handling in
source code and script code. Updated Build module with NotifyDriverMbx.c
to include new driver in IPC product libraries for C66 and ARP32.

10 years agoBIOS: NameServerRemoteNotify callback may have uninitialized var
Arnie Reynoso [Fri, 14 Mar 2014 17:04:10 +0000 (10:04 -0700)]
BIOS: NameServerRemoteNotify callback may have uninitialized var

The callback function for NameServerRemoteNotify may end up with an
uninitialized swiHandle.  Though this case should never happen, the handle
should be initialized and an assert must be issued if it remains NULL.
This also fixes a Coverity error with the variable.

10 years agoBIOS: NameServerRemote must copy names with 1 char less than max
Arnie Reynoso [Thu, 13 Mar 2014 21:08:00 +0000 (14:08 -0700)]
BIOS: NameServerRemote must copy names with 1 char less than max

The strncpy length must be max number of characters - 1 bytes. The last
character will be the null termination thus shouldn't be copied. This
fix addresses a Coverity buffer overrun error.

10 years agoBIOS: NameServerMessageQ names need proper termination
Arnie Reynoso [Thu, 13 Mar 2014 20:58:02 +0000 (13:58 -0700)]
BIOS: NameServerMessageQ names need proper termination

The NameServerMessageQ instanceName and name strings weren't being
properly null terminated when the names were 1 character less than the
maximum size. This addresses the following bug:

SDOCM00106336: NameServerMessageQ copy of name is not copying null
terminated character

10 years agoRemove dead code that appears to be trying to set L1D cache size to 0
Robert Tivy [Thu, 13 Mar 2014 00:44:46 +0000 (17:44 -0700)]
Remove dead code that appears to be trying to set L1D cache size to 0

The way to set an L1/L2 cache size is through the Build.platformTable
platform instance creation.  The dead code that is removed here was not
only trying to change the cache size at too late a time, it was doing
so by setting a local variable that went nowhere.

10 years agoEliminate need to specify Syslink_Override_Params on QNX
vwan@ti.com [Fri, 7 Mar 2014 21:26:11 +0000 (13:26 -0800)]
Eliminate need to specify Syslink_Override_Params on QNX

This commit changes Syslink_Override_Params in Platform.c to an empty
string. It removes the need to specify carveouts in the string, which
was only used for verification purposes when there is a slave-side MMU.
Code associated with the verification of the resource table entries
against these carveouts is removed.

This commit also changes the default for mmuEnable to TRUE, since that
is currently the only mode we support.

This addresses CQ SDOCM00105667.

Signed-off-by: VW <vwan@ti.com>
10 years agoAdd timestamp prefix to LOG[0|1|2]() macros
Robert Tivy [Fri, 28 Feb 2014 00:19:11 +0000 (16:19 -0800)]
Add timestamp prefix to LOG[0|1|2]() macros

For the timestamp prefix, subtract the start time (which is established
when the logFile is opened) so that the massive "since the epoch" value
is not displayed.  For this, subtract only the timeval.tv_sec (seconds)
value so we don't have to worry about the "borrow" that results when
start_tv.tv_usec > tv.tv_usec (essentially, treat start_tv.tv_usec as 0,
which skews this "relative" time ahead by start_tv.tv_usec microseconds).

10 years agoTest: Fix NameServerApp config 3.21 ipc-3.21-next 3.21.00.07 3.22.00.00_eng
Chris Ring [Tue, 4 Mar 2014 21:23:16 +0000 (13:23 -0800)]
Test: Fix NameServerApp config

IpcMgr_ipcStartup() was being added twice to the BIOS startup
function - once in nameserverapp.cfg (which is removed in this
commit) and again in messageq_common.cfg.xs (which is included
by nameserverapp.cfg).  In addition to just being wrong, this
resulted in an abort on Keystone 2 devices.

Also, the MessageQ.SetupTransportProxy was errantly not assigned
in the nameserverapp.cfg script.  This resulted in MessageQ.xs
pulling in 'default' MessageQ configuration, which pulled in much
more content than was necessary for this test (for example,
TransportShm, which then pulled in GateMP, SharedRegion, etc).  By
explicitly assigning MessageQ.SetupTransportProxy to the
ti.ipc.transports.TransportRpmsgSetup module, these extra [unused]
modules are no longer pulled in.

10 years agoRevert "SDOCM00106428 Add notify mailbox driver support on DRA7xx (Part 1)"
Chris Ring [Fri, 28 Feb 2014 17:40:43 +0000 (09:40 -0800)]
Revert "SDOCM00106428 Add notify mailbox driver support on DRA7xx (Part 1)"

This reverts commit 3be15bd0ee6a26a8c1d712e698f4055b94f47043.

10 years agoRevert "SDOCM00106428 Add notify mailbox driver support on DRA7xx (Part 2)"
Chris Ring [Fri, 28 Feb 2014 17:40:08 +0000 (09:40 -0800)]
Revert "SDOCM00106428 Add notify mailbox driver support on DRA7xx (Part 2)"

This reverts commit 73882d944bb7b1865f4c35e4bdb35c05bc3da9e5.

10 years agoRevert "SDOCM00106428 Add notify mailbox driver support on DRA7xx (Part 3)"
Chris Ring [Fri, 28 Feb 2014 17:38:21 +0000 (09:38 -0800)]
Revert "SDOCM00106428 Add notify mailbox driver support on DRA7xx (Part 3)"

This reverts commit 65a4b382ea3fc702dedc51f02471149e642772b8.

10 years agoFix misuse of SET_BIT macro to clear mailbox-interrupt-status-clear registers
vwan@ti.com [Thu, 27 Feb 2014 22:49:06 +0000 (14:49 -0800)]
Fix misuse of SET_BIT macro to clear mailbox-interrupt-status-clear registers

The mailbox interrupt handling code in QNX IPC uses the SET_BIT macro to
clear status bits from the MAILBOX_IRQSTATUS_CLR_u registers. This is wrong,
because the macro does as follows:

  >#define SET_BIT(num,pos)            ((num) |= (1u << (pos)))

It will read the register and end up clearing *ALL* bits that are pending
during the write-back, as opposed to the specific one it needs to clear. If the
host is in the midst of processing an interrupt from a given core when a second
core writes to its (sub)mailbox, the second payload may be lost.

This commit changes the SET_BIT call to a direct register assignment of the
appropriate bit mask.

Signed-off-by: VW <vwan@ti.com>
10 years agoIncrease NAMESERVER_GET_TIMEOUT from 20000 to 40000 microseconds
Robert Tivy [Thu, 27 Feb 2014 02:08:05 +0000 (18:08 -0800)]
Increase NAMESERVER_GET_TIMEOUT from 20000 to 40000 microseconds

Product testing revealed that a remote core was occasionally taking
slighly longer than 20000 microseconds to respond (in the negative)
to a NameServer_getRemote() query.  We're not sure why it's taking
so long in some cases, as normally the remote core will respond in a
few hundred microseconds.

Doubling the timeout will affect the total query time across multiple
remote cores when some of those cores aren't running NameServer, but
this should be OK since it affects "startup" times with MessageQ_open()
and shouldn't affect normal "execute" times.

10 years agoRemove duplicated call to GateMP_close in gatempapp on BIOS side
vwan@ti.com [Wed, 26 Feb 2014 21:54:16 +0000 (13:54 -0800)]
Remove duplicated call to GateMP_close in gatempapp on BIOS side

Signed-off-by: VW <vwan@ti.com>
10 years agoBuild: Switch from ?= assignments to =
Chris Ring [Thu, 27 Feb 2014 00:34:57 +0000 (16:34 -0800)]
Build: Switch from ?= assignments to =

products.mak should use the [less confusing] = assignments, rather
than the set-if-not-already-set ?= assignment.  This helps with user
readability of the assignments.

10 years agoSDOCM00106664: Reduce slave-side trace from tests
Chris Ring [Wed, 26 Feb 2014 21:41:37 +0000 (13:41 -0800)]
SDOCM00106664: Reduce slave-side trace from tests

The slave-side trace enabled by the tests is too high.  It obfuscates
actual test output, as well as, in at least one case, was slowing
down the slave-side execution enough to cause host-side timeouts
waiting for replies.

This commit changes some Registry-related masks from ALWAYS_ON
to RUNTIME_OFF to help quiet things down.

10 years agoEnable gptimers in PD_IPU domain 3.21.00.06_eng
vwan@ti.com [Tue, 25 Feb 2014 00:09:30 +0000 (16:09 -0800)]
Enable gptimers in PD_IPU domain

This commit adds workaround to enable gptimers in PD_IPU domain on Vayu in QNX.
It enables example ex41_forwardmsg to run successfully.

Signed-off-by: VW <vwan@ti.com>
10 years agoSDOCM00106450 HeapMemMP_free fails to cache invalidate freed...
Ramsey Harris [Fri, 21 Feb 2014 18:48:15 +0000 (10:48 -0800)]
SDOCM00106450 HeapMemMP_free fails to cache invalidate freed...

The freed buffer content (after the header) was left in cache. If
buffer content was dirty, it would eventually be evicted with a
write-back possibly overwriting memory in use by a different core,
and cause heap corruption.

10 years agoSDOCM00106428 Add notify mailbox driver support on DRA7xx (Part 3)
Ramsey Harris [Fri, 21 Feb 2014 17:51:14 +0000 (09:51 -0800)]
SDOCM00106428 Add notify mailbox driver support on DRA7xx (Part 3)

Added notify mailbox driver support for ARP32. The IPC interrupt on
arp32 will dispatch to the appropriate driver (shm or mbx). This
improves the NotifyDriverShm performance because it checks only the
mailboxes which might have raised the given event instead of always
checking all mailboxes. Improved ROV view of NotifyDriverMbx. Added
a mailbox tab which shows inbound and outbound mailbox status. Better
ISA handling in source code and script code.

10 years agoAdd configurable polling interval to ipc_trace_daemon on QNX
vwan@ti.com [Fri, 21 Feb 2014 22:21:57 +0000 (14:21 -0800)]
Add configurable polling interval to ipc_trace_daemon on QNX

This commit adds a command line parameter to ipc_trace_daemon to set the
polling interval. The default is now set to 0.5 sec as the previous
default was too long. This addresses SDOCM00105472.

Signed-off-by: VW <vwan@ti.com>
10 years agoLinux/Qnx: MessageQBench test must check initial MSG put
Arnie Reynoso [Wed, 19 Feb 2014 22:56:54 +0000 (14:56 -0800)]
Linux/Qnx: MessageQBench test must check initial MSG put

The MessageQBench test must ensure the initial MessageQ_put during
the applications handshaking returns successful before continuing.

10 years agoAdd IPU1 support in QNX
vwan@ti.com [Wed, 19 Feb 2014 19:51:31 +0000 (11:51 -0800)]
Add IPU1 support in QNX

This commit adds support for IPU1 in QNX. It has the current limitation that
the core cannot be put into deep sleep in the idle task, so the function
IpcPower_idle() must be removed from the idle loop. This issue will be fixed
at a later time.

Signed-off-by: VW <vwan@ti.com>
10 years agoSDOCM00106428 Add notify mailbox driver support on DRA7xx (Part 2)
Ramsey Harris [Wed, 19 Feb 2014 02:16:50 +0000 (18:16 -0800)]
SDOCM00106428 Add notify mailbox driver support on DRA7xx (Part 2)

Updated Build module with NotifyDriverMbx.c to include new driver
in IPC product libraries (C66, M4, ARP32, A15g).

10 years agoVAYU QNX: Prevent race condition when host is slow to clear interrupts from IPU
vwan@ti.com [Sat, 15 Feb 2014 01:33:27 +0000 (17:33 -0800)]
VAYU QNX: Prevent race condition when host is slow to clear interrupts from IPU

This commit prevents the same race condition that was fixed in commit id
feb7a8486ed537033c5aed5b170f52f758bddabe, this time for the IPUs as
the other commit only dealt with the DSP.

Signed-off-by: VW <vwan@ti.com>
10 years agoSDOCM00106428 Add notify mailbox driver support on DRA7xx (Part 1)
Ramsey Harris [Mon, 17 Feb 2014 22:14:54 +0000 (14:14 -0800)]
SDOCM00106428 Add notify mailbox driver support on DRA7xx (Part 1)

New NotifyDriverMbx module; initial implementation of notify mailbox
driver on dsp only. Added support for multiple notify driver configs
in NotifySetup; requires new dispatch isr for notify events.

10 years agoLinux/Qnx: MessageQ msg cannot be freed if put fails
Arnie Reynoso [Fri, 14 Feb 2014 19:53:31 +0000 (11:53 -0800)]
Linux/Qnx: MessageQ msg cannot be freed if put fails

MessageQ msg being put to the transport layer can only be freed
if the msg is successfully placed. Otherwise, it's the responsibility
of the application to free the msg.

10 years agoBIOS: Only build rpmsg libs when useful
Chris Ring [Fri, 14 Feb 2014 00:12:50 +0000 (16:12 -0800)]
BIOS: Only build rpmsg libs when useful

Many of the rpmsg-protocol-related IPC packages build for
all targets thrown at them (like good packages should).

However, we know many supported targets will never use the rpmsg
protocol, and we are therefore unnecessarily building libraries
that will never be used.

This commit changes some of the rpmsg-specific packages to not
build for targets that don't have any devices containing an
rpmsg-using HLOS-based host.

10 years agoLinux: Fix pkg-config dependency name 3.21.00.05_eng
Chris Ring [Thu, 13 Feb 2014 00:59:59 +0000 (16:59 -0800)]
Linux: Fix pkg-config dependency name

The name of dependent packages includes the 'lib' prefix - this
fixes pkg-config when run on libtiipc.pc.

10 years agoLinux: Fix warnings in LAD for non GateMP builds
Arnie Reynoso [Mon, 10 Feb 2014 22:28:27 +0000 (14:28 -0800)]
Linux: Fix warnings in LAD for non GateMP builds

To eliminate build warnings in LAD, variables used for GateMP enabled
code need to be encapsulated.

10 years agoLinux: Update autotools generated files
Chris Ring [Tue, 11 Feb 2014 19:41:38 +0000 (11:41 -0800)]
Linux: Update autotools generated files

Check in autoreconf-generated files after the change from
C66AK2E to 66AK2E.

10 years ago66AK2E: Linux: Remove leading 'C' in device name
Chris Ring [Tue, 11 Feb 2014 19:36:28 +0000 (11:36 -0800)]
66AK2E: Linux: Remove leading 'C' in device name

The initial Linux support for 66AK2E (commit
f45b1ad1a591b188eb1321102a3b8ed479eec490) went in with
the leading 'C66AK2E' identifier.  After review by the MCSDK team,
the leading 'C' was incorrect and removed.

Note that autotools' condition variables must start with a
leading character, so internally the variable 'C66AK2E' is
still used.  But the user only sees '66AK2E' when setting
the PLATFORM variable.

The BIOS-side changes are in a separate commit.

10 years ago66AK2E: BIOS: Remove leading 'C' in device name
Chris Ring [Tue, 11 Feb 2014 18:58:52 +0000 (10:58 -0800)]
66AK2E: BIOS: Remove leading 'C' in device name

The initial support for 66AK2E (commit
867efc6fa15f91639820614f6f9ca6ee6751ffa6) went in with
the 'C66AK2E' identifier.  After review by the MCSDK team,
the leading 'C' was incorrect and removed.

The XDC platform and catalog includes this leading 'C', so
most of the internal config-related support did not require
changes.

Finally, this is only the BIOS-side changes.  The Linux-side
changes will be done in a subsequent commit.

10 years agoSDOCM00106383: Remove C6x COFF support
Chris Ring [Tue, 11 Feb 2014 17:25:41 +0000 (09:25 -0800)]
SDOCM00106383: Remove C6x COFF support

C6x COFF support is being [softly] removed from IPC 3.21.  This
commit deletes C6x COFF-related variables from products.mak, but
leaves everything else intact.  If a user finds they need COFF
support, they can easily re-enable it themselves by setting the
variable(s) removed from products.mak and rebuilding.

Eventually the intent is to remove C6x COFF support altogether -
including the build support in ipc-bios.mak and ipc-bios.bld, and
possibly elsewhere.

10 years agoBIOS: GateMP host support must ensure maxNameLen is 32
Arnie Reynoso [Mon, 10 Feb 2014 19:49:16 +0000 (11:49 -0800)]
BIOS: GateMP host support must ensure maxNameLen is 32

When GateMP host support is enabled, the default GateMP must ensure
the size of the maxNameLen must be at least 32. The size must correspond
to the expected size on the host OS (Linux, Qnx, Android) which is
currently 32.

The default size for maxNameLen on the BIOS-side is 32. Thus this issue
hadn't be encountered.