GLAST/LAT > DAQ and FSW > FSW > Doxygen Index > MEM / V3-1-0

Constituent: mem     Tag: rad750


Interface   Data Structures   File List   Data Fields   Globals  

memcommon.c File Reference

Code common to MEM functions. More...

#include <string.h>
#include "CCSDS/CCSDS_pkt.h"
#include "MEM/MEM.h"
#include "MEM/MEMCMD.h"
#include "MEM/MEM_msgs.h"
#include "MSG/MSG_pubdefs.h"
#include "mempriv.h"

Include dependency graph for memcommon.c:

Include dependency graph

Functions

void MEM_CreateDescriptor (MEM_Descriptor *md, const MEM_Memmap map, const caddr_t addr, const size_t bytes)
 Create generic memory descriptor.

unsigned int MEM_CreateDescriptorFromDumpCommand (MEM_Descriptor *md_p, const void *pkt_p)
 Create memory descriptor from a memory dump command.

void * Mem_GatherRegisterSet (void *ptr)
 Gather register info.


Detailed Description

Code common to MEM functions.

  CVS $Id: memcommon.c,v 1.7 2004/07/23 16:30:23 dmay Exp $
  

Function Documentation

void MEM_CreateDescriptor MEM_Descriptor md,
const MEM_Memmap  map,
const caddr_t  addr,
const size_t  bytes
 

Create generic memory descriptor.

Create a generic memory descriptor. This can be used to create any type of memory descriptor, but for those with extended data (such as a PCI configuration space descriptor), the extended data must be added by the caller. This function simply copies its arguments to the corresponding members of the memory descriptor.

There is no argument checking, a user can create a completely bogus memory descriptor with this call. It is up to the routines that use the memory descriptor to validate it.

Parameters:
md Pointer to location to build the descriptor.
map Type of memory.
addr Starting memory address.
bytes Size of memory, in bytes.

unsigned int MEM_CreateDescriptorFromDumpCommand MEM_Descriptor md_p,
const void *  pkt_p
 

Create memory descriptor from a memory dump command.

This function creates a memory descriptor for use during a memory dump. It converts a valid memory dump command packet to a memory descriptor that describes the memory specified in the memory dump command.

It is assumed that the memory dump command packet has been validated.

Parameters:
md_p Pointer to location to build the descriptor.
pkt_p Pointer to valid memory dump command packet.

Here is the call graph for this function:

void* Mem_GatherRegisterSet void *  ptr  ) 
 

Gather register info.

Get a CPU register dump and store it at the location defined by ptr. Returns the sum of ptr and the number of bytes used to dump the register set.

Parameters:
ptr Pointer to location to store register dump.
Returns:
Sum of ptr and number of bytes used by register dump.


Generated on Mon Dec 13 07:31:56 2004 by doxygen 1.3.3