/*! * ======== VirtQueue_isr ======== * Note 'arg' is ignored: it is the Hwi argument, not the mailbox argument. */ Void VirtQueue_isr(UArg msg) { VirtQueue_Object *vq; Log_print1(Diags_USER1, "VirtQueue_isr received msg = 0x%x\n", msg); if (MultiProc_self() == sysm3ProcId) { switch(msg) { case (UInt)RP_MSG_MBOX_READY: return; case (UInt)RP_MBOX_ECHO_REQUEST: InterruptM3_intSend(hostProcId, (UInt)(RP_MBOX_ECHO_REPLY)); return; case (UInt)RP_MBOX_ABORT_REQUEST: { Fxn f = (Fxn)0x0; Log_print0(Diags_USER1, "Crash on demand ...\n"); f(); } return; case (UInt)RP_MSG_FLUSH_CACHE: Cache_wbAll(); return; case (UInt)RP_MSG_HIBERNATION: /* Notify Core1 */ InterruptM3_intSend(appm3ProcId, (UInt)(RP_MSG_HIBERNATION)); IpcPower_suspend(); return; default: /* * If the message isn't one of the above, it's either part of the * 2-message synchronization sequence or it a virtqueue message */ break; } } else if (msg & 0xFFFF0000) { if (msg == (UInt)RP_MSG_HIBERNATION) { IpcPower_suspend(); } return; } if (MultiProc_self() == sysm3ProcId && (msg == ID_A9_TO_APPM3 || msg == ID_APPM3_TO_A9)) { InterruptM3_intSend(appm3ProcId, (UInt)msg); } else { vq = queueRegistry[msg]; if (vq) { vq->callback(vq); } } }
/*! * ======== VirtQueue_isr ======== * Note 'arg' is ignored: it is the Hwi argument, not the mailbox argument. */ Void VirtQueue_isr(UArg msg) { VirtQueue_Object *vq; Log_print1(Diags_USER1, "VirtQueue_isr received msg = 0x%x\n", msg); #ifndef SMP if (MultiProc_self() == sysm3ProcId || MultiProc_self() == dspProcId) { #endif switch(msg) { case (UInt)RP_MSG_MBOX_READY: return; case (UInt)RP_MBOX_ECHO_REQUEST: InterruptProxy_intSend(hostProcId, (UInt)(RP_MBOX_ECHO_REPLY)); return; case (UInt)RP_MBOX_ABORT_REQUEST: { Fxn f = (Fxn)0x0; Log_print0(Diags_USER1, "Crash on demand ...\n"); f(); } return; case (UInt)RP_MSG_FLUSH_CACHE: Cache_wbAll(); return; case (UInt)RP_MSG_HIBERNATION: if (IpcPower_canHibernate() == FALSE) { InterruptProxy_intSend(hostProcId, (UInt)RP_MSG_HIBERNATION_CANCEL); return; } /* Fall through */ case (UInt)RP_MSG_HIBERNATION_FORCE: #ifndef SMP /* Core0 should notify Core1 */ if (MultiProc_self() == sysm3ProcId) { InterruptProxy_intSend(appm3ProcId, (UInt)(RP_MSG_HIBERNATION)); } #endif /* Ack request */ InterruptProxy_intSend(hostProcId, (UInt)RP_MSG_HIBERNATION_ACK); IpcPower_suspend(); return; default: #if defined(M3_ONLY) && !defined(SMP) /* Check and process any Inter-M3 Offload messages */ if (OffloadM3_processSysM3Tasks(msg)) return; #endif /* * If the message isn't one of the above, it's either part of the * 2-message synchronization sequence or it a virtqueue message */ break; } #ifndef SMP } else if (msg & 0xFFFF0000) { if (msg == (UInt)RP_MSG_HIBERNATION) { IpcPower_suspend(); } return; } if (MultiProc_self() == sysm3ProcId && (msg == ID_A9_TO_APPM3 || msg == ID_APPM3_TO_A9)) { InterruptProxy_intSend(appm3ProcId, (UInt)msg); } else { #endif /* Don't let unknown messages to pass as a virtqueue index */ if (msg >= NUM_QUEUES) { /* Adding print here deliberately, we should never see this */ System_printf("VirtQueue_isr: Invalid mailbox message 0x%x " "received\n", msg); return; } vq = queueRegistry[msg]; if (vq) { vq->callback(vq); } #ifndef SMP } #endif }