Exemple #1
0
/*!
 *  ======== InterruptDsp_intRegister ======== 
 */
Void InterruptDsp_intRegister(UInt16 remoteProcId, IInterrupt_IntInfo *intInfo,
                              Fxn func, UArg arg)
{
    UInt        key;
    Int         index; 
    InterruptDsp_FxnTable *table;    
    Hwi_Params  hwiParams;    

    /* Ensure that our ID is set correctly */
    Assert_isTrue(InterruptDsp_dspProcId == MultiProc_self(),
            ti_sdo_ipc_Ipc_A_internal);    
    
    /* Ensure that remoteProcId is valid */
    Assert_isTrue(remoteProcId < ti_sdo_utils_MultiProc_numProcessors, 
            ti_sdo_ipc_Ipc_A_invArgument);
   
    /* Ensure that proper intVectorId has been supplied */
    Assert_isTrue(intInfo->intVectorId <= 15, ti_sdo_ipc_Ipc_A_internal);    
    
    if (remoteProcId == InterruptDsp_hostProcId) {
        index = 0;
    }
    else if (remoteProcId == InterruptDsp_core0ProcId) {
        index = 1;
    }
    else {
        /* DSP cannot talk to CORE1 */
        Assert_isTrue(FALSE, ti_sdo_ipc_Ipc_A_internal);
    }
    
    /* Disable global interrupts */
    key = Hwi_disable();

    table = &(InterruptDsp_module->fxnTable[index]); 
    table->func = func;
    table->arg  = arg;
    
    InterruptDsp_intClear(remoteProcId, intInfo);
    
    /* Make sure the interrupt only gets plugged once */
    InterruptDsp_module->numPlugged++;
    if (InterruptDsp_module->numPlugged == 1) {
        Hwi_Params_init(&hwiParams);
        hwiParams.eventId = DSPINT;
        Hwi_create(intInfo->intVectorId,
                   (Hwi_FuncPtr)InterruptDsp_intShmStub,
                   &hwiParams,
                   NULL);
        
        /* Enable the interrupt */
        Wugen_enableEvent(DSPINT);
        Hwi_enableInterrupt(intInfo->intVectorId);
    }
 
    /* Enable the mailbox interrupt to the DSP */
    InterruptDsp_intEnable(remoteProcId, intInfo);
    
    /* Restore global interrupts */
    Hwi_restore(key);
}
Exemple #2
0
/*!
 *  ======== InterruptDsp_intRegister ======== 
 */
Void InterruptDsp_intRegister(UInt16 remoteProcId, IInterrupt_IntInfo *intInfo,
                              Fxn func, UArg arg)
{
    UInt        key;
    UInt        eventId;
    UInt        combinedEventId;
    Int         index; 
    Hwi_Params  params;
    InterruptDsp_FxnTable *table; 

    Assert_isTrue(((remoteProcId < MultiProc_getNumProcsInCluster()) && 
                   (remoteProcId != MultiProc_self())), ti_sdo_ipc_Ipc_A_internal);

    index = PROCID(remoteProcId);
    
    /* Disable global interrupts */
    key = Hwi_disable();

    table = &(InterruptDsp_module->fxnTable[index]);
    table->func = func;
    table->arg  = arg;
    
    InterruptDsp_intClear(remoteProcId, intInfo);
    
    /* Make sure the interrupt only gets plugged once */
    eventId = InterruptDsp_dspInterruptTable[index];
    
    InterruptDsp_module->numPlugged++;
    
    if (InterruptDsp_module->numPlugged == 1) {
        EventCombiner_dispatchPlug(eventId,
            (Hwi_FuncPtr)InterruptDsp_intShmStub, eventId, TRUE);
        Hwi_Params_init(&params);
  
        combinedEventId = eventId / EVENT_GROUP_SIZE;  
            
        params.eventId = combinedEventId;
        params.arg = combinedEventId;
        params.enableInt = TRUE;
        Hwi_create(intInfo->intVectorId, &ti_sysbios_family_c64p_EventCombiner_dispatch,
                   &params, NULL);
        Hwi_enableInterrupt(intInfo->intVectorId);
    }
    else {
        EventCombiner_dispatchPlug(eventId,
                (Hwi_FuncPtr)InterruptDsp_intShmStub, eventId, TRUE);
    }

    /* Enable the mailbox interrupt to the DSP */
    InterruptDsp_intEnable(remoteProcId, intInfo);
    
    /* Restore global interrupts */
    Hwi_restore(key);
}
Exemple #3
0
/*!
 *  ======== InterruptDsp_intRegister ======== 
 */
Void InterruptDsp_intRegister(UInt16 remoteProcId, IInterrupt_IntInfo *intInfo,
                              Fxn func, UArg arg)
{
    UInt        key;
    Int         index; 
    InterruptDsp_FxnTable *table;    
   
    Assert_isTrue(intInfo->intVectorId <= 15, ti_sdo_ipc_Ipc_A_internal);
    
    if (remoteProcId == InterruptDsp_hostProcId) {
        index = 0;
    }
    else if (remoteProcId == InterruptDsp_videoProcId) {
        index = 1;
    }
    else if (remoteProcId == InterruptDsp_vpssProcId) {
        index = 2;
    }
    else {
        Assert_isTrue(FALSE, ti_sdo_ipc_Ipc_A_internal);
        return;    /* keep Coverity happy */ 
    }
    
    /* Disable global interrupts */
    key = Hwi_disable();

    table = &(InterruptDsp_module->fxnTable[index]);
    table->func = func;
    table->arg  = arg;
    
    InterruptDsp_intClear(remoteProcId, intInfo);
    
    /* Make sure the interrupt only gets plugged once */
    InterruptDsp_module->numPlugged++;
    if (InterruptDsp_module->numPlugged == 1) { 
        /* Map the interrupt number to HWI vector */
        Hwi_eventMap(intInfo->intVectorId, DSPINT);    

        Hwi_create(intInfo->intVectorId,
                   (Hwi_FuncPtr)InterruptDsp_intShmStub,
                   NULL,
                   NULL);
        Hwi_enableInterrupt(intInfo->intVectorId);
    }
    
    /* Enable the mailbox interrupt to the DSP */
    InterruptDsp_intEnable(remoteProcId, intInfo);
    
    /* Restore global interrupts */
    Hwi_restore(key);
}
Exemple #4
0
/*!
 *  ======== InterruptDsp_intRegister ======== 
 */
Void InterruptDsp_intRegister(UInt16 remoteProcId, IInterrupt_IntInfo *intInfo,
                              Fxn func, UArg arg)
{
    UInt        key;
    Hwi_Params  hwiAttrs;
    Error_Block eb;
    InterruptDsp_FxnTable *table;    
   
    Assert_isTrue(intInfo->intVectorId <= 15, ti_sdo_ipc_Ipc_A_internal);

    /* init error block */
    Error_init(&eb);

    /* Disable global interrupts */
    key = Hwi_disable();

    table = &(InterruptDsp_module->fxnTable);
    table->func = func;
    table->arg  = arg;
    
    InterruptDsp_intClear(remoteProcId, intInfo);

    /* Make sure the interrupt only gets plugged once */
    InterruptDsp_module->numPlugged++;
    if (InterruptDsp_module->numPlugged == 1) { 
        /* Register interrupt to remote processor */
        Hwi_Params_init(&hwiAttrs);
        hwiAttrs.arg = arg;
        hwiAttrs.eventId = 90;

        Hwi_create(intInfo->intVectorId,
                   (Hwi_FuncPtr)InterruptDsp_intShmStub,
                   &hwiAttrs,
                   &eb);
        
        /* enable the interrupt vector */
        Hwi_enableInterrupt(intInfo->intVectorId);
    }
    
    /* Enable the mailbox interrupt to the DSP */
    InterruptDsp_intEnable(remoteProcId, intInfo);
    
    /* Restore global interrupts */
    Hwi_restore(key);
}
Exemple #5
0
/*
 *  ======== InterruptDsp_intRegister ========
 */
Void InterruptDsp_intRegister(UInt16 remoteProcId, IInterrupt_IntInfo *intInfo,
                              Fxn func, UArg arg)
{
    UInt        key;
    Int         index;
    Hwi_Params  hwiAttrs;
    Error_Block eb;
    InterruptDsp_FxnTable *table;

    Assert_isTrue(intInfo->intVectorId <= 15, ti_sdo_ipc_Ipc_A_internal);

    /* init error block */
    Error_init(&eb);

    if (remoteProcId == InterruptDsp_hostProcId) {
        index = 0;
    }
    else if (remoteProcId == InterruptDsp_videoProcId) {
        index = 1;
    }
    else if (remoteProcId == InterruptDsp_vpssProcId) {
        index = 2;
    }
    else if (remoteProcId == InterruptDsp_eveProcId) {
        index = 3;
    }
    else {
        Assert_isTrue(FALSE, ti_sdo_ipc_Ipc_A_internal);
        return;     /* keep Coverity happy */
    }

    /* Disable global interrupts */
    key = Hwi_disable();

    table = &(InterruptDsp_module->fxnTable[index]);
    table->func = func;
    table->arg  = arg;

    InterruptDsp_intClear(remoteProcId, intInfo);

    if (remoteProcId == InterruptDsp_eveProcId) {
        /* This should be called only once */
        /* Register interrupt for eve internal mailbox */
        Hwi_Params_init(&hwiAttrs);
        hwiAttrs.arg     = arg;
        hwiAttrs.eventId = EVE_MAILBOX_DSPINT;

        Hwi_create(intInfo->intVectorId,
                   (Hwi_FuncPtr)InterruptDsp_intEveShmStub,
                   &hwiAttrs,
                   &eb);

        Hwi_enableInterrupt(intInfo->intVectorId);
    }
    else {
        /* Make sure the interrupt only gets plugged once */
        InterruptDsp_module->numPlugged++;

        if (InterruptDsp_module->numPlugged == 1) {
            /* Register interrupt for system mailbox */
            Hwi_Params_init(&hwiAttrs);
            hwiAttrs.arg     = arg;
            hwiAttrs.eventId = MAILBOX_DSPINT;

            Hwi_create(intInfo->intVectorId,
                       (Hwi_FuncPtr)InterruptDsp_intShmStub,
                       &hwiAttrs,
                       &eb);

            Hwi_enableInterrupt(intInfo->intVectorId);
        }
    }

    /* Enable the mailbox interrupt to the DSP */
    InterruptDsp_intEnable(remoteProcId, intInfo);

    /* Restore global interrupts */
    Hwi_restore(key);
}