Hi,
As I studied the dsplink, I found that dsp and gpp talk first via DSPLINK_shmBaseAddress.
/** ============================================================================
* @const DSPLINK_shmBaseAddress
*
* @desc Location where the starting address of the shared memory used by
* the DSPLINK components is stored.
* ============================================================================
*/
Uint32 DSPLINK_shmBaseAddress ;
/** ----------------------------------------------------------------------------
* @name DSPLINK_isInitialized
*
* @desc Indicates if DSP/BIOS LINK has been initialized
* ----------------------------------------------------------------------------
*/
static Bool DSPLINK_isInitialized = FALSE ;
/** ============================================================================
* Create named sections for all DSPLINK functions to allow specific memory
* placement.
* ============================================================================
*/
#pragma CODE_SECTION (DSPLINK_init, ".text:DSPLINK_init")
/** ============================================================================
* @func DSPLINK_init
*
* @desc This function initializes DSP/BIOS LINK. It is called by the
* applications.
*
* @modif None.
* ============================================================================
*/
Void
DSPLINK_init (Void)
{
DRV_Ctrl * ctrlPtr = (DRV_Ctrl *) DSPLINK_shmBaseAddress ;
Uint16 dspHandshake = DRV_HANDSHAKE_BASE ;
/* Call the internal function to initialize DSPLINK. By this time, data
* drivers (if any) and pools (if any) are already initialized.
*/
_DSPLINK_init () ;
/* If data drivers or pools were not included by the application, complete
* the handshake for them to ensure that the GPP-side can proceed further.
*/
#if defined (POOL_COMPONENT)
if (ctrlPtr->poolDspInitDone == COMP_UNINITIALIZED) {
ctrlPtr->poolDspInitDone = (Uint32) SYS_OK ;
dspHandshake |= DRV_HANDSHAKE_POOL ;
}
#endif /* if defined (POOL_COMPONENT) */
#if defined (CHNL_COMPONENT)
if (ctrlPtr->dataDspInitDone == COMP_UNINITIALIZED) {
ctrlPtr->dataDspInitDone = (Uint32) SYS_OK ;
dspHandshake |= DRV_HANDSHAKE_DATA ;
}
#endif /* if defined (CHNL_COMPONENT) */
HAL_cacheWbInv ((Void *) ctrlPtr, sizeof (DRV_Ctrl)) ;
/* Complete the handshake for configured components as expected by the
* GPP, even if they are not included by the application.
*/
SHMDRV_handshake (ID_GPP, dspHandshake) ;
}
But When dsp side executable start to run, DSPLINK_init is called first generaly.
The question is who initialize the Uint32 DSPLINK_shmBaseAddress?
As the the comment said the it is a const, but where is the initial value.
Could any guys tell me?
Thanks a lot!
David Chan (also known as Blacksword.David)