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>
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>
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>
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>
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>
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>
Add Linux fault test to git-ignore list
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).
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).
Generated makefiles for IHeap support
These generated makefiles compliment the Makefile.am changes needed
to support the IHeap interface.
These generated makefiles compliment the Makefile.am changes needed
to support the IHeap interface.
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.
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.
Merge remote-tracking branch 'origin/3.36' into ipc-next
Add missing copyright header to file
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.
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.
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.
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.
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
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
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.
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.
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
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
Change error-related printf()s to fprintf(stderr)
Addresses SDOCM00115404.
Addresses SDOCM00115404.
Add Power module to gatempapp.cfg
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>
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>
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.
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.
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
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.
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.
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.
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.
Fix compiler warning when asserts are disabled
Removed the use of a temporary variable which becomes set but
never used when asserts are disabled.
Removed the use of a temporary variable which becomes set but
never used when asserts are disabled.
Silence unused variable warning when asserts disabled
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>
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
Update help text in QNX IPC driver to show support for DSP2
Signed-off-by: VW <vwan@ti.com>
Signed-off-by: VW <vwan@ti.com>
Fix typo in error message
Signed-off-by: VW <vwan@ti.com>
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
Wrap the ARM assembly statement in a check for GNU compiler and ARM architecture version 7.
Added recursive mutex initializer for Android
Don't build test package when building only libraries
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.
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.
General cleanup in fault test
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).
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).
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.
Previously Watchdog.xs would cryptically error out if an unsupported
device tried to use Deh. This change produces a clean error statement.
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.
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.
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>
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>
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>
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>
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>
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>
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>
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>
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.
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.
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.
After calling the transport's "put" function, MessageQ_put() checks
errno for ESHUTDOWN, and if set MessageQ_put() returns MessageQ_E_SHUTDOWN.
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.
Decrement the reference count only once, it was being decremented
twice. Do this regardless of the success/failure status of the
function.
Add Deh & Watchdog config for Vayu DSP1 and IPU1 in tests config
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>
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>
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>
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>
Generated Makefile.in for previous commit
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.
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.
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>
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>
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>
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>
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.
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.
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>
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>
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>
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>
Move MultiProc configuration into qnx/src/cfg directory
Signed-off-by: VW <vwan@ti.com>
Signed-off-by: VW <vwan@ti.com>
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>
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>
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.
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.
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.
When checking for invalid pointers in 'struct Reserved', use
SharedRegion_INVALIDSRPTR instead of implicit check for NULL.
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.
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.
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.
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.
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.
Due to refactoring, a needed Ipc_getConfig function was added to LAD.
Also removed unnecessary dependency to libtiipc.
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.
A define of EFD_SEMAPHORE was added to the local files since Android bionic
headers don't currently define it.
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).
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).
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.
Fix syntax for using the @see markup XDCspec documentation tag.
Also fixed similar usage in Build module.
SDOCM00115428 Incorrect return status from NameServer_delete
Fix incorrect union references in both LAD command loop and
client API unmarshal code. Verified all references to 'status'.
Fix incorrect union references in both LAD command loop and
client API unmarshal code. Verified all references to 'status'.
SDOCM00115373 NameServer local get methods are missing on Linux
Add enum entries for missing API methods. Add union members
in the command object only, reuse existing union members in
the response object. Add API stub calls in LAD command loop.
No logging in LAD command loop because some transports use this
method for each message (would generate too many log events).
Add enum entries for missing API methods. Add union members
in the command object only, reuse existing union members in
the response object. Add API stub calls in LAD command loop.
No logging in LAD command loop because some transports use this
method for each message (would generate too many log events).
SDOCM00115434 NameServer_delete in LAD daemon leaks memory
Remove invalid assertion that name list must be empty. This
is not true and instance might still be in use by another
client (object is reference counted). Add while loop to delete
each entry on the name list. Destroy the object's gate (was not
being done). Remove macro to destruct a list object (not needed).
Remove invalid assertion that name list must be empty. This
is not true and instance might still be in use by another
client (object is reference counted). Add while loop to delete
each entry on the name list. Destroy the object's gate (was not
being done). Remove macro to destruct a list object (not needed).
Ignore cluster members which are not running
To maintain backwards compatibility, return success when Ipc_attach
fails if the Ipc module is configured with Ipc_ProcSync_ALL.
To maintain backwards compatibility, return success when Ipc_attach
fails if the Ipc module is configured with Ipc_ProcSync_ALL.
Remove DSP2 from invalid list and improve error handling for non-existing core
This commit removes DSP2 from the invalid processor list, and improves
error handling in case the IPC driver is asked to load DSP2
when it does not exist (e.g. on J6 Eco)
Signed-off-by: VW <vwan@ti.com>
This commit removes DSP2 from the invalid processor list, and improves
error handling in case the IPC driver is asked to load DSP2
when it does not exist (e.g. on J6 Eco)
Signed-off-by: VW <vwan@ti.com>
Support a seperate address translation table for DSP2
Updated to the DSP proc module (VayuDSPProc.c) to
support 2 seperate Address translation tables for DSP1 and DSP2.
Cleaned-up version of the original commit from Praveen Rao.
Signed-off-by: VW <vwan@ti.com>
Updated to the DSP proc module (VayuDSPProc.c) to
support 2 seperate Address translation tables for DSP1 and DSP2.
Cleaned-up version of the original commit from Praveen Rao.
Signed-off-by: VW <vwan@ti.com>
Add support to load DSP2 and communicate with it.
Cleaned-up version of original commit from Praveen Rao.
Signed-off-by: VW <vwan@ti.com>
Cleaned-up version of original commit from Praveen Rao.
Signed-off-by: VW <vwan@ti.com>
Combine .gitignore from ipc3x_dev into the global .gitignore file
Signed-off-by: VW <vwan@ti.com>
Signed-off-by: VW <vwan@ti.com>
Fix build warning regarding strict aliasing when building QNX IPC in Windows
Signed-off-by: VW <vwan@ti.com>
Signed-off-by: VW <vwan@ti.com>
Initialize apiStatus field in all NameServer devctl calls
Upon the return from Nameserver's internal devctl calls, the apiStatus field
in the returned CmdArgs structure for some APIs (NameServer_create,
NameServer_add, NameServer_addUInt32, NameServer_Params_init) is left
uninitialized. This commit ensures that the field is correctly set, so that
sporadic failures do not occur due to the uninitialized apiStatus field being
negative.
This addresses SDOCM00115294/SDOCM00115308/SDOCM00115309/SDOCM00115310.
Signed-off-by: VW <vwan@ti.com>
Upon the return from Nameserver's internal devctl calls, the apiStatus field
in the returned CmdArgs structure for some APIs (NameServer_create,
NameServer_add, NameServer_addUInt32, NameServer_Params_init) is left
uninitialized. This commit ensures that the field is correctly set, so that
sporadic failures do not occur due to the uninitialized apiStatus field being
negative.
This addresses SDOCM00115294/SDOCM00115308/SDOCM00115309/SDOCM00115310.
Signed-off-by: VW <vwan@ti.com>
Generated makefile for previous commit (Ipc attach)
Add Ipc attach phase to Linux implementation
Refactor the Ipc startup code to separate work done during
setup and during attach. Previous attach mode always assumed
Ipc_ProcSync_ALL, so all work was always done during startup
phase. Add new Ipc config file to LAD for specifying attach
mode. Add new NameServer and TransportRpmsg attach API.
Significant rework of the TransportRpmsg module.
Refactor the Ipc startup code to separate work done during
setup and during attach. Previous attach mode always assumed
Ipc_ProcSync_ALL, so all work was always done during startup
phase. Add new Ipc config file to LAD for specifying attach
mode. Add new NameServer and TransportRpmsg attach API.
Significant rework of the TransportRpmsg module.
Remove MAX #define from Linux Std.h
The MAX() macro that is #defined in Std.h for Linux can either conflict
or be a duplicate of other MAX() macro definitions. GCC's glibc defines
MAX in sys/param.h, and code builds will either warn abour or error on
a duplicate or conflicting definition.
Remove the usage of MAX completely to avoid this. Use a locally-defined,
differently-named macro in C file if appropriate.
The MAX() macro that is #defined in Std.h for Linux can either conflict
or be a duplicate of other MAX() macro definitions. GCC's glibc defines
MAX in sys/param.h, and code builds will either warn abour or error on
a duplicate or conflicting definition.
Remove the usage of MAX completely to avoid this. Use a locally-defined,
differently-named macro in C file if appropriate.
Correct the argument name in MessageQ_openQueueId
Replace the incorrect remoteProcId argument with procId in the
doxygen description. Fix macro spelling error. Minor word smithing.
Replace the incorrect remoteProcId argument with procId in the
doxygen description. Fix macro spelling error. Minor word smithing.
Fix doxygen comment (@Returns -> @return)
Turn TiIpcFxns.h into a public header for QNX
This commit makes TiIpcFxns.h into a public header that is exported
to the target filesystem during 'make install'.
This is in reference to enhancement SDOCM00115106.
Signed-off-by: VW <vwan@ti.com>
This commit makes TiIpcFxns.h into a public header that is exported
to the target filesystem during 'make install'.
This is in reference to enhancement SDOCM00115106.
Signed-off-by: VW <vwan@ti.com>
SDOCM00115143 Improper timeout handling in MessageQ_get (Linux)
Split the given timeout value into seconds and microseconds.
Add these to the current time of day. Check for rollover on
the microseconds.
Split the given timeout value into seconds and microseconds.
Add these to the current time of day. Check for rollover on
the microseconds.
SDOCM00114745 Ipc_transportConfig has race window
Regardless of the Ipc module reference count, any subsequent
caller to Ipc_transportConfig must use the same factory as
the first caller. Otherwise, it is an error.
Regardless of the Ipc module reference count, any subsequent
caller to Ipc_transportConfig must use the same factory as
the first caller. Otherwise, it is an error.
Add $(JOBS) to XDC command definition, intended set to -j by user
Increase default value ProcMgr_MAX_MEMORY_REGIONS in QNX
This commit increases the default value of ProcMgr_MAX_MEMORY_REGIONS to
match what we used to support in SysLink 2 (SDOCM00115108), so that real
applications that require many ProcMgr address mappings do not easily
run into this limit.
Signed-off-by: VW <vwan@ti.com>
This commit increases the default value of ProcMgr_MAX_MEMORY_REGIONS to
match what we used to support in SysLink 2 (SDOCM00115108), so that real
applications that require many ProcMgr address mappings do not easily
run into this limit.
Signed-off-by: VW <vwan@ti.com>
Revert MessageQCopy_MAXMQS back to original value in QNX
In a previous commit, we had to increase MessageQCopy_MAXMQS to accommodate for
a base reserved queue port value of 2048. However, this has since been moved
to 0x80, so we no longer need to support high queue port values.
Signed-off-by: VW <vwan@ti.com>
In a previous commit, we had to increase MessageQCopy_MAXMQS to accommodate for
a base reserved queue port value of 2048. However, this has since been moved
to 0x80, so we no longer need to support high queue port values.
Signed-off-by: VW <vwan@ti.com>
8 years agoSDOCM00115110 GateMP_open crashes on Keystone 2 3.35 ipc-3.35-next 3.35.01.06_eng 3.35.01.07
SDOCM00115110 GateMP_open crashes on Keystone 2
NameServer_get takes an array of procIds. The last element in the
array must be MultiProc_INVALIDID (the array size is not known).
However, several places in IPC call this function and pass an array
which does not have the last entry marker. NameServer_get had a check
to stop iterating when the number of processors in the cluster had
been reached. I removed this check. I'm now restoring this check.
NameServer_get takes an array of procIds. The last element in the
array must be MultiProc_INVALIDID (the array size is not known).
However, several places in IPC call this function and pass an array
which does not have the last entry marker. NameServer_get had a check
to stop iterating when the number of processors in the cluster had
been reached. I removed this check. I'm now restoring this check.
Merge branch '3.30' into ipc-next
Avoid changing the entry point on cores not loaded by remoteproc
This commit prevents the template packages/ti/ipc/remoteproc/linkcmd.xdt
from changing the entry point on cores that are not loaded by remoteproc,
such as on a Tomahawk.
Signed-off-by: VW <vwan@ti.com>
This commit prevents the template packages/ti/ipc/remoteproc/linkcmd.xdt
from changing the entry point on cores that are not loaded by remoteproc,
such as on a Tomahawk.
Signed-off-by: VW <vwan@ti.com>
Fix incorrect generation of --diags option usage
A --diags option is being thrown to suppress a warning about an entry
point other than _c_int00, but it was being thrown even when the -e
entry point option was not used. Changed to throw the --diags only
when we throw the -e.
A --diags option is being thrown to suppress a warning about an entry
point other than _c_int00, but it was being thrown even when the -e
entry point option was not used. Changed to throw the --diags only
when we throw the -e.
Add new IpcMgr.h header file to package release
Added header file to release because it is not a generated file.
Added header file to release because it is not a generated file.
Reduced MessageQ port offset from 0x800 to 0x80
The larger port offset was causing a failure in the Linux driver
(rpmsg_proto I think) which caused a back-to-back run of any IPC
application to fail. RPMessage has a maximum reserved port of 100.
Message queue port numbers will still be above the reserved ports.
The larger port offset was causing a failure in the Linux driver
(rpmsg_proto I think) which caused a back-to-back run of any IPC
application to fail. RPMessage has a maximum reserved port of 100.
Message queue port numbers will still be above the reserved ports.
Remove code references to non-SMP mode on DRA7xx/Vayu QNX
Some cleanup to help address SDOCM00108142, since we do not support non-SMP
mode on IPUs in QNX.
Signed-off-by: VW <vwan@ti.com>
Some cleanup to help address SDOCM00108142, since we do not support non-SMP
mode on IPUs in QNX.
Signed-off-by: VW <vwan@ti.com>
SDOCM00114985 Macro to extract destination address from header
Modified the existing MessageQ_getDstQueue macro to extract both
the destination queue index and procId from the message header.
It was calling MultiProc_self to acquire the destination procId,
but this only works when invoked on the actual destination processor.
Modified the existing MessageQ_getDstQueue macro to extract both
the destination queue index and procId from the message header.
It was calling MultiProc_self to acquire the destination procId,
but this only works when invoked on the actual destination processor.
SDOCM00114354 IPC Manager needs a public header file
Added header file IpcMgr.h. The module is meta-only, so there is
no generated header file which might collide with this one. Added
two functions typically called by the application: rpmsgStartup,
and ipcStartup. Omitted callIpcStart because this is only used from
config script, not application source file.
Added header file IpcMgr.h. The module is meta-only, so there is
no generated header file which might collide with this one. Added
two functions typically called by the application: rpmsgStartup,
and ipcStartup. Omitted callIpcStart because this is only used from
config script, not application source file.
Rename IPC_DEBUG_TRACE_LEVEL to IPC_DEBUG_SLOG_LEVEL
This commit renames the environment variable IPC_DEBUG_TRACE_LEVEL to
IPC_DEBUG_SLOG_LEVEL in QNX.
Signed-off-by: VW <vwan@ti.com>
This commit renames the environment variable IPC_DEBUG_TRACE_LEVEL to
IPC_DEBUG_SLOG_LEVEL in QNX.
Signed-off-by: VW <vwan@ti.com>
SDOCM00114964 Processor data array size should match cluster size
Added new config param: MultiProc.procAddrMode. This is used to
specify which processors require dedicated resources. This config
param is used by MessageQ and NameServer to control the size of
resource arrays. When using ProcAddrMode_Cluster, the resource array
size matches the number of members in the cluster. Modified
TransportRpmsgSetup and TransportShmNotify to always use the cluster
size because that is the only mode they support. These changes are
needed to minimize memory usage in large processor systems.
Added new config param: MultiProc.procAddrMode. This is used to
specify which processors require dedicated resources. This config
param is used by MessageQ and NameServer to control the size of
resource arrays. When using ProcAddrMode_Cluster, the resource array
size matches the number of members in the cluster. Modified
TransportRpmsgSetup and TransportShmNotify to always use the cluster
size because that is the only mode they support. These changes are
needed to minimize memory usage in large processor systems.
Add support for IPC_DEBUG in QNX
This commit adds support to allow end users to more easily see the trace from
IPC's user libraries. Tracing is enabled via an environment variable
(IPC_DEBUG). Setting IPC_DEBUG=1 enables 'some' trace, setting IPC_DEBUG to 2
(or 3) enables more.
Signed-off-by: VW <vwan@ti.com>
This commit adds support to allow end users to more easily see the trace from
IPC's user libraries. Tracing is enabled via an environment variable
(IPC_DEBUG). Setting IPC_DEBUG=1 enables 'some' trace, setting IPC_DEBUG to 2
(or 3) enables more.
Signed-off-by: VW <vwan@ti.com>
Add reserved queue support for QNX
This commit adds support for reserved queues on QNX (SDOCM00114908).
Signed-off-by: VW <vwan@ti.com>
This commit adds support for reserved queues on QNX (SDOCM00114908).
Signed-off-by: VW <vwan@ti.com>
Re-work MessageQ_put to eliminate transport recursion
On Linux, when delivering an inbound message sent from another process
on the same processor, the logic in MessageQ_put caused a transport
infinite recursion. In other words, the message was given back to the
transport instead of being delivered to the queue. The new logic is to
attempt the local message deliver first; if it fails, then give it to
the transport for delivery instead of failing back to the caller.
On Linux, when delivering an inbound message sent from another process
on the same processor, the logic in MessageQ_put caused a transport
infinite recursion. In other words, the message was given back to the
transport instead of being delivered to the queue. The new logic is to
attempt the local message deliver first; if it fails, then give it to
the transport for delivery instead of failing back to the caller.
SDOCM00114478 Incorrect thread safety in MessageQ_setup (Linux)
Statically initialize the mutex object; removed the dynamic init
call. Protect the entire MessageQ_setup function inside the gate.
Added gate protection to MessageQ_destroy. Decrement the reference
count (this was missing).
Statically initialize the mutex object; removed the dynamic init
call. Protect the entire MessageQ_setup function inside the gate.
Added gate protection to MessageQ_destroy. Decrement the reference
count (this was missing).
Add autoconf generated file
Signed-off-by: VW <vwan@ti.com>
Signed-off-by: VW <vwan@ti.com>
Simplify configuration of maximum name length in NameServer
This commit cleans up how the maximum name length is configured in NameServer.
Now the user only needs to configure it during instance creation, and to
configure it at the remote level in
packages/ti/ipc/namesrv/_NameServerRemoteRpmsg.h.
When a name passed to the NameServer remote exceeds the length it can support,
it now returns NameServer_E_NAMETOOLONG.
The NameServerApp is updated to test for long names that exceed the
maximum length.
This commit addresses SDOCM00111686.
Signed-off-by: VW <vwan@ti.com>
This commit cleans up how the maximum name length is configured in NameServer.
Now the user only needs to configure it during instance creation, and to
configure it at the remote level in
packages/ti/ipc/namesrv/_NameServerRemoteRpmsg.h.
When a name passed to the NameServer remote exceeds the length it can support,
it now returns NameServer_E_NAMETOOLONG.
The NameServerApp is updated to test for long names that exceed the
maximum length.
This commit addresses SDOCM00111686.
Signed-off-by: VW <vwan@ti.com>
SDOCM00103540 Incorrect number of hardware spin locks on DRA7XX
Set the number of hardware spin locks to 256 in spinlockDelegate.
Set the number of hardware spin locks to 256 in spinlockDelegate.