aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBuddy Liong2016-07-28 14:04:24 -0500
committerBuddy Liong2016-08-16 12:04:51 -0500
commit8ad2a268739f134b70e972711f59bd74346a87e1 (patch)
tree31808e8fc7af1e19b9d62fe95bdccb45fc0ff388
parent7c283ebc252223a728cb542dbc10c3ca0ab53e59 (diff)
downloadipumm-8ad2a268739f134b70e972711f59bd74346a87e1.tar.gz
ipumm-8ad2a268739f134b70e972711f59bd74346a87e1.tar.xz
ipumm-8ad2a268739f134b70e972711f59bd74346a87e1.zip
Run dce_init on Task thread
Previously dce_init() is configured as the BIOS UserStartupFunction or started when BIOS_start() is called. This is configured in \src\ti\framework\dce\package.xs The assumption is that IpcMgr_rpmsgStartup() is also configured as the BIOS UserStartupFunction or started when BIOS_start() is called. This is configured in \platform\ti\dce\baseimage\dce_ipu.cfg If IPC API IpcMgr_rpmsgStartup() is not configured as BIOS UserStartupFunction but instead it was called from a Task thread, then dce_init has to be delayed until RPMessage_init() which is called in IpcMgr_rpmsgStartup() is completed. Otherwise rpmsg-dce and dce_callback thread in dce_init() will be failing since the RPMSG is not configured yet. This patch removes dce_init() from BIOS UserStartupFunction. It will now be called from IPUMM_Main() Change-Id: I6d2cb8f4cf55d72c25eb867ad48ed7e2710efb4b Signed-off-by: Buddy Liong <a0270631@ti.com>
-rw-r--r--platform/ti/dce/baselib/ipumm_main.c2
-rw-r--r--src/ti/framework/dce/dce.c2
-rw-r--r--src/ti/framework/dce/package.xs1
3 files changed, 3 insertions, 2 deletions
diff --git a/platform/ti/dce/baselib/ipumm_main.c b/platform/ti/dce/baselib/ipumm_main.c
index aa92080..76ccd34 100644
--- a/platform/ti/dce/baselib/ipumm_main.c
+++ b/platform/ti/dce/baselib/ipumm_main.c
@@ -83,6 +83,8 @@ int IPUMM_Main(int argc, char * *argv)
83 hostId = MultiProc_getId("HOST"); 83 hostId = MultiProc_getId("HOST");
84 RPMessage_init(hostId); 84 RPMessage_init(hostId);
85 85
86 dce_init();
87
86 /* CPU load reporting in the trace. */ 88 /* CPU load reporting in the trace. */
87 start_load_task(); 89 start_load_task();
88 90
diff --git a/src/ti/framework/dce/dce.c b/src/ti/framework/dce/dce.c
index f0e1d77..78848d4 100644
--- a/src/ti/framework/dce/dce.c
+++ b/src/ti/framework/dce/dce.c
@@ -1619,7 +1619,7 @@ Bool dce_init(void)
1619 Task_Params callback_params; 1619 Task_Params callback_params;
1620 Semaphore_Params semParams; 1620 Semaphore_Params semParams;
1621 1621
1622 INFO("Creating DCE server and DCE callbabk server thread..."); 1622 INFO("Creating DCE server and DCE callback server thread...");
1623 1623
1624 /* Create DCE task. */ 1624 /* Create DCE task. */
1625 Task_Params_init(&params); 1625 Task_Params_init(&params);
diff --git a/src/ti/framework/dce/package.xs b/src/ti/framework/dce/package.xs
index 7e7f11a..d385733 100644
--- a/src/ti/framework/dce/package.xs
+++ b/src/ti/framework/dce/package.xs
@@ -46,7 +46,6 @@ function init()
46 * it will be called during BIOS_start() 46 * it will be called during BIOS_start()
47 */ 47 */
48 var BIOS = xdc.useModule('ti.sysbios.BIOS'); 48 var BIOS = xdc.useModule('ti.sysbios.BIOS');
49 BIOS.addUserStartupFunction('&dce_init');
50 49
51 Program.sectMap[".ipummversion"] = new Program.SectionSpec(); 50 Program.sectMap[".ipummversion"] = new Program.SectionSpec();
52 Program.sectMap[".ipummversion"].type = "COPY"; 51 Program.sectMap[".ipummversion"].type = "COPY";