Revert "ResMgr: Add local structures for auxclk and regulator resources"

This reverts commit e4553e51faf71e7c6f164bf05df420ab34323b09.

The host-side resmgr code has been modified to accept ids for
regulators and auxclks. This patch reverts the functionality
back to what it had been originally in the rpmsg-1.20 branch.

Signed-off-by: Fernando Guzman Lugo <fernando.lugo@ti.com>
Signed-off-by: Subramaniam C.A <subramaniam.ca@ti.com>
Signed-off-by: Suman Anna <s-anna@ti.com>
Resources: Adjust for CMA relocation within 512MB

The CMA carveouts for the remote processors have been moved to
lie within the first 512MB of DDR. The IPC start addresses have
been adjusted accordingly to match the kernel-side.

This change is being done to improve stability on the host-side
with the new kernel.

Signed-off-by: Suman Anna <s-anna@ti.com>
IPC: Move Log_printf after registering with Registry module

Module-specific logging support is automatic with XDC modules,
and similar functionality for non-XDC modules (like MessageQCopy)
is only possible through the Registry module. The MessageQCopy
module can have its own Diags mask, module id and logging support
functional only after registering with the Registry module (using
Registry_addModule).

Any Log_printf or other API that rely on the module id and the
descriptor, if called before Registry_addModule, will be using
invalid values for the diags mask and module id. This can cause
potential stack/memory corruption issues due to erroneous
diagnostic text lookups or other array out of bounds issues.

This patch moves the Log_printf in MessageQCopy_init only after
initialization of the Registry_Desc has been completed.

Signed-off-by: Juan Gutierrez <jgutierrez@ti.com>
Signed-off-by: Suman Anna <s-anna@ti.com>
IPC: Initialize procId variables in interrupt send functions

The procId variables are static on a particular base image and
are used in the InterruptXXX_intSend functions to eliminate the
need to do a function lookup for the id every time a message
needs to be sent. The variables are currently initialized in the
InterruptXXX_intRegister function. The xxx_intRegister function
is used for enabling a Rx interrupt to process received messages,
and should be orthogonal to the xxx_intSend function, which is
solely used for sending a message.

The procId initialization has therefore been moved to the
xxx_intSend function itself to break the above dependency. This
ensures that the variables are always initialized, and would
avoid any exceptions when sending a message even before a Rx
interrupt has been registered.

This behavior has been observed in the case of an early crash.
The VirtQueue_postCrashToMailbox tries to notify MPU in case
of an exception during the initial boot and this can lead to
another secondary crash due to uninitialized procId variables.
This nested-exception behavior masks the register and stack
dump of the very first crash.

Signed-off-by: Artur Troian <x0164361@ti.com>
Signed-off-by: Juan Gutierrez <jgutierrez@ti.com>
Signed-off-by: Suman Anna <s-anna@ti.com>
Revert "Resources: Adjust for CMA relocation within 512MB"

This reverts commit ecf363f09df5d60ee181f1f0833d03db710753fa.

We are not ready on kernel side, yet.

Signed-off-by: Vincent Stehlé <v-stehle@ti.com>
IPC: Handling unknown mbox messages correctly

Some valid mailbox messages are not correctly handled in the
ISR. The unknown message could pass to the default section and
seen as a valid message with a virtqueue index.

A check is added to verify the message provides a valid virtqueue
index, otherwise just return from the ISR.

Signed-off-by: Juan Gutierrez <jgutierrez@ti.com>
Rework core0 memory map for DCE core0 image

Signed-off-by: Nicolas Dechesne <n-dechesne@ti.com>
RCM: Do not bring in legacy IPC components

The RCM modules in ti.grcm is designed to work with MessageQCopy
module and not with the legacy MessageQ module. The RcmServer
module is cleaned up from bringing in any of these components
during the configuration phase.

The ti.grcm package still needs a good amount of cleanup to
remove all the code that it does not actively use or designed
to work/link with.

Signed-off-by: Suman Anna <s-anna@ti.com>
Handle errors in NameMap

Signed-off-by: Vincent Stehlé <v-stehle@ti.com>
Hack! Align OMAP5 IPU addresses on OMAP4

Signed-off-by: Vincent Stehlé <v-stehle@ti.com>
Corruption fix from Juan Gutierrez

Signed-off-by: Vincent Stehlé <v-stehle@ti.com>
Add requirement on ti.grcm

This solves link time issue of DCE image, about undefined symbols, such as
RcmServer_create.

Signed-off-by: Vincent Stehlé <v-stehle@ti.com>