Hi Johannes,
It is not a typo. It is what I intend to to.
First of all, you should not assume the core0 has ID 0, and core1 has ID 1. From my previous snippert, if you have noticed, the ownerId is 1, since our cfg does following:
var MultiProc = xdc.useModule('ti.sdo.utils.MultiProc'); /* Note: MultiProc_self is set during VirtQueue_init based on DNUM. */ MultiProc.setConfig(null, ["HOST", "CORE0", "CORE1", "CORE3","CORE4","CORE5","CORE6","CORE7"]);
And the test program just like following:
int main(int argc, Char * argv[]) { kdump_init(); System_printf("%s %s, cpu = %d\n", __FUNCTION__, __TIME__, MultiProc_self()); /* * Assume the program runs on core0, it is chosen as the master core. * When the program runs on core1..7, it is a slave core. */ DBGPRINTF("[%d][%d]kdump_init success!\n", DNUM, MultiProc_self()); if (startup_IPC_init()) { return -1; } #if 1 if ( MultiProc_self() == 1 ) { int status = -1; do { DBGPRINTF("Try attach 2:%d\n", status); status = Ipc_attach(2); if (status < 0) { Task_sleep(1); } } while (status < 0); DBGPRINTF("Attach 2:%d\n", status); } else { int status = -1; do { DBGPRINTF("Try attach 1:%d\n", status); status = Ipc_attach(1); if (status < 0) { Task_sleep(1); } } while (status < 0); DBGPRINTF("Attach 1:%d\n", status); } #endif while (1) { DBGPRINTF("OK"); Task_sleep(1); } BIOS_start(); return (0); }
(Please visit the site to view this file)