RTEMS CPU Kit with SuperCore  4.11.3
Files | Data Structures | Macros | Typedefs | Enumerations | Functions | Variables
MPCI Handler

The MPCI Handler encapsulates functionality which is related to the generation, receipt, and processing of remote operations in a multiprocessor system. More...

Collaboration diagram for MPCI Handler:

Files

file  mpci.h
 MPCI Layer API.
 
file  mpciimpl.h
 MPCI Layer Implementation.
 
file  mpci.c
 Multiprocessing Communications Interface (MPCI) Handler.
 

Data Structures

struct  MPCI_Control
 This type defines the Multiprocessor Communications Interface (MPCI) Table. More...
 
struct  MPCI_Internal_packet
 The following data structure defines the packet used to perform remote event operations. More...
 

Macros

#define MPCI_ALL_NODES   0
 The following defines the node number used when a broadcast is desired.
 
#define MPCI_DEFAULT_TIMEOUT   0xFFFFFFFF
 For packets associated with requests that don't already have a timeout, use the one specified by this MPCI driver. More...
 

Typedefs

typedef void MPCI_Entry
 This type is returned by all user provided MPCI routines.
 
typedef MPCI_Entry(* MPCI_initialization_entry) (void)
 This type defines the prototype for the initization entry point in an Multiprocessor Communications Interface.
 
typedef MPCI_Entry(* MPCI_get_packet_entry) (MP_packet_Prefix **)
 This type defines the prototype for the get packet entry point in an Multiprocessor Communications Interface. More...
 
typedef MPCI_Entry(* MPCI_return_packet_entry) (MP_packet_Prefix *)
 This type defines the prototype for the return packet entry point in an Multiprocessor Communications Interface. More...
 
typedef MPCI_Entry(* MPCI_send_entry) (uint32_t, MP_packet_Prefix *)
 This type defines the prototype for send get packet entry point in an Multiprocessor Communications Interface. More...
 
typedef MPCI_Entry(* MPCI_receive_entry) (MP_packet_Prefix **)
 This type defines the prototype for the receive packet entry point in an Multiprocessor Communications Interface. More...
 
typedef void(* MPCI_Packet_processor) (MP_packet_Prefix *)
 The following defines the type for packet processing routines invoked by the MPCI Receive server.
 

Enumerations

enum  MPCI_Internal_Remote_operations { MPCI_PACKETS_SYSTEM_VERIFY = 0 }
 The following enumerated type defines the list of internal MP operations.
 

Functions

void _MPCI_Handler_initialization (uint32_t timeout_status)
 Initialize the MPCI handler. More...
 
void _MPCI_Create_server (void)
 Create the MPCI server thread. More...
 
void _MPCI_Initialization (void)
 Initialize the MPCI driver. More...
 
void _MPCI_Register_packet_processor (MP_packet_Classes the_class, MPCI_Packet_processor the_packet_processor)
 This routine registers the MPCI packet processor for the designated object class. More...
 
MP_packet_Prefix_MPCI_Get_packet (void)
 This function obtains a packet by invoking the user provided MPCI get packet callout. More...
 
void _MPCI_Return_packet (MP_packet_Prefix *the_packet)
 Deallocate a packet. More...
 
void _MPCI_Send_process_packet (uint32_t destination, MP_packet_Prefix *the_packet)
 Send a process packet. More...
 
uint32_t _MPCI_Send_request_packet (uint32_t destination, MP_packet_Prefix *the_packet, States_Control extra_state, uint32_t timeout_code)
 Send a request packet. More...
 
void _MPCI_Send_response_packet (uint32_t destination, MP_packet_Prefix *the_packet)
 Send a response packet. More...
 
MP_packet_Prefix_MPCI_Receive_packet (void)
 Receive a packet. More...
 
Thread_Control_MPCI_Process_response (MP_packet_Prefix *the_packet)
 Pass a packet to the thread. More...
 
Thread _MPCI_Receive_server (uint32_t ignored)
 Receive and process all packets. More...
 
void _MPCI_Announce (void)
 Announce the availability of a packet. More...
 
void _MPCI_Internal_packets_Send_process_packet (MPCI_Internal_Remote_operations operation)
 Perform a process on another node. More...
 
void _MPCI_Internal_packets_Process_packet (MP_packet_Prefix *the_packet_prefix)
 _MPCI_Internal_packets_Send_request_packet More...
 
MPCI_Internal_packet_MPCI_Internal_packets_Get_packet (void)
 _MPCI_Internal_packets_Send_object_was_deleted More...
 
RTEMS_INLINE_ROUTINE bool _Mp_packet_Is_valid_packet_class (MP_packet_Classes the_packet_class)
 This function returns true if the the_packet_class is valid, and false otherwise. More...
 

Variables

SCORE_EXTERN Thread_queue_Control _MPCI_Remote_blocked_threads
 The following thread queue is used to maintain a list of tasks which currently have outstanding remote requests.
 
SCORE_EXTERN MPCI_Control_MPCI_table
 The following define the internal pointers to the user's configuration information.
 
SCORE_EXTERN Thread_Control_MPCI_Receive_server_tcb
 Pointer to MP thread control block. More...
 
SCORE_EXTERN MPCI_Packet_processor _MPCI_Packet_processors [MP_PACKET_CLASSES_LAST+1]
 The following table contains the process packet routines provided by each object that supports MP operations.
 

Detailed Description

The MPCI Handler encapsulates functionality which is related to the generation, receipt, and processing of remote operations in a multiprocessor system.

This handler contains the message passing support for making remote service calls as well as the server thread which processes requests from remote nodes.

Macro Definition Documentation

◆ MPCI_DEFAULT_TIMEOUT

#define MPCI_DEFAULT_TIMEOUT   0xFFFFFFFF

For packets associated with requests that don't already have a timeout, use the one specified by this MPCI driver.

The value specified by the MPCI driver sets an upper limit on how long a remote request should take to complete.

Typedef Documentation

◆ MPCI_get_packet_entry

typedef MPCI_Entry( * MPCI_get_packet_entry) (MP_packet_Prefix **)

This type defines the prototype for the get packet entry point in an Multiprocessor Communications Interface.

The single parameter will point to the packet allocated.

◆ MPCI_receive_entry

typedef MPCI_Entry( * MPCI_receive_entry) (MP_packet_Prefix **)

This type defines the prototype for the receive packet entry point in an Multiprocessor Communications Interface.

The single parameter will point to a packet allocated and filled in by the receive packet handler. The caller will block until a packet is received.

◆ MPCI_return_packet_entry

typedef MPCI_Entry( * MPCI_return_packet_entry) (MP_packet_Prefix *)

This type defines the prototype for the return packet entry point in an Multiprocessor Communications Interface.

The single parameter will point to a packet previously allocated by the get packet MPCI entry.

◆ MPCI_send_entry

typedef MPCI_Entry( * MPCI_send_entry) (uint32_t, MP_packet_Prefix *)

This type defines the prototype for send get packet entry point in an Multiprocessor Communications Interface.

The single parameter will point to a packet previously allocated by the get packet entry point that has been filled in by the caller.

Function Documentation

◆ _Mp_packet_Is_valid_packet_class()

RTEMS_INLINE_ROUTINE bool _Mp_packet_Is_valid_packet_class ( MP_packet_Classes  the_packet_class)

This function returns true if the the_packet_class is valid, and false otherwise.

Note
Check for lower bounds (MP_PACKET_CLASSES_FIRST ) is unnecessary because this enum starts at lower bound of zero.

References MP_PACKET_CLASSES_LAST.

Referenced by _MPCI_Receive_server().

◆ _MPCI_Announce()

void _MPCI_Announce ( void  )

Announce the availability of a packet.

This routine informs RTEMS of the availability of an MPCI packet.

References _CORE_semaphore_Surrender(), and _ISR_lock_ISR_disable.

Referenced by rtems_multiprocessing_announce().

◆ _MPCI_Create_server()

void _MPCI_Create_server ( void  )

Create the MPCI server thread.

This routine creates the packet receive server used in MP systems.

Referenced by rtems_initialize_before_drivers().

◆ _MPCI_Get_packet()

MP_packet_Prefix* _MPCI_Get_packet ( void  )

This function obtains a packet by invoking the user provided MPCI get packet callout.

Return values
Thismethod returns a pointer to a MPCI packet which can be filled in by the caller and used to perform a subsequent remote operation.

References _MPCI_table, _Terminate(), MPCI_Control::get_packet, and INTERNAL_ERROR_CORE.

Referenced by _Event_MP_Get_packet(), _Message_queue_MP_Get_packet(), _MPCI_Internal_packets_Get_packet(), _Partition_MP_Get_packet(), _Region_MP_Get_packet(), _RTEMS_tasks_MP_Get_packet(), _Semaphore_MP_Get_packet(), and _Signal_MP_Get_packet().

◆ _MPCI_Handler_initialization()

void _MPCI_Handler_initialization ( uint32_t  timeout_status)

Initialize the MPCI handler.

This routine performs the initialization necessary for this handler.

Parameters
[in]timeout_statusis the value which should be returned to blocking threads when they timeout on a remote operation.

References _Terminate(), and INTERNAL_ERROR_CORE.

◆ _MPCI_Initialization()

void _MPCI_Initialization ( void  )

Initialize the MPCI driver.

This routine initializes the MPCI driver by invoking the user provided MPCI initialization callout.

References _MPCI_table, and MPCI_Control::initialization.

Referenced by rtems_initialize_device_drivers().

◆ _MPCI_Internal_packets_Get_packet()

MPCI_Internal_packet* _MPCI_Internal_packets_Get_packet ( void  )

_MPCI_Internal_packets_Send_object_was_deleted

This routine is invoked indirectly by the thread queue when a proxy has been removed from the thread queue and the remote node must be informed of this.

This routine is not needed since there are no objects deleted by this manager. _MPCI_Internal_packets_Send_extract_proxy

This routine is invoked when a task is deleted and it has a proxy which must be removed from a thread queue and the remote node must be informed of this.

This routine is not needed since there are no objects deleted by this manager. Obtain an internal thread.

This routine is used to obtain an internal threads MP packet.

References _MPCI_Get_packet().

◆ _MPCI_Internal_packets_Process_packet()

void _MPCI_Internal_packets_Process_packet ( MP_packet_Prefix the_packet_prefix)

_MPCI_Internal_packets_Send_request_packet

This routine performs a remote procedure call so that a directive operation can be initiated on another node.

This routine is not needed since there are no request packets to be sent by this manager. _MPCI_Internal_packets_Send_response_packet

This routine performs a remote procedure call so that a directive can be performed on another node.

This routine is not needed since there are no response packets to be sent by this manager. Perform requested action from another node.

This routine performs the actions specific to this package for the request from another node.

References MPCI_Internal_packet::operation.

◆ _MPCI_Internal_packets_Send_process_packet()

void _MPCI_Internal_packets_Send_process_packet ( MPCI_Internal_Remote_operations  operation)

Perform a process on another node.

This routine performs a remote procedure call so that a process operation can be performed on another node.

Parameters
[in]operationis the remote operation to perform.

Referenced by rtems_initialize_device_drivers().

◆ _MPCI_Process_response()

Thread_Control* _MPCI_Process_response ( MP_packet_Prefix the_packet)

Pass a packet to the thread.

This routine is responsible for passing the_packet to the thread waiting on the remote operation to complete. The unblocked thread is responsible for eventually freeing the_packet.

Parameters
[in]the_packetis the response packet to be processed.
Return values
Thismethod returns a pointer to the thread which was if unblocked or NULL if the waiting thread no longer exists.

References _Thread_Get(), and MP_packet_Prefix::id.

◆ _MPCI_Receive_packet()

MP_packet_Prefix* _MPCI_Receive_packet ( void  )

Receive a packet.

This routine receives a packet by invoking the user provided MPCI receive callout.

Return values
Thismethod returns the packet received.

References _MPCI_table, and MPCI_Control::receive_packet.

Referenced by _MPCI_Receive_server().

◆ _MPCI_Receive_server()

Thread _MPCI_Receive_server ( uint32_t  ignored)

Receive and process all packets.

This is the server thread which receives and processes all MCPI packets.

Parameters
[in]ignoredis the thread argument. It is not used.

References _CORE_semaphore_Seize(), _ISR_lock_ISR_disable, _Mp_packet_Is_valid_packet_class(), _MPCI_Packet_processors, _MPCI_Receive_packet(), _Terminate(), _Thread_Get_executing(), INTERNAL_ERROR_CORE, MP_packet_Prefix::the_class, and WATCHDOG_NO_TIMEOUT.

◆ _MPCI_Register_packet_processor()

void _MPCI_Register_packet_processor ( MP_packet_Classes  the_class,
MPCI_Packet_processor  the_packet_processor 
)

This routine registers the MPCI packet processor for the designated object class.

Parameters
[in]the_classis the class indicator for packets which will be processed by the_packet_processor method.
[in]the_packet_processoris a pointer to a method which is invoked when packets with the_class are received.

References _MPCI_Packet_processors.

Referenced by _Event_Manager_initialization(), and _Signal_Manager_initialization().

◆ _MPCI_Return_packet()

void _MPCI_Return_packet ( MP_packet_Prefix the_packet)

Deallocate a packet.

This routine deallocates a packet by invoking the user provided MPCI return packet callout.

Parameters
[in]the_packetis the MP packet to deallocate.

References _MPCI_table, and MPCI_Control::return_packet.

◆ _MPCI_Send_process_packet()

void _MPCI_Send_process_packet ( uint32_t  destination,
MP_packet_Prefix the_packet 
)

Send a process packet.

This routine sends a process packet by invoking the user provided MPCI send callout.

Parameters
[in]destinationis the node which should receive this packet.
[in]the_packetis the packet to be sent.

References MP_packet_Prefix::source_tid.

◆ _MPCI_Send_request_packet()

uint32_t _MPCI_Send_request_packet ( uint32_t  destination,
MP_packet_Prefix the_packet,
States_Control  extra_state,
uint32_t  timeout_code 
)

Send a request packet.

This routine sends a request packet by invoking the user provided MPCI send callout.

Parameters
[in]destinationis the node which should receive this packet.
[in]the_packetis the packet to be sent.
[in]extra_stateis the extra thread state bits which should be set in addition to the remote operation pending state. It may indicate the caller is blocking on a message queue operation.
[in]timeout_codeis the timeout code
Return values
Thismethod returns the operation status from the remote node.

◆ _MPCI_Send_response_packet()

void _MPCI_Send_response_packet ( uint32_t  destination,
MP_packet_Prefix the_packet 
)

Send a response packet.

This routine sends a response packet by invoking the user provided MPCI send callout.

Parameters
[in]destinationis the node which should receive this packet.
[in]the_packetis the packet to be sent.

References MP_packet_Prefix::source_tid.

Variable Documentation

◆ _MPCI_Receive_server_tcb

SCORE_EXTERN Thread_Control* _MPCI_Receive_server_tcb

Pointer to MP thread control block.

The following is used to determine when the multiprocessing receive thread is executing so that a proxy can be allocated instead of blocking the multiprocessing receive thread.