Data Structures | Defines | Typedefs | Enumerations | Functions

ProcMgr.h File Reference


Detailed Description

The Processor Manager on a master processor provides control functionality for a slave device.

The ProcMgr module provides the following services for the slave processor:

Internally, processor management is composed of:

All processors in the system shall be identified by unique processor ID. The management of this processor ID is done by the MultiProc module.

Go to the source code of this file.

Data Structures

struct  ProcMgr_AttachParams_tag
 Configuration parameters specific to the slave ProcMgr instance. More...
struct  ProcMgr_StartParams_tag
 Configuration parameters to be provided while starting the slave processor. More...
struct  ProcMgr_AddrInfo_tag
 This structure defines information about memory regions mapped by the ProcMgr module. More...
struct  ProcMgr_MappedMemEntry
 Structure containing information of mapped memory regions. More...
struct  ProcMgr_ProcInfo_tag
 Characteristics of the slave processor. More...
struct  ProcMgr_SectionInfo_tag
 Characteristics of sections in executable. More...

Defines

#define ProcMgr_S_SETUP   5
 Other ProcMgr clients have still setup the ProcMgr module.
#define ProcMgr_S_OPENHANDLE   4
 Other ProcMgr handles are still open in this process.
#define ProcMgr_S_ALREADYEXISTS   3
 The ProcMgr instance has already been created/opened in this process.
#define ProcMgr_S_BUSY   2
 The resource is still in use.
#define ProcMgr_S_ALREADYSETUP   1
 The module has been already setup.
#define ProcMgr_S_SUCCESS   0
 Operation is successful.
#define ProcMgr_E_FAIL   -1
 Generic failure.
#define ProcMgr_E_INVALIDARG   -2
 Argument passed to function is invalid.
#define ProcMgr_E_MEMORY   -3
 Operation resulted in memory failure.
#define ProcMgr_E_ALREADYEXISTS   -4
 The specified entity already exists.
#define ProcMgr_E_NOTFOUND   -5
 Unable to find the specified entity.
#define ProcMgr_E_TIMEOUT   -6
 Operation timed out.
#define ProcMgr_E_INVALIDSTATE   -7
 Module is not initialized.
#define ProcMgr_E_OSFAILURE   -8
 A failure occurred in an OS-specific call.
#define ProcMgr_E_RESOURCE   -9
 Specified resource is not available.
#define ProcMgr_E_RESTART   -10
 Operation was interrupted. Please restart the operation.
#define ProcMgr_E_HANDLE   -11
 Invalid object handle specified.
#define ProcMgr_E_ACCESSDENIED   -12
 The operation is not permitted in this process.
#define ProcMgr_E_TRANSLATE   -13
 An address translation error occurred.
#define ProcMgr_E_SYMBOLNOTFOUND   -14
 Could not find the specified symbol in the loaded file.
#define ProcMgr_E_MAP   -15
 Failed to map/unmap an address range.
#define ProcMgr_MAX_MEMORY_REGIONS   32u
 Maximum number of memory regions supported by ProcMgr module.
#define IS_VALID_PROCID(id)   (id < MultiProc_MAXPROCESSORS)
 Checks if the Processor ID is valid.
#define ProcMgr_MASTERKNLVIRT   (ProcMgr_MapMask)(1 << 0)
 Kernel virtual address on master processor.
#define ProcMgr_MASTERUSRVIRT   (ProcMgr_MapMask)(1 << 1)
 User virtual address on master processor.
#define ProcMgr_SLAVEVIRT   (ProcMgr_MapMask)(1 << 2)
 Virtual address on slave processor.

Typedefs

typedef struct ProcMgr_Object * ProcMgr_Handle
 Defines ProcMgr object handle.
typedef UInt32 ProcMgr_MapMask
 Address Map Mask type.
typedef struct
ProcMgr_AttachParams_tag 
ProcMgr_AttachParams
 Configuration parameters specific to the slave ProcMgr instance.
typedef struct
ProcMgr_StartParams_tag 
ProcMgr_StartParams
 Configuration parameters to be provided while starting the slave processor.
typedef struct ProcMgr_AddrInfo_tag ProcMgr_AddrInfo
 This structure defines information about memory regions mapped by the ProcMgr module.
typedef struct
ProcMgr_MappedMemEntry 
ProcMgr_MappedMemEntry
 Structure containing information of mapped memory regions.
typedef struct ProcMgr_ProcInfo_tag ProcMgr_ProcInfo
 Characteristics of the slave processor.
typedef struct
ProcMgr_SectionInfo_tag 
ProcMgr_SectionInfo
 Characteristics of sections in executable.

Enumerations

enum  ProcMgr_State {
  ProcMgr_State_Unknown = 0u,
  ProcMgr_State_Powered = 1u,
  ProcMgr_State_Reset = 2u,
  ProcMgr_State_Loaded = 3u,
  ProcMgr_State_Running = 4u,
  ProcMgr_State_Unavailable = 5u,
  ProcMgr_State_EndValue = 6u
}
 

Enumerations to indicate Processor states.

More...
enum  ProcMgr_BootMode {
  ProcMgr_BootMode_Boot = 0u,
  ProcMgr_BootMode_NoLoad_Pwr = 1u,
  ProcMgr_BootMode_NoLoad_NoPwr = 2u,
  ProcMgr_BootMode_NoBoot = 3u,
  ProcMgr_BootMode_EndValue = 4u
}
 

Enumerations to indicate different types of slave boot modes.

More...
enum  ProcMgr_AddrType {
  ProcMgr_AddrType_MasterKnlVirt = 0u,
  ProcMgr_AddrType_MasterUsrVirt = 1u,
  ProcMgr_AddrType_MasterPhys = 2u,
  ProcMgr_AddrType_SlaveVirt = 3u,
  ProcMgr_AddrType_SlavePhys = 4u,
  ProcMgr_AddrType_EndValue = 5u
}
 

Enumerations to indicate address types used for translation.

More...

Functions

Int ProcMgr_open (ProcMgr_Handle *handlePtr, UInt16 procId)
 Function to open a handle to an existing ProcMgr object handling the procId.
Int ProcMgr_close (ProcMgr_Handle *handlePtr)
 Function to close this handle to the ProcMgr instance.
Void ProcMgr_getAttachParams (ProcMgr_Handle handle, ProcMgr_AttachParams *params)
 Function to initialize the parameters for the ProcMgr attach function.
Int ProcMgr_attach (ProcMgr_Handle handle, ProcMgr_AttachParams *params)
 Function to attach the client to the specified slave and also initialize the slave (if required).
Int ProcMgr_detach (ProcMgr_Handle handle)
 Function to detach the client from the specified slave and also finalze the slave (if required).
Int ProcMgr_load (ProcMgr_Handle handle, String imagePath, UInt32 argc, String *argv, Ptr params, UInt32 *fileId)
 Function to load the specified slave executable on the slave Processor.
Int ProcMgr_unload (ProcMgr_Handle handle, UInt32 fileId)
 Function to unload the previously loaded file on the slave processor.
Void ProcMgr_getStartParams (ProcMgr_Handle handle, ProcMgr_StartParams *params)
 Function to initialize the parameters for the ProcMgr start function.
Int ProcMgr_start (ProcMgr_Handle handle, ProcMgr_StartParams *params)
 Start the slave processor running.
Int ProcMgr_stop (ProcMgr_Handle handle)
 Stop the slave processor.
ProcMgr_State ProcMgr_getState (ProcMgr_Handle handle)
 Function to get the current state of the slave Processor.
Int ProcMgr_read (ProcMgr_Handle handle, UInt32 procAddr, UInt32 *numBytes, Ptr buffer)
 Function to read from the slave processor's memory.
Int ProcMgr_write (ProcMgr_Handle handle, UInt32 procAddr, UInt32 *numBytes, Ptr buffer)
 Function to write into the slave processor's memory.
Int ProcMgr_control (ProcMgr_Handle handle, Int32 cmd, Ptr arg)
 Perform device-dependent operations.
Int ProcMgr_translateAddr (ProcMgr_Handle handle, Ptr *dstAddr, ProcMgr_AddrType dstAddrType, Ptr srcAddr, ProcMgr_AddrType srcAddrType)
 Translate between two types of address spaces.
Int ProcMgr_getSymbolAddress (ProcMgr_Handle handle, UInt32 fileId, String symbolName, UInt32 *symValue)
 Function to retrieve the target address of a symbol from the specified file.
Int ProcMgr_map (ProcMgr_Handle handle, ProcMgr_MapMask mapMask, ProcMgr_AddrInfo *addrInfo, ProcMgr_AddrType srcAddrType)
 Function to map address to specified destination type(s).
Int ProcMgr_unmap (ProcMgr_Handle handle, ProcMgr_MapMask mapMask, ProcMgr_AddrInfo *addrInfo, ProcMgr_AddrType srcAddrType)
 Function to map address to slave address space.
Int ProcMgr_getProcInfo (ProcMgr_Handle handle, ProcMgr_ProcInfo *procInfo)
 Retrieve information about the slave processor.
Int ProcMgr_getSectionInfo (ProcMgr_Handle handle, UInt32 fileId, String sectionName, ProcMgr_SectionInfo *sectionInfo)
 Function that returns section information given the name of section and number of bytes to read.
Int ProcMgr_getSectionData (ProcMgr_Handle handle, UInt32 fileId, ProcMgr_SectionInfo *sectionInfo, Ptr buffer)
UInt32 ProcMgr_getLoadedFileId (ProcMgr_Handle handle)

Define Documentation

#define ProcMgr_S_SETUP   5

Other ProcMgr clients have still setup the ProcMgr module.

#define ProcMgr_S_OPENHANDLE   4

Other ProcMgr handles are still open in this process.

#define ProcMgr_S_ALREADYEXISTS   3

The ProcMgr instance has already been created/opened in this process.

#define ProcMgr_S_BUSY   2

The resource is still in use.

#define ProcMgr_S_ALREADYSETUP   1

The module has been already setup.

#define ProcMgr_S_SUCCESS   0

Operation is successful.

#define ProcMgr_E_FAIL   -1

Generic failure.

#define ProcMgr_E_INVALIDARG   -2

Argument passed to function is invalid.

#define ProcMgr_E_MEMORY   -3

Operation resulted in memory failure.

#define ProcMgr_E_ALREADYEXISTS   -4

The specified entity already exists.

#define ProcMgr_E_NOTFOUND   -5

Unable to find the specified entity.

#define ProcMgr_E_TIMEOUT   -6

Operation timed out.

#define ProcMgr_E_INVALIDSTATE   -7

Module is not initialized.

#define ProcMgr_E_OSFAILURE   -8

A failure occurred in an OS-specific call.

#define ProcMgr_E_RESOURCE   -9

Specified resource is not available.

#define ProcMgr_E_RESTART   -10

Operation was interrupted. Please restart the operation.

#define ProcMgr_E_HANDLE   -11

Invalid object handle specified.

#define ProcMgr_E_ACCESSDENIED   -12

The operation is not permitted in this process.

#define ProcMgr_E_TRANSLATE   -13

An address translation error occurred.

#define ProcMgr_E_SYMBOLNOTFOUND   -14

Could not find the specified symbol in the loaded file.

#define ProcMgr_E_MAP   -15

Failed to map/unmap an address range.

#define ProcMgr_MAX_MEMORY_REGIONS   32u

Maximum number of memory regions supported by ProcMgr module.

#define IS_VALID_PROCID (   id )    (id < MultiProc_MAXPROCESSORS)

Checks if the Processor ID is valid.

#define ProcMgr_MASTERKNLVIRT   (ProcMgr_MapMask)(1 << 0)

Kernel virtual address on master processor.

#define ProcMgr_MASTERUSRVIRT   (ProcMgr_MapMask)(1 << 1)

User virtual address on master processor.

#define ProcMgr_SLAVEVIRT   (ProcMgr_MapMask)(1 << 2)

Virtual address on slave processor.


Typedef Documentation

typedef struct ProcMgr_Object* ProcMgr_Handle

Defines ProcMgr object handle.

Address Map Mask type.

Configuration parameters specific to the slave ProcMgr instance.

Configuration parameters to be provided while starting the slave processor.

This structure defines information about memory regions mapped by the ProcMgr module.

Structure containing information of mapped memory regions.

Characteristics of the slave processor.

Characteristics of sections in executable.


Enumeration Type Documentation

Enumerations to indicate Processor states.

Enumerator:
ProcMgr_State_Unknown 

Unknown Processor state (e.g. at startup or error).

ProcMgr_State_Powered 

Indicates the Processor is powered up.

ProcMgr_State_Reset 

Indicates the Processor is reset.

ProcMgr_State_Loaded 

Indicates the Processor is loaded.

ProcMgr_State_Running 

Indicates the Processor is running.

ProcMgr_State_Unavailable 

Indicates the Processor is unavailable to the physical transport.

ProcMgr_State_EndValue 

End delimiter indicating start of invalid values for this enum

Enumerations to indicate different types of slave boot modes.

Enumerator:
ProcMgr_BootMode_Boot 

ProcMgr is responsible for loading the slave and its reset control.

ProcMgr_BootMode_NoLoad_Pwr 

ProcMgr is not responsible for loading the slave. It is responsible for reset control of the slave.

ProcMgr_BootMode_NoLoad_NoPwr 

ProcMgr is not responsible for loading the slave. It is partial responsible for reset control of the slave. It doesn't put in reset while procMgr_attach but release reset while procMgr_start operation.

ProcMgr_BootMode_NoBoot 

ProcMgr is not responsible for loading or reset control of the slave. The slave either self-boots, or this is done by some entity outside of the ProcMgr module.

ProcMgr_BootMode_EndValue 

End delimiter indicating start of invalid values for this enum

Enumerations to indicate address types used for translation.

Enumerator:
ProcMgr_AddrType_MasterKnlVirt 

Kernel Virtual address on master processor

ProcMgr_AddrType_MasterUsrVirt 

User Virtual address on master processor

ProcMgr_AddrType_MasterPhys 

Physical address on master processor

ProcMgr_AddrType_SlaveVirt 

Virtual address on slave processor

ProcMgr_AddrType_SlavePhys 

Physical address on slave processor

ProcMgr_AddrType_EndValue 

End delimiter indicating start of invalid values for this enum


Function Documentation

Int ProcMgr_open ( ProcMgr_Handle handlePtr,
UInt16  procId 
)

Function to open a handle to an existing ProcMgr object handling the procId.

This function returns a handle to an existing ProcMgr instance created for this procId. It enables other entities to access and use this ProcMgr instance.

Parameters:
[out]handlePtrReturn Parameter: Handle to the ProcMgr instance
[in]procIdProcessor ID represented by this ProcMgr instance
Return values:
ProcMgr_S_SUCCESSOperation successful
ProcMgr_E_INVALIDARGInvalid parameter specified
ProcMgr_E_INVALIDSTATEModule was not initialized
ProcMgr_S_ALREADYEXISTSObject is already created/opened in this process
ProcMgr_E_MAPFailed to map address range to host OS
ProcMgr_E_OSFAILUREFailed in an OS-specific call
ProcMgr_E_MEMORYMemory allocation failed
See also:
ProcMgr_close()
Int ProcMgr_close ( ProcMgr_Handle handlePtr )

Function to close this handle to the ProcMgr instance.

This function closes the handle to the ProcMgr instance obtained through ProcMgr_open call made earlier. The handle in the passed pointer is reset on success.

Parameters:
[in]handlePtrPointer to the ProcMgr handle
Return values:
ProcMgr_S_SUCCESSOperation successful
ProcMgr_E_INVALIDARGInvalid parameter specified
ProcMgr_E_INVALIDSTATEModule was not initialized
ProcMgr_E_ACCESSDENIEDAll open handles to this ProcMgr object are already closed
ProcMgr_S_OPENHANDLEOther threads in this process have already opened handles to this ProcMgr instance.
ProcMgr_E_OSFAILUREFailed in an OS-specific call
See also:
ProcMgr_open()
Void ProcMgr_getAttachParams ( ProcMgr_Handle  handle,
ProcMgr_AttachParams params 
)

Function to initialize the parameters for the ProcMgr attach function.

This function can be called by the application to get their configuration parameter to ProcMgr_attach filled in by the ProcMgr module with the default parameters. If the user does not wish to make any change in the default parameters, this API is not required to be called.

Parameters:
handleHandle to the ProcMgr object. If specified as NULL, the default global configuration values are returned.
paramsPointer to the ProcMgr attach params structure in which the default params is to be returned.
See also:
ProcMgr_attach()
Int ProcMgr_attach ( ProcMgr_Handle  handle,
ProcMgr_AttachParams params 
)

Function to attach the client to the specified slave and also initialize the slave (if required).

Remarks:
This function attaches to an instance of the ProcMgr module and performs any hardware initialization required to power up the slave device. This function also performs the required state transitions for this ProcMgr instance to ensure that the local object representing the slave device correctly indicates the state of the slave device. Depending on the slave boot mode being used, the slave may be powered up, in reset, or even running state.
Configuration parameters need to be provided to this function. If the user wishes to change some specific config parameters, then ProcMgr_getAttachParams() can be called to get the configuration filled with the default values. After this, only the required configuration values can be changed. If the user does not wish to make any change in the default parameters, the application can simply call ProcMgr_attach() with NULL parameters. The default parameters would get automatically used.
Parameters:
[in]handleHandle to the ProcMgr object.
[in]paramsOptional ProcMgr attach parameters. If provided as NULL, default configuration is used.
Return values:
ProcMgr_S_SUCCESSOperation successful
ProcMgr_E_INVALIDARGInvalid parameter specified
ProcMgr_E_INVALIDSTATEModule was not initialized
ProcMgr_E_HANDLEInvalid NULL handle specified
ProcMgr_E_MAPFailed to map address range to host OS
ProcMgr_E_OSFAILUREFailed in an OS-specific call
See also:
ProcMgr_detach()
ProcMgr_getAttachParams()
Int ProcMgr_detach ( ProcMgr_Handle  handle )

Function to detach the client from the specified slave and also finalze the slave (if required).

Remarks:
This function detaches from an instance of the ProcMgr module and performs any hardware finalization required to power down the slave device. This function also performs the required state transitions for this ProcMgr instance to ensure that the local object representing the slave device correctly indicates the state of the slave device. Depending on the slave boot mode being used, the slave may be powered down, in reset, or left in its original state.
Parameters:
[in]handleHandle to the ProcMgr object
Return values:
ProcMgr_S_SUCCESSOperation successful
ProcMgr_E_INVALIDARGInvalid parameter specified
ProcMgr_E_INVALIDSTATEModule was not initialized
ProcMgr_E_HANDLEInvalid NULL handle specified
ProcMgr_E_OSFAILUREFailed in an OS-specific call
See also:
ProcMgr_attach
Int ProcMgr_load ( ProcMgr_Handle  handle,
String  imagePath,
UInt32  argc,
String argv,
Ptr  params,
UInt32 fileId 
)

Function to load the specified slave executable on the slave Processor.

Remarks:
This function allows usage of different types of loaders. The loader specified when creating this instance of the ProcMgr is used for loading the slave executable. Depending on the type of loader, the imagePath parameter may point to the path of the file in the host file system, or it may be NULL. Some loaders may require specific parameters to be passed.
This function returns a fileId, which can be used for further function calls that reference a specific file that has been loaded on the slave processor.
Some loaders may not support all features. For example, the ELF loader may not support passing argc/argv to the slave.
Parameters:
[in]handleHandle to the ProcMgr object
[in]imagePathFull file path
[in]argcNumber of arguments
[in]argvString array of arguments
[in]paramsLoader specific parameters
[in,out]fileIdReturn parameter: ID of the loaded file
Return values:
ProcMgr_S_SUCCESSOperation successful
ProcMgr_E_INVALIDARGInvalid parameter specified
ProcMgr_E_INVALIDSTATEModule was not initialized
ProcMgr_E_HANDLEInvalid NULL handle specified
ProcMgr_E_OSFAILUREFailed in an OS-specific call
See also:
ProcMgr_unload()
Int ProcMgr_unload ( ProcMgr_Handle  handle,
UInt32  fileId 
)

Function to unload the previously loaded file on the slave processor.

Remarks:
This function unloads the file that was previously loaded on the slave processor through the ProcMgr_load() API. It frees up any resources that were allocated during ProcMgr_load for this file.
The fileId received from the load function must be passed to this function.
Parameters:
[in]handleHandle to the ProcMgr object
[in]fileIdID of the loaded file to be unloaded
Return values:
ProcMgr_S_SUCCESSOperation successful
ProcMgr_E_INVALIDARGInvalid parameter specified
ProcMgr_E_INVALIDSTATEModule was not initialized
ProcMgr_E_HANDLEInvalid NULL handle specified
ProcMgr_E_OSFAILUREFailed in an OS-specific call
See also:
ProcMgr_load()
Void ProcMgr_getStartParams ( ProcMgr_Handle  handle,
ProcMgr_StartParams params 
)

Function to initialize the parameters for the ProcMgr start function.

Remarks:
This function can be called by the application to get their configuration parameter to ProcMgr_start() filled in by the ProcMgr module with the default parameters.
If the user does not wish to make any change in the default parameters, this API is not required to be called.
Parameters:
[in]handleHandle to the ProcMgr object. If NULL, the default global configuration values are returned.
paramsPointer to the ProcMgr start params structure in which the default params is to be returned.
See also:
ProcMgr_start
Int ProcMgr_start ( ProcMgr_Handle  handle,
ProcMgr_StartParams params 
)

Start the slave processor running.

Remarks:
Function to start execution of the loaded code on the slave from the entry point specified in the slave executable loaded earlier by call to ProcMgr_load().
Postcondition:
After successful completion of this function, the ProcMgr instance is expected to be in the ProcMgr_State_Running state.
Parameters:
[in]handleHandle to the ProcMgr object
[in]paramsOptional ProcMgr start parameters. If NULL, default parameters are used.
Return values:
ProcMgr_S_SUCCESSOperation successful
ProcMgr_E_INVALIDARGInvalid parameter specified
ProcMgr_E_INVALIDSTATEModule was not initialized
ProcMgr_E_HANDLEInvalid NULL handle specified
ProcMgr_E_SYMBOLNOTFOUNDEntry ponit symbol not found in loaded file
ProcMgr_E_OSFAILUREFailed in an OS-specific call
See also:
ProcMgr_stop()
Int ProcMgr_stop ( ProcMgr_Handle  handle )

Stop the slave processor.

Remarks:
Depending on the boot mode, after successful completion of this function, the ProcMgr instance may be in the ProcMgr_State_Reset state.
Parameters:
handleHandle to the ProcMgr object
Return values:
ProcMgr_S_SUCCESSOperation successful
ProcMgr_E_INVALIDARGInvalid parameter specified
ProcMgr_E_INVALIDSTATEModule was not initialized
ProcMgr_E_HANDLEInvalid NULL handle specified
ProcMgr_E_OSFAILUREFailed in an OS-specific call
See also:
ProcMgr_start()
ProcMgr_State ProcMgr_getState ( ProcMgr_Handle  handle )

Function to get the current state of the slave Processor.

Remarks:
This function gets the state of the slave processor as maintained on the master Processor state machine. It does not go to the slave processor to get its actual state at the time when this API is called.
Parameters:
[in]handleHandle to the ProcMgr object
Return values:
Processor-stateOperation successful
Int ProcMgr_read ( ProcMgr_Handle  handle,
UInt32  procAddr,
UInt32 numBytes,
Ptr  buffer 
)

Function to read from the slave processor's memory.

Remarks:
This function reads from the specified address in the processor's address space and copies the required number of bytes into the specified buffer.
It returns the number of bytes actually read in the numBytes parameter.
Parameters:
[in]handleHandle to the ProcMgr object
procAddrAddress in space processor's address space of the memory region to read from.
[in,out]numBytesAs an IN-parameter, it takes in the number of bytes to be read. When the function returns, this parameter contains the number of bytes actually read.
[in,out]bufferUser-provided buffer in which the slave processor's memory contents are to be copied.
Precondition:
handle is a valid (non-NULL) ProcMgr handle.
Return values:
ProcMgr_S_SUCCESSOperation successful
ProcMgr_E_INVALIDARGInvalid parameter specified
ProcMgr_E_INVALIDSTATEModule was not initialized
ProcMgr_E_HANDLEInvalid NULL handle specified
ProcMgr_E_TRANSLATEAddress is not mapped
ProcMgr_E_OSFAILUREFailed in an OS-specific call
See also:
ProcMgr_write
Int ProcMgr_write ( ProcMgr_Handle  handle,
UInt32  procAddr,
UInt32 numBytes,
Ptr  buffer 
)

Function to write into the slave processor's memory.

This function writes into the specified address in the processor's address space and copies the required number of bytes from the specified buffer. It returns the number of bytes actually written in the numBytes parameter.

Parameters:
[in]handleHandle to the ProcMgr object
[in]procAddrAddress in space processor's address space of the memory region to write into.
[in,out]numBytesAs an IN-parameter, it takes in the number of bytes to be written. When the function returns, this parameter contains the number of bytes actually written.
[in]bufferUser-provided buffer from which the data is to be written into the slave processor's memory.
Return values:
ProcMgr_S_SUCCESSOperation successful
ProcMgr_E_INVALIDARGInvalid parameter specified
ProcMgr_E_INVALIDSTATEModule was not initialized
ProcMgr_E_HANDLEInvalid NULL handle specified
ProcMgr_E_TRANSLATEAddress is not mapped
ProcMgr_E_OSFAILUREFailed in an OS-specific call
See also:
ProcMgr_read()
Int ProcMgr_control ( ProcMgr_Handle  handle,
Int32  cmd,
Ptr  arg 
)

Perform device-dependent operations.

Remarks:
This function performs control operations supported by the as exposed directly by the specific implementation of the Processor interface. These commands and their specific argument types are used with this function.
Parameters:
[in]handleHandle to the ProcMgr object
[in]cmdDevice specific processor command
[in]argArguments specific to the type of command.
Return values:
ProcMgr_S_SUCCESSOperation successful
ProcMgr_E_INVALIDARGInvalid parameter specified
ProcMgr_E_INVALIDSTATEModule was not initialized
ProcMgr_E_HANDLEInvalid NULL handle specified
ProcMgr_E_OSFAILUREFailed in an OS-specific call
Int ProcMgr_translateAddr ( ProcMgr_Handle  handle,
Ptr dstAddr,
ProcMgr_AddrType  dstAddrType,
Ptr  srcAddr,
ProcMgr_AddrType  srcAddrType 
)

Translate between two types of address spaces.

Remarks:
This function translates addresses between two types of address spaces. The destination and source address types are indicated through parameters specified in this function.
Parameters:
[in]handleHandle to the ProcMgr object
[out]dstAddrReturn parameter: Pointer to receive the translated address.
[in]dstAddrTypeDestination address type requested
[in]srcAddrSource address in the source address space
[in]srcAddrTypeSource address type
Return values:
ProcMgr_S_SUCCESSOperation successful
ProcMgr_E_INVALIDARGInvalid parameter specified
ProcMgr_E_INVALIDSTATEModule was not initialized
ProcMgr_E_HANDLEInvalid NULL handle specified
ProcMgr_E_TRANSLATEFailed to translate address.
ProcMgr_E_OSFAILUREFailed in an OS-specific call
See also:
ProcMgr_AddrType
Int ProcMgr_getSymbolAddress ( ProcMgr_Handle  handle,
UInt32  fileId,
String  symbolName,
UInt32 symValue 
)

Function to retrieve the target address of a symbol from the specified file.

Parameters:
[in]handleHandle to the ProcMgr object
[in]fileIdID of the file received from the load function
[in]symbolNameName of the symbol
[out]symValueReturn parameter: Symbol address
Return values:
ProcMgr_S_SUCCESSOperation successful
ProcMgr_E_INVALIDARGInvalid parameter specified
ProcMgr_E_INVALIDSTATEModule was not initialized
ProcMgr_E_HANDLEInvalid NULL handle specified
ProcMgr_E_SYMBOLNOTFOUNDSymbol not found in loaded file
ProcMgr_E_OSFAILUREFailed in an OS-specific call
Int ProcMgr_map ( ProcMgr_Handle  handle,
ProcMgr_MapMask  mapMask,
ProcMgr_AddrInfo addrInfo,
ProcMgr_AddrType  srcAddrType 
)

Function to map address to specified destination type(s).

Remarks:
This function maps the provided address of specified srcAddrType to one or more destination address types, and returns the mapped addresses and size in the same addrInfo structure.
Parameters:
[in]handleHandle to the Processor object
[in]mapMaskMask of destination types of mapping to be performed. One or more types may be ORed together.
[in,out]addrInfoStructure containing map info. When this API is called, user must provide a valid address for the address of srcAddrType. On successful completion of this function, this same structure shall contain valid addresses for destination address types given in mapType.
[in]srcAddrTypeSource address type.
Return values:
ProcMgr_S_SUCCESSOperation successful
ProcMgr_E_INVALIDARGInvalid parameter specified
ProcMgr_E_INVALIDSTATEModule was not initialized
ProcMgr_E_HANDLEInvalid NULL handle specified
ProcMgr_E_MAPFailed to map address range to host OS
ProcMgr_E_OSFAILUREFailed in an OS-specific call
See also:
ProcMgr_unmap()
Int ProcMgr_unmap ( ProcMgr_Handle  handle,
ProcMgr_MapMask  mapMask,
ProcMgr_AddrInfo addrInfo,
ProcMgr_AddrType  srcAddrType 
)

Function to map address to slave address space.

Remarks:
This function unmaps the provided address(es) of specified one or more destination address types. The srcAddrType indicates the source address with which the entry for the mapping is to be identified. It must be the same address that was specified as the src address when the corresponding mapping was performed.
Parameters:
[in]handleHandle to the Processor object
[in]mapMaskMask of destination types of unmapping to be performed. One or more types may be ORed together.
[in,out]addrInfoStructure containing map info. When this API is called, user must provide a valid address for the address of srcAddrType, as well as each of the destination types given in the mapType mask. On successful completion of this function, the specified destination mappings are unmapped.
[in]srcAddrTypeSource address type.
Return values:
ProcMgr_S_SUCCESSOperation successful
ProcMgr_E_INVALIDARGInvalid parameter specified
ProcMgr_E_INVALIDSTATEModule was not initialized
ProcMgr_E_HANDLEInvalid NULL handle specified
ProcMgr_E_NOTFOUNDInfo provided does not match with any mapped entry
ProcMgr_E_MAPFailed to unmap address range from host OS
ProcMgr_E_OSFAILUREFailed in an OS-specific call
See also:
ProcMgr_map()
Int ProcMgr_getProcInfo ( ProcMgr_Handle  handle,
ProcMgr_ProcInfo procInfo 
)

Retrieve information about the slave processor.

Parameters:
[in]handleHandle to the ProcMgr object
[out]procInfoPointer to the ProcInfo object to be populated.
Return values:
ProcMgr_S_SUCCESSOperation successful
ProcMgr_E_INVALIDARGInvalid parameter specified
ProcMgr_E_INVALIDSTATEModule was not initialized
ProcMgr_E_HANDLEInvalid NULL handle specified
ProcMgr_E_OSFAILUREFailed in an OS-specific call
Int ProcMgr_getSectionInfo ( ProcMgr_Handle  handle,
UInt32  fileId,
String  sectionName,
ProcMgr_SectionInfo sectionInfo 
)

Function that returns section information given the name of section and number of bytes to read.

Parameters:
[in]handleHandle to the ProcMgr object
[in]fileIdID of the file received from the load function
[in]sectionNameName of section to be retrieved
[out]sectionInfoReturn parameter: Section information
Return values:
ProcMgr_S_SUCCESSOperation successful
ProcMgr_E_INVALIDARGInvalid parameter specified
ProcMgr_E_INVALIDSTATEModule was not initialized
ProcMgr_E_HANDLEInvalid NULL handle specified
ProcMgr_E_OSFAILUREFailed in an OS-specific call
Int ProcMgr_getSectionData ( ProcMgr_Handle  handle,
UInt32  fileId,
ProcMgr_SectionInfo sectionInfo,
Ptr  buffer 
)
UInt32 ProcMgr_getLoadedFileId ( ProcMgr_Handle  handle )
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Defines

Copyright 2011, Texas Instruments Incorporated