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.
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>
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.
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.
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>
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.
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.
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.
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>
Add reserved queue support for QNX 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.
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).
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>
Specify Address Family for RPMessage in products.mak We use the Linux kernel version to make a guess at the value of AF_RPMSG. However, depending on the kernel configuration, this guess could be wrong. In this case, you must specify the AF_RPMSG value directly. This had been done in ipc-linux.mak, but this was too obscure. So, I moved it to products.mak.