tests: Update memory map to match update in Linux dts
Updated memory region for each core to be 16 MB each
R5F0: 0xA0000000-0xA0FFFFFF: 16 MB
R5F1: 0xA1000000-0xA1FFFFFF: 16 MB
Also re-arranged memory sections to keep the resource table on the top
at offset 0x100000.
Updated resource table addresses and MPU settings accordingly.
Signed-off-by: Sam Nelson <sam.nelson@ti.com>
Reviewed-by: Suman Anna <s-anna@ti.com>
Updated memory region for each core to be 16 MB each
R5F0: 0xA0000000-0xA0FFFFFF: 16 MB
R5F1: 0xA1000000-0xA1FFFFFF: 16 MB
Also re-arranged memory sections to keep the resource table on the top
at offset 0x100000.
Updated resource table addresses and MPU settings accordingly.
Signed-off-by: Sam Nelson <sam.nelson@ti.com>
Reviewed-by: Suman Anna <s-anna@ti.com>
Remoteproc: OMAPL138: Use FW_RSC_ADDR_ANY for vrings in resource table
The memory for vrings are allocated dynamically by the Linux kernel-side,
and the corresponding resource table vring da fields are updated with the
allocated vring physical addresses. The current resource table uses fixed
addresses, and these happen to match the allocated addresses with the
current DSP device DMA/CMA pools. Newer Linux kernels > 4.19 still do
dynamic allocation, but only update these fields if they are read as
FW_RSC_ADDR_ANY. The OMAPL138 platforms do not have an MMU and so must
use the actual allocated addresses, so update the current resource table
to use FW_RSC_ADDR_ANY for the vring da fields. The previously defined
macros are also cleaned up.
The patch can only be used after the vdev synchronization logic commit
("omapl138: VirtQueue: Add vdev status synchronization logic").
Signed-off-by: Suman Anna <s-anna@ti.com>
The memory for vrings are allocated dynamically by the Linux kernel-side,
and the corresponding resource table vring da fields are updated with the
allocated vring physical addresses. The current resource table uses fixed
addresses, and these happen to match the allocated addresses with the
current DSP device DMA/CMA pools. Newer Linux kernels > 4.19 still do
dynamic allocation, but only update these fields if they are read as
FW_RSC_ADDR_ANY. The OMAPL138 platforms do not have an MMU and so must
use the actual allocated addresses, so update the current resource table
to use FW_RSC_ADDR_ANY for the vring da fields. The previously defined
macros are also cleaned up.
The patch can only be used after the vdev synchronization logic commit
("omapl138: VirtQueue: Add vdev status synchronization logic").
Signed-off-by: Suman Anna <s-anna@ti.com>
omapl138: VirtQueue: Add vdev status synchronization logic
The VirtQueue objects are currently initialized using the vring
addresses from the corresponding vring entries in the resource
table. The memory for vrings is always allocated on the Linux
kernel at runtime, and the resource table entry is updated with
the corresponding allocated address.
This allocation always used to happen during the vdev resource
handling previously on the Linux kernel side, but this behavior
has changed in newer Linux kernels > 4.19. The memory is allocated
now after all the resources are handled, and the resource table
is updated only when the virtio_rpmsg_bus driver is probed, and
only if a FW_RSC_ADDR_ANY is passed in the resource table. This
driver can be installed after the remoteproc is up, which results
in the RTOS code using a stale value.
Resolve this by adding a synchronization logic for the vdev
status (set during virtio_rpmsg_bus probe on kernel-side). The
synchronization is added during the creation of the first VirtQueue
object. This can probably be done in module startup as well since
the VirtQueue code on OMAPL138 is a XDC module, but the design
follows the non-XDC usage as on DRA7xx/AM57xx platforms.
Signed-off-by: Suman Anna <s-anna@ti.com>
The VirtQueue objects are currently initialized using the vring
addresses from the corresponding vring entries in the resource
table. The memory for vrings is always allocated on the Linux
kernel at runtime, and the resource table entry is updated with
the corresponding allocated address.
This allocation always used to happen during the vdev resource
handling previously on the Linux kernel side, but this behavior
has changed in newer Linux kernels > 4.19. The memory is allocated
now after all the resources are handled, and the resource table
is updated only when the virtio_rpmsg_bus driver is probed, and
only if a FW_RSC_ADDR_ANY is passed in the resource table. This
driver can be installed after the remoteproc is up, which results
in the RTOS code using a stale value.
Resolve this by adding a synchronization logic for the vdev
status (set during virtio_rpmsg_bus probe on kernel-side). The
synchronization is added during the creation of the first VirtQueue
object. This can probably be done in module startup as well since
the VirtQueue code on OMAPL138 is a XDC module, but the design
follows the non-XDC usage as on DRA7xx/AM57xx platforms.
Signed-off-by: Suman Anna <s-anna@ti.com>
omapl138: VirtQueue: Fixup mapVAtoPA() and mapPAtoVA()
The mapVAtoPA() and mapPAtoVA() functions used in the OMAPL138
VirtQueue code uses a hard-coded address translating logic that
caters to only a specific set of images. The DSPs on OMAPL138
do not have MMUs, so the addresses seen in the vring control
structures should be identical between the processor view and
the actual DDR address. The only case where this might not be
true is if the MPAX is being used to perform some address
translations, but this is not the case today.
So, fixup these functions to provide a one-to-one exact translation.
This fixes up issues with latest upstream kernels (v5.1+) where
the virtio buffers are no longer allocated from the same remoteproc
device DMA pool, and so can be allocated anywhere in DDR memory
(from the default Linux DMA/CMA pool).
Signed-off-by: Suman Anna <s-anna@ti.com>
The mapVAtoPA() and mapPAtoVA() functions used in the OMAPL138
VirtQueue code uses a hard-coded address translating logic that
caters to only a specific set of images. The DSPs on OMAPL138
do not have MMUs, so the addresses seen in the vring control
structures should be identical between the processor view and
the actual DDR address. The only case where this might not be
true is if the MPAX is being used to perform some address
translations, but this is not the case today.
So, fixup these functions to provide a one-to-one exact translation.
This fixes up issues with latest upstream kernels (v5.1+) where
the virtio buffers are no longer allocated from the same remoteproc
device DMA pool, and so can be allocated anywhere in DDR memory
(from the default Linux DMA/CMA pool).
Signed-off-by: Suman Anna <s-anna@ti.com>
Remoteproc: OMAPL138: Remove unused macros from resource table
There are couple of macros that are defined in the OMAPL138 resource
table file, but are not used anywhere. These are left-overs from very
old code, so clean them up.
Signed-off-by: Suman Anna <s-anna@ti.com>
There are couple of macros that are defined in the OMAPL138 resource
table file, but are not used anywhere. These are left-overs from very
old code, so clean them up.
Signed-off-by: Suman Anna <s-anna@ti.com>
rsc_types: Add the definition of FW_RSC_ADDR_ANY
Add the definition for a FW_RSC_ADDR_ANY macro. This macro
should be used for da in various resource types if that
particular memory needs to be dynamically allocated on the
kernel. This value is now actively used in all the upstream
kernels post the v4.19 release.
Signed-off-by: Suman Anna <s-anna@ti.com>
Add the definition for a FW_RSC_ADDR_ANY macro. This macro
should be used for da in various resource types if that
particular memory needs to be dynamically allocated on the
kernel. This value is now actively used in all the upstream
kernels post the v4.19 release.
Signed-off-by: Suman Anna <s-anna@ti.com>
rsc_types: Use the correct integer type in fw_rsc_vdev
The Linux kernel uses an unsigned 8-bit integer type for the
status, num_of_vrings and reserved fields of the fw_rsc_vdev
structure. These are slightly mis-represented as a 8-bit Char
type within the IPC code. Fix this by using the equivalent
BIOS-side variable type - UInt8 in the rsc_types.h header
file.
This does fix couple of warnings about comparision between
mixed types.
Signed-off-by: Suman Anna <s-anna@ti.com>
The Linux kernel uses an unsigned 8-bit integer type for the
status, num_of_vrings and reserved fields of the fw_rsc_vdev
structure. These are slightly mis-represented as a 8-bit Char
type within the IPC code. Fix this by using the equivalent
BIOS-side variable type - UInt8 in the rsc_types.h header
file.
This does fix couple of warnings about comparision between
mixed types.
Signed-off-by: Suman Anna <s-anna@ti.com>
Resource: Fix compile warning in Resource_getTraceBufSize()
The function Resource_getTraceBufSize() should return a value
of type SizeT, but is currently returning a value of NULL upon
failures. This generates the following compile warning,
"warning: return value type does not match the function type".
Fix this properly by simply returning a value of 0.
Signed-off-by: Suman Anna <s-anna@ti.com>
The function Resource_getTraceBufSize() should return a value
of type SizeT, but is currently returning a value of NULL upon
failures. This generates the following compile warning,
"warning: return value type does not match the function type".
Fix this properly by simply returning a value of 0.
Signed-off-by: Suman Anna <s-anna@ti.com>
Linux: Update user AF_RPMSG define for 4.18+ kernels
IPC's Linux user space support contains a copy of a few
kernel-defined structs and definitions including the socket
address family used for rpmsg-based sockets - AF_RPMSG. This
driver is currently out-of-tree and so it's definition is
always 'one more' than the last address family defined by
the mainline kernel's socket.h.
A new address family was introduced in 4.18 (AF_XDP), and as
a result, the AF_RPMSG macro needs to be set to 45 post 4.18
kernel. The user space header has been updated to reflect on
the kernel version and appropriately assign the value of
AF_RPMSG.
Do note that a specific value of AF_RPMSG can always be provided
through the products.mak when KERNEL_INSTALL_DIR is not set.
Signed-off-by: Suman Anna <s-anna@ti.com>
IPC's Linux user space support contains a copy of a few
kernel-defined structs and definitions including the socket
address family used for rpmsg-based sockets - AF_RPMSG. This
driver is currently out-of-tree and so it's definition is
always 'one more' than the last address family defined by
the mainline kernel's socket.h.
A new address family was introduced in 4.18 (AF_XDP), and as
a result, the AF_RPMSG macro needs to be set to 45 post 4.18
kernel. The user space header has been updated to reflect on
the kernel version and appropriately assign the value of
AF_RPMSG.
Do note that a specific value of AF_RPMSG can always be provided
through the products.mak when KERNEL_INSTALL_DIR is not set.
Signed-off-by: Suman Anna <s-anna@ti.com>
trace: Update to remove direct dependence on SysMin
The size of trace buffer here instead obtaining from the Sysmin
parameter from headerfile, is now obtained directly from the resource
table
Also fixes backward compatibility issues with applications using
xdc/runtime/SysMin.
Signed-off-by: Sam Nelson <sam.nelson@ti.com>
The size of trace buffer here instead obtaining from the Sysmin
parameter from headerfile, is now obtained directly from the resource
table
Also fixes backward compatibility issues with applications using
xdc/runtime/SysMin.
Signed-off-by: Sam Nelson <sam.nelson@ti.com>
am65xx: Update to remove reference to sciclient internal header file
Note that this reference to
ti/drv/sciclient/include/V0/tisci_resasg_types.h was added due to an
issue with the sciclient in terms of API.
Now that the issue is resolved sciclient, the reference to this header
file can be removed.
Signed-off-by: Sam Nelson <sam.nelson@ti.com>
Note that this reference to
ti/drv/sciclient/include/V0/tisci_resasg_types.h was added due to an
issue with the sciclient in terms of API.
Now that the issue is resolved sciclient, the reference to this header
file can be removed.
Signed-off-by: Sam Nelson <sam.nelson@ti.com>
c66x: Update compiler options to reduce code size
Reduce IPC unit test code size for C66 binaries when using compiler
version 8.3.x by using optimization -mf=2 or --opt_for_speed=2
Signed-off-by: Sam Nelson <sam.nelson@ti.com>
Reduce IPC unit test code size for C66 binaries when using compiler
version 8.3.x by using optimization -mf=2 or --opt_for_speed=2
Signed-off-by: Sam Nelson <sam.nelson@ti.com>
tests: R5F Memory map cleanup
Added section to capture unused sections
Added align to avoid issues with unaligned load
Signed-off-by: Sam Nelson <sam.nelson@ti.com>
Added section to capture unused sections
Added align to avoid issues with unaligned load
Signed-off-by: Sam Nelson <sam.nelson@ti.com>
am65xx: Fix issue for R5F0 to R5F1 communication
This code was originally designed to use local interrupt mechanisms
between R5F-0 and R5F-1 cores. But the implementation now assumes
mailbox interrupts to be directly used. So removing the code here which
bypasses enabling and disable of mailbox interrupts
Signed-off-by: Sam Nelson <sam.nelson@ti.com>
This code was originally designed to use local interrupt mechanisms
between R5F-0 and R5F-1 cores. But the implementation now assumes
mailbox interrupts to be directly used. So removing the code here which
bypasses enabling and disable of mailbox interrupts
Signed-off-by: Sam Nelson <sam.nelson@ti.com>
tests: Remove misleading memory comments
The memory section itself is self explanatory.
Signed-off-by: Sam Nelson <sam.nelson@ti.com>
The memory section itself is self explanatory.
Signed-off-by: Sam Nelson <sam.nelson@ti.com>
ipc: Remove compiler warnings
Removes warnings due to Assert_isTrue id set to NULL
Also removes warnings due to int to pointer conversion
Signed-off-by: Sam Nelson <sam.nelson@ti.com>
Removes warnings due to Assert_isTrue id set to NULL
Also removes warnings due to int to pointer conversion
Signed-off-by: Sam Nelson <sam.nelson@ti.com>
am65xx: Fix Compilation warnings on int to pointer conversion
Signed-off-by: Sam Nelson <sam.nelson@ti.com>
Signed-off-by: Sam Nelson <sam.nelson@ti.com>
tests: R5F Split mode support
Add code to build separate test images for R5F0, R5F1.
R5F0 images can be used AS-IS with R5F cores in Lock step mode
Note the DDR memory is partitioned according to the Linux device tree
nodes for r5f-0 and r5f-1
Signed-off-by: Sam Nelson <sam.nelson@ti.com>
Add code to build separate test images for R5F0, R5F1.
R5F0 images can be used AS-IS with R5F cores in Lock step mode
Note the DDR memory is partitioned according to the Linux device tree
nodes for r5f-0 and r5f-1
Signed-off-by: Sam Nelson <sam.nelson@ti.com>
am65x: Update resource table for split R5F cores
Note the memory is partitioned between the two split cores and the
sections should match what is the Linux device tree nodes for R5F0 &
R5F1
Signed-off-by: Sam Nelson <sam.nelson@ti.com>
Note the memory is partitioned between the two split cores and the
sections should match what is the Linux device tree nodes for R5F0 &
R5F1
Signed-off-by: Sam Nelson <sam.nelson@ti.com>
Remoteproc: AM65xx: Remove all RSC_CARVEOUT entries
The R5F cores on AM65xx SoCs do not have an MMU, and so use
direct mapping of CPU memory to DDR memory. The Region Address
Translator (RAT) sub-module can provide linear address translations
but is not currently supported. The RSC_CARVEOUT entries are
currently being used to allocate memory on the Linux side for
various firmware image sections, but this was a temporary
workaround to leverage existing infrastructure on the Linux kernel
side.
Remove all the RSC_CARVEOUT entries and rely on the newly added
support on the Linux kernel side for fixed memory regions for
loading firmware images. The firmware image linker map sections
should fit the addresses defined through the reserved memory nodes
associated with the remoteproc device on the Linux kernel side.
NOTE:
The RSC_DEVMEM resource entry is retained for now until the
address translation logic in AM65xx VirtQueue code is fixed up,
since this resource type is not supported for remoteprocs without
any MMUs.
Signed-off-by: Suman Anna <s-anna@ti.com>
The R5F cores on AM65xx SoCs do not have an MMU, and so use
direct mapping of CPU memory to DDR memory. The Region Address
Translator (RAT) sub-module can provide linear address translations
but is not currently supported. The RSC_CARVEOUT entries are
currently being used to allocate memory on the Linux side for
various firmware image sections, but this was a temporary
workaround to leverage existing infrastructure on the Linux kernel
side.
Remove all the RSC_CARVEOUT entries and rely on the newly added
support on the Linux kernel side for fixed memory regions for
loading firmware images. The firmware image linker map sections
should fit the addresses defined through the reserved memory nodes
associated with the remoteproc device on the Linux kernel side.
NOTE:
The RSC_DEVMEM resource entry is retained for now until the
address translation logic in AM65xx VirtQueue code is fixed up,
since this resource type is not supported for remoteprocs without
any MMUs.
Signed-off-by: Suman Anna <s-anna@ti.com>
am65xx: Update to use static resources from System firmware
Instead of hard coding the interrupt resource, use the ones statically
configured as part of the board config
Signed-off-by: Sam Nelson <sam.nelson@ti.com>
Instead of hard coding the interrupt resource, use the ones statically
configured as part of the board config
Signed-off-by: Sam Nelson <sam.nelson@ti.com>
tests: Update MPU configuration for non-shared memory
Making the code/data memory shareable makes the memory non-cacheable and
performance is affected.
Modified MPU configuration, so that only the shared region is marked as
shareable and other regions used for code/data are mareked as non-
shareable.
This results in better performance.
Signed-off-by: Sam Nelson <sam.nelson@ti.com>
Making the code/data memory shareable makes the memory non-cacheable and
performance is affected.
Modified MPU configuration, so that only the shared region is marked as
shareable and other regions used for code/data are mareked as non-
shareable.
This results in better performance.
Signed-off-by: Sam Nelson <sam.nelson@ti.com>
rsc_table: Update to fix backward compatibilty with xdc SysMin
With this, application can use either ti.trace.SysMin or
xdc.runtime.SysMin.
Old applications using xdc.runtime.SysMin can still work.
Signed-off-by: Sam Nelson <sam.nelson@ti.com>
With this, application can use either ti.trace.SysMin or
xdc.runtime.SysMin.
Old applications using xdc.runtime.SysMin can still work.
Signed-off-by: Sam Nelson <sam.nelson@ti.com>
am65xx: Integrate sciclient for interrupt routing through system-fw
- Adds dependency on sciclient part of the PDK package
- Add new module ti.sdo.ip.family.am65xx.NotifySciClient which
configures interrupt routes by communicating with system core using
sciclient module.
- removes old code which configured directly the interrupt routes to cpu
Signed-off-by: Sam Nelson <sam.nelson@ti.com>
- Adds dependency on sciclient part of the PDK package
- Add new module ti.sdo.ip.family.am65xx.NotifySciClient which
configures interrupt routes by communicating with system core using
sciclient module.
- removes old code which configured directly the interrupt routes to cpu
Signed-off-by: Sam Nelson <sam.nelson@ti.com>
tests: Add idle function to test code
This is to plug in function to handle idle state
Signed-off-by: Sam Nelson <sam.nelson@ti.com>
This is to plug in function to handle idle state
Signed-off-by: Sam Nelson <sam.nelson@ti.com>
am65xx: Add Power module for idle routine
Idle routine is needed to put cpu in safe state for the host processor
to reset.
Signed-off-by: Sam Nelson <sam.nelson@ti.com>
Idle routine is needed to put cpu in safe state for the host processor
to reset.
Signed-off-by: Sam Nelson <sam.nelson@ti.com>
ping_rpmsg: OMAPL138: Add program section for tracebuf
This is needed when you use ti.trace.SysMin
Signed-off-by: Sam Nelson <sam.nelson@ti.com>
This is needed when you use ti.trace.SysMin
Signed-off-by: Sam Nelson <sam.nelson@ti.com>
rsc_table: am65xx: Update trace buffer size to 0x8000
Given availability of DDR, expanding to better size
Signed-off-by: Sam Nelson <sam.nelson@ti.com>
Given availability of DDR, expanding to better size
Signed-off-by: Sam Nelson <sam.nelson@ti.com>
rsc_table: Remove unused carveout definitions
This is leftover from previous code. Not used anymore.
Signed-off-by: Sam Nelson <sam.nelson@ti.com>
This is leftover from previous code. Not used anymore.
Signed-off-by: Sam Nelson <sam.nelson@ti.com>
Resource: Handle AM65xx case correctly
The previous modification handled addressed the backward compatibility
concern, but reverted fix for am65xx
Signed-off-by: Sam Nelson <sam.nelson@ti.com>]
The previous modification handled addressed the backward compatibility
concern, but reverted fix for am65xx
Signed-off-by: Sam Nelson <sam.nelson@ti.com>]
rpmsg: Fix to handle Keystone 2 correctly
xdc_Fxn is used only by OMAPL138, TCI6638
Signed-off-by: Sam Nelson <sam.nelson@ti.com>
xdc_Fxn is used only by OMAPL138, TCI6638
Signed-off-by: Sam Nelson <sam.nelson@ti.com>
tracebuf: Update trace buffer size to 0x2000
Given tracebuf is circular buffer 0x2000 should be sufficient.
Need to reduce number of buffers for K2E to fix compilation issues
Also remove unused carveout definitions
Signed-off-by: Sam Nelson <sam.nelson@ti.com>
Given tracebuf is circular buffer 0x2000 should be sufficient.
Need to reduce number of buffers for K2E to fix compilation issues
Also remove unused carveout definitions
Signed-off-by: Sam Nelson <sam.nelson@ti.com>
Resource: Fix backward compatibility issue
Need to still handle case where no load segment is defined and the
.resource table need to be created a noninit section
Signed-off-by: Sam Nelson <sam.nelson@ti.com>
Need to still handle case where no load segment is defined and the
.resource table need to be created a noninit section
Signed-off-by: Sam Nelson <sam.nelson@ti.com>
rpmsg: Fix compilation warning
xdc_Fxn is used only by OMAPL138
Signed-off-by: Sam Nelson <sam.nelson@ti.com>
xdc_Fxn is used only by OMAPL138
Signed-off-by: Sam Nelson <sam.nelson@ti.com>
transports: Add TransportRpmsg.c to package for AM65XX
Without the fix , TransportRpmsg.c not included in package for AM65XX
Signed-off-by: Sam Nelson <sam.nelson@ti.com>
---
Change from previous verison
Update typo in commit title
---
Without the fix , TransportRpmsg.c not included in package for AM65XX
Signed-off-by: Sam Nelson <sam.nelson@ti.com>
---
Change from previous verison
Update typo in commit title
---
qnx: Add 64 bit defines
This is needed for MessageQ API updates to handle processors with 64 bit
support
Signed-off-by: Sam Nelson <sam.nelson@ti.com>
This is needed for MessageQ API updates to handle processors with 64 bit
support
Signed-off-by: Sam Nelson <sam.nelson@ti.com>
tests: Update tracebuf sections for K2 and omapl138
- It is needed now that ti.trace.SysMin is used
Signed-off-by: Sam Nelson <sam.nelson@ti.com>
- It is needed now that ti.trace.SysMin is used
Signed-off-by: Sam Nelson <sam.nelson@ti.com>
TEMP: smp: Disable SMP for now for A53
BIOS currently does not support SMP for A53
Disabling SMP configuration for now
Signed-off-by: Sam Nelson <sam.nelson@ti.com>
BIOS currently does not support SMP for A53
Disabling SMP configuration for now
Signed-off-by: Sam Nelson <sam.nelson@ti.com>
daemon: Update debug print with more clear information
Helps to debug if the AF_RPMSG is not the expected value
Signed-off-by: Sam Nelson <sam.nelson@ti.com>
Helps to debug if the AF_RPMSG is not the expected value
Signed-off-by: Sam Nelson <sam.nelson@ti.com>
Build.xs: Cleanup item identified
Added TODO to mark change needed
Signed-off-by: Sam Nelson <sam.nelson@ti.com>
Added TODO to mark change needed
Signed-off-by: Sam Nelson <sam.nelson@ti.com>
TEMP: Tests: ping_rpmsg: Override checkFrequency flags
This is a work around to avoid issues with dmtimer.
TODO: Need to check with updated build target.
Signed-off-by: Suman Anna <s-anna@ti.com>
Signed-off-by: Sam Nelson <sam.nelson@ti.com>
This is a work around to avoid issues with dmtimer.
TODO: Need to check with updated build target.
Signed-off-by: Suman Anna <s-anna@ti.com>
Signed-off-by: Sam Nelson <sam.nelson@ti.com>
remoteproc: Use ti.trace.SysMin instead of xdc.runtime.SysMin
ti.trace.SysMin is needed to have the trace handled as a circular buffer
Updating this for omapl138 and K2 platforms.
Signed-off-by: Suman Anna <s-anna@ti.com>
Signed-off-by: Sam Nelson <sam.nelson@ti.com>
ti.trace.SysMin is needed to have the trace handled as a circular buffer
Updating this for omapl138 and K2 platforms.
Signed-off-by: Suman Anna <s-anna@ti.com>
Signed-off-by: Sam Nelson <sam.nelson@ti.com>
SysMin: Remove error check against CPU memory map
Moving forward new platforms does not capture the cpu memory map, so
remove this error check for AM65X only
Signed-off-by: Suman Anna <s-anna@ti.com>
Signed-off-by: Sam Nelson <sam.nelson@ti.com>
Moving forward new platforms does not capture the cpu memory map, so
remove this error check for AM65X only
Signed-off-by: Suman Anna <s-anna@ti.com>
Signed-off-by: Sam Nelson <sam.nelson@ti.com>
TMP: listMP: Add Cache operation for v8A
Ideally with the coherence working between A53 and R5F, there is no
cache operations required from A53 side. But the coherence operations
requires the ISC registers configured for R5F transactions to be non-
secure.
Adding this as temporary workaround.
Signed-off-by: Sam Nelson <sam.nelson@ti.com>
Ideally with the coherence working between A53 and R5F, there is no
cache operations required from A53 side. But the coherence operations
requires the ISC registers configured for R5F transactions to be non-
secure.
Adding this as temporary workaround.
Signed-off-by: Sam Nelson <sam.nelson@ti.com>
Build.xs: Remove -mapcs-frame for A53F
This option is deprecated in gcc for A53F target
Signed-off-by: Sam Nelson <sam.nelson@ti.com>
This option is deprecated in gcc for A53F target
Signed-off-by: Sam Nelson <sam.nelson@ti.com>
Build.xs: Update GCC compile option mapcs-frame
mapcs is deprecated with new version of gcc tools but identical to
mapcs-frame
Signed-off-by: Sam Nelson <sam.nelson@ti.com>
mapcs is deprecated with new version of gcc tools but identical to
mapcs-frame
Signed-off-by: Sam Nelson <sam.nelson@ti.com>
tests: Cleanup for observed compiler warnings
Removed typecast forcing pointer to UInt. With 64 bit pointer need to
print with appropriate formatting
- added type casts where needed
Signed-off-by: Sam Nelson <sam.nelson@ti.com>
Removed typecast forcing pointer to UInt. With 64 bit pointer need to
print with appropriate formatting
- added type casts where needed
Signed-off-by: Sam Nelson <sam.nelson@ti.com>
daemon: Add error check form read and write calls.
Added error check of return values from read and write functions.
This also clears compiler warnings
Signed-off-by: Sam Nelson <sam.nelson@ti.com>
Added error check of return values from read and write functions.
This also clears compiler warnings
Signed-off-by: Sam Nelson <sam.nelson@ti.com>
transport: Add error check for read and write function calls
Added error check of return values from read and write functions.
This also clears compiler warnings
Signed-off-by: Sam Nelson <sam.nelson@ti.com>
Added error check of return values from read and write functions.
This also clears compiler warnings
Signed-off-by: Sam Nelson <sam.nelson@ti.com>
Build.xs: remove unused utilsSources
Sources for utils are already captured in packages/ti/sdo/utils/Build.xs
Signed-off-by: Sam Nelson <sam.nelson@ti.com>
Sources for utils are already captured in packages/ti/sdo/utils/Build.xs
Signed-off-by: Sam Nelson <sam.nelson@ti.com>
MessageQ: Update MesssageQ header for 64 bit addresses
The reserved fields are expected to hold the next and previous pointers
which needs to work with 64 bit pointers.
Redefined to be Bits64 to accomodate this.
Signed-off-by: Sam Nelson <sam.nelson@ti.com>
The reserved fields are expected to hold the next and previous pointers
which needs to work with 64 bit pointers.
Redefined to be Bits64 to accomodate this.
Signed-off-by: Sam Nelson <sam.nelson@ti.com>
autotools: Update autotools generated files with K3 AM65XX support
- autoreconf used to generate makefiles
Signed-off-by: Sam Nelson <sam.nelson@ti.com>
- autoreconf used to generate makefiles
Signed-off-by: Sam Nelson <sam.nelson@ti.com>
K3: Add support for K3 AM65XX device
- Adds support for A53 and R5F cores
- Adds IPC VirtQueue, Interrupt & Notity drivers for AM65XX platform.
- gates: Add V7R and v8A support
Signed-off-by: Sam Nelson <sam.nelson@ti.com>
- Adds support for A53 and R5F cores
- Adds IPC VirtQueue, Interrupt & Notity drivers for AM65XX platform.
- gates: Add V7R and v8A support
Signed-off-by: Sam Nelson <sam.nelson@ti.com>
Resource: Update to handle resource table area using linker symbol
- Modified to place memory only if loadSegment is defined
- For new platforms, SYSBIOS will not handle platform memory map.
So the linker command file is external. Only way to get the
start address is using the external linker symbol.
- Added new variable loadSymbol to allow setting the tableptr using
symbol
Signed-off-by: Sam Nelson <sam.nelson@ti.com>
- Modified to place memory only if loadSegment is defined
- For new platforms, SYSBIOS will not handle platform memory map.
So the linker command file is external. Only way to get the
start address is using the external linker symbol.
- Added new variable loadSymbol to allow setting the tableptr using
symbol
Signed-off-by: Sam Nelson <sam.nelson@ti.com>
SharedRegion: Update to use linker symbols instead of platform map
The Keystone3 platform in sysbios does not support memory maps. The
memory map needs to be done using the custom linker command file.
And hence changed Shared Region module to optionally accept
linker symbols for base and length of shared region.
platform.dataMemory is no longer supported. Need to use linker.cmd
to place sections
Update types to generic types: Previous code assumed UInt32 for Pointer
Signed-off-by: Sam Nelson <sam.nelson@ti.com>
The Keystone3 platform in sysbios does not support memory maps. The
memory map needs to be done using the custom linker command file.
And hence changed Shared Region module to optionally accept
linker symbols for base and length of shared region.
platform.dataMemory is no longer supported. Need to use linker.cmd
to place sections
Update types to generic types: Previous code assumed UInt32 for Pointer
Signed-off-by: Sam Nelson <sam.nelson@ti.com>
Std.h: Add definition of 64 bit types
This is needed for supporting new devices with 64 bit pointers
Signed-off-by: Sam Nelson <sam.nelson@ti.com>
This is needed for supporting new devices with 64 bit pointers
Signed-off-by: Sam Nelson <sam.nelson@ti.com>
lad: Add Timeout waiting for Response FIFO
Add a timeout to the logic which opens the client response FIFO
in the LAD daemon during LAD_CONNECT. There are some corner cases
that might result in this hanging forever waiting for the response
FIFO, in which case, all other LAD communication will be blocked
forever.
Such cases might be:
- Client application crashes after sending LAD_connect request
- Communication with LAD through the LADCMDS fifo takes too long
and the Client times out waiting for the response FIFO (5 seconds).
If this happens, Client will never try to open the FIFO again due
to failing when doing the stat() on the FIFO.
With this patch, if the FIFO connection is not established within the
timeout, the FIFO will be unlinked and the original state restored so
that the connection can be attempted again.
The timeout is chosen as 1 second so as not to block all other LAD
communication for a long period of time. 1 second should (hopefully) be
sufficient time for the Client and LAD to both open the FIFO.
Signed-off-by: Angela Stegmaier <angelabaker@ti.com>
Add a timeout to the logic which opens the client response FIFO
in the LAD daemon during LAD_CONNECT. There are some corner cases
that might result in this hanging forever waiting for the response
FIFO, in which case, all other LAD communication will be blocked
forever.
Such cases might be:
- Client application crashes after sending LAD_connect request
- Communication with LAD through the LADCMDS fifo takes too long
and the Client times out waiting for the response FIFO (5 seconds).
If this happens, Client will never try to open the FIFO again due
to failing when doing the stat() on the FIFO.
With this patch, if the FIFO connection is not established within the
timeout, the FIFO will be unlinked and the original state restored so
that the connection can be attempted again.
The timeout is chosen as 1 second so as not to block all other LAD
communication for a long period of time. 1 second should (hopefully) be
sufficient time for the Client and LAD to both open the FIFO.
Signed-off-by: Angela Stegmaier <angelabaker@ti.com>
Resource: Rename the IpcMemory name in Resource.xs
The Resource module is derived from the IpcMemory module within
the sysbios-rpmsg codebase originally, but the Resource.xs file
is still using the IpcMemory name and so the config processing of
this module will print erroneous names on any misconfiguration.
Rename the variable IpcMemory to Resource like is normally done
with .xs files.
Signed-off-by: Suman Anna <s-anna@ti.com>
The Resource module is derived from the IpcMemory module within
the sysbios-rpmsg codebase originally, but the Resource.xs file
is still using the IpcMemory name and so the config processing of
this module will print erroneous names on any misconfiguration.
Rename the variable IpcMemory to Resource like is normally done
with .xs files.
Signed-off-by: Suman Anna <s-anna@ti.com>
ipc: static analysis issues on NULL pointer access
Added null check to avoid direct crash and return error or assert.
Signed-off-by: Sam Nelson <sam.nelson@ti.com>
Added null check to avoid direct crash and return error or assert.
Signed-off-by: Sam Nelson <sam.nelson@ti.com>
Android: Remove use of LOCAL_MODULE_PATH to allow Multilib build
LOCAL_MODULE_PATH is not multilib safe, the recommended alternative
is LOCAL_MODULE_RELATIVE_PATH, but we don't need that either as
using LOCAL_VENDOR_MODULE will get our output deployed to the
correct spot without needing to hard-code paths.
Signed-off-by: Andrew F. Davis <afd@ti.com>
LOCAL_MODULE_PATH is not multilib safe, the recommended alternative
is LOCAL_MODULE_RELATIVE_PATH, but we don't need that either as
using LOCAL_VENDOR_MODULE will get our output deployed to the
correct spot without needing to hard-code paths.
Signed-off-by: Andrew F. Davis <afd@ti.com>
tests: DRA7XX: Fix clock configuration in gatempapp.cfg
The gatempapp.cfg was not selecting the proper clock
config for DSP1. This patch fixes the gatempapp.cfg
file to use the same common Dsp_vayu.cfg and Dsp_vayu_power.cfg
files to do the common configurations including clock
configuration.
Without this, the watchdog will not be proper and will
result in unexpected watchdog timings for the messageq_fault
tests for DSP1.
Reported-by: Suman Anna <s-anna@ti.com>
Signed-off-by: Angela Stegmaier <angelabaker@ti.com>
Tested-by: Suman Anna <s-anna@ti.com>
The gatempapp.cfg was not selecting the proper clock
config for DSP1. This patch fixes the gatempapp.cfg
file to use the same common Dsp_vayu.cfg and Dsp_vayu_power.cfg
files to do the common configurations including clock
configuration.
Without this, the watchdog will not be proper and will
result in unexpected watchdog timings for the messageq_fault
tests for DSP1.
Reported-by: Suman Anna <s-anna@ti.com>
Signed-off-by: Angela Stegmaier <angelabaker@ti.com>
Tested-by: Suman Anna <s-anna@ti.com>
Linux: Cleanup on Failure in Ipc_start
Add the appropriate cleanup calls when Ipc_start fails, so
that Ipc_start can be called again in a clean state. This
allows retry of Ipc_start in case of failure due to various
conditions including if reponses are delayed from the remote
core for some reason.
Signed-off-by: Angela Stegmaier <angelabaker@ti.com>
Add the appropriate cleanup calls when Ipc_start fails, so
that Ipc_start can be called again in a clean state. This
allows retry of Ipc_start in case of failure due to various
conditions including if reponses are delayed from the remote
core for some reason.
Signed-off-by: Angela Stegmaier <angelabaker@ti.com>
Linux: GateMP: Fix Error Handling When defaultGate Not Found Due to Timeout
In a corner case where remote NameServer requests take too long and
time out, it is possible that remoteSystemGate may be de-referenced
in GateMP_start when it wasn't allocated during GateMP_attach.
This patch improves error checking in GateMP_start to avoid the potential
NULL pointer de-reference. Before trying to access the remoteSystemGates
pointer during GateMP_start, we should first make sure that the pointer is
valid. Also check to make sure that the gate number does not exceed the
number of allocated gates.
If the corner case has been hit where the GateMP_attach failed but GateMP_open
later passes during GateMP_start, GateMP_start will now return an error,
resulting in Ipc_start returning an error. The application can then call
Ipc_start again.
Signed-off-by: Angela Stegmaier <angelabaker@ti.com>
In a corner case where remote NameServer requests take too long and
time out, it is possible that remoteSystemGate may be de-referenced
in GateMP_start when it wasn't allocated during GateMP_attach.
This patch improves error checking in GateMP_start to avoid the potential
NULL pointer de-reference. Before trying to access the remoteSystemGates
pointer during GateMP_start, we should first make sure that the pointer is
valid. Also check to make sure that the gate number does not exceed the
number of allocated gates.
If the corner case has been hit where the GateMP_attach failed but GateMP_open
later passes during GateMP_start, GateMP_start will now return an error,
resulting in Ipc_start returning an error. The application can then call
Ipc_start again.
Signed-off-by: Angela Stegmaier <angelabaker@ti.com>
ipc-bios.mak: Update to allow use of top level Rule.mak
Products.mak sets variables to point to external products.
Allowing RULES_MAKE variable to be overriden, helps in building in a SDK
context.
This is to help with build with SDKs bundling IPC.
Should not affect stand alone IPC builds
Signed-off-by: Sam Nelson <sam.nelson@ti.com>
Products.mak sets variables to point to external products.
Allowing RULES_MAKE variable to be overriden, helps in building in a SDK
context.
This is to help with build with SDKs bundling IPC.
Should not affect stand alone IPC builds
Signed-off-by: Sam Nelson <sam.nelson@ti.com>
GateMP: Add cache operation to make sure the SR0 contents are synced up
Before opening the shared region, make sure the cache is
invalidated. Even though the memory was not accessed before, because of
speculative execution the memory may be in the cache line already.
Signed-off-by: Sam Nelson <sam.nelson@ti.com>
Before opening the shared region, make sure the cache is
invalidated. Even though the memory was not accessed before, because of
speculative execution the memory may be in the cache line already.
Signed-off-by: Sam Nelson <sam.nelson@ti.com>
ListMP: Add barrier to ensure write backs complete
The call to barrier function is needed to ensure the intended changes
are already written back to memory before leaving the gate to avoid
issues.
Signed-off-by: Sam Nelson <sam.nelson@ti.com>
The call to barrier function is needed to ensure the intended changes
are already written back to memory before leaving the gate to avoid
issues.
Signed-off-by: Sam Nelson <sam.nelson@ti.com>
Android: Fix compilation warnings
Fix compilation warnings seen with Android build.
Signed-off-by: Angela Stegmaier <angelabaker@ti.com>
Fix compilation warnings seen with Android build.
Signed-off-by: Angela Stegmaier <angelabaker@ti.com>
Linux: Update user AF_RPMSG define for 4.11+ kernels
IPC's Linux user space support contains a copy of a few
kernel-defined structs and definitions including the socket
address family used for rpmsg-based sockets - AF_RPMSG. This
driver is currently out-of-tree and so it's definition is
always 'one more' than the last address family defined by
the mainline kernel's socket.h.
A new address family was introduced in 4.11 (AF_SMC), and as
a result, the AF_RPMSG macro needs to be set to 44 post 4.11
kernel. The user space header has been updated to reflect on
the kernel version and appropriately assign the value of
AF_RPMSG.
Do note that a specific value of AF_RPMSG can always be provided
through the products.mak when KERNEL_INSTALL_DIR is not set.
Signed-off-by: Suman Anna <s-anna@ti.com>
IPC's Linux user space support contains a copy of a few
kernel-defined structs and definitions including the socket
address family used for rpmsg-based sockets - AF_RPMSG. This
driver is currently out-of-tree and so it's definition is
always 'one more' than the last address family defined by
the mainline kernel's socket.h.
A new address family was introduced in 4.11 (AF_SMC), and as
a result, the AF_RPMSG macro needs to be set to 44 post 4.11
kernel. The user space header has been updated to reflect on
the kernel version and appropriately assign the value of
AF_RPMSG.
Do note that a specific value of AF_RPMSG can always be provided
through the products.mak when KERNEL_INSTALL_DIR is not set.
Signed-off-by: Suman Anna <s-anna@ti.com>
Linux: LAD_client: Fix Race Condition with Command FIFO
With the current implementation, there is a small window
where the FIFO is closed by the client for writing while it is
still open by the LAD daemon for reading. In this small window,
if the LAD daemon attempts to do a read on the FIFO, it will get
EOF and the LAD daemon will close it's own FIFO and re-open it.
If the client then is able to open the FIFO again after
the LAD daemon has received EOF from the read call, but before
the LAD daemon has closed the FIFO, then there is now a situation
where the client has a handle to a stale FIFO. If all these
things happen, then when the client tries to write/flush to the
FIFO, a SIGPIPE signal will happen, resulting in the client
crash.
To avoid this race condition, we must close the window where
the FIFO is not open for writing by the client while it is already
open for reading by the daemon.
This patch closes the window by modifiying the client code to
delay closing it's non-blocking FIFO handle (used for handshaking)
until after it has successfully opened the regular FIFO.
Signed-off-by: Angela Stegmaier <angelabaker@ti.com>
With the current implementation, there is a small window
where the FIFO is closed by the client for writing while it is
still open by the LAD daemon for reading. In this small window,
if the LAD daemon attempts to do a read on the FIFO, it will get
EOF and the LAD daemon will close it's own FIFO and re-open it.
If the client then is able to open the FIFO again after
the LAD daemon has received EOF from the read call, but before
the LAD daemon has closed the FIFO, then there is now a situation
where the client has a handle to a stale FIFO. If all these
things happen, then when the client tries to write/flush to the
FIFO, a SIGPIPE signal will happen, resulting in the client
crash.
To avoid this race condition, we must close the window where
the FIFO is not open for writing by the client while it is already
open for reading by the daemon.
This patch closes the window by modifiying the client code to
delay closing it's non-blocking FIFO handle (used for handshaking)
until after it has successfully opened the regular FIFO.
Signed-off-by: Angela Stegmaier <angelabaker@ti.com>
6 years agoAndroid: Makefile: move IPC libraries/binaries to vendor partition 3.47.00.00 3.47.00.00_eng
Android: Makefile: move IPC libraries/binaries to vendor partition
Updating Android makefile to generate IPC userspace binaries and
libraries in /vendor location instead of /system.
This change requires the lad_dra7xx service definition in init.*.rc
files to be updated accordingly
-service lad_dra7xx /system/bin/lad_dra7xx -g
+service lad_dra7xx /vendor/bin/lad_dra7xx -g
Signed-off-by: Vishal Mahaveer <vishalm@ti.com>
Updating Android makefile to generate IPC userspace binaries and
libraries in /vendor location instead of /system.
This change requires the lad_dra7xx service definition in init.*.rc
files to be updated accordingly
-service lad_dra7xx /system/bin/lad_dra7xx -g
+service lad_dra7xx /vendor/bin/lad_dra7xx -g
Signed-off-by: Vishal Mahaveer <vishalm@ti.com>
Vayu: NotifySetup: Incorrect Index in NotifySetup_unplugHwi
When checking the reference count before deleting the Hwi,
the code was always checking against index 0, instead of
the mbxIdx. This lead to the Hwi being deleted, even when
there were still references. Then, even if NotifySetup_plugHwi
was called again, the reference count was greater than 1,
and the Hwi would never be plugged again.
This issue manifests when Ipc_detach is called followed by
Ipc_attach.
This patch fixes the issue by checking against the appropriate
refcount for the mbxIdx.
Signed-off-by: Angela Stegmaier <angelabaker@ti.com>
When checking the reference count before deleting the Hwi,
the code was always checking against index 0, instead of
the mbxIdx. This lead to the Hwi being deleted, even when
there were still references. Then, even if NotifySetup_plugHwi
was called again, the reference count was greater than 1,
and the Hwi would never be plugged again.
This issue manifests when Ipc_detach is called followed by
Ipc_attach.
This patch fixes the issue by checking against the appropriate
refcount for the mbxIdx.
Signed-off-by: Angela Stegmaier <angelabaker@ti.com>
Android: update version.h include path for AF_RPMSG handling
Update include path of version.h for current Android setup.
Previously (before O) we used to update the socket.h bionic header with
AF_RPMSG definitions, so the KERNEL_VERSION check was not exercized.
Now the kernel-headers of dra7xx in Android repo is updated to
reflect the correct Kernel version and can be used to check
the kernel version.
For older Android versions that do not have version.h in
kernel-headers, AF_RPMSG can still be taken from the socket.h
bionic header if it is updated to include AF_RPMSG.
Signed-off-by: Vishal Mahaveer <vishalm@ti.com>
Signed-off-by: Angela Stegmaier <angelabaker@ti.com>
Update include path of version.h for current Android setup.
Previously (before O) we used to update the socket.h bionic header with
AF_RPMSG definitions, so the KERNEL_VERSION check was not exercized.
Now the kernel-headers of dra7xx in Android repo is updated to
reflect the correct Kernel version and can be used to check
the kernel version.
For older Android versions that do not have version.h in
kernel-headers, AF_RPMSG can still be taken from the socket.h
bionic header if it is updated to include AF_RPMSG.
Signed-off-by: Vishal Mahaveer <vishalm@ti.com>
Signed-off-by: Angela Stegmaier <angelabaker@ti.com>
Linux: TransportRpmsg: Fix Mutex Deadlock Issue
In an error recovery situation, it is possible that a
mutex deadlock could occur when MessageQ_delete happened
at the same time that an fd was being signaled about the
remote core error in the same process. This error could
occur if there are multiple MessageQs in the same process
communicating with the remote core that is doing recovery.
When MessageQ_delete grabs the lock, it then tries to
communicate with rpmsgThreadFxn, sending a message and
then waiting for a response. If at the same time, the thread
is processing a shutdown notification for an fd, it will
also try to grab the mutex, but will be blocked because
MessageQ_delete is holding the mutex. The rpmsgThreadFxn
will not continue until it gets the mutex, leading to the
deadlock.
The fix is to change the mutex_lock to a trylock when
handling shutdown notifications in rpmsgThreadFxn. If the
thread fails to acquire the lock, it continues processing
commands and will try again later to process the shutdown
request at a time when the lock is no longer being held.
Signed-off-by: Angela Stegmaier <angelabaker@ti.com>
In an error recovery situation, it is possible that a
mutex deadlock could occur when MessageQ_delete happened
at the same time that an fd was being signaled about the
remote core error in the same process. This error could
occur if there are multiple MessageQs in the same process
communicating with the remote core that is doing recovery.
When MessageQ_delete grabs the lock, it then tries to
communicate with rpmsgThreadFxn, sending a message and
then waiting for a response. If at the same time, the thread
is processing a shutdown notification for an fd, it will
also try to grab the mutex, but will be blocked because
MessageQ_delete is holding the mutex. The rpmsgThreadFxn
will not continue until it gets the mutex, leading to the
deadlock.
The fix is to change the mutex_lock to a trylock when
handling shutdown notifications in rpmsgThreadFxn. If the
thread fails to acquire the lock, it continues processing
commands and will try again later to process the shutdown
request at a time when the lock is no longer being held.
Signed-off-by: Angela Stegmaier <angelabaker@ti.com>
MmRpc: Fix Compilation Warnings
Fix compilation warnings introduced with commit
6736bb2b9b060cf37d3e6728e21509b24ec12da8,
"MmRpc: Add Input Paramter Checking to APIs".
Signed-off-by: Angela Stegmaier <angelabaker@ti.com>
Fix compilation warnings introduced with commit
6736bb2b9b060cf37d3e6728e21509b24ec12da8,
"MmRpc: Add Input Paramter Checking to APIs".
Signed-off-by: Angela Stegmaier <angelabaker@ti.com>
TransportRpmsg: Fix Check for Invalid Socket
A check for sock in TransportRpmsg was incorrectly checking
for sock != 0, when it should have been checking against
INVALIDSOCKET (the value uninitialized socket are set to).
This patch fixes the check.
Signed-off-by: Angela Stegmaier <angelabaker@ti.com>
A check for sock in TransportRpmsg was incorrectly checking
for sock != 0, when it should have been checking against
INVALIDSOCKET (the value uninitialized socket are set to).
This patch fixes the check.
Signed-off-by: Angela Stegmaier <angelabaker@ti.com>
Linux: LAD_client: Avoid hang in fopen during connect
If the application is started and calls Ipc_start before
the LAD is started and created/opened the fifo, then
the application can block in the fopen trying to connect
to the command FIFO.
This patch makes the sequence more robust by first checking
if the fifo exists, then trying to open it as non-blocking,
thereby getting an immediate success or error instead of
blocking until it has been opened for reading by LAD. Once
the non-blocking open returns successfully, the regular
connect sequence can continue. If it returns with a failure,
it will sleep and then try again for a period of time,
eventually returning a timeout failure if it is unable
to connect. This should prevent the application from hanging
if LAD is not started before it calls Ipc_start.
Signed-off-by: Angela Stegmaier <angelabaker@ti.com>
If the application is started and calls Ipc_start before
the LAD is started and created/opened the fifo, then
the application can block in the fopen trying to connect
to the command FIFO.
This patch makes the sequence more robust by first checking
if the fifo exists, then trying to open it as non-blocking,
thereby getting an immediate success or error instead of
blocking until it has been opened for reading by LAD. Once
the non-blocking open returns successfully, the regular
connect sequence can continue. If it returns with a failure,
it will sleep and then try again for a period of time,
eventually returning a timeout failure if it is unable
to connect. This should prevent the application from hanging
if LAD is not started before it calls Ipc_start.
Signed-off-by: Angela Stegmaier <angelabaker@ti.com>
MmRpc: Add Input Paramter Checking to APIs
This patch adds input paramter checking to the MmRpc_* APIs,
specifically checking for NULL pointers, in order to prevent
a crash due to NULL-pointer de-reference in the case that the
user sends a bad (NULL) pointer.
Signed-off-by: Angela Stegmaier <angelabaker@ti.com>
This patch adds input paramter checking to the MmRpc_* APIs,
specifically checking for NULL pointers, in order to prevent
a crash due to NULL-pointer de-reference in the case that the
user sends a bad (NULL) pointer.
Signed-off-by: Angela Stegmaier <angelabaker@ti.com>
6 years agoQNX: NameServer_daemon: Initialize mutex_attr 3.46 ipc-3.46-next 3.46.02.04 3.46.02.04_eng
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>
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: Tests: Add NameServer and GateMP to Fault Test
Add NameServer and GatemP to fault recovery test in
order to test error recovery of these modules.
Signed-off-by: Angela Stegmaier <angelabaker@ti.com>
Add NameServer and GatemP to fault recovery test in
order to test error recovery of these modules.
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>
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: Tests: Add error/cleanup tests to NameServer test
Signed-off-by: Angela Stegmaier <angelabaker@ti.com>
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>
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>
Makefile: Include GATE related sources for all platforms.
Want all the sources to be part of IPC package irrespective of platform
Signed-off-by: Sam Nelson <sam.nelson@ti.com>
Want all the sources to be part of IPC package irrespective of platform
Signed-off-by: Sam Nelson <sam.nelson@ti.com>
6 years agoLinux: NameServer_daemon: Initialize mutex_attr before using it 3.46.01.03 3.46.01.03_eng
Linux: NameServer_daemon: Initialize mutex_attr before using it
Initialize mutex_attr before using it. Otherwise, it could
contain some uninitialized values.
Also, initialize nsMsg to zero before using it.
Signed-off-by: Falk Tristram <falk.tristram@cognex.com>
Signed-off-by: Angela Stegmaier <angelabaker@ti.com>
Initialize mutex_attr before using it. Otherwise, it could
contain some uninitialized values.
Also, initialize nsMsg to zero before using it.
Signed-off-by: Falk Tristram <falk.tristram@cognex.com>
Signed-off-by: Angela Stegmaier <angelabaker@ti.com>
QNX: ProcMgr: Fix Compilation Warnings
Fix compilation warnings discovered when compiling with
newer QNX versions.
Signed-off-by: Angela Stegmaier <angelabaker@ti.com>
Fix compilation warnings discovered when compiling with
newer QNX versions.
Signed-off-by: Angela Stegmaier <angelabaker@ti.com>
QNX: Osal: Fix Compilation Warnings
Fix compilation warnings discovered when compiling with
newer QNX versions.
Signed-off-by: Angela Stegmaier <angelabaker@ti.com>
Fix compilation warnings discovered when compiling with
newer QNX versions.
Signed-off-by: Angela Stegmaier <angelabaker@ti.com>
QNX: Resmgr: Fix Compilation Warnings
Fix compilation warnings discovered when compiling
with newer QNX versions.
Signed-off-by: Angela Stegmaier <angelabaker@ti.com>
Fix compilation warnings discovered when compiling
with newer QNX versions.
Signed-off-by: Angela Stegmaier <angelabaker@ti.com>
QNX: tests: Fix Compilation Warnings
Fix compilation warnings discovered when compiling with
newer QNX versions.
Signed-off-by: Angela Stegmaier <angelabaker@ti.com>
Fix compilation warnings discovered when compiling with
newer QNX versions.
Signed-off-by: Angela Stegmaier <angelabaker@ti.com>
QNX: Samples: Fix Compilation Warnings
Fix compilation warnings discovered when building with
newer QNX versions.
Signed-off-by: Angela Stegmaier <angelabaker@ti.com>
Fix compilation warnings discovered when building with
newer QNX versions.
Signed-off-by: Angela Stegmaier <angelabaker@ti.com>
QNX: Loader: Fix Compilation Warnings
Fix compilation warnings discovered when building with
newer QNX version.
Signed-off-by: Angela Stegmaier <angelabaker@ti.com>
Fix compilation warnings discovered when building with
newer QNX version.
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>
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: Trace Daemon: Fix Compilation Warnings
This patch fixes compilation warnings introduced with
the newer QNX version.
Signed-off-by: Angela Stegmaier <angelabaker@ti.com>
This patch fixes compilation warnings introduced with
the newer QNX version.
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>
This patch fixes compilation warnings introduced with
the newer QNX version.
Signed-off-by: Angela Stegmaier <angelabaker@ti.com>
QNX: Mx: Fix Compilation Warnings
This patch fixes compilation warnings introduced with
newer QNX version build.
Signed-off-by: Angela Stegmaier <angelabaker@ti.com>
This patch fixes compilation warnings introduced with
newer QNX version build.
Signed-off-by: Angela Stegmaier <angelabaker@ti.com>
QNX: Build: Fix Build for Newer QNX Versions on Windows
When building on Windows, the overriding of the usemsg
command in quiet.mk was causing the build to fail. It
appears that usemsg isn't always defined when building
with newer QNX versions and the overriding of the command should
be done conditionally.
This patch changes quiet.mk to only update the usemsg
command if it is defined.
Signed-off-by: Angela Stegmaier <angelabaker@ti.com>
When building on Windows, the overriding of the usemsg
command in quiet.mk was causing the build to fail. It
appears that usemsg isn't always defined when building
with newer QNX versions and the overriding of the command should
be done conditionally.
This patch changes quiet.mk to only update the usemsg
command if it is defined.
Signed-off-by: Angela Stegmaier <angelabaker@ti.com>
Examples: DRA7XX: Enable PM for DSP test images
Enable the DSP PM for the test images also.
Signed-off-by: Angela Stegmaier <angelabaker@ti.com>
Enable the DSP PM for the test images also.
Signed-off-by: Angela Stegmaier <angelabaker@ti.com>
Watchdog: Add Watchdog_restore for DRA7XX DSP
Watchdog code is not currently adding the Watchdog_restore
callback for DRA7XX DSP. When power management (suspend/resume)
is enabled for the DSP, the restore hook should be added
so that the values of the timer are proper upon resume.
Without this patch, when power management is enabled for the DSP,
the watchdog timeout is not proper after resuming from suspend.
Signed-off-by: Angela Stegmaier <angelabaker@ti.com>
Watchdog code is not currently adding the Watchdog_restore
callback for DRA7XX DSP. When power management (suspend/resume)
is enabled for the DSP, the restore hook should be added
so that the values of the timer are proper upon resume.
Without this patch, when power management is enabled for the DSP,
the watchdog timeout is not proper after resuming from suspend.
Signed-off-by: Angela Stegmaier <angelabaker@ti.com>
Remoteproc: OMAP-L138: Fix up resource table
The OMAP-L138 resource table structure definitions are incorrect,
the offset variable was defined to be an array of 13, whereas the
real valid entries are 3, thereby mis-representing the offsets of
the resources in the actual resource table when compared to the
resource structure definition. Fix this properly by adjusting the
array length.
While at this, also replace the name IPU with DSP in various macros.
The SoC only has a DSP, and has no IPU, and the IPU name can be
misleading for users even though there is no difference functionally.
Signed-off-by: Suman Anna <s-anna@ti.com>
The OMAP-L138 resource table structure definitions are incorrect,
the offset variable was defined to be an array of 13, whereas the
real valid entries are 3, thereby mis-representing the offsets of
the resources in the actual resource table when compared to the
resource structure definition. Fix this properly by adjusting the
array length.
While at this, also replace the name IPU with DSP in various macros.
The SoC only has a DSP, and has no IPU, and the IPU name can be
misleading for users even though there is no difference functionally.
Signed-off-by: Suman Anna <s-anna@ti.com>
autotools: Update Linux tests Makefile.in for fault app name change
Update the Makefile.in to account for the fault app name
change.
Signed-off-by: Angela Stegmaier <angelabaker@ti.com>
Update the Makefile.in to account for the fault app name
change.
Signed-off-by: Angela Stegmaier <angelabaker@ti.com>
Android: Makefile: Update Name of Fault Test Source File
A recent change was made to rename the fault.c file to
MessageQFaultApp.c. This patch updates the Android.mk
file with the new source file name.
Signed-off-by: Angela Stegmaier <angelabaker@ti.com>
A recent change was made to rename the fault.c file to
MessageQFaultApp.c. This patch updates the Android.mk
file with the new source file name.
Signed-off-by: Angela Stegmaier <angelabaker@ti.com>