Linux: Update user AF_RPMSG define for 5.15+ 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 5.15 (AF_MCTP), and as
a result, the AF_RPMSG macro needs to be set to 46 post 5.15
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: Sinthu Raja <sinthu.raja@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 5.15 (AF_MCTP), and as
a result, the AF_RPMSG macro needs to be set to 46 post 5.15
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: Sinthu Raja <sinthu.raja@ti.com>
am65xx: Update Resource type to match sciclient API change
This type is expected to work with both PG1 and PG2 versions
Signed-off-by: Sam Nelson <sam.nelson@ti.com>
This type is expected to work with both PG1 and PG2 versions
Signed-off-by: Sam Nelson <sam.nelson@ti.com>
Remoteproc: DRA7xx: Fix incorrect DSP HEAP1 address
Commit 23a7eefaf8e2 ("Remoteproc: DRA7xx: Adjust entries to fix carveout
allocation failures") has split up the single DSP heap at 0x95200000 of
size 3 MB into two chunks of 2 MB and 1 MB. This erroneously used the
address 0x95300000 for the second 1 MB chunk, when it should really be
0x95400000. Fix this properly.
Fixes: 23a7eefaf8e2 ("Remoteproc: DRA7xx: Adjust entries to fix carveout allocation failures")
Signed-off-by: Suman Anna <s-anna@ti.com>
Commit 23a7eefaf8e2 ("Remoteproc: DRA7xx: Adjust entries to fix carveout
allocation failures") has split up the single DSP heap at 0x95200000 of
size 3 MB into two chunks of 2 MB and 1 MB. This erroneously used the
address 0x95300000 for the second 1 MB chunk, when it should really be
0x95400000. Fix this properly.
Fixes: 23a7eefaf8e2 ("Remoteproc: DRA7xx: Adjust entries to fix carveout allocation failures")
Signed-off-by: Suman Anna <s-anna@ti.com>
am65xx: Pass valid request pointer for Sciclient version check
Sciclient now requires request payload to be non-NULL.
This patch updates the payload pointer to be non-NULL value
in order to be able to check the version.
Signed-off-by: Angela Stegmaier <angelabaker@ti.com>
Sciclient now requires request payload to be non-NULL.
This patch updates the payload pointer to be non-NULL value
in order to be able to check the version.
Signed-off-by: Angela Stegmaier <angelabaker@ti.com>
K2: Use FW_RSC_ADDR_ANY for vrings in R5F resource table
Mark the vring device addresses as FW_RSC_ADDR_ANY, so that Linux kernel
knows it needs to update these to the actual dynamically allocated
memory locations. The virtqueue driver itself will poll for the
completion status of this update.
Signed-off-by: Sam Nelson <sam.nelson@ti.com>
Mark the vring device addresses as FW_RSC_ADDR_ANY, so that Linux kernel
knows it needs to update these to the actual dynamically allocated
memory locations. The virtqueue driver itself will poll for the
completion status of this update.
Signed-off-by: Sam Nelson <sam.nelson@ti.com>
VirtQueue: K2: poll for init completion status
Virtqueue device address is provided by host, so poll the completion
status for this operation before proceeding. Otherwise we end up using
bad virtqueue address.
Signed-off-by: Sam Nelson <sam.nelson@ti.com>
Virtqueue device address is provided by host, so poll the completion
status for this operation before proceeding. Otherwise we end up using
bad virtqueue address.
Signed-off-by: Sam Nelson <sam.nelson@ti.com>
Remoteproc: AM65XX: Use FW_RSC_ADDR_ANY for vrings in R5F resource table
Mark the vring device addresses as FW_RSC_ADDR_ANY, so that Linux kernel
knows it needs to update these to the actual dynamically allocated
memory locations. The virtqueue driver itself will poll for the
completion status of this update.
Signed-off-by: Sam Nelson <sam.nelson@ti.com>
Mark the vring device addresses as FW_RSC_ADDR_ANY, so that Linux kernel
knows it needs to update these to the actual dynamically allocated
memory locations. The virtqueue driver itself will poll for the
completion status of this update.
Signed-off-by: Sam Nelson <sam.nelson@ti.com>
VirtQueue: AM65X: poll for init completion status
Virtqueue device address is provided by host, so poll the completion
status for this operation before proceeding. Otherwise we end up using
bad virtqueue address.
Signed-off-by: Sam Nelson <sam.nelson@ti.com>
Virtqueue device address is provided by host, so poll the completion
status for this operation before proceeding. Otherwise we end up using
bad virtqueue address.
Signed-off-by: Sam Nelson <sam.nelson@ti.com>
am65xx: Remove dependence on DEVMEM entry
AM65XX does not have an IOMMU, and currently the DEVMEM entry is used as
a work around.
But in reality the VA and PA are directly mapped and dependence on
DEVMEM to do the address translation need to be removed.
Signed-off-by: Sam Nelson <sam.nelson@ti.com>
AM65XX does not have an IOMMU, and currently the DEVMEM entry is used as
a work around.
But in reality the VA and PA are directly mapped and dependence on
DEVMEM to do the address translation need to be removed.
Signed-off-by: Sam Nelson <sam.nelson@ti.com>
Remoteproc: DRA7xx: Use FW_RSC_ADDR_ANY for vrings in IPU resource table
Mark the vring device addresses as FW_RSC_ADDR_ANY, so that Linux kernel
knows it needs to update these to the actual dynamically allocated
memory locations. The virtqueue driver itself will poll for the
completion status of this update.
Signed-off-by: Tero Kristo <t-kristo@ti.com>
Mark the vring device addresses as FW_RSC_ADDR_ANY, so that Linux kernel
knows it needs to update these to the actual dynamically allocated
memory locations. The virtqueue driver itself will poll for the
completion status of this update.
Signed-off-by: Tero Kristo <t-kristo@ti.com>
Remoteproc: DRA7xx: Use FW_RSC_ADDR_ANY for vrings in DSP resource table
Mark the vring device addresses as FW_RSC_ADDR_ANY, so that Linux kernel
knows it needs to update these to the actual dynamically allocated
memory locations. The virtqueue driver itself will poll for the
completion status of this update.
Signed-off-by: Tero Kristo <t-kristo@ti.com>
Mark the vring device addresses as FW_RSC_ADDR_ANY, so that Linux kernel
knows it needs to update these to the actual dynamically allocated
memory locations. The virtqueue driver itself will poll for the
completion status of this update.
Signed-off-by: Tero Kristo <t-kristo@ti.com>
VirtQueue: dra7xx: poll for init completion status
Virtqueue device address is provided by host, so poll the completion
status for this operation before proceeding. Otherwise we end up using
bad virtqueue address.
Signed-off-by: Tero Kristo <t-kristo@ti.com>
Virtqueue device address is provided by host, so poll the completion
status for this operation before proceeding. Otherwise we end up using
bad virtqueue address.
Signed-off-by: Tero Kristo <t-kristo@ti.com>
test_omx: Add null termination to avoid out of bound access
Signed-off-by: Sam Nelson <sam.nelson@ti.com>
Signed-off-by: Sam Nelson <sam.nelson@ti.com>
srvmgr: Fix issue with memcopy
Previous fix to avoid the partial copy was wrong. Need to copy only the
task parameters after arg0.
Signed-off-by: Sam Nelson <sam.nelson@ti.com>
Previous fix to avoid the partial copy was wrong. Need to copy only the
task parameters after arg0.
Signed-off-by: Sam Nelson <sam.nelson@ti.com>
Remoteproc: DRA7xx: Adjust entries to fix carveout allocation failures
If the linux device tree uses DMA pools for carving out memory for the
slave cores, the DMA pools uses the next power of 2 page order
fitting the requested size (eg: 6 MB gets attempted to be allocated
using 8 MB and at 8 MB alignments), and this may result in allocation
failures if the overall DMA pool size does not have enough room to
support the different RSC_CARVEOUT aligned size.
This adjustment of the entries are updated carefully to make sure the
allocation does not fail due to this alignment. The 1 MB IPC_DATA
carveout entry is placed immediately after the vdev resource so that
the image carveouts are always aligned on an even 2 MB boundary.
Signed-off-by: Sam Nelson <sam.nelson@ti.com>
Signed-off-by: Suman Anna <s-anna@ti.com>
If the linux device tree uses DMA pools for carving out memory for the
slave cores, the DMA pools uses the next power of 2 page order
fitting the requested size (eg: 6 MB gets attempted to be allocated
using 8 MB and at 8 MB alignments), and this may result in allocation
failures if the overall DMA pool size does not have enough room to
support the different RSC_CARVEOUT aligned size.
This adjustment of the entries are updated carefully to make sure the
allocation does not fail due to this alignment. The 1 MB IPC_DATA
carveout entry is placed immediately after the vdev resource so that
the image carveouts are always aligned on an even 2 MB boundary.
Signed-off-by: Sam Nelson <sam.nelson@ti.com>
Signed-off-by: Suman Anna <s-anna@ti.com>
Remoteproc: DRA7xx: Drop invalid MEM_IOBUFS devmem entry
The MEM_IOBUFS DEVMEM entry of size 90 MB was a left-over from
OMAP4/OMAP5 code, and this was used to map a static carveout of
the same size at 0xBA300000 address into the DSP and IPU MMUs.
This region is fully owned by the Linux kernel on DRA7xx/AM57xx
SoCs, so it should not be mapped into the IPU and DSP memory space.
Drop these invalid entries from both the IPU & DSP resource tables.
Signed-off-by: Suman Anna <s-anna@ti.com>
Signed-off-by: Sam Nelson <sam.nelson@ti.com>
The MEM_IOBUFS DEVMEM entry of size 90 MB was a left-over from
OMAP4/OMAP5 code, and this was used to map a static carveout of
the same size at 0xBA300000 address into the DSP and IPU MMUs.
This region is fully owned by the Linux kernel on DRA7xx/AM57xx
SoCs, so it should not be mapped into the IPU and DSP memory space.
Drop these invalid entries from both the IPU & DSP resource tables.
Signed-off-by: Suman Anna <s-anna@ti.com>
Signed-off-by: Sam Nelson <sam.nelson@ti.com>
test_omx: Update not to fill the whole buffer
Signed-off-by: Sam Nelson <sam.nelson@ti.com>
Signed-off-by: Sam Nelson <sam.nelson@ti.com>
SysMin: Fix missed local variable
Signed-off-by: Sam Nelson <sam.nelson@ti.com>
Signed-off-by: Sam Nelson <sam.nelson@ti.com>
SysMin: Fix double usage of variable i
Renamed local usage inside loop
Signed-off-by: Sam Nelson <sam.nelson@ti.com>
Renamed local usage inside loop
Signed-off-by: Sam Nelson <sam.nelson@ti.com>
tests: Fix issue with parameter order for strncpy
Signed-off-by: Sam Nelson <sam.nelson@ti.com>
Signed-off-by: Sam Nelson <sam.nelson@ti.com>
RcmServer: Update cast to match type compared
Signed-off-by: Sam Nelson <sam.nelson@ti.com>
Signed-off-by: Sam Nelson <sam.nelson@ti.com>
package.bld: Remove --gcc option
--gcc is deprecated and will be removed in a subsequent
release. GCC compatibility is implemented through the --relaxed_ansi
option
and is the default behavior of the compiler.
Signed-off-by: Sam Nelson <sam.nelson@ti.com>
--gcc is deprecated and will be removed in a subsequent
release. GCC compatibility is implemented through the --relaxed_ansi
option
and is the default behavior of the compiler.
Signed-off-by: Sam Nelson <sam.nelson@ti.com>
tests: Add error check to be more robust
Signed-off-by: Sam Nelson <sam.nelson@ti.com>
Signed-off-by: Sam Nelson <sam.nelson@ti.com>
transports: Fix to avoid potential divide by zero error
Signed-off-by: Sam Nelson <sam.nelson@ti.com>
Signed-off-by: Sam Nelson <sam.nelson@ti.com>
nsremote: Add additional check to handle assert disabled
Signed-off-by: Sam Nelson <sam.nelson@ti.com>
Signed-off-by: Sam Nelson <sam.nelson@ti.com>
heaps: Avoid possible divide by zero error
Signed-off-by: Sam Nelson <sam.nelson@ti.com>
Signed-off-by: Sam Nelson <sam.nelson@ti.com>
NotifySetup: Initialize retval
This is to avoid uninitialized variable usage
Signed-off-by: Sam Nelson <sam.nelson@ti.com>
This is to avoid uninitialized variable usage
Signed-off-by: Sam Nelson <sam.nelson@ti.com>
ListMP: Add additional check to handle no Assert case
Signed-off-by: Sam Nelson <sam.nelson@ti.com>
Signed-off-by: Sam Nelson <sam.nelson@ti.com>
SysMin: Update type to match print pattern
Signed-off-by: Sam Nelson <sam.nelson@ti.com>
Signed-off-by: Sam Nelson <sam.nelson@ti.com>
RPMessage: Add additional check to handle no Assert case
Signed-off-by: Sam Nelson <sam.nelson@ti.com>
Signed-off-by: Sam Nelson <sam.nelson@ti.com>
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>
Adding cast to UArg to indicate this is intentional
Signed-off-by: Sam Nelson <sam.nelson@ti.com>
GateMP: Update handling of address > 32 bit for local Gate only
Signed-off-by: Sam Nelson <sam.nelson@ti.com>
Signed-off-by: Sam Nelson <sam.nelson@ti.com>
ListMP: Update to handle the case without Shared address translation
Fixes compiler warnings
Signed-off-by: Sam Nelson <sam.nelson@ti.com>
Fixes compiler warnings
Signed-off-by: Sam Nelson <sam.nelson@ti.com>
TransportShmCirc: Fix handling of address > 32 bits
Signed-off-by: Sam Nelson <sam.nelson@ti.com>
Signed-off-by: Sam Nelson <sam.nelson@ti.com>
TransportShm: Fix handling of address > 32 bits
Signed-off-by: Sam Nelson <sam.nelson@ti.com>
Signed-off-by: Sam Nelson <sam.nelson@ti.com>
NameServer: Fix for handling address > 32 bits
Signed-off-by: Sam Nelson <sam.nelson@ti.com>
Signed-off-by: Sam Nelson <sam.nelson@ti.com>
NameServerRemoteNotify: Fix handling of address > 32 bits
Signed-off-by: Sam Nelson <sam.nelson@ti.com>
Signed-off-by: Sam Nelson <sam.nelson@ti.com>
NotifyDriverShm: Fix handling of address > 32 bits
Signed-off-by: Sam Nelson <sam.nelson@ti.com>
Signed-off-by: Sam Nelson <sam.nelson@ti.com>
NotifyDriverCirc: Fix handling of address > 32 bits
Signed-off-by: Sam Nelson <sam.nelson@ti.com>
Signed-off-by: Sam Nelson <sam.nelson@ti.com>
HeapMultiBufMP: Update to handle > 32 bit address
Signed-off-by: Sam Nelson <sam.nelson@ti.com>
Signed-off-by: Sam Nelson <sam.nelson@ti.com>
HeapMemMP: Update handling of > 32bit shared addresses
Signed-off-by: Sam Nelson <sam.nelson@ti.com>
Signed-off-by: Sam Nelson <sam.nelson@ti.com>
HeapBufMP: Update handling for > 32 bit addresses
Signed-off-by: Sam Nelson <sam.nelson@ti.com>
Signed-off-by: Sam Nelson <sam.nelson@ti.com>
NotifySetup: Add return value check for cases not using Assert
Signed-off-by: Sam Nelson <sam.nelson@ti.com>
Signed-off-by: Sam Nelson <sam.nelson@ti.com>
Ipc: Add round up function separately for Address pointers
Signed-off-by: Sam Nelson <sam.nelson@ti.com>
Signed-off-by: Sam Nelson <sam.nelson@ti.com>
SharedRegion: Update to handle address calculation > 32 bits correctly
Signed-off-by: Sam Nelson <sam.nelson@ti.com>
Signed-off-by: Sam Nelson <sam.nelson@ti.com>
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>
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>
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>
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>
VirtQueue: Add additional checks to handle, assert not enabled
Signed-off-by: Sam Nelson <sam.nelson@ti.com>
Signed-off-by: Sam Nelson <sam.nelson@ti.com>
mm: Update code for better portability
Replaced UInt32 with UArg
Signed-off-by: Sam Nelson <sam.nelson@ti.com>
Replaced UInt32 with UArg
Signed-off-by: Sam Nelson <sam.nelson@ti.com>
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>
With the --gcc option the current gcc compiler gives warning and hence
removed
Signed-off-by: Sam Nelson <sam.nelson@ti.com>
trace: Update to snprintf for robustness
Signed-off-by: Sam Nelson <sam.nelson@ti.com>
Signed-off-by: Sam Nelson <sam.nelson@ti.com>
srvmgr: Add NULL check for robustness
Signed-off-by: Sam Nelson <sam.nelson@ti.com>
Signed-off-by: Sam Nelson <sam.nelson@ti.com>
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>
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>
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>
No need to do caluculation of size using assumptions on structure
element
Signed-off-by: Sam Nelson <sam.nelson@ti.com>
TransportShm: Add NULL check for robustness
Signed-off-by: Sam Nelson <sam.nelson@ti.com>
Signed-off-by: Sam Nelson <sam.nelson@ti.com>
NameServerRemoteNotify: Add NULL check for robustness
Signed-off-by: Sam Nelson <sam.nelson@ti.com>
Signed-off-by: Sam Nelson <sam.nelson@ti.com>
NotifyDriverShm: Update local variable types match usage
Signed-off-by: Sam Nelson <sam.nelson@ti.com>
Signed-off-by: Sam Nelson <sam.nelson@ti.com>
HeapMultiBufMP: Add NULL check for robustness
Add cast to match types
Signed-off-by: Sam Nelson <sam.nelson@ti.com>
Add cast to match types
Signed-off-by: Sam Nelson <sam.nelson@ti.com>
HeapMemMP: Add NULL check for robustness
Signed-off-by: Sam Nelson <sam.nelson@ti.com>
Signed-off-by: Sam Nelson <sam.nelson@ti.com>
HeapBufMP: Add NULL check for robustness
Also removes unnecessary Int32 cast
Signed-off-by: Sam Nelson <sam.nelson@ti.com>
Also removes unnecessary Int32 cast
Signed-off-by: Sam Nelson <sam.nelson@ti.com>
GatePersonN: Update stack variable to match usage
Signed-off-by: Sam Nelson <sam.nelson@ti.com>
Signed-off-by: Sam Nelson <sam.nelson@ti.com>
GateHWSpinlock: Update stack variable to match usage
Signed-off-by: Sam Nelson <sam.nelson@ti.com>
Signed-off-by: Sam Nelson <sam.nelson@ti.com>
GateHWSem: Update stack variable to match usage
Signed-off-by: Sam Nelson <sam.nelson@ti.com>
Signed-off-by: Sam Nelson <sam.nelson@ti.com>
Notify: Add NULL check for robustness
Signed-off-by: Sam Nelson <sam.nelson@ti.com>
Signed-off-by: Sam Nelson <sam.nelson@ti.com>
listMP: Add NULL check for robustness
Signed-off-by: Sam Nelson <sam.nelson@ti.com>
Signed-off-by: Sam Nelson <sam.nelson@ti.com>
Ipc: Fix mismatched types for comparison
Also adds null checks for robustness
Signed-off-by: Sam Nelson <sam.nelson@ti.com>
Also adds null checks for robustness
Signed-off-by: Sam Nelson <sam.nelson@ti.com>
GateMP: Cast to common type for comparison
Also adds NULL check
Signed-off-by: Sam Nelson <sam.nelson@ti.com>
Also adds NULL check
Signed-off-by: Sam Nelson <sam.nelson@ti.com>
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>
Also make curInit volatile so that multiple threads can touch the same
variable
Signed-off-by: Sam Nelson <sam.nelson@ti.com>
IpcPower: Add NULL check to avoid NULL pointer access
Signed-off-by: Sam Nelson <sam.nelson@ti.com>
Signed-off-by: Sam Nelson <sam.nelson@ti.com>
TransportRpmsg: Add NULL check to avoid NULL pointer access
Signed-off-by: Sam Nelson <sam.nelson@ti.com>
Signed-off-by: Sam Nelson <sam.nelson@ti.com>
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>
Convert to common unsigned int
Also add error check where needed
Signed-off-by: Sam Nelson <sam.nelson@ti.com>
Watchdog: Add NULL check to avoid NULL pointer access
Signed-off-by: Sam Nelson <sam.nelson@ti.com>
Signed-off-by: Sam Nelson <sam.nelson@ti.com>
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>
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>
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>
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>
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>