GLAST / LAT > DAQ and FSW > FSW > Doxygen Index> MEM / V5-8-2 > mem_unit_test / rad750


Interface   Data Structures   File List   Data Fields   Globals  

MEM.h File Reference

public interface to memory dump/load More...


Classes

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   (768)
 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 struct _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 map, const caddr_t addr, const size_t bytes)
 Create a generic memory descriptor.
unsigned int MEM_CreateDescriptorFromDumpCommand (MEM_Descriptor *md_p, const void *pkt_p)
 Create a memory descriptor from a dump command.


Detailed Description

public interface to memory dump/load

Memory library. For use in boot and operation code.

Log
MEM.h,v
Revision 1.14 2011/03/29 01:58:51 apw Upgrade for RHEL 4/5/6 32/64

Revision 1.13 2005/10/06 21:13:22 dmay fix doxygen 1.4.4 warnings

Revision 1.12 2005/08/12 15:46:06 dmay add extern to function prototypes

Revision 1.11 2005/05/02 18:30:55 dmay add ifdef __cplusplus change some comments

Revision 1.10 2005/02/28 21:08:35 dmay removed unused MEM_CreateDescriptorFromLoadCommand

Revision 1.9 2005/02/23 19:52:41 dmay increase CPU register set size to 768 bytes

Revision 1.8 2004/12/08 17:25:27 dmay removed PCI fields from MEM_Descriptor

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.

Referenced by mem_ValidateMemoryRange_test(), test_Descriptor_Compare(), and test_LoadInfo_Compare().

#define MEM_REGISTER_SET_BYTES   (768)

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 68 32-bit SPRs. That adds up to 656 bytes (164 words). A little extra space is allocated here (768 bytes, 192 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.

Referenced by mem_DumpRegSet_test(), and mem_SetRegs().


Typedef Documentation

Typedef for memory map selection.

Typedef for _MEM_Memmap enumeration.

Typedef for return status of memory functions.

Type for memory library return status codes.


Enumeration Type Documentation

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 a 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.

Referenced by mem_DumpMemory_test(), mem_DumpPCI_test(), mem_DumpRegSet_test(), mem_DumpWrap_test(), and mem_ValidateMemoryRange_test().

unsigned int MEM_CreateDescriptorFromDumpCommand ( MEM_Descriptor md_p,
const void *  pkt_p 
)

Create a memory descriptor from a 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.

Referenced by mem_check_dump_command(), and mem_check_null_desc_params().


Generated on Wed Nov 21 21:10:43 2012 by  doxygen 1.5.8