ipc/ipcdev.git
20 months agonsremote: Add additional check to handle assert disabled
Sam Nelson [Tue, 8 Oct 2019 04:50:16 +0000 (00:50 -0400)]
nsremote: Add additional check to handle assert disabled

Signed-off-by: Sam Nelson <sam.nelson@ti.com>
20 months agoheaps: Avoid possible divide by zero error
Sam Nelson [Tue, 8 Oct 2019 04:48:04 +0000 (00:48 -0400)]
heaps: Avoid possible divide by zero error

Signed-off-by: Sam Nelson <sam.nelson@ti.com>
20 months agoNotifySetup: Initialize retval
Sam Nelson [Tue, 8 Oct 2019 01:11:05 +0000 (21:11 -0400)]
NotifySetup: Initialize retval

This is to avoid uninitialized variable usage

Signed-off-by: Sam Nelson <sam.nelson@ti.com>
20 months agoListMP: Add additional check to handle no Assert case
Sam Nelson [Tue, 8 Oct 2019 01:09:34 +0000 (21:09 -0400)]
ListMP: Add additional check to handle no Assert case

Signed-off-by: Sam Nelson <sam.nelson@ti.com>
20 months agoSysMin: Update type to match print pattern
Sam Nelson [Tue, 8 Oct 2019 01:08:47 +0000 (21:08 -0400)]
SysMin: Update type to match print pattern

Signed-off-by: Sam Nelson <sam.nelson@ti.com>
20 months agoRPMessage: Add additional check to handle no Assert case
Sam Nelson [Tue, 8 Oct 2019 01:07:47 +0000 (21:07 -0400)]
RPMessage: Add additional check to handle no Assert case

Signed-off-by: Sam Nelson <sam.nelson@ti.com>
20 months agogrcm: fix issue with Uint32 to Ptr conversion
Sam Nelson [Mon, 7 Oct 2019 17:21:14 +0000 (13:21 -0400)]
grcm: fix issue with Uint32 to Ptr conversion

Adding cast to UArg to indicate this is intentional

Signed-off-by: Sam Nelson <sam.nelson@ti.com>
20 months agoGateMP: Update handling of address > 32 bit for local Gate only
Sam Nelson [Mon, 7 Oct 2019 20:14:03 +0000 (16:14 -0400)]
GateMP: Update handling of address > 32 bit for local Gate only

Signed-off-by: Sam Nelson <sam.nelson@ti.com>
20 months agoListMP: Update to handle the case without Shared address translation
Sam Nelson [Mon, 7 Oct 2019 20:11:59 +0000 (16:11 -0400)]
ListMP: Update to handle the case without Shared address translation

Fixes compiler warnings

Signed-off-by: Sam Nelson <sam.nelson@ti.com>
20 months agoTransportShmCirc: Fix handling of address > 32 bits
Sam Nelson [Mon, 7 Oct 2019 19:52:42 +0000 (15:52 -0400)]
TransportShmCirc: Fix handling of address > 32 bits

Signed-off-by: Sam Nelson <sam.nelson@ti.com>
20 months agoTransportShm: Fix handling of address > 32 bits
Sam Nelson [Mon, 7 Oct 2019 19:52:11 +0000 (15:52 -0400)]
TransportShm: Fix handling of address > 32 bits

Signed-off-by: Sam Nelson <sam.nelson@ti.com>
20 months agoNameServer: Fix for handling address > 32 bits
Sam Nelson [Mon, 7 Oct 2019 19:51:11 +0000 (15:51 -0400)]
NameServer: Fix for handling address > 32 bits

Signed-off-by: Sam Nelson <sam.nelson@ti.com>
20 months agoNameServerRemoteNotify: Fix handling of address > 32 bits
Sam Nelson [Mon, 7 Oct 2019 19:48:48 +0000 (15:48 -0400)]
NameServerRemoteNotify: Fix handling of address > 32 bits

Signed-off-by: Sam Nelson <sam.nelson@ti.com>
20 months agoNotifyDriverShm: Fix handling of address > 32 bits
Sam Nelson [Mon, 7 Oct 2019 19:48:16 +0000 (15:48 -0400)]
NotifyDriverShm: Fix handling of address > 32 bits

Signed-off-by: Sam Nelson <sam.nelson@ti.com>
20 months agoNotifyDriverCirc: Fix handling of address > 32 bits
Sam Nelson [Mon, 7 Oct 2019 19:45:17 +0000 (15:45 -0400)]
NotifyDriverCirc: Fix handling of address > 32 bits

Signed-off-by: Sam Nelson <sam.nelson@ti.com>
20 months agoHeapMultiBufMP: Update to handle > 32 bit address
Sam Nelson [Mon, 7 Oct 2019 19:43:05 +0000 (15:43 -0400)]
HeapMultiBufMP: Update to handle > 32 bit address

Signed-off-by: Sam Nelson <sam.nelson@ti.com>
20 months agoHeapMemMP: Update handling of > 32bit shared addresses
Sam Nelson [Mon, 7 Oct 2019 19:37:26 +0000 (15:37 -0400)]
HeapMemMP: Update handling of > 32bit shared addresses

Signed-off-by: Sam Nelson <sam.nelson@ti.com>
20 months agoHeapBufMP: Update handling for > 32 bit addresses
Sam Nelson [Mon, 7 Oct 2019 19:36:54 +0000 (15:36 -0400)]
HeapBufMP: Update handling for > 32 bit addresses

Signed-off-by: Sam Nelson <sam.nelson@ti.com>
20 months agoNotifySetup: Add return value check for cases not using Assert
Sam Nelson [Mon, 7 Oct 2019 19:31:25 +0000 (15:31 -0400)]
NotifySetup: Add return value check for cases not using Assert

Signed-off-by: Sam Nelson <sam.nelson@ti.com>
20 months agoIpc: Add round up function separately for Address pointers
Sam Nelson [Mon, 7 Oct 2019 19:28:41 +0000 (15:28 -0400)]
Ipc: Add round up function separately for Address pointers

Signed-off-by: Sam Nelson <sam.nelson@ti.com>
20 months agoSharedRegion: Update to handle address calculation > 32 bits correctly
Sam Nelson [Mon, 7 Oct 2019 19:27:53 +0000 (15:27 -0400)]
SharedRegion: Update to handle address calculation > 32 bits correctly

Signed-off-by: Sam Nelson <sam.nelson@ti.com>
20 months agoIpc: Add proper hanlding of shared pointer and addresses
Sam Nelson [Mon, 7 Oct 2019 19:22:08 +0000 (15:22 -0400)]
Ipc: Add proper hanlding of shared pointer and addresses

Add appropriate handling of shared pointer which is limited to 32 bit.
But the addresses can be 64 bits for some cores.

Signed-off-by: Sam Nelson <sam.nelson@ti.com>
20 months agoGateMP: Update arg to accomodate pointer for local Gate
Sam Nelson [Mon, 7 Oct 2019 19:14:49 +0000 (15:14 -0400)]
GateMP: Update arg to accomodate pointer for local Gate

arg is storing value of a pointer. Need to accomodate more than 32 bit
in 64 bit cores

Signed-off-by: Sam Nelson <sam.nelson@ti.com>
20 months agoVirtQueue: Add additional checks to handle, assert not enabled
Sam Nelson [Mon, 7 Oct 2019 17:22:18 +0000 (13:22 -0400)]
VirtQueue: Add additional checks to handle, assert not enabled

Signed-off-by: Sam Nelson <sam.nelson@ti.com>
20 months agomm: Update code for better portability
Sam Nelson [Sat, 5 Oct 2019 15:11:51 +0000 (11:11 -0400)]
mm: Update code for better portability

Replaced UInt32 with UArg

Signed-off-by: Sam Nelson <sam.nelson@ti.com>
20 months agobuild: Remove deprecated --gcc option
Sam Nelson [Sat, 5 Oct 2019 13:34:40 +0000 (09:34 -0400)]
build: Remove deprecated --gcc option

With the --gcc option the current gcc compiler gives warning and hence
removed

Signed-off-by: Sam Nelson <sam.nelson@ti.com>
20 months agotrace: Update to snprintf for robustness
Sam Nelson [Sat, 5 Oct 2019 13:32:59 +0000 (09:32 -0400)]
trace: Update to snprintf for robustness

Signed-off-by: Sam Nelson <sam.nelson@ti.com>
20 months agosrvmgr: Add NULL check for robustness
Sam Nelson [Sat, 5 Oct 2019 13:31:45 +0000 (09:31 -0400)]
srvmgr: Add NULL check for robustness

Signed-off-by: Sam Nelson <sam.nelson@ti.com>
20 months agosrvmgr: Update shutdown variable type to volatile
Sam Nelson [Sat, 5 Oct 2019 13:31:19 +0000 (09:31 -0400)]
srvmgr: Update shutdown variable type to volatile

The shutdown vraiable can be set by a different task to indicate
shutdown
Also updates string copy not to use the last element in character array

Signed-off-by: Sam Nelson <sam.nelson@ti.com>
20 months agosrvmgr: update copy of the whole taskParams structure
Sam Nelson [Sat, 5 Oct 2019 13:28:01 +0000 (09:28 -0400)]
srvmgr: update copy of the whole taskParams structure

No need to do caluculation of size using assumptions on structure
element

Signed-off-by: Sam Nelson <sam.nelson@ti.com>
20 months agoTransportShm: Add NULL check for robustness
Sam Nelson [Sat, 5 Oct 2019 13:16:51 +0000 (09:16 -0400)]
TransportShm: Add NULL check for robustness

Signed-off-by: Sam Nelson <sam.nelson@ti.com>
20 months agoNameServerRemoteNotify: Add NULL check for robustness
Sam Nelson [Sat, 5 Oct 2019 13:16:09 +0000 (09:16 -0400)]
NameServerRemoteNotify: Add NULL check for robustness

Signed-off-by: Sam Nelson <sam.nelson@ti.com>
20 months agoNotifyDriverShm: Update local variable types match usage
Sam Nelson [Sat, 5 Oct 2019 13:15:36 +0000 (09:15 -0400)]
NotifyDriverShm: Update local variable types match usage

Signed-off-by: Sam Nelson <sam.nelson@ti.com>
20 months agoHeapMultiBufMP: Add NULL check for robustness
Sam Nelson [Sat, 5 Oct 2019 13:14:23 +0000 (09:14 -0400)]
HeapMultiBufMP: Add NULL check for robustness

Add cast to match types

Signed-off-by: Sam Nelson <sam.nelson@ti.com>
20 months agoHeapMemMP: Add NULL check for robustness
Sam Nelson [Sat, 5 Oct 2019 13:13:12 +0000 (09:13 -0400)]
HeapMemMP: Add NULL check for robustness

Signed-off-by: Sam Nelson <sam.nelson@ti.com>
20 months agoHeapBufMP: Add NULL check for robustness
Sam Nelson [Sat, 5 Oct 2019 13:12:50 +0000 (09:12 -0400)]
HeapBufMP: Add NULL check for robustness

Also removes unnecessary Int32 cast

Signed-off-by: Sam Nelson <sam.nelson@ti.com>
20 months agoGatePersonN: Update stack variable to match usage
Sam Nelson [Sat, 5 Oct 2019 13:11:15 +0000 (09:11 -0400)]
GatePersonN: Update stack variable to match usage

Signed-off-by: Sam Nelson <sam.nelson@ti.com>
20 months agoGateHWSpinlock: Update stack variable to match usage
Sam Nelson [Sat, 5 Oct 2019 13:10:39 +0000 (09:10 -0400)]
GateHWSpinlock: Update stack variable to match usage

Signed-off-by: Sam Nelson <sam.nelson@ti.com>
20 months agoGateHWSem: Update stack variable to match usage
Sam Nelson [Sat, 5 Oct 2019 13:09:38 +0000 (09:09 -0400)]
GateHWSem: Update stack variable to match usage

Signed-off-by: Sam Nelson <sam.nelson@ti.com>
20 months agoNotify: Add NULL check for robustness
Sam Nelson [Sat, 5 Oct 2019 13:08:38 +0000 (09:08 -0400)]
Notify: Add NULL check for robustness

Signed-off-by: Sam Nelson <sam.nelson@ti.com>
20 months agolistMP: Add NULL check for robustness
Sam Nelson [Sat, 5 Oct 2019 13:08:09 +0000 (09:08 -0400)]
listMP: Add NULL check for robustness

Signed-off-by: Sam Nelson <sam.nelson@ti.com>
20 months agoIpc: Fix mismatched types for comparison
Sam Nelson [Sat, 5 Oct 2019 13:07:33 +0000 (09:07 -0400)]
Ipc: Fix mismatched types for comparison

Also adds null checks for robustness

Signed-off-by: Sam Nelson <sam.nelson@ti.com>
20 months agoGateMP: Cast to common type for comparison
Sam Nelson [Sat, 5 Oct 2019 03:46:58 +0000 (23:46 -0400)]
GateMP: Cast to common type for comparison

Also adds NULL check

Signed-off-by: Sam Nelson <sam.nelson@ti.com>
20 months agoIpcPowerDsp_dra7xx: Add NULL check to avoid NULL pointer access
Sam Nelson [Sat, 5 Oct 2019 03:31:02 +0000 (23:31 -0400)]
IpcPowerDsp_dra7xx: Add NULL check to avoid NULL pointer access

Also make curInit volatile so that multiple threads can touch the same
variable

Signed-off-by: Sam Nelson <sam.nelson@ti.com>
20 months agoIpcPower: Add NULL check to avoid NULL pointer access
Sam Nelson [Sat, 5 Oct 2019 03:29:24 +0000 (23:29 -0400)]
IpcPower: Add NULL check to avoid NULL pointer access

Signed-off-by: Sam Nelson <sam.nelson@ti.com>
20 months agoTransportRpmsg: Add NULL check to avoid NULL pointer access
Sam Nelson [Sat, 5 Oct 2019 03:28:46 +0000 (23:28 -0400)]
TransportRpmsg: Add NULL check to avoid NULL pointer access

Signed-off-by: Sam Nelson <sam.nelson@ti.com>
20 months agoVirtQueue: Avoid mismatch of types in comparison
Sam Nelson [Sat, 5 Oct 2019 03:27:53 +0000 (23:27 -0400)]
VirtQueue: Avoid mismatch of types in comparison

Convert to common unsigned int
Also add error check where needed

Signed-off-by: Sam Nelson <sam.nelson@ti.com>
20 months agoWatchdog: Add NULL check to avoid NULL pointer access
Sam Nelson [Sat, 5 Oct 2019 03:26:19 +0000 (23:26 -0400)]
Watchdog: Add NULL check to avoid NULL pointer access

Signed-off-by: Sam Nelson <sam.nelson@ti.com>
21 months agoam65xx: Update core type for sciclient 3.50.04.07
Sam Nelson [Fri, 30 Aug 2019 02:03:16 +0000 (02:03 +0000)]
am65xx: Update core type for sciclient

The sciclient has library for mcu1_0, mcu1_1 and mpu1_0 separately.
Adding configuration to specify the right core type.
( Note this is supported in only new version of sciclient library)

Signed-off-by: Sam Nelson <sam.nelson@ti.com>
22 months agobuild: Descoping C64x and C66 big endian 3.50.04.06
Mahesh Radhakrishnan [Thu, 1 Aug 2019 19:03:18 +0000 (19:03 +0000)]
build: Descoping C64x and C66 big endian

The C64x and c66 big endian platform are no longer supported and hence
getting removed from the build files
.
Signed-off-by: Sam Nelson <sam.nelson@ti.com>
22 months agotests: Update memory map to match update in Linux dts
Sam Nelson [Wed, 31 Jul 2019 22:45:35 +0000 (22:45 +0000)]
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>
2 years agoRemoteproc: OMAPL138: Use FW_RSC_ADDR_ANY for vrings in resource table
Suman Anna [Tue, 26 Mar 2019 23:00:56 +0000 (18:00 -0500)]
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>
2 years agoomapl138: VirtQueue: Add vdev status synchronization logic
Suman Anna [Tue, 26 Mar 2019 23:00:55 +0000 (18:00 -0500)]
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>
2 years agoomapl138: VirtQueue: Fixup mapVAtoPA() and mapPAtoVA()
Suman Anna [Tue, 26 Mar 2019 23:00:54 +0000 (18:00 -0500)]
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>
2 years agoRemoteproc: OMAPL138: Remove unused macros from resource table
Suman Anna [Tue, 26 Mar 2019 23:00:53 +0000 (18:00 -0500)]
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>
2 years agorsc_types: Add the definition of FW_RSC_ADDR_ANY
Suman Anna [Tue, 26 Mar 2019 23:00:52 +0000 (18:00 -0500)]
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>
2 years agorsc_types: Use the correct integer type in fw_rsc_vdev
Suman Anna [Tue, 26 Mar 2019 23:00:51 +0000 (18:00 -0500)]
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>
2 years agoResource: Fix compile warning in Resource_getTraceBufSize()
Suman Anna [Tue, 26 Mar 2019 23:00:50 +0000 (18:00 -0500)]
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>
2 years agoLinux: Update user AF_RPMSG define for 4.18+ kernels ipc-3.50-next 3.50.03.05
Suman Anna [Fri, 21 Dec 2018 23:47:53 +0000 (17:47 -0600)]
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>
2 years agotrace: Update to remove direct dependence on SysMin 3.50.03.04
Sam Nelson [Thu, 29 Nov 2018 19:40:03 +0000 (14:40 -0500)]
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>
2 years agoam65xx: Update to remove reference to sciclient internal header file
Sam Nelson [Mon, 12 Nov 2018 21:52:33 +0000 (16:52 -0500)]
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>
2 years agoc66x: Update compiler options to reduce code size
Gaurav Mitra [Mon, 29 Oct 2018 15:00:41 +0000 (11:00 -0400)]
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>
2 years agotests: R5F Memory map cleanup
Sam Nelson [Wed, 24 Oct 2018 15:52:27 +0000 (11:52 -0400)]
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>
2 years agoam65xx: Fix issue for R5F0 to R5F1 communication
Sam Nelson [Thu, 25 Oct 2018 17:08:54 +0000 (13:08 -0400)]
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>
2 years agotests: Remove misleading memory comments 3.50.03.03
Sam Nelson [Mon, 22 Oct 2018 21:11:47 +0000 (17:11 -0400)]
tests: Remove misleading memory comments

The memory section itself is self explanatory.

Signed-off-by: Sam Nelson <sam.nelson@ti.com>
2 years agoipc: Remove compiler warnings
Sam Nelson [Sun, 21 Oct 2018 20:52:52 +0000 (16:52 -0400)]
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>
2 years agoam65xx: Fix Compilation warnings on int to pointer conversion
Sam Nelson [Sun, 21 Oct 2018 20:42:47 +0000 (16:42 -0400)]
am65xx: Fix Compilation warnings on int to pointer conversion

Signed-off-by: Sam Nelson <sam.nelson@ti.com>
2 years agotests: R5F Split mode support
Sam Nelson [Sun, 21 Oct 2018 20:41:25 +0000 (16:41 -0400)]
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>
2 years agoam65x: Update resource table for split R5F cores
Sam Nelson [Mon, 22 Oct 2018 19:43:14 +0000 (15:43 -0400)]
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>
2 years agoRemoteproc: AM65xx: Remove all RSC_CARVEOUT entries
Suman Anna [Thu, 18 Oct 2018 21:56:12 +0000 (16:56 -0500)]
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>
2 years agoam65xx: Update to use static resources from System firmware
Sam Nelson [Sat, 20 Oct 2018 02:43:00 +0000 (22:43 -0400)]
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>
2 years agotests: Update MPU configuration for non-shared memory
Sam Nelson [Sun, 21 Oct 2018 12:50:37 +0000 (08:50 -0400)]
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>
2 years agorsc_table: Update to fix backward compatibilty with xdc SysMin
Sam Nelson [Thu, 13 Sep 2018 18:20:03 +0000 (14:20 -0400)]
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>
2 years agoam65xx: Integrate sciclient for interrupt routing through system-fw 3.50.01.01
Sam Nelson [Fri, 17 Aug 2018 15:17:48 +0000 (11:17 -0400)]
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>
2 years agotests: Add idle function to test code 3.50.01.00C
Sam Nelson [Fri, 17 Aug 2018 16:05:16 +0000 (12:05 -0400)]
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>
2 years agoam65xx: Add Power module for idle routine
Sam Nelson [Fri, 17 Aug 2018 16:03:22 +0000 (12:03 -0400)]
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>
2 years agoping_rpmsg: OMAPL138: Add program section for tracebuf
Sam Nelson [Wed, 22 Aug 2018 14:22:54 +0000 (10:22 -0400)]
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>
2 years agorsc_table: am65xx: Update trace buffer size to 0x8000 3.50.01.00B
Sam Nelson [Tue, 21 Aug 2018 21:34:10 +0000 (17:34 -0400)]
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>
2 years agorsc_table: Remove unused carveout definitions
Sam Nelson [Tue, 21 Aug 2018 20:09:26 +0000 (16:09 -0400)]
rsc_table: Remove unused carveout definitions

This is leftover from previous code. Not used anymore.

Signed-off-by: Sam Nelson <sam.nelson@ti.com>
2 years agoResource: Handle AM65xx case correctly
Sam Nelson [Mon, 20 Aug 2018 20:06:32 +0000 (16:06 -0400)]
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>]
2 years agorpmsg: Fix to handle Keystone 2 correctly
Sam Nelson [Tue, 21 Aug 2018 18:54:19 +0000 (14:54 -0400)]
rpmsg: Fix to handle Keystone 2 correctly

xdc_Fxn is used only by OMAPL138, TCI6638

Signed-off-by: Sam Nelson <sam.nelson@ti.com>
2 years agotracebuf: Update trace buffer size to 0x2000 3.50.01.00A
Sam Nelson [Mon, 20 Aug 2018 20:56:07 +0000 (16:56 -0400)]
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>
2 years agoResource: Fix backward compatibility issue
Sam Nelson [Mon, 20 Aug 2018 20:06:32 +0000 (16:06 -0400)]
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>
2 years agorpmsg: Fix compilation warning
Sam Nelson [Fri, 17 Aug 2018 15:41:23 +0000 (11:41 -0400)]
rpmsg: Fix compilation warning

xdc_Fxn is used only by OMAPL138

Signed-off-by: Sam Nelson <sam.nelson@ti.com>
2 years agotransports: Add TransportRpmsg.c to package for AM65XX 3.50.01.00
Sam Nelson [Sat, 11 Aug 2018 02:22:00 +0000 (22:22 -0400)]
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
---

2 years agoqnx: Add 64 bit defines
Sam Nelson [Sun, 5 Aug 2018 22:13:22 +0000 (18:13 -0400)]
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>
2 years agotests: Update tracebuf sections for K2 and omapl138
Sam Nelson [Fri, 3 Aug 2018 21:15:40 +0000 (17:15 -0400)]
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>
2 years agoTEMP: smp: Disable SMP for now for A53
Sam Nelson [Thu, 2 Aug 2018 02:15:52 +0000 (22:15 -0400)]
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>
2 years agodaemon: Update debug print with more clear information
Sam Nelson [Mon, 30 Jul 2018 20:34:35 +0000 (16:34 -0400)]
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>
2 years agoBuild.xs: Cleanup item identified
Sam Nelson [Wed, 9 Aug 2017 13:34:13 +0000 (09:34 -0400)]
Build.xs: Cleanup item identified

Added TODO to mark change needed

Signed-off-by: Sam Nelson <sam.nelson@ti.com>
2 years agoTEMP: Tests: ping_rpmsg: Override checkFrequency flags
Suman Anna [Wed, 30 May 2018 01:18:59 +0000 (20:18 -0500)]
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>
2 years agoremoteproc: Use ti.trace.SysMin instead of xdc.runtime.SysMin
Suman Anna [Wed, 4 Apr 2018 19:59:59 +0000 (14:59 -0500)]
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>
2 years agoSysMin: Remove error check against CPU memory map
Suman Anna [Wed, 4 Apr 2018 19:55:17 +0000 (14:55 -0500)]
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>
2 years agoTMP: listMP: Add Cache operation for v8A
Sam Nelson [Tue, 27 Mar 2018 12:43:34 +0000 (08:43 -0400)]
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>
2 years agoBuild.xs: Remove -mapcs-frame for A53F
Sam Nelson [Tue, 24 Oct 2017 14:43:51 +0000 (10:43 -0400)]
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>
2 years agoBuild.xs: Update GCC compile option mapcs-frame
Sam Nelson [Wed, 4 Oct 2017 23:59:46 +0000 (19:59 -0400)]
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>
2 years agotests: Cleanup for observed compiler warnings
Sam Nelson [Sat, 28 Jul 2018 04:17:15 +0000 (00:17 -0400)]
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>
2 years agodaemon: Add error check form read and write calls.
Sam Nelson [Sat, 28 Jul 2018 04:13:13 +0000 (00:13 -0400)]
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>
2 years agotransport: Add error check for read and write function calls
Sam Nelson [Fri, 7 Jul 2017 21:31:43 +0000 (17:31 -0400)]
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>
2 years agoBuild.xs: remove unused utilsSources
Sam Nelson [Fri, 30 Jun 2017 15:48:07 +0000 (11:48 -0400)]
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>