RTEMS Logo

RTEMS 4.9.2 On-Line Library


Shared Memory Support Driver Shared Memory Configuration Table

PREV UP NEXT Bookshelf BSP and Device Driver Development Guide

16.1: Shared Memory Configuration Table

The Shared Memory Configuration Table is defined in the following structure:

typedef volatile uint32_t vol_u32;

typedef struct {
  vol_u32 *address;        /* write here for interrupt    */
  vol_u32  value;          /* this value causes interrupt */
  vol_u32  length;         /* for this length (0,1,2,4)   */
} Shm_Interrupt_information;

struct shm_config_info {
  vol_u32           *base;       /* base address of SHM         */
  vol_u32            length;     /* length (in bytes) of SHM    */
  vol_u32            format;     /* SHM is big or little endian */
  vol_u32          (*convert)(); /* neutral conversion routine  */
  vol_u32            poll_intr;  /* POLLED or INTR driven mode  */
  void             (*cause_intr)( uint32_t );
  Shm_Interrupt_information   Intr; /* cause intr information   */
};

typedef struct shm_config_info shm_config_table;

where the fields are defined as follows:

base
is the base address of the shared memory buffer used to pass messages between the nodes in the system.
length
is the length (in bytes) of the shared memory buffer used to pass messages between the nodes in the system.
format
is either SHM_BIG or SHM_LITTLE to indicate that the neutral format of the shared memory area is big or little endian. The format of the memory should be chosen to match most of the inter-node traffic.
convert
is the address of a routine which converts from native format to neutral format. Ideally, the neutral format is the same as the native format so this routine is quite simple.
poll_intr
is either INTR_MODE or POLLED_MODE to indicate how the node will be informed of incoming messages.
cause_intr
Intr
is the information required to cause an interrupt on a node. This structure contains the following fields:
address
is the address to write at to cause an interrupt on that node. For a polled node, this should be NULL.
value
is the value to write to cause an interrupt.
length
is the length of the entity to write on the node to cause an interrupt. This can be 0 to indicate polled operation, 1 to write a byte, 2 to write a sixteen-bit entity, and 4 to write a thirty-two bit entity.


PREV UP NEXT Bookshelf BSP and Device Driver Development Guide

Copyright © 1988-2008 OAR Corporation