Exemple #1
0
/*!
 *  ======== NotifySetup_sharedMemReq ========
 */  
SizeT NotifySetup_sharedMemReq(UInt16 remoteProcId, Ptr sharedAddr) 
{
    SizeT memReq;
    NotifyDriverShm_Params notifyShmParams;
    
    NotifyDriverShm_Params_init(&notifyShmParams);
    notifyShmParams.sharedAddr = sharedAddr;

    memReq = NotifyDriverShm_sharedMemReq(&notifyShmParams);

    return (memReq);
}
/*!
 *  ======== NotifySetup_sharedMemReq ========
 *  Return the amount of shared memory required
 */
SizeT
NotifySetupOmapl1xx_sharedMemReq (UInt16 remoteProcId, Ptr sharedAddr)
{
    SizeT                  memReq = 0x0;
    NotifyDriverShm_Params params;

    GT_1trace (curTrace, GT_ENTER, "NotifySetupOmapl1xx_sharedMemReq",
               sharedAddr);

    GT_assert (curTrace, (sharedAddr != NULL));

#if !defined(SYSLINK_BUILD_OPTIMIZE)
    if (sharedAddr == NULL) {
        /*! @retval  0 Invalid NULL sharedAddr argument provided. */
        GT_setFailureReason (curTrace,
                             GT_4CLASS,
                             "NotifySetupOmapl1xx_sharedMemReq",
                             Notify_E_INVALIDARG,
                             "Invalid NULL sharedAddr provided.");
    }
    else {
#endif /* if !defined(SYSLINK_BUILD_OPTIMIZE) */
        NotifyDriverShm_Params_init (&params);
        params.sharedAddr = sharedAddr;

        if (!NotifySetup_useSecondLine) {
            memReq = NotifyDriverShm_sharedMemReq (&params);
        }
        else {
            memReq = 2 * NotifyDriverShm_sharedMemReq (&params);
        }
#if !defined(SYSLINK_BUILD_OPTIMIZE)
    }
#endif /* if !defined(SYSLINK_BUILD_OPTIMIZE) */

    GT_1trace (curTrace, GT_LEAVE, "NotifySetupOmapl1xx_sharedMemReq", memReq);

    /*! @retval Shared-Memory-Requirements Operation successful */
    return (memReq);
}
Exemple #3
0
/*!
 * ======== NotifySetup_sharedMemReq ========
 */
SizeT NotifySetup_sharedMemReq(UInt16 remoteProcId, Ptr sharedAddr)
{
    SizeT memReq;
    NotifyDriverShm_Params params;
    
    NotifyDriverShm_Params_init(&params);
    params.sharedAddr      = sharedAddr;
    params.intVectorId     = NotifySetup_dspIntVectId;
    params.remoteProcId    = remoteProcId;

    memReq = NotifyDriverShm_sharedMemReq(&params);
    
    return(memReq);
}
Exemple #4
0
/*!
 * ======== NotifySetup_sharedMemReq ========
 */
SizeT NotifySetup_sharedMemReq(UInt16 remoteProcId, Ptr sharedAddr)
{
    SizeT memReq;
    NotifyDriverShm_Params params;

    Assert_isTrue(remoteProcId != MultiProc_getId("HOST"), NULL);

    NotifyDriverShm_Params_init(&params);
    params.sharedAddr      = sharedAddr;
    params.intVectorId     = NotifySetup_dspIntVectId;
    params.remoteProcId    = remoteProcId;

    memReq = NotifyDriverShm_sharedMemReq(&params);

    return(memReq);
}
Exemple #5
0
/*!
 *  ======== NotifySetup_sharedMemReq ========
 */  
SizeT NotifySetup_sharedMemReq(UInt16 remoteProcId, Ptr sharedAddr) 
{
    SizeT memReq;
    NotifyDriverShm_Params notifyShmParams;
    
    NotifyDriverShm_Params_init(&notifyShmParams);
    notifyShmParams.sharedAddr = sharedAddr;
    /* Disable cache for inter-ducati NotifyDriverShm instances */
    /*if ((MultiProc_self() == NotifySetup_vpssProcId && 
         remoteProcId == NotifySetup_videoProcId) ||
        (MultiProc_self() == NotifySetup_videoProcId && 
        remoteProcId == NotifySetup_vpssProcId)) {
        notifyShmParams.cacheEnabled = FALSE;
        notifyShmParams.cacheLineSize = 0;
    }*/

    memReq = NotifyDriverShm_sharedMemReq(&notifyShmParams);

    return (memReq);
}
Exemple #6
0
/*!
 *  ======== NotifySetup_sharedMemReq ========
 */  
SizeT NotifySetup_sharedMemReq(UInt16 remoteProcId, Ptr sharedAddr) 
{
    SizeT memReq;
    NotifyDriverShm_Params notifyShmParams;
    UInt16 myId = MultiProc_self();   
    
    NotifyDriverShm_Params_init(&notifyShmParams);
    notifyShmParams.sharedAddr = sharedAddr;
    /* Disable cache for inter-ducati NotifyDriverShm instances */
    if ((myId == NotifySetup_core1ProcId && 
         remoteProcId == NotifySetup_core0ProcId) ||
        (myId == NotifySetup_core0ProcId && 
        remoteProcId == NotifySetup_core1ProcId)) {
        notifyShmParams.cacheLineSize = 0;
        notifyShmParams.cacheEnabled = FALSE;
    }

    memReq = NotifyDriverShm_sharedMemReq(&notifyShmParams);
    
    return (memReq);
}
/*!
 *  @brief      Function to perform device specific setup for Notify module.
 *              This function creates the Notify drivers.
 *
 *  @param[in]  sharedAddr Shared address base.
 *
 *  @sa         NotifySetupOmapl1xx_detach
 */
Int
NotifySetupOmapl1xx_attach (UInt16 procId, Ptr sharedAddr)
{
    Int32                  status    = Notify_S_SUCCESS ;
    NotifyDriverShm_Params notifyShmParams;

    GT_1trace (curTrace, GT_ENTER, "NotifySetupOmapl1xx_attach", sharedAddr);

    GT_assert (curTrace, (sharedAddr != NULL));

#if !defined(SYSLINK_BUILD_OPTIMIZE)
    if (sharedAddr == NULL) {
        /*! @retval  Notify_E_INVALIDARG Invalid NULL sharedAddr argument
                                         provided. */
        status = Notify_E_INVALIDARG;
        GT_setFailureReason (curTrace,
                             GT_4CLASS,
                             "NotifySetupOmapl1xx_attach",
                             status,
                             "Invalid NULL sharedAddr provided.");
    }
    else {
#endif /* if !defined(SYSLINK_BUILD_OPTIMIZE) */
        /*
         *  Setup the notify driver to the DSP (Line 0)
         */
        NotifyDriverShm_Params_init (&notifyShmParams);
        notifyShmParams.cacheEnabled   = SharedRegion_isCacheEnabled(
            SharedRegion_getId((Ptr)sharedAddr));
        notifyShmParams.localIntId     = NotifySetup_armRecvIntId0;
        notifyShmParams.remoteIntId    = NotifySetup_dspRecvIntId0;
        notifyShmParams.remoteProcId   = procId;
        notifyShmParams.lineId         = 0u;
        notifyShmParams.sharedAddr     = sharedAddr;

        NotifySetup_dspDriverHandle0 = NotifyDriverShm_create(&notifyShmParams);
#if !defined(SYSLINK_BUILD_OPTIMIZE)
        if (NotifySetup_dspDriverHandle0 == NULL) {
            /*! @retval  Notify_E_FAIL NotifyDriverShm_create failed for line
                                       0 */
            status = Notify_E_FAIL;
            GT_setFailureReason (curTrace,
                                 GT_4CLASS,
                                 "NotifySetupOmapl1xx_attach",
                                 status,
                                 "NotifyDriverShm_create failed for line 0");
        }
        else {
#endif /* if !defined(SYSLINK_BUILD_OPTIMIZE) */
            NotifySetup_notifyHandle0 = Notify_create (
                                                   NotifySetup_dspDriverHandle0,
                                                   procId,
                                                   0u,
                                                   NULL);

#if !defined(SYSLINK_BUILD_OPTIMIZE)
            if (NotifySetup_notifyHandle0 == NULL) {
                /*! @retval  Notify_E_FAIL Notify_create failed for line 0 */
                status = Notify_E_FAIL;
                GT_setFailureReason (curTrace,
                                     GT_4CLASS,
                                     "NotifySetupOmapl1xx_attach",
                                     status,
                                     "Notify_create failed for line 0");
            }
        }

        if (status >= 0) {
#endif /* if !defined(SYSLINK_BUILD_OPTIMIZE) */
            if (NotifySetup_useSecondLine) {
                /*
                 *  Setup the notify driver to the DSP (Line 1)
                 */
                NotifyDriverShm_Params_init (&notifyShmParams);
                notifyShmParams.localIntId     = NotifySetup_armRecvIntId1;
                notifyShmParams.remoteIntId    = NotifySetup_dspRecvIntId1;
                notifyShmParams.remoteProcId   = procId;
                notifyShmParams.lineId         = 1u;
                notifyShmParams.sharedAddr     = sharedAddr;/* To allow sharedegion
                                                             * Calculations
                                                             */
                notifyShmParams.sharedAddr     = (Ptr)((UInt32) sharedAddr +
                              NotifyDriverShm_sharedMemReq (&notifyShmParams));
                NotifySetup_dspDriverHandle1 = NotifyDriverShm_create (
                                                            &notifyShmParams);
#if !defined(SYSLINK_BUILD_OPTIMIZE)
                if (NotifySetup_dspDriverHandle1 == NULL) {
                    /*! @retval  Notify_E_FAIL NotifyDriverShm_create failed
                                               for line 1*/
                    status = Notify_E_FAIL;
                    GT_setFailureReason (curTrace,
                                 GT_4CLASS,
                                 "NotifySetupOmapl1xx_attach",
                                 status,
                                 "NotifyDriverShm_create failed for line 1");
                }
                else {
#endif /* if !defined(SYSLINK_BUILD_OPTIMIZE) */
                    NotifySetup_notifyHandle1 = Notify_create (
                                                  NotifySetup_dspDriverHandle1,
                                                  procId,
                                                  1u,
                                                  NULL);
#if !defined(SYSLINK_BUILD_OPTIMIZE)
                    if (NotifySetup_notifyHandle0 == NULL) {
                        /*! @retval  Notify_E_FAIL Notify_create failed for
                                                 line 1*/
                        status = Notify_E_FAIL;
                        GT_setFailureReason (curTrace,
                                         GT_4CLASS,
                                         "NotifySetupOmapl1xx_attach",
                                         status,
                                         "Notify_create failed for line 1");
                    }
                }
#endif /* if !defined(SYSLINK_BUILD_OPTIMIZE) */
            }
#if !defined(SYSLINK_BUILD_OPTIMIZE)
        }
    }
#endif /* if !defined(SYSLINK_BUILD_OPTIMIZE) */

    GT_1trace (curTrace, GT_LEAVE, "NotifySetupOmapl1xx_attach", status);

    /*! @retval Notify_S_SUCCESS Operation successful */
    return (status);
}