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

Constituent: mem     Tag: mv2304


Interface   Data Structures   File List   Data Fields   Globals  

MEM.h File Reference

public interface to memory dump/load More...

This graph shows which files directly or indirectly include this file:

Included by dependency graph

Data Structures

struct  _MEM_Descriptor
 Memory descriptor. More...


Defines

#define MEM_MAP_NAME(__e__)
 Evaluate a memory map code to a text string.

#define MEM_PCI_CONFIG_BYTES   (256)
 Size in bytes of the PCI configuration space.

#define MEM_REGISTER_SET_BYTES   (640)
 Size in bytes of a register dump.


Typedefs

typedef unsigned int MEM_Status
 Typedef for return status of memory functions.

typedef enum _MEM_Memmap MEM_Memmap
 Typedef for memory map selection.

typedef _MEM_Descriptor MEM_Descriptor
 Typedef for # _MEM_Descriptor.


Enumerations

enum  _MEM_Memmap {
  MEM_MEMMAP_MEMORY,
  MEM_MEMMAP_PCI_CFG,
  MEM_MEMMAP_REGISTER
}
 Memory map selection. More...


Functions

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

MEM_Status MEM_CreateDescriptorFromDumpCommand (MEM_Descriptor *, const void *)
 Create memory descriptor from a memory dump command.

MEM_Status MEM_CreateDescriptorFromLoadCommand (MEM_Descriptor *, const void *)
 Create memory descriptor from a memory load command.


Detailed Description

public interface to memory dump/load

Author:
Ray Caperoon
Date:
Fri Sep 12 07:59:31 2003
Memory library. For use in boot and operation code.

Date
2004/07/19 16:05:24
Source
/nfs/slac/g/glast/flight/archive/MEM/MEM/MEM.h,v
Author
dmay
Revision
1.7
Log
MEM.h,v
Revision 1.7 2004/07/19 16:05:24 dmay no longer include MEMCMD.h

Revision 1.6 2004/06/29 14:09:38 dmay restructure MEM_Descriptor; move memory dump functions to MEM_dump.h

Revision 1.5 2004/06/17 20:00:31 dmay remove load data from memory descriptors

Revision 1.4 2004/05/03 20:09:33 dmay Added MemLoad data and PCI config data to memory descriptors; Combined MEM_CreateXxxDescriptor functions into single MEM_CreateDescriptor function

Revision 1.3 2004/03/23 20:07:28 dmay increase MEM_REGISTER_SET_BYTES from 512 to 640

Revision 1.2 2004/03/11 13:35:50 ray added wrapped indcator to dumps

Revision 1.1.1.1 2004/01/09 12:52:27 ray Create package MEM


Define Documentation

#define MEM_MAP_NAME __e__   ) 
 

Value:

(((__e__)==MEM_MEMMAP_MEMORY)?"Memory": \
                            (((__e__)==MEM_MEMMAP_PCI_CFG)?"PCI Config": \
                            (((__e__)==MEM_MEMMAP_REGISTER)?"Register": \
                                                            "Unknown Map")))
Evaluate a memory map code to a text string.

#define MEM_REGISTER_SET_BYTES   (640)
 

Size in bytes of a register dump.

This is the size of a CPU register dump. There are 32 32-bit GPRs, 32 64-bit FPRs and 53 32-bit SPRs. That adds up to 596 bytes (149 words). A little extra space is allocated here (640 bytes, 160 words) in case a register or two was missed and needs to be added later.

For Memory Dump commands, a snapshot of the processor register values are gathered and stored in the dump context at the time the dump is started. The register values are then retrieved from the context as the dump progresses.


Typedef Documentation

MEM_Memmap
 

Typedef for memory map selection.

Typedef for _MEM_Memmap enumeration.

MEM_Status
 

Typedef for return status of memory functions.

Type for memory library return status codes.


Enumeration Type Documentation

enum _MEM_Memmap
 

Memory map selection.

Enumerated types to select a memory map. This is derived from the memory dump and load telecommands and describes three types of memory accesses made by the LAT memory system:

MEMORY - regular byte-accessable RAM-like memories with no alignment requirements.

PCI_CFG - PCI configuration space.

REGISTER - PPCI memory-mapped registers. Memory map may contains "holes", so generic non-aligned bytes access not always allowed.


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_CreateDescriptorFromLoadCommand MEM_Descriptor ,
const void * 
 

Create memory descriptor from a memory load command.


Generated on Mon Dec 13 07:24:39 2004 by doxygen 1.3.3