Defines the interfaces and data structures for the API sub-component PROC.
============================================================================
Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
* Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
* Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.
* Neither the name of Texas Instruments Incorporated nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission.
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ============================================================================
#include <dsplink.h>
#include <procdefs.h>
#include <linkcfgdefs.h>
Go to the source code of this file.
Defines | |
#define | PROC_Destroy PROC_destroy |
#define | PROC_Attach PROC_attach |
#define | PROC_Detach PROC_detach |
#define | PROC_GetState PROC_getState |
#define | PROC_Load PROC_load |
#define | PROC_LoadSection PROC_loadSection |
#define | PROC_Read PROC_read |
#define | PROC_Write PROC_write |
#define | PROC_Start PROC_start |
#define | PROC_Stop PROC_stop |
#define | PROC_Control PROC_control |
Functions | |
DLLEXPORT DSP_STATUS | PROC_setup (IN LINKCFG_Object *linkCfg) |
Sets up the necessary data structures for the PROC sub-component. | |
DLLEXPORT DSP_STATUS | PROC_destroy (void) |
Destroys the data structures for the PROC component, allocated earlier by a call to PROC_setup (). | |
DLLEXPORT DSP_STATUS | PROC_attach (IN ProcessorId procId, PROC_Attrs *attr) |
Attaches the client to the specified DSP and also initializes the DSP (if required). | |
DLLEXPORT DSP_STATUS | PROC_detach (IN ProcessorId procId) |
Detaches the client from specified processor. If the caller is the owner of the processor, this function releases all the resources that this component uses and puts the DSP in an unusable state (from application perspective). | |
DLLEXPORT DSP_STATUS | PROC_getState (IN ProcessorId procId, OUT PROC_State *procState) |
Gets the current status of DSP by querying the Link Driver. | |
DLLEXPORT DSP_STATUS | PROC_load (IN ProcessorId procId, IN Char8 *imagePath, IN Uint32 argc, IN Char8 **argv) |
Loads the specified DSP executable on the target DSP. It ensures that the caller owns the DSP. | |
DLLEXPORT DSP_STATUS | PROC_loadSection (IN ProcessorId procId, IN Char8 *imagePath, IN Uint32 sectID) |
Loads the specified section of DSP executable onto the target DSP. It ensures that the client owns the DSP. | |
DLLEXPORT DSP_STATUS | PROC_read (IN ProcessorId procId, IN Uint32 dspAddr, IN Uint32 numBytes, IN OUT Pvoid buffer) |
This function allows GPP side applications to read from the DSP memory space. | |
DLLEXPORT DSP_STATUS | PROC_write (IN ProcessorId procId, IN Uint32 dspAddr, IN Uint32 numBytes, IN Pvoid buffer) |
This function allows GPP side applications to write to the DSP memory space. | |
DLLEXPORT DSP_STATUS | PROC_start (IN ProcessorId procId) |
Starts execution of the loaded code on DSP from the starting point specified in the DSP executable loaded earlier by call to PROC_load (). | |
DLLEXPORT DSP_STATUS | PROC_stop (IN ProcessorId procId) |
Stops the DSP. | |
DLLEXPORT DSP_STATUS | PROC_control (IN ProcessorId procId, IN Int32 cmd, Pvoid arg) |
Provides a hook to perform device dependent control operations on the DSP. | |
DLLEXPORT DSP_STATUS | PROC_GetSymbolAddress (IN ProcessorId procId, IN Char8 *symbolName, OUT Uint32 *dspAddr) |
Gets the DSP address corresponding to a symbol within a DSP executable currently loaded on the DSP. | |
DLLEXPORT DSP_STATUS | PROC_sendTerminateEvent (IN ProcessorId procId) |
Send an IPS terminate event to the DSP. | |
DLLEXPORT DSP_STATUS | PROC_Setup (void) |
#define PROC_Destroy PROC_destroy |
============================================================================
============================================================================
#define PROC_Attach PROC_attach |
============================================================================
============================================================================
#define PROC_Detach PROC_detach |
============================================================================
============================================================================
#define PROC_GetState PROC_getState |
============================================================================
============================================================================
#define PROC_Load PROC_load |
============================================================================
============================================================================
#define PROC_LoadSection PROC_loadSection |
============================================================================
============================================================================
#define PROC_Read PROC_read |
============================================================================
============================================================================
#define PROC_Write PROC_write |
============================================================================
============================================================================
#define PROC_Start PROC_start |
============================================================================
============================================================================
#define PROC_Stop PROC_stop |
============================================================================
============================================================================
#define PROC_Control PROC_control |
============================================================================
============================================================================
DLLEXPORT DSP_STATUS PROC_setup | ( | IN LINKCFG_Object * | linkCfg ) |
Sets up the necessary data structures for the PROC sub-component.
============================================================================
linkCfg | Pointer to the configuration information structure for DSP/BIOS LINK. If NULL, indicates that default configuration should be used. |
DLLEXPORT DSP_STATUS PROC_destroy | ( | void | ) |
Destroys the data structures for the PROC component, allocated earlier by a call to PROC_setup ().
============================================================================
None |
DLLEXPORT DSP_STATUS PROC_attach | ( | IN ProcessorId | procId, |
PROC_Attrs * | attr | ||
) |
Attaches the client to the specified DSP and also initializes the DSP (if required).
============================================================================
procId | DSP identifier. |
attr | Attributes for the processor on which attach is to be done. |
DLLEXPORT DSP_STATUS PROC_detach | ( | IN ProcessorId | procId ) |
Detaches the client from specified processor. If the caller is the owner of the processor, this function releases all the resources that this component uses and puts the DSP in an unusable state (from application perspective).
============================================================================
procId | DSP identifier. |
DLLEXPORT DSP_STATUS PROC_getState | ( | IN ProcessorId | procId, |
OUT PROC_State * | procState | ||
) |
Gets the current status of DSP by querying the Link Driver.
============================================================================
procId | DSP identifier. |
procState | Placeholder for processor state. |
DLLEXPORT DSP_STATUS PROC_load | ( | IN ProcessorId | procId, |
IN Char8 * | imagePath, | ||
IN Uint32 | argc, | ||
IN Char8 ** | argv | ||
) |
Loads the specified DSP executable on the target DSP. It ensures that the caller owns the DSP.
============================================================================
procId | DSP identifier. |
imagePath | Full path to the image file to load on DSP. |
argc | Number of argument to be passed to the base image upon start. |
argv | Arguments to be passed to DSP main application. |
DLLEXPORT DSP_STATUS PROC_loadSection | ( | IN ProcessorId | procId, |
IN Char8 * | imagePath, | ||
IN Uint32 | sectID | ||
) |
Loads the specified section of DSP executable onto the target DSP. It ensures that the client owns the DSP.
============================================================================
procId | DSP identifier. |
imagePath | Full path to the image file. |
sectID | Section ID of section to load. |
DLLEXPORT DSP_STATUS PROC_read | ( | IN ProcessorId | procId, |
IN Uint32 | dspAddr, | ||
IN Uint32 | numBytes, | ||
IN OUT Pvoid | buffer | ||
) |
This function allows GPP side applications to read from the DSP memory space.
============================================================================
procId | Processor ID of the target DSP. |
dspAddr | Address of the DSP memory region from where to read. |
numBytes | Number of bytes to be read |
buffer | User specified buffer to contain the data from DSP memory space |
DLLEXPORT DSP_STATUS PROC_write | ( | IN ProcessorId | procId, |
IN Uint32 | dspAddr, | ||
IN Uint32 | numBytes, | ||
IN Pvoid | buffer | ||
) |
This function allows GPP side applications to write to the DSP memory space.
============================================================================
procId | Processor ID of the target DSP. |
dspAddr | Address of the DSP memory region from where the data is to be written to. |
numBytes | Number of bytes to be written |
buffer | User specified buffer with data to be written into DSP memory space |
DLLEXPORT DSP_STATUS PROC_start | ( | IN ProcessorId | procId ) |
Starts execution of the loaded code on DSP from the starting point specified in the DSP executable loaded earlier by call to PROC_load ().
============================================================================
procId | DSP Identifier. |
DLLEXPORT DSP_STATUS PROC_stop | ( | IN ProcessorId | procId ) |
Stops the DSP.
============================================================================
procId | DSP Identifier. |
DLLEXPORT DSP_STATUS PROC_control | ( | IN ProcessorId | procId, |
IN Int32 | cmd, | ||
Pvoid | arg | ||
) |
Provides a hook to perform device dependent control operations on the DSP.
============================================================================
procId | DSP Identifier. |
cmd | Command id. |
arg | Optional argument for the specified command. |
DLLEXPORT DSP_STATUS PROC_GetSymbolAddress | ( | IN ProcessorId | procId, |
IN Char8 * | symbolName, | ||
OUT Uint32 * | dspAddr | ||
) |
Gets the DSP address corresponding to a symbol within a DSP executable currently loaded on the DSP.
============================================================================
procId | DSP Identifier. |
symbolName | name of the symbol. |
dspAddr | pointer to get the dsp address corresponding to symbolName. |
DLLEXPORT DSP_STATUS PROC_sendTerminateEvent | ( | IN ProcessorId | procId ) |
Send an IPS terminate event to the DSP.
============================================================================
procId | DSP Identifier. |
DLLEXPORT DSP_STATUS PROC_Setup | ( | void | ) |
============================================================================
============================================================================