\hypertarget{MEM_8h}{
\section{MEM.h File Reference}
\label{MEM_8h}\index{MEM.h@{MEM.h}}
}
public interface to memory dump/load  




This graph shows which files directly or indirectly include this file:\begin{figure}[H]
\begin{center}
\leavevmode
\includegraphics[width=171pt]{MEM_8h__dep__incl}
\end{center}
\end{figure}
\subsection*{Data Structures}
\begin{CompactItemize}
\item 
struct \hyperlink{struct__MEM__Descriptor}{\_\-MEM\_\-Descriptor}
\begin{CompactList}\small\item\em Memory descriptor. \item\end{CompactList}\end{CompactItemize}
\subsection*{Defines}
\begin{CompactItemize}
\item 
\#define \hyperlink{MEM_8h_a0}{MEM\_\-MAP\_\-NAME}(\_\-\_\-e\_\-\_\-)
\begin{CompactList}\small\item\em Evaluate a memory map code to a text string. \item\end{CompactList}\item 
\hypertarget{MEM_8h_a1}{
\#define \hyperlink{MEM_8h_a1}{MEM\_\-PCI\_\-CONFIG\_\-BYTES}\ (256)}
\label{MEM_8h_a1}

\begin{CompactList}\small\item\em Size in bytes of the PCI configuration space. \item\end{CompactList}\item 
\#define \hyperlink{MEM_8h_a2}{MEM\_\-REGISTER\_\-SET\_\-BYTES}\ (768)
\begin{CompactList}\small\item\em Size in bytes of a register dump. \item\end{CompactList}\end{CompactItemize}
\subsection*{Typedefs}
\begin{CompactItemize}
\item 
typedef unsigned int \hyperlink{MEM_8h_a3}{MEM\_\-Status}
\begin{CompactList}\small\item\em Typedef for return status of memory functions. \item\end{CompactList}\item 
typedef enum \hyperlink{MEM_8h_a11}{\_\-MEM\_\-Memmap} \hyperlink{MEM_8h_a4}{MEM\_\-Memmap}
\begin{CompactList}\small\item\em Typedef for memory map selection. \item\end{CompactList}\item 
\hypertarget{MEM_8h_a5}{
typedef \hyperlink{struct__MEM__Descriptor}{\_\-MEM\_\-Descriptor} \hyperlink{MEM_8h_a5}{MEM\_\-Descriptor}}
\label{MEM_8h_a5}

\begin{CompactList}\small\item\em Typedef for \# \hyperlink{struct__MEM__Descriptor}{\_\-MEM\_\-Descriptor}. \item\end{CompactList}\end{CompactItemize}
\subsection*{Enumerations}
\begin{CompactItemize}
\item 
enum \hyperlink{MEM_8h_a11}{\_\-MEM\_\-Memmap} \{ \par
{\bf MEM\_\-MEMMAP\_\-MEMORY}, 
\par
{\bf MEM\_\-MEMMAP\_\-PCI\_\-CFG}, 
\par
{\bf MEM\_\-MEMMAP\_\-REGISTER}
 \}
\begin{CompactList}\small\item\em Memory map selection. \item\end{CompactList}\end{CompactItemize}
\subsection*{Functions}
\begin{CompactItemize}
\item 
void \hyperlink{MEM_8h_a9}{MEM\_\-Create\-Descriptor} (\hyperlink{struct__MEM__Descriptor}{MEM\_\-Descriptor} $\ast$md, const \hyperlink{MEM_8h_a4}{MEM\_\-Memmap}, const caddr\_\-t, const size\_\-t)
\begin{CompactList}\small\item\em Create generic memory descriptor. \item\end{CompactList}\item 
\hyperlink{MEM_8h_a3}{MEM\_\-Status} \hyperlink{MEM_8h_a10}{MEM\_\-Create\-Descriptor\-From\-Dump\-Command} (\hyperlink{struct__MEM__Descriptor}{MEM\_\-Descriptor} $\ast$, const void $\ast$)
\begin{CompactList}\small\item\em Create memory descriptor from a memory dump command. \item\end{CompactList}\end{CompactItemize}


\subsection{Detailed Description}
public interface to memory dump/load 

Memory library. For use in boot and operation code.

\begin{Desc}
\item[Log]\hyperlink{MEM_8h}{MEM.h},v \end{Desc}
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\_\-Create\-Descriptor\-From\-Load\-Command

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 \hyperlink{MEM__dump_8h}{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 Mem\-Load data and PCI config data to memory descriptors Combined MEM\_\-Create\-Xxx\-Descriptor functions into single MEM\_\-Create\-Descriptor 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

\subsection{Define Documentation}
\hypertarget{MEM_8h_a0}{
\index{MEM.h@{MEM.h}!MEM_MAP_NAME@{MEM\_\-MAP\_\-NAME}}
\index{MEM_MAP_NAME@{MEM\_\-MAP\_\-NAME}!MEM.h@{MEM.h}}
\subsubsection[MEM\_\-MAP\_\-NAME]{\setlength{\rightskip}{0pt plus 5cm}\#define MEM\_\-MAP\_\-NAME(\_\-\_\-e\_\-\_\-)}}
\label{MEM_8h_a0}


{\bf Value:}

\footnotesize\begin{verbatim}(((__e__)==MEM_MEMMAP_MEMORY)?"Memory": \
                            (((__e__)==MEM_MEMMAP_PCI_CFG)?"PCI Config": \
                            (((__e__)==MEM_MEMMAP_REGISTER)?"Register": \
                                                            "Unknown Map")))
\end{verbatim}\normalsize 
Evaluate a memory map code to a text string. 

\hypertarget{MEM_8h_a2}{
\index{MEM.h@{MEM.h}!MEM_REGISTER_SET_BYTES@{MEM\_\-REGISTER\_\-SET\_\-BYTES}}
\index{MEM_REGISTER_SET_BYTES@{MEM\_\-REGISTER\_\-SET\_\-BYTES}!MEM.h@{MEM.h}}
\subsubsection[MEM\_\-REGISTER\_\-SET\_\-BYTES]{\setlength{\rightskip}{0pt plus 5cm}\#define MEM\_\-REGISTER\_\-SET\_\-BYTES\ (768)}}
\label{MEM_8h_a2}


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. 

\subsection{Typedef Documentation}
\hypertarget{MEM_8h_a4}{
\index{MEM.h@{MEM.h}!MEM_Memmap@{MEM\_\-Memmap}}
\index{MEM_Memmap@{MEM\_\-Memmap}!MEM.h@{MEM.h}}
\subsubsection[MEM\_\-Memmap]{\setlength{\rightskip}{0pt plus 5cm}\hyperlink{MEM_8h_a4}{MEM\_\-Memmap}}}
\label{MEM_8h_a4}


Typedef for memory map selection. 

Typedef for \_\-MEM\_\-Memmap enumeration. \hypertarget{MEM_8h_a3}{
\index{MEM.h@{MEM.h}!MEM_Status@{MEM\_\-Status}}
\index{MEM_Status@{MEM\_\-Status}!MEM.h@{MEM.h}}
\subsubsection[MEM\_\-Status]{\setlength{\rightskip}{0pt plus 5cm}\hyperlink{MEM_8h_a3}{MEM\_\-Status}}}
\label{MEM_8h_a3}


Typedef for return status of memory functions. 

Type for memory library return status codes. 

\subsection{Enumeration Type Documentation}
\hypertarget{MEM_8h_a11}{
\index{MEM.h@{MEM.h}!_MEM_Memmap@{\_\-MEM\_\-Memmap}}
\index{_MEM_Memmap@{\_\-MEM\_\-Memmap}!MEM.h@{MEM.h}}
\subsubsection[\_\-MEM\_\-Memmap]{\setlength{\rightskip}{0pt plus 5cm}enum \hyperlink{MEM_8h_a11}{\_\-MEM\_\-Memmap}}}
\label{MEM_8h_a11}


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 \char`\"{}holes\char`\"{}, so generic non-aligned bytes access not always allowed. 

\subsection{Function Documentation}
\hypertarget{MEM_8h_a9}{
\index{MEM.h@{MEM.h}!MEM_CreateDescriptor@{MEM\_\-CreateDescriptor}}
\index{MEM_CreateDescriptor@{MEM\_\-CreateDescriptor}!MEM.h@{MEM.h}}
\subsubsection[MEM\_\-CreateDescriptor]{\setlength{\rightskip}{0pt plus 5cm}void MEM\_\-Create\-Descriptor (\hyperlink{struct__MEM__Descriptor}{MEM\_\-Descriptor} $\ast$ {\em md}, const {\em MEM\_\-Memmap}, const {\em caddr\_\-t}, const {\em size\_\-t})}}
\label{MEM_8h_a9}


Create generic memory descriptor. 

\hypertarget{MEM_8h_a10}{
\index{MEM.h@{MEM.h}!MEM_CreateDescriptorFromDumpCommand@{MEM\_\-CreateDescriptorFromDumpCommand}}
\index{MEM_CreateDescriptorFromDumpCommand@{MEM\_\-CreateDescriptorFromDumpCommand}!MEM.h@{MEM.h}}
\subsubsection[MEM\_\-CreateDescriptorFromDumpCommand]{\setlength{\rightskip}{0pt plus 5cm}void MEM\_\-Create\-Descriptor\-From\-Dump\-Command (\hyperlink{struct__MEM__Descriptor}{MEM\_\-Descriptor} $\ast$, const void $\ast$)}}
\label{MEM_8h_a10}


Create memory descriptor from a memory dump command. 

