RTEMS 6.1-rc2
|
The Dual-Ported Memory Manager provides a mechanism for converting addresses between internal and external representations for multiple dual-ported memory areas (DPMA). More...
Functions | |
rtems_status_code | rtems_port_create (rtems_name name, void *internal_start, void *external_start, uint32_t length, rtems_id *id) |
Creates a port. | |
rtems_status_code | rtems_port_ident (rtems_name name, rtems_id *id) |
Identifies a port by the object name. | |
rtems_status_code | rtems_port_delete (rtems_id id) |
Deletes the port. | |
rtems_status_code | rtems_port_external_to_internal (rtems_id id, void *external, void **internal) |
Converts the external address to the internal address. | |
rtems_status_code | rtems_port_internal_to_external (rtems_id id, void *internal, void **external) |
Converts the internal address to the external address. | |
The Dual-Ported Memory Manager provides a mechanism for converting addresses between internal and external representations for multiple dual-ported memory areas (DPMA).
rtems_status_code rtems_port_create | ( | rtems_name | name, |
void * | internal_start, | ||
void * | external_start, | ||
uint32_t | length, | ||
rtems_id * | id | ||
) |
Creates a port.
name | is the object name of the port. | |
internal_start | is the internal start address of the memory area. | |
external_start | is the external start address of the memory area. | |
length | is the length in bytes of the memory area. | |
[out] | id | is the pointer to an rtems_id object. When the directive call is successful, the identifier of the created port will be stored in this object. |
This directive creates a port which resides on the local node. The port has the user-defined object name specified in name
. The assigned object identifier is returned in id
. This identifier is used to access the port with other dual-ported memory port related directives.
RTEMS_SUCCESSFUL | The requested operation was successful. |
RTEMS_INVALID_NAME | The name parameter was invalid. |
RTEMS_INVALID_ADDRESS | The id parameter was NULL. |
RTEMS_INVALID_ADDRESS | The internal_start parameter was not properly aligned. |
RTEMS_INVALID_ADDRESS | The external_start parameter was not properly aligned. |
RTEMS_TOO_MANY | There was no inactive object available to create a port. The number of port available to the application is configured through the CONFIGURE_MAXIMUM_PORTS application configuration option. |
The internal_start
and external_start
parameters must be on a boundary defined by the target processor architecture.
For control and maintenance of the port, RTEMS allocates a DPCB from the local DPCB free pool and initializes it.
The following constraints apply to this directive:
rtems_status_code rtems_port_delete | ( | rtems_id | id | ) |
Deletes the port.
id | is the port identifier. |
This directive deletes the port specified by id
.
RTEMS_SUCCESSFUL | The requested operation was successful. |
RTEMS_INVALID_ID | There was no port associated with the identifier specified by id . |
The following constraints apply to this directive:
rtems_status_code rtems_port_external_to_internal | ( | rtems_id | id, |
void * | external, | ||
void ** | internal | ||
) |
Converts the external address to the internal address.
id | is the port identifier. | |
external | is the external address to convert. | |
[out] | internal | is the pointer to a void pointer object. When the directive call is successful, the external address associated with the internal address will be stored in this object. |
This directive converts a dual-ported memory address from external to internal representation for the specified port. If the given external address is invalid for the specified port, then the internal address is set to the given external address.
RTEMS_SUCCESSFUL | The requested operation was successful. |
RTEMS_INVALID_NAME | The id parameter was invalid. |
RTEMS_INVALID_ADDRESS | The internal parameter was NULL. |
The following constraints apply to this directive:
rtems_status_code rtems_port_ident | ( | rtems_name | name, |
rtems_id * | id | ||
) |
Identifies a port by the object name.
name | is the object name to look up. | |
[out] | id | is the pointer to an rtems_id object. When the directive call is successful, the object identifier of an object with the specified name will be stored in this object. |
This directive obtains a port identifier associated with the port name specified in name
.
RTEMS_SUCCESSFUL | The requested operation was successful. |
RTEMS_INVALID_ADDRESS | The id parameter was NULL. |
RTEMS_INVALID_NAME | The name parameter was 0. |
RTEMS_INVALID_NAME | There was no object with the specified name on the local node. |
If the port name is not unique, then the port identifier will match the first port with that name in the search order. However, this port identifier is not guaranteed to correspond to the desired port.
The objects are searched from lowest to the highest index. Only the local node is searched.
The port identifier is used with other dual-ported memory related directives to access the port.
The following constraints apply to this directive:
rtems_status_code rtems_port_internal_to_external | ( | rtems_id | id, |
void * | internal, | ||
void ** | external | ||
) |
Converts the internal address to the external address.
id | is the port identifier. | |
internal | is the internal address to convert. | |
[out] | external | is the pointer to a void pointer object. When the directive call is successful, the external address associated with the internal address will be stored in this object. |
This directive converts a dual-ported memory address from internal to external representation so that it can be passed to owner of the DPMA represented by the specified port. If the given internal address is an invalid dual-ported address, then the external address is set to the given internal address.
RTEMS_SUCCESSFUL | The requested operation was successful. |
RTEMS_INVALID_NAME | The id parameter was invalid. |
RTEMS_INVALID_ADDRESS | The external parameter was NULL. |
The following constraints apply to this directive: