|
RTEMS CPU Kit with SuperCore
4.10.99.0
|
Dual Ported Memory Manager. More...
|
Data Structures | |
| struct | Dual_ported_memory_Control |
| The following structure defines the port control block. More... | |
Functions | |
| void | _Dual_ported_memory_Manager_initialization (void) |
| Dual Ported Memory Manager Initialization. | |
| rtems_status_code | rtems_port_create (rtems_name name, void *internal_start, void *external_start, uint32_t length, rtems_id *id) |
| Creates a port into a dual-ported memory area. | |
| rtems_status_code | rtems_port_ident (rtems_name name, rtems_id *id) |
| RTEMS Port Name to Id. | |
| rtems_status_code | rtems_port_delete (rtems_id id) |
| RTEMS Delete Port. | |
| rtems_status_code | rtems_port_external_to_internal (rtems_id id, void *external, void **internal) |
| RTEMS Port External to Internal. | |
| rtems_status_code | rtems_port_internal_to_external (rtems_id id, void *internal, void **external) |
| RTEMS Port Internal to External. | |
| RTEMS_INLINE_ROUTINE Dual_ported_memory_Control * | _Dual_ported_memory_Allocate (void) |
| Allocates a port control block from the inactive chain of free port control blocks. | |
| RTEMS_INLINE_ROUTINE void | _Dual_ported_memory_Free (Dual_ported_memory_Control *the_port) |
| Frees a port control block to the inactive chain of free port control blocks. | |
| RTEMS_INLINE_ROUTINE Dual_ported_memory_Control * | _Dual_ported_memory_Get (Objects_Id id, Objects_Locations *location) |
| Maps port IDs to port control blocks. | |
| RTEMS_INLINE_ROUTINE bool | _Dual_ported_memory_Is_null (Dual_ported_memory_Control *the_port) |
| Checks if the_port is NULL. | |
Variables | |
|
RTEMS_DPMEM_EXTERN Objects_Information | _Dual_ported_memory_Information |
| Define the internal Dual Ported Memory information The following define the internal Dual Ported Memory information. | |
Dual Ported Memory Manager.
This encapsulates functionality related to the Classic API Dual Ported Memory Manager.
This include file contains all the constants and structures associated with the Dual Ported Memory Manager. This manager provides a mechanism for converting addresses between internal and external representations for multiple dual-ported memory areas.
Directives provided are:
| RTEMS_INLINE_ROUTINE Dual_ported_memory_Control* _Dual_ported_memory_Allocate | ( | void | ) |
Allocates a port control block from the inactive chain of free port control blocks.
This routine allocates a port control block from the inactive chain of free port control blocks.
References _Objects_Allocate(), and _Dual_ported_memory_Information.
| RTEMS_INLINE_ROUTINE void _Dual_ported_memory_Free | ( | Dual_ported_memory_Control * | the_port | ) |
Frees a port control block to the inactive chain of free port control blocks.
This routine frees a port control block to the inactive chain of free port control blocks.
References _Objects_Free(), _Dual_ported_memory_Information, and Dual_ported_memory_Control::Object.
| RTEMS_INLINE_ROUTINE Dual_ported_memory_Control* _Dual_ported_memory_Get | ( | Objects_Id | id, |
| Objects_Locations * | location | ||
| ) |
Maps port IDs to port control blocks.
This function maps port IDs to port control blocks. If ID corresponds to a local port, then it returns the_port control pointer which maps to ID and location is set to OBJECTS_LOCAL. Global ports are not supported, thus if ID does not map to a local port, location is set to OBJECTS_ERROR and the_port is undefined.
References _Objects_Get(), and _Dual_ported_memory_Information.
| RTEMS_INLINE_ROUTINE bool _Dual_ported_memory_Is_null | ( | Dual_ported_memory_Control * | the_port | ) |
Checks if the_port is NULL.
This function returns true if the_port is NULL and false otherwise.
| void _Dual_ported_memory_Manager_initialization | ( | void | ) |
Dual Ported Memory Manager Initialization.
This routine performs the initialization necessary for this manager.
| rtems_status_code rtems_port_create | ( | rtems_name | name, |
| void * | internal_start, | ||
| void * | external_start, | ||
| uint32_t | length, | ||
| rtems_id * | id | ||
| ) |
Creates a port into a dual-ported memory area.
This routine implements the rtems_port_create directive. The port will have the name name. The port maps onto an area of dual ported memory of length bytes which has internal_start and external_start as the internal and external starting addresses, respectively. It returns the id of the created port in ID.
| [in] | name | is the user defined port name |
| [in] | internal_start | is the internal start address of port |
| [in] | external_start | is the external start address of port |
| [in] | length | is the physical length in bytes |
| [out] | id | is the address of port id to set |
| This | method returns RTEMS_SUCCESSFUL if there was not an error. Otherwise, a status code is returned indicating the source of the error. If successful, the id will be filled in with the port id. |
| rtems_status_code rtems_port_delete | ( | rtems_id | id | ) |
RTEMS Delete Port.
This routine implements the rtems_port_delete directive. It deletes the port associated with ID.
| [in] | id | is the dual-ported memory area id |
| This | method returns RTEMS_SUCCESSFUL if there was not an error. Otherwise, a status code is returned indicating the source of the error. |
| rtems_status_code rtems_port_external_to_internal | ( | rtems_id | id, |
| void * | external, | ||
| void ** | internal | ||
| ) |
RTEMS Port External to Internal.
This routine implements the rtems_port_external_to_internal directive. It returns the internal port address which maps to the provided external port address for the specified port ID. If the given external address is an invalid dual-ported address, then the internal address is set to the given external address.
| [in] | id | is the id of dp memory object |
| [in] | external | is the external address |
| [out] | internal | is the pointer of internal address to set |
| RTEMS_SUCCESSFUL |
| rtems_status_code rtems_port_ident | ( | rtems_name | name, |
| rtems_id * | id | ||
| ) |
RTEMS Port Name to Id.
This routine implements the rtems_port_ident directive. This directive returns the port ID associated with name. If more than one port is named name, then the port to which the ID belongs is arbitrary.
| [in] | name | is the user defined port name |
| [out] | id | is the pointer to port id |
| RTEMS_SUCCESSFUL | if successful or error code if unsuccessful |
| rtems_status_code rtems_port_internal_to_external | ( | rtems_id | id, |
| void * | internal, | ||
| void ** | external | ||
| ) |
RTEMS Port Internal to External.
This routine implements the Port_internal_to_external directive. It returns the external port address which maps to the provided internal port address for the specified port ID. If the given internal address is an invalid dual-ported address, then the external address is set to the given internal address.
| [in] | id | is the id of dual-ported memory object |
| [in] | internal | is the internal address to set |
| [in] | external | is the pointer to external address |
| RTEMS_SUCCESSFUL | and the external will be filled in with the external addresses |
1.7.5