/*! * ======== VirtQueue_startup ======== */ Void VirtQueue_startup() { hostProcId = MultiProc_getId("HOST"); #ifndef SMP dsp1ProcId = MultiProc_getId("DSP1"); sysm3ProcId = MultiProc_getId("CORE0"); appm3ProcId = MultiProc_getId("CORE1"); #endif #ifdef DSP intInfo.intVectorId = DSPEVENTID; #else /* Initilize the IpcPower module */ IpcPower_init(); #endif /* * Wait for HLOS (Virtio device) to indicate that priming of host's receive * buffers is complete, indicating that host is ready to send. * * Though this is a Linux Virtio configuration status, it must be * implemented by each non-Linux HLOS as well. */ Log_print1(Diags_USER1, "VirtQueue_startup: VDEV status: 0x%x\n", Resource_getVdevStatus(VIRTIO_ID_RPMSG)); Log_print0(Diags_USER1, "VirtQueue_startup: Polling VDEV status...\n"); while (Resource_getVdevStatus(VIRTIO_ID_RPMSG) != VRING_BUFS_PRIMED); Log_print1(Diags_USER1, "VirtQueue_startup: VDEV status: 0x%x\n", Resource_getVdevStatus(VIRTIO_ID_RPMSG)); InterruptProxy_intRegister(hostProcId, &intInfo, (Fxn)VirtQueue_isr, NULL); Log_print0(Diags_USER1, "Passed VirtQueue_startup\n"); }
/*! * ======== VirtQueue_startup ======== */ Void VirtQueue_startup() { hostProcId = MultiProc_getId("HOST"); dspProcId = MultiProc_getId("DSP"); sysm3ProcId = MultiProc_getId("CORE0"); appm3ProcId = MultiProc_getId("CORE1"); /* Initilize the IpcPower module */ IpcPower_init(); /* * DSP can be used to prototype communications with CORE0 instead of * HOST */ if (MultiProc_self() == dspProcId) { memset((void *)RP_MSG_A9_SYSM3_VRING_DA, 0, RP_MSG_RING_SIZE * 2 + RP_MSG_BUFS_SPACE); InterruptM3_intRegister(VirtQueue_isr); InterruptM3_intSend(sysm3ProcId, (UInt)RP_MSG_MBOX_READY); InterruptM3_intSend(sysm3ProcId, (0xA0000000)); InterruptM3_intSend(appm3ProcId, (UInt)RP_MSG_MBOX_READY); InterruptM3_intSend(appm3ProcId, (0xA0000000)); buf_addr = (Ptr)RP_MSG_A9_SYSM3_VRING_DA; } else if (MultiProc_self() == sysm3ProcId) InterruptM3_intRegister(VirtQueue_isr); else if (MultiProc_self() == appm3ProcId) InterruptM3_intRegister(VirtQueue_isr); }
/*! * ======== VirtQueue_startup ======== */ Void VirtQueue_startup() { hostProcId = MultiProc_getId("HOST"); #ifndef SMP dspProcId = MultiProc_getId("DSP"); sysm3ProcId = MultiProc_getId("CORE0"); appm3ProcId = MultiProc_getId("CORE1"); #endif /* Initilize the IpcPower module */ IpcPower_init(); #if defined(M3_ONLY) && !defined(SMP) if (MultiProc_self() == sysm3ProcId) { OffloadM3_init(); } #endif InterruptProxy_intRegister(VirtQueue_isr); }