GLAST / LAT > DAQ and FSW > FSW > Doxygen Index> MEM / V5-8-1 > mem_base / linux-gcc


Interface   Data Structures   File List   Data Fields   Globals  

mempriv.h File Reference

Private MEM package definitions. More...

#include <MEM/MEM_map.h>
#include <MSG/MSG_pubdefs.h>

Classes

struct  _mem_mapEntry
 Memory map entry. More...

Defines

#define TRUE   (1)
 Boolean true.
#define FALSE   (0)
 Boolean false.
#define MIN(a, b)   (((a) < (b) ) ? (a) : (b))
 Standard definition for data minimum.
#define MAX(a, b)   (((a) > (b) ) ? (a) : (b))
 Standard definition for data maximum.
#define MEM_MSG(_status,...)   _msg_report ((_status), 0, __VA_ARGS__)
 MSG signaller.

Typedefs

typedef struct _mem_mapEntry mem_mapEntry
 Typedef for struct _mem_mapEntry.

Functions

unsigned int Mem_ValidateMemoryRange (const MEM_Descriptor *md, const MEM_mapAccessType accessType, const mem_mapEntry **mapEntry)
 Validate memory descriptor against memory map table.
void * Mem_WriteRegisterSet (void *data_p, void *mask_p)
 Write CPU registers.


Detailed Description

Private MEM package definitions.

Interface to functions that are private to the MEM package.

  CVS $Id: mempriv.h,v 1.9 2011/03/29 01:58:53 apw Exp $
  

Define Documentation

#define MEM_MSG ( _status,
...   )     _msg_report ((_status), 0, __VA_ARGS__)

MSG signaller.

Configuration-dependent message signaller. For boot configuration, returns _status. For application configuration, calls _msg_report().

Parameters:
_status The variable holding the status code.
... The message specific parameter values.

Referenced by MEM_CancelDump(), MEM_CreateDescriptorFromDumpCommand(), MEM_dumpGetContext(), MEM_dumpGetData(), MEM_dumpGetInfo(), MEM_dumpReleaseContext(), MEM_dumpStart(), MEM_loadGetContext(), MEM_loadGetInfo(), MEM_loadPktMemory(), MEM_loadPktPci(), MEM_loadPktReg(), MEM_loadReleaseContext(), mem_loadStart(), MEM_loadWrite(), MEM_mapAddEntry(), mem_ValidateDumpDescriptor(), and Mem_ValidateMemoryRange().


Function Documentation

unsigned int Mem_ValidateMemoryRange ( const MEM_Descriptor md,
const MEM_mapAccessType  accessType,
const mem_mapEntry **  mapEntry 
)

Validate memory descriptor against memory map table.

This function verifies that a memory descriptor is valid for a given set of access types. Potential access types are specified in accessType as a bitfield. If at least one of the access types specified is legal for the memory descriptor, a handle to the appropriate memory map entry is passed back for future use. If, instead, the caller wants to know if *all* specified access types are valid, then this function must be called once for each type.

Parameters:
md Pointer to memory descriptor to be validated.
accessType Bitfield of types of accesses to validate.
mapEntry Pointer to location to return map table entry handle.
Return values:
MEM_SUCCESS md is OK for accessType.
MEM_OUTOFRNG md does not fit in any memory map.
MEM_BADMAP md does not contain a legal memory map type.
MEM_BADACC accessType is not legal for md.
This function verifies that a memory descriptor is valid for a given set of access types. Potential access types are specified in accessType as a bitfield. If at least one of the access types specified is legal for the memory descriptor, a handle to the appropriate memory map entry is passed back for future use. If, instead, the caller wants to know if *all* specified access types are valid, then this function must be called once for each type.

Parameters:
md Pointer to memory descriptor to be validated.
accessType Bitfield of types of accesses to validate.
mapEntry Pointer to location to return map table entry handle.
Return values:
MEM_SUCCESS md is OK for accessType.
MEM_OUTOFRNG md does not fit in any memory map.
MEM_BADMAP md does not contain a legal memory map type.
MEM_BADACC accessType is not legal for md.

References _mem_mapEntry::access_flags, _MEM_Descriptor::addr, _MEM_Descriptor::bytes, DIM, MEM_MAP_ACCESS_16, MEM_MAP_ACCESS_8, MEM_MSG, _MEM_Descriptor::memmap, _mem_mapEntry::num_bytes, and _mem_mapEntry::start_addr.

Referenced by mem_loadStart(), and mem_ValidateDumpDescriptor().

void * Mem_WriteRegisterSet ( void *  data_p,
void *  mask_p 
)

Write CPU registers.

Writes a subset of the CPU registers.

Parameters:
data_p Pointer to array of data values to write.
mask_p Pointer to array of mask values to apply to the data.
Returns:
Sum of data_p and the number of bytes written.


Generated on Sat Apr 9 19:26:02 2011 by  doxygen 1.5.8