RTEMS CPU Kit with SuperCore  4.10.99.0
Data Structures | Functions | Variables
Dual Ported Memory
RTEMS Classic API

Dual Ported Memory Manager. More...

Collaboration diagram for Dual Ported Memory:

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.

Detailed Description

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:


Function Documentation

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.

Parameters:
[in]nameis the user defined port name
[in]internal_startis the internal start address of port
[in]external_startis the external start address of port
[in]lengthis the physical length in bytes
[out]idis the address of port id to set
Return values:
Thismethod 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.

Parameters:
[in]idis the dual-ported memory area id
Return values:
Thismethod 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.

Parameters:
[in]idis the id of dp memory object
[in]externalis the external address
[out]internalis the pointer of internal address to set
Return values:
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.

Parameters:
[in]nameis the user defined port name
[out]idis the pointer to port id
Return values:
RTEMS_SUCCESSFULif 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.

Parameters:
[in]idis the id of dual-ported memory object
[in]internalis the internal address to set
[in]externalis the pointer to external address
Return values:
RTEMS_SUCCESSFULand the external will be filled in with the external addresses