The controller operations provide mechanisms for obtaining access to a controller. Controller operations can also determine the characteristics of the underlying interconnect. The following list contains information on controller operations:
Get controller
Get controller attributes
Release controller
The rsm_get_controller operation acquires a controller handle for the given controller instance, such as sci0 or loopback. The returned controller handle is used for subsequent RSM library calls.
Return Values: Returns 0 if successful. Returns an error value otherwise.
Invalid controller handle
Controller not present
Insufficient memory
Invalid library version
Bad address
This function releases the controller associated with the given controller handle. Each call to rsm_release_controller must have a matching rsm_get_controller. When all the controller handles associated with a controller are released, the system resources associated with the controller are freed. Attempting to access a controller handle, or attempting to access import or export segments on a released controller handle, is not legal. The results of such an attempt are undefined.
Return Values: Returns 0 if successful. Returns an error value otherwise.
Invalid controller handle
This function retrieves attributes for the specified controller handle. The following list describes the currently defined attributes for this function:
typedef struct { uint_t attr_direct_access_sizes; uint_t attr_atomic_sizes; size_t attr_page_size; size_t attr_max_export_segment_size; size_t attr_tot_export_segment_size; ulong_t attr_max_export_segments; size_t attr_max_import_map_size; size_t attr_tot_import_map_size; ulong_t attr_max_import_segments; } rsmapi_controller_attr_t;
Return Values: Returns 0 if successful. Returns an error value otherwise.
Invalid controller handle
Bad address