Commit 927a91dd authored by Suman Anna's avatar Suman Anna Committed by Hari Kanigeri

SYSLINK: ipc - Enable SWDMM memory region in SysMgr

This is a patch for near-term to enable MM to validate non-Tiler buffers.
This patch  maps the SW DMM region at 0x80000000 and of size 4MB into
the kernel space and also adds a new shared region for it in
platform_setup function. platform_override_config function is updated
to configure the messageq module with 3 heaps.
Signed-off-by: default avatarSuman Anna <s-anna@ti.com>
parent 1a11912a
......@@ -140,6 +140,14 @@
#define BOOTLOADPAGE_SLV_VRT_BASEADDR_APPM3 0x980FF000
#define BOOTLOADPAGE_SLV_VRT_BASESIZE_APPM3 0x00001000
/*! @brief Start of shared memory */
#define SHAREDMEMORY_SWDMM_PHY_BASEADDR 0x87C00000
#define SHAREDMEMORY_SWDMM_PHY_BASESIZE 0x00400000
/*! @brief Start of SHM SW DMMfor Ducati */
#define SHAREDMEMORY_SWDMM_SLV_VRT_BASEADDR 0x80000000
#define SHAREDMEMORY_SWDMM_SLV_VRT_BASESIZE 0x00400000
/*!
* @brief Size of the shared memory heap, this heap is used for providing
* shared memory to drivers/instances. Should not be used for any other purpose.
......@@ -161,6 +169,10 @@
*/
#define SMHEAP_SRINDEX_APPM3 1
/*!
* @brief Shared region index for Shared memory SW DMM section.
*/
#define SMHEAP_SRINDEX_SWDMM 2
/*!
* @brief Shared region index for SysM3 boot load page
......@@ -296,7 +308,7 @@ struct platform_proc_config_params {
/*!
* @brief Number of slave memory entries for OMAP4430.
*/
#define NUM_MEM_ENTRIES 2
#define NUM_MEM_ENTRIES 3
/*!
* @brief Number of slave memory entries for OMAP4430 SYSM3.
......@@ -308,14 +320,12 @@ struct platform_proc_config_params {
*/
#define NUM_MEM_ENTRIES_APPM3 1
/*!
* @brief Position of reset vector memory region in the memEntries array.
*/
#define RESET_VECTOR_ENTRY_ID 0
#define DUCATI_SHM_VA 0x98000000
#define DUCATI_SHM_1_VA 0x98080000
/** ============================================================================
* Globals
* ============================================================================
......@@ -347,6 +357,18 @@ static struct proc4430_mem_entry mem_entries[NUM_MEM_ENTRIES] = {
SHAREDMEMORY_SLV_VRT_BASESIZE_APPM3,
/* SIZE : Size of the memory region */
true, /* SHARE : Shared access memory? */
},
{
"DUCATI_SHM_SWDMM", /* NAME : Name of the memory region */
SHAREDMEMORY_SWDMM_PHY_BASEADDR,
/* PHYSADDR : Physical address */
SHAREDMEMORY_SWDMM_SLV_VRT_BASEADDR,
/* SLAVEVIRTADDR : Slave virtual address */
(u32) -1u,
/* MASTERVIRTADDR : Master virtual address (if known) */
SHAREDMEMORY_SWDMM_SLV_VRT_BASESIZE,
/* SIZE : Size of the memory region */
true, /* SHARE : Shared access memory? */
}
};
......@@ -485,6 +507,19 @@ s32 platform_setup(struct sysmgr_config *config)
0,
SHAREDMEMORY_PHY_BASESIZE_APPM3);
/* Map the static region */
info.src = SHAREDMEMORY_SWDMM_PHY_BASEADDR;
info.size = SHAREDMEMORY_SWDMM_PHY_BASESIZE;
info.is_cached = false;
status = platform_mem_map(&info);
if (status < 0)
goto mem_map_fail;
/* Create the shared region entry for the SW DMM heap */
sharedregion_add(SMHEAP_SRINDEX_SWDMM,
(void *)info.dst,
info.size);
proc4430_get_config(&proc_config);
status = proc4430_setup(&proc_config);
if (status < 0)
......@@ -755,13 +790,27 @@ void platform_load_callback(void *arg)
sysmemmgr_xltflag_kvirt2phys);
info.base = (void *) SHAREDMEMORY_SLV_VRT_BASEADDR_APPM3;
/* Write info the boot load page */
/* Write info into the boot load page */
nwrite = sysmgr_put_object_config(proc_id,
(void *) &info,
SYSMGR_CMD_SHAREDREGION_ENTRY_START +
SMHEAP_SRINDEX_APPM3,
sizeof(struct sharedregion_info));
WARN_ON(nwrite != sizeof(struct sharedregion_info));
/* For SW DMM region */
sharedregion_get_table_info(SMHEAP_SRINDEX_SWDMM,
local_id,
&info);
info.base = (void *) SHAREDMEMORY_SWDMM_SLV_VRT_BASEADDR;
/* Write info into the boot load page */
nwrite = sysmgr_put_object_config(proc_id,
(void *) &info,
SYSMGR_CMD_SHAREDREGION_ENTRY_START +
SMHEAP_SRINDEX_SWDMM,
sizeof(struct sharedregion_info));
WARN_ON(nwrite != sizeof(struct sharedregion_info));
goto exit;
proc_mgr_translate_addr_fail:
......
......@@ -64,8 +64,9 @@ int platform_override_config(struct sysmgr_config *config)
/* Override the messageq default config */
/* We use 2 heaps, 1 for APPM3 and 1 for SYSM3 */
if (config->messageq_cfg.num_heaps < 2)
config->messageq_cfg.num_heaps = 2;
/* FIXME: Temporary Fix - Add one more for the SW DMM heap */
if (config->messageq_cfg.num_heaps < 3)
config->messageq_cfg.num_heaps = 3;
/* Override the notify default config */
config->notify_cfg.maxDrivers = 2;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment