QNX: NameServer_daemon: Initialize mutex_attr Initialize mutex_attr before using it. Otherwise, it could contain some uninitialized values. This patch is ported from commit id 7b3a739876e46d3194861a2d93077ff95954affb Signed-off-by: Angela Stegmaier <angelabaker@ti.com>
QNX: NameServer Daemon: Check that Handles passed from User are Valid Check that the handle being passed from the user is a valid handle that the daemon has previously allocated. This prevents the resource manager from crashing by accessing a stale handle that the user has passed (for instance in some error recovery scenarios). This patch adds the checking for function calls which are accessible through a devctl call. Signed-off-by: Angela Stegmaier <angelabaker@ti.com>
QNX: NameServer_delete in NameServer daemon leaks memory Remove an invalid assertion that the name list must be empty. This is not true and the instance might still be in use by another client (object is reference counted). Add a while loop to delete each entry on the name list. Destroy the object's gate (was not being done). Remove the macro to destruct a list object (not needed). [Ported from commits 8a52a6a5fa20ac028158a3ad346da46555ce45b7 "SDOCM00115434 NameServer_delete in LAD daemon leaks memory" and 6c4799151327f2c83b9f253ea25c52bef4e10803 "Remove NameServer instance from module list in NameServer_delete()"] Signed-off-by: Angela Stegmaier <angelabaker@ti.com>
QNX: DRA7XX: Fix Compilation Warnings This patch fixes compilation warnings in the DRA7XX-specific files that were introduced with the newer QNX version build. Signed-off-by: Angela Stegmaier <angelabaker@ti.com>
QNX: Shmemallocator: Fix Compilation Warnings This patch fixes compilation warnings introduced with the newer QNX version. Signed-off-by: Angela Stegmaier <angelabaker@ti.com>
QNX: rpmsg-rpc: Add MAP_SHARED to mmap64 Call With newer QNX kernels, there are issues unless the MAP_SHARED/MAP_PRIVATE flag is added to the mmap64 call alongside the MAP_PHYS parameter in rpmsg-rpc. This patch adds the MAP_SHARED flag to address the issues. Signed-off-by: Angela Stegmaier <angelabaker@ti.com>
QNX: NameServer: Fix Debug Trace in NameServer_add Fix a trace in NameServer_add which was assuming a 32-bit aligned pointer, but the pointer may not be aligned. So, print only the first byte, as the size of the entry is varaible anyway. Signed-off-by: Angela Stegmaier <angelabaker@ti.com>
QNX: Change LOGn to GT traces for consistency The QNX IPC code has a mix of LOGn and GT traces. This patch modifies all the LOGn traces to be GT traces for consistency, and to give better control to trace enabling. Signed-off-by: Angela Stegmaier <angelabaker@ti.com>
QNX: IPC: Handle Internal Memory Loading outside of Resource Table This patch essentially reverts the following commits: 1. "Add fw_rsc_intmem definition to support new TYPE_INTMEM entries in QNX" (commit 4a5f6fd0864854a99d430c6e6e7c65fb962f00e4) 2. " Add INTMEM resource type support in QNX" (commit eb3d6bcfd35b823746c6032a9f811fc414824704) Support for TYPE_INTMEM is being removed. Instead the internal memory regions will be available by default from the QNX resource manager, without the remote core image needing to speicify a special resource table entry. The changes are being made to align with coming BIOS-side changes to remove the TYPE_INTMEM. Signed-off-by: Angela Stegmaier <angelabaker@ti.com>
QNX: GateMP: Check Number of Resources for Gates Before Mapping A recent change to the BIOS-side GateMPSupportNull exposed an issue in the GateMP module in which it may attempt to map an address of 0x0. Previously, when GateMPSupportNull was used, the number of resources was set as 1 and a valid address was obtained. With the update, the number of resources for GateMPSupportNull is now 0. In this case, the GateMP code will attempt to map an address of 0x0, of size 0, which will fail. This patch fixes the code to first check that the number of resources is not 0, and only then proceed with the mapping. If the number of resources is 0, then we skip the mapping for that remote gate. This patch also makes a minor update to the LOGs for the failure cases for mapping remoteCustom1InUse and remoteCustom2InUse to print the proper remote InUse array. Signed-off-by: Angela Stegmaier <angelabaker@ti.com>
Disable entry/exit trace in some List_* functions in QNX Some functions in the List module are called with interrupts disabled. When these functions write to the slog (IPC_DEBUG_SLOG_LEVEL=7), a hard hang is occasionally observed. This patch disables the entry/exit trace in these functions to prevent the system from entering the deadlock state. Signed-off-by: VW <vwan@ti.com>