This module has a common header that can be found in the
ti.ipc
package. Application code should include the common header file (not the
RTSC-generated one):
#include <ti/ipc/GateMP.h>
The RTSC module must be used in the application's RTSC configuration file
(.cfg) if runtime APIs will be used in the application:
GateMP = xdc.useModule('ti.sdo.ipc.GateMP');
Documentation for all runtime APIs, instance configuration parameters,
error codes macros and type definitions available to the application
integrator can be found in the
Doxygen documenation
for the IPC product. However, the documentation presented on this page
should be referred to for information specific to the RTSC module, such as
module configuration, Errors, and Asserts.
enum GateMP_LocalProtect |
|
A set of local context protection levels
typedef enum GateMP_LocalProtect {
GateMP_LocalProtect_NONE,
GateMP_LocalProtect_INTERRUPT,
GateMP_LocalProtect_TASKLET,
GateMP_LocalProtect_THREAD,
GateMP_LocalProtect_PROCESS
} GateMP_LocalProtect;
DETAILS
Each member corresponds to a specific local processor gates used for
local protection.
For SYS/BIOS users, the following are the mappings for the constants
- INTERRUPT -> GateAll: disables interrupts
- TASKLET -> GateSwi: disables Swis (software interrupts)
- THREAD -> GateMutexPri: based on Semaphores
- PROCESS -> GateMutexPri: based on Semaphores
enum GateMP_RemoteProtect |
|
Type of remote Gate
typedef enum GateMP_RemoteProtect {
GateMP_RemoteProtect_NONE,
GateMP_RemoteProtect_SYSTEM,
GateMP_RemoteProtect_CUSTOM1,
GateMP_RemoteProtect_CUSTOM2
} GateMP_RemoteProtect;
DETAILS
Each member corresponds to a specific type of remote gate.
Each enum value corresponds to the following remote protection levels:
- NONE -> No remote protection (the GateMP instance will exclusively
offer local protection configured in localProtect)
- SYSTEM -> Use the SYSTEM remote protection level (default for remote
protection
- CUSTOM1 -> Use the CUSTOM1 remote protection level
- CUSTOM2 -> Use the CUSTOM2 remote protection level
struct GateMP_Reserved |
|
typedef struct GateMP_Reserved {
Bits32 version;
} GateMP_Reserved;
config GateMP_A_invalidClose // module-wide |
|
Assert raised when calling GateMP_close with the wrong handle
extern const Assert_Id GateMP_A_invalidClose;
config GateMP_A_invalidDelete // module-wide |
|
Assert raised when calling GateMP_delete incorrectly
extern const Assert_Id GateMP_A_invalidDelete;
config GateMP_E_gateUnavailable // module-wide |
|
Error raised no gates of the requested type are available
extern const Error_Id GateMP_E_gateUnavailable;
config GateMP_E_localGate // module-wide |
|
Error raised when remote side tried to open local gate
extern const Error_Id GateMP_E_localGate;
config GateMP_LM_close // module-wide |
|
Logged on gate close
config GateMP_LM_create // module-wide |
|
Logged on gate create
config GateMP_LM_delete // module-wide |
|
Logged on gate deletion
config GateMP_LM_enter // module-wide |
|
Logged on gate enter
config GateMP_LM_leave // module-wide |
|
Logged on gate leave
config GateMP_LM_open // module-wide |
|
Logged on gate open
config GateMP_maxNameLen // module-wide |
|
Maximum length for names
extern const UInt GateMP_maxNameLen;
Module-Wide Built-Ins |
|
// Get this module's unique id
Bool GateMP_Module_startupDone();
// Test if this module has completed startup
// The heap from which this module allocates memory
Bool GateMP_Module_hasMask();
// Test whether this module has a diagnostics mask
Bits16 GateMP_Module_getMask();
// Returns the diagnostics mask for this module
Void GateMP_Module_setMask(Bits16 mask);
// Set the diagnostics mask for this module
Instance Object Types |
|
typedef struct GateMP_Object GateMP_Object;
// Opaque internal representation of an instance object
// Client reference to an instance object
typedef struct GateMP_Struct GateMP_Struct;
// Opaque client structure large enough to hold an instance object
// Convert this instance structure pointer into an instance handle
// Convert this instance handle into an instance structure pointer
Instance Config Parameters |
|
typedef struct GateMP_Params {
// Instance config-params structure
// Common per-instance configs
//
String name;
// Name of the instance
UInt16 regionId;
// Shared Region Id
//
Ptr sharedAddr;
// Physical address of the shared memory
} GateMP_Params;
// Initialize this config-params structure with supplier-specified defaults before instance creation
config GateMP_localProtect // instance |
|
config GateMP_name // instance |
|
Name of the instance
DETAILS
Name needs to be unique. Used only if
useNameServer
is set to TRUE.
config GateMP_regionId // instance |
|
Shared Region Id
DETAILS
The ID corresponding to the shared region in which this shared instance
is to be placed.
config GateMP_remoteProtect // instance |
|
config GateMP_sharedAddr // instance |
|
Physical address of the shared memory
DETAILS
The creator must supply the shared memory that will be used
for maintaining shared state information. This parameter is used
only when
Type is set to
Type_SHARED
Instance Built-Ins |
|
Int GateMP_Object_count();
// The number of statically-created instance objects
// The handle of the i-th statically-created instance object (array == NULL)
// The handle of the first dynamically-created instance object, or NULL
// The handle of the next dynamically-created instance object, or NULL
// The heap used to allocate dynamically-created instance objects
// The label associated with this instance object
// The name of this instance object
var GateMP = xdc.useModule('ti.sdo.ipc.GateMP');
local proxy modules
module-wide constants & types
module-wide config parameters
msg: "A_invalidContext: Calling GateMP_close with the wrong handle"
};
msg: "A_invalidDelete: Calling GateMP_delete incorrectly"
};
msg: "E_gateUnavailable: No gates of requested type are available"
};
msg: "E_localGate: Only creator can open local Gate"
};
msg: "LM_close: Gate (remoteGate = %d, resourceId = %d) closed"
};
msg: "LM_create: Gate (remoteGate = %d, resourceId = %d) created"
};
msg: "LM_delete: Gate (remoteGate = %d, resourceId = %d) deleted"
};
msg: "LM_enter: Gate (remoteGate = %d, resourceId = %d) entered, returning key = %d"
};
msg: "LM_leave: Gate (remoteGate = %d, resourceId = %d) left using key = %d"
};
msg: "LM_open: Remote gate (remoteGate = %d, resourceId = %d) opened"
};
per-instance config parameters
proxy GateMP.RemoteCustom1Proxy |
|
Custom1 remote gate proxy
XDCscript usage |
meta-domain |
// explicit access to the currently bound delegate module
GateMP.RemoteCustom1Proxy.abstractInstances$ = false
// use indirect runtime function calls if true
DETAILS
GateMP instances may use the 'Custom1' proxy for locking between
multiple processors. This proxy defaults to
ti.sdo.ipc.gates.GatePeterson.
proxy GateMP.RemoteCustom2Proxy |
|
Custom2 remote gate proxy
XDCscript usage |
meta-domain |
// explicit access to the currently bound delegate module
GateMP.RemoteCustom2Proxy.abstractInstances$ = false
// use indirect runtime function calls if true
DETAILS
GateMP instances may use the 'Custom2' proxy for locking between
multiple processors. This proxy defaults to
ti.sdo.ipc.gates.GateMPSupportNull.
proxy GateMP.RemoteSystemProxy |
|
System remote gate proxy
XDCscript usage |
meta-domain |
// explicit access to the currently bound delegate module
GateMP.RemoteSystemProxy.abstractInstances$ = false
// use indirect runtime function calls if true
DETAILS
By default, GateMP instances use the 'System' proxy for locking between
multiple processors by setting the 'localProtect' setting to . This
remote gate proxy defaults to a device-specific remote GateMP delegate
and typically should not be modified.
enum GateMP.LocalProtect |
|
A set of local context protection levels
XDCscript usage |
meta-domain |
values of type GateMP.LocalProtect
const GateMP.LocalProtect_NONE;
const GateMP.LocalProtect_INTERRUPT;
const GateMP.LocalProtect_TASKLET;
const GateMP.LocalProtect_THREAD;
const GateMP.LocalProtect_PROCESS;
DETAILS
Each member corresponds to a specific local processor gates used for
local protection.
For SYS/BIOS users, the following are the mappings for the constants
- INTERRUPT -> GateAll: disables interrupts
- TASKLET -> GateSwi: disables Swis (software interrupts)
- THREAD -> GateMutexPri: based on Semaphores
- PROCESS -> GateMutexPri: based on Semaphores
C SYNOPSIS
enum GateMP.RemoteProtect |
|
Type of remote Gate
XDCscript usage |
meta-domain |
values of type GateMP.RemoteProtect
const GateMP.RemoteProtect_NONE;
const GateMP.RemoteProtect_SYSTEM;
const GateMP.RemoteProtect_CUSTOM1;
const GateMP.RemoteProtect_CUSTOM2;
DETAILS
Each member corresponds to a specific type of remote gate.
Each enum value corresponds to the following remote protection levels:
- NONE -> No remote protection (the GateMP instance will exclusively
offer local protection configured in localProtect)
- SYSTEM -> Use the SYSTEM remote protection level (default for remote
protection
- CUSTOM1 -> Use the CUSTOM1 remote protection level
- CUSTOM2 -> Use the CUSTOM2 remote protection level
C SYNOPSIS
struct GateMP.Reserved |
|
XDCscript usage |
meta-domain |
var obj = new GateMP.Reserved;
obj.version = Bits32 ...
C SYNOPSIS
config GateMP.A_invalidClose // module-wide |
|
Assert raised when calling GateMP_close with the wrong handle
XDCscript usage |
meta-domain |
msg: "A_invalidContext: Calling GateMP_close with the wrong handle"
};
C SYNOPSIS
config GateMP.A_invalidDelete // module-wide |
|
Assert raised when calling GateMP_delete incorrectly
XDCscript usage |
meta-domain |
msg: "A_invalidDelete: Calling GateMP_delete incorrectly"
};
C SYNOPSIS
config GateMP.E_gateUnavailable // module-wide |
|
Error raised no gates of the requested type are available
XDCscript usage |
meta-domain |
msg: "E_gateUnavailable: No gates of requested type are available"
};
C SYNOPSIS
config GateMP.E_localGate // module-wide |
|
Error raised when remote side tried to open local gate
XDCscript usage |
meta-domain |
msg: "E_localGate: Only creator can open local Gate"
};
C SYNOPSIS
config GateMP.LM_close // module-wide |
|
Logged on gate close
XDCscript usage |
meta-domain |
msg: "LM_close: Gate (remoteGate = %d, resourceId = %d) closed"
};
C SYNOPSIS
config GateMP.LM_create // module-wide |
|
Logged on gate create
XDCscript usage |
meta-domain |
msg: "LM_create: Gate (remoteGate = %d, resourceId = %d) created"
};
C SYNOPSIS
config GateMP.LM_delete // module-wide |
|
Logged on gate deletion
XDCscript usage |
meta-domain |
msg: "LM_delete: Gate (remoteGate = %d, resourceId = %d) deleted"
};
C SYNOPSIS
config GateMP.LM_enter // module-wide |
|
Logged on gate enter
XDCscript usage |
meta-domain |
msg: "LM_enter: Gate (remoteGate = %d, resourceId = %d) entered, returning key = %d"
};
C SYNOPSIS
config GateMP.LM_leave // module-wide |
|
Logged on gate leave
XDCscript usage |
meta-domain |
msg: "LM_leave: Gate (remoteGate = %d, resourceId = %d) left using key = %d"
};
C SYNOPSIS
config GateMP.LM_open // module-wide |
|
Logged on gate open
XDCscript usage |
meta-domain |
msg: "LM_open: Remote gate (remoteGate = %d, resourceId = %d) opened"
};
C SYNOPSIS
config GateMP.maxNameLen // module-wide |
|
Maximum length for names
XDCscript usage |
meta-domain |
GateMP.maxNameLen = UInt 32;
C SYNOPSIS
metaonly config GateMP.common$ // module-wide |
|
Common module configuration parameters
XDCscript usage |
meta-domain |
DETAILS
All modules have this configuration parameter. Its name
contains the '$' character to ensure it does not conflict with
configuration parameters declared by the module. This allows
new configuration parameters to be added in the future without
any chance of breaking existing modules.
metaonly config GateMP.maxRuntimeEntries // module-wide |
|
Maximum runtime entries
XDCscript usage |
meta-domain |
DETAILS
Maximum number of GateMP's that can be dynamically created and
added to the NameServer.
To minimize the amount of runtime allocation, this parameter allows
the pre-allocation of memory for the GateMP's NameServer table.
The default is to allow growth (i.e. memory allocation when
creating a new instance).
metaonly config GateMP.tableSection // module-wide |
|
Section name is used to place the names table
XDCscript usage |
meta-domain |
GateMP.tableSection = String null;
Instance Config Parameters |
|
XDCscript usage |
meta-domain |
var params = new GateMP.Params;
// Instance config-params object
//
params.name = String null;
// Name of the instance
params.regionId = UInt16 0;
// Shared Region Id
//
params.sharedAddr = Ptr null;
// Physical address of the shared memory
config GateMP.localProtect // instance |
|
XDCscript usage |
meta-domain |
var params = new GateMP.Params;
...
C SYNOPSIS
config GateMP.name // instance |
|
Name of the instance
XDCscript usage |
meta-domain |
var params = new GateMP.Params;
...
params.name = String null;
DETAILS
Name needs to be unique. Used only if
useNameServer
is set to TRUE.
C SYNOPSIS
config GateMP.regionId // instance |
|
Shared Region Id
XDCscript usage |
meta-domain |
var params = new GateMP.Params;
...
params.regionId = UInt16 0;
DETAILS
The ID corresponding to the shared region in which this shared instance
is to be placed.
C SYNOPSIS
config GateMP.remoteProtect // instance |
|
XDCscript usage |
meta-domain |
var params = new GateMP.Params;
...
C SYNOPSIS
config GateMP.sharedAddr // instance |
|
Physical address of the shared memory
XDCscript usage |
meta-domain |
var params = new GateMP.Params;
...
params.sharedAddr = Ptr null;
DETAILS
The creator must supply the shared memory that will be used
for maintaining shared state information. This parameter is used
only when
Type is set to
Type_SHARED
C SYNOPSIS