\hypertarget{memdump_8c}{
\section{memdump.c File Reference}
\label{memdump_8c}\index{memdump.c@{memdump.c}}
}
Memory Dump functions.  


{\tt \#include $<$string.h$>$}\par
{\tt \#include $<$MEM/MEM\_\-cmddefs.h$>$}\par
{\tt \#include $<$MEM/MEM\_\-dump.h$>$}\par
{\tt \#include $<$MEM/MEM\_\-msgs.h$>$}\par
{\tt \#include $<$MSG/MSG\_\-pubdefs.h$>$}\par
{\tt \#include $<$mempriv.h$>$}\par
{\tt \#include $<$PBS/MBA.h$>$}\par
\subsection*{Classes}
\begin{CompactItemize}
\item 
union \hyperlink{union__mem__DumpSnap}{\_\-mem\_\-DumpSnap}
\begin{CompactList}\small\item\em Memory Dump snapshot. \item\end{CompactList}\item 
struct \hyperlink{struct__mem__DumpContext}{\_\-mem\_\-DumpContext}
\begin{CompactList}\small\item\em Memory Dump context. \item\end{CompactList}\end{CompactItemize}
\subsection*{Defines}
\begin{CompactItemize}
\item 
\hypertarget{memdump_8c_beaaa2f40f901823fe4d52f02d1d62ea}{
\#define \hyperlink{memdump_8c_beaaa2f40f901823fe4d52f02d1d62ea}{MEM\_\-DUMP\_\-KEY\_\-VALID}~(0x235689ab)}
\label{memdump_8c_beaaa2f40f901823fe4d52f02d1d62ea}

\begin{CompactList}\small\item\em Dump info 'valid' key value. \item\end{CompactList}\end{CompactItemize}
\subsection*{Typedefs}
\begin{CompactItemize}
\item 
typedef union \hyperlink{union__mem__DumpSnap}{\_\-mem\_\-DumpSnap} \hyperlink{memdump_8c_627d22b1475ff974547e97581d5eab74}{mem\_\-DumpSnap}
\begin{CompactList}\small\item\em Typedef for \hyperlink{union__mem__DumpSnap}{\_\-mem\_\-DumpSnap}. \item\end{CompactList}\item 
typedef struct \hyperlink{struct__mem__DumpContext}{\_\-mem\_\-DumpContext} \hyperlink{memdump_8c_c3073ce224fe8f0aa50ace4fc44e8789}{mem\_\-DumpContext}
\begin{CompactList}\small\item\em Typedef for \hyperlink{struct__mem__DumpContext}{\_\-mem\_\-DumpContext}. \item\end{CompactList}\end{CompactItemize}
\subsection*{Functions}
\begin{CompactItemize}
\item 
static void $\ast$ \hyperlink{memdump_8c_30ad26344cd9e0d035453cd75d0185b4}{Mem\_\-GatherRegisterSet} (void $\ast$ptr)
\begin{CompactList}\small\item\em Gather CPU register info. \item\end{CompactList}\item 
static void $\ast$ \hyperlink{memdump_8c_655a89738aed9ec576bf5b25944a1cd5}{Mem\_\-GatherPciHeader} (unsigned char $\ast$dest\_\-p, \hyperlink{struct__MEM__Descriptor}{MEM\_\-Descriptor} $\ast$md\_\-p)
\begin{CompactList}\small\item\em Gather PCI device header info. \item\end{CompactList}\item 
static unsigned int \hyperlink{memdump_8c_2e2d6a2566799a7a903cf8a372f928dd}{mem\_\-dumpCheckHandle} (const \hyperlink{MEM__dump_8h_23ed1c249b298b17be5104192fae3e62}{MEM\_\-DumpHandle} handle, \hyperlink{struct__mem__DumpContext}{mem\_\-DumpContext} $\ast$$\ast$context\_\-pp)
\begin{CompactList}\small\item\em Validate a Memory Dump context handle. \item\end{CompactList}\item 
static unsigned int \hyperlink{memdump_8c_ee7a0cbfdf2bfadc7ed05571b2bea341}{mem\_\-dumpUpdateStatus} (\hyperlink{struct__mem__DumpContext}{mem\_\-DumpContext} $\ast$context\_\-p, const unsigned int status)
\begin{CompactList}\small\item\em Update dump context status. \item\end{CompactList}\item 
static unsigned int \hyperlink{memdump_8c_42962730925e0e46a85eed31e1f1625b}{mem\_\-dumpResetContext} (\hyperlink{struct__mem__DumpContext}{mem\_\-DumpContext} $\ast$context\_\-p)
\begin{CompactList}\small\item\em Reset the state of a dump context. \item\end{CompactList}\item 
unsigned int \hyperlink{memdump_8c_368be6f8c7e06b0a1c290441ff2d98c4}{MEM\_\-dumpInit} (void)
\begin{CompactList}\small\item\em Start the Memory Dump system. \item\end{CompactList}\item 
\hyperlink{MEM_8h_2769b3c7b72f3c6e7562ee4b91bb17f1}{MEM\_\-Status} \hyperlink{memdump_8c_b5df896e08ca5a25bf406d11a44de4dd}{mem\_\-ValidateDumpDescriptor} (const \hyperlink{struct__MEM__Descriptor}{MEM\_\-Descriptor} $\ast$md, const \hyperlink{struct__mem__mapEntry}{mem\_\-mapEntry} $\ast$$\ast$mapEntry)
\begin{CompactList}\small\item\em Validate arguments for memory dump. \item\end{CompactList}\item 
unsigned int \hyperlink{memdump_8c_7be4a810088ef3d02c210b32fc010e4f}{MEM\_\-dumpGetContext} (\hyperlink{MEM__dump_8h_23ed1c249b298b17be5104192fae3e62}{MEM\_\-DumpHandle} $\ast$handle\_\-p)
\begin{CompactList}\small\item\em Allocate a Memory Dump context. \item\end{CompactList}\item 
unsigned int \hyperlink{memdump_8c_75c6604751f15e63384b470625839e5c}{MEM\_\-dumpReleaseContext} (\hyperlink{MEM__dump_8h_23ed1c249b298b17be5104192fae3e62}{MEM\_\-DumpHandle} handle)
\begin{CompactList}\small\item\em Release a Memory Dump context. \item\end{CompactList}\item 
unsigned int \hyperlink{memdump_8c_ab1298cafdcda22d8ee3d633e3b86e6e}{MEM\_\-dumpStart} (\hyperlink{MEM__dump_8h_23ed1c249b298b17be5104192fae3e62}{MEM\_\-DumpHandle} handle, const \hyperlink{struct__MEM__Descriptor}{MEM\_\-Descriptor} $\ast$md\_\-p)
\item 
unsigned int \hyperlink{memdump_8c_11f9e6dedd75a96a44bfd1223ab4238e}{MEM\_\-CancelDump} (\hyperlink{MEM__dump_8h_23ed1c249b298b17be5104192fae3e62}{MEM\_\-DumpHandle} handle)
\begin{CompactList}\small\item\em Cancel a Memory Dump operation. \item\end{CompactList}\item 
unsigned int \hyperlink{memdump_8c_4ac9b8d75006b4eba57d4d40a0887a3f}{MEM\_\-dumpGetInfo} (const \hyperlink{MEM__dump_8h_23ed1c249b298b17be5104192fae3e62}{MEM\_\-DumpHandle} handle, \hyperlink{struct__MEM__DumpInfo}{MEM\_\-DumpInfo} $\ast$info\_\-p)
\begin{CompactList}\small\item\em Get detailed information about a Memory Dump context. \item\end{CompactList}\item 
unsigned int \hyperlink{memdump_8c_6b360b2068fe43717bfc3fa537b52327}{MEM\_\-dumpGetData} (\hyperlink{MEM__dump_8h_23ed1c249b298b17be5104192fae3e62}{MEM\_\-DumpHandle} handle, size\_\-t req\_\-bytes, caddr\_\-t $\ast$addr\_\-p, size\_\-t $\ast$act\_\-bytes\_\-p, void $\ast$dest\_\-p)
\begin{CompactList}\small\item\em Read data for a Memory Dump operation. \item\end{CompactList}\end{CompactItemize}


\subsection{Detailed Description}
Memory Dump functions. 

These functions handle Memory Dump telecommands and the resulting dump operations.



\footnotesize\begin{verbatim}
  CVS $Id: memdump.c,v 1.21 2011/03/29 01:58:53 apw Exp $
  \end{verbatim}
\normalsize
 

\subsection{Typedef Documentation}
\hypertarget{memdump_8c_c3073ce224fe8f0aa50ace4fc44e8789}{
\index{memdump.c@{memdump.c}!mem\_\-DumpContext@{mem\_\-DumpContext}}
\index{mem\_\-DumpContext@{mem\_\-DumpContext}!memdump.c@{memdump.c}}
\subsubsection[{mem\_\-DumpContext}]{\setlength{\rightskip}{0pt plus 5cm}{\bf mem\_\-DumpContext}}}
\label{memdump_8c_c3073ce224fe8f0aa50ace4fc44e8789}


Typedef for \hyperlink{struct__mem__DumpContext}{\_\-mem\_\-DumpContext}. 

The typedef for \hyperlink{struct__mem__DumpContext}{\_\-mem\_\-DumpContext}. \hypertarget{memdump_8c_627d22b1475ff974547e97581d5eab74}{
\index{memdump.c@{memdump.c}!mem\_\-DumpSnap@{mem\_\-DumpSnap}}
\index{mem\_\-DumpSnap@{mem\_\-DumpSnap}!memdump.c@{memdump.c}}
\subsubsection[{mem\_\-DumpSnap}]{\setlength{\rightskip}{0pt plus 5cm}{\bf mem\_\-DumpSnap}}}
\label{memdump_8c_627d22b1475ff974547e97581d5eab74}


Typedef for \hyperlink{union__mem__DumpSnap}{\_\-mem\_\-DumpSnap}. 

The typedef for \hyperlink{union__mem__DumpSnap}{\_\-mem\_\-DumpSnap}. 

\subsection{Function Documentation}
\hypertarget{memdump_8c_11f9e6dedd75a96a44bfd1223ab4238e}{
\index{memdump.c@{memdump.c}!MEM\_\-CancelDump@{MEM\_\-CancelDump}}
\index{MEM\_\-CancelDump@{MEM\_\-CancelDump}!memdump.c@{memdump.c}}
\subsubsection[{MEM\_\-CancelDump}]{\setlength{\rightskip}{0pt plus 5cm}unsigned int MEM\_\-CancelDump ({\bf MEM\_\-DumpHandle} {\em handle})}}
\label{memdump_8c_11f9e6dedd75a96a44bfd1223ab4238e}


Cancel a Memory Dump operation. 

\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em handle}]Handle for dump context.\end{description}
\end{Desc}
\begin{Desc}
\item[Returns:]A MEM MSG code. \end{Desc}


References \_\-MEM\_\-Descriptor::addr, \_\-mem\_\-DumpContext::currentAddr, FALSE, \_\-mem\_\-DumpContext::md, mem\_\-dumpCheckHandle(), mem\_\-dumpUpdateStatus(), MEM\_\-MSG, and \_\-mem\_\-DumpContext::wrapped.\hypertarget{memdump_8c_2e2d6a2566799a7a903cf8a372f928dd}{
\index{memdump.c@{memdump.c}!mem\_\-dumpCheckHandle@{mem\_\-dumpCheckHandle}}
\index{mem\_\-dumpCheckHandle@{mem\_\-dumpCheckHandle}!memdump.c@{memdump.c}}
\subsubsection[{mem\_\-dumpCheckHandle}]{\setlength{\rightskip}{0pt plus 5cm}unsigned int mem\_\-dumpCheckHandle (const {\bf MEM\_\-DumpHandle} {\em handle}, \/  {\bf mem\_\-DumpContext} $\ast$$\ast$ {\em context\_\-pp})\hspace{0.3cm}{\tt  \mbox{[}static\mbox{]}}}}
\label{memdump_8c_2e2d6a2566799a7a903cf8a372f928dd}


Validate a Memory Dump context handle. 

Validate a Memory Dump context handle and return a pointer to the corresponding context.

\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em handle}]Handle for the context. \item[{\em context\_\-pp}]Pointer to location to return context pointer.\end{description}
\end{Desc}
\begin{Desc}
\item[Returns:]A MEM MSG code. \end{Desc}


References MEM\_\-DUMP\_\-KEY\_\-VALID, and \_\-mem\_\-DumpContext::valid\_\-key.

Referenced by MEM\_\-CancelDump(), MEM\_\-dumpGetData(), MEM\_\-dumpGetInfo(), MEM\_\-dumpReleaseContext(), and MEM\_\-dumpStart().\hypertarget{memdump_8c_7be4a810088ef3d02c210b32fc010e4f}{
\index{memdump.c@{memdump.c}!MEM\_\-dumpGetContext@{MEM\_\-dumpGetContext}}
\index{MEM\_\-dumpGetContext@{MEM\_\-dumpGetContext}!memdump.c@{memdump.c}}
\subsubsection[{MEM\_\-dumpGetContext}]{\setlength{\rightskip}{0pt plus 5cm}unsigned int MEM\_\-dumpGetContext ({\bf MEM\_\-DumpHandle} $\ast$ {\em handle\_\-p})}}
\label{memdump_8c_7be4a810088ef3d02c210b32fc010e4f}


Allocate a Memory Dump context. 

Allocate a Memory Dump context. This is analogous to a constructor for a context. This function returns only a handle to a context. The details of the context are hidden from the user. The \hyperlink{MEM__dump_8h_4ac9b8d75006b4eba57d4d40a0887a3f}{MEM\_\-dumpGetInfo()} function can be used to get detailed information about the context.

\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em handle\_\-p}]Pointer to location to return context handle.\end{description}
\end{Desc}
\begin{Desc}
\item[Returns:]A MEM MSG code. \end{Desc}


References MEM\_\-DUMP\_\-KEY\_\-VALID, mem\_\-dumpResetContext(), mem\_\-dumpUpdateStatus(), and MEM\_\-MSG.\hypertarget{memdump_8c_6b360b2068fe43717bfc3fa537b52327}{
\index{memdump.c@{memdump.c}!MEM\_\-dumpGetData@{MEM\_\-dumpGetData}}
\index{MEM\_\-dumpGetData@{MEM\_\-dumpGetData}!memdump.c@{memdump.c}}
\subsubsection[{MEM\_\-dumpGetData}]{\setlength{\rightskip}{0pt plus 5cm}unsigned int MEM\_\-dumpGetData ({\bf MEM\_\-DumpHandle} {\em handle}, \/  size\_\-t {\em req\_\-bytes}, \/  caddr\_\-t $\ast$ {\em addr\_\-p}, \/  size\_\-t $\ast$ {\em act\_\-bytes\_\-p}, \/  void $\ast$ {\em dest\_\-p})}}
\label{memdump_8c_6b360b2068fe43717bfc3fa537b52327}


Read data for a Memory Dump operation. 

Read a chunk of data for the specified Memory Dump context. This function should be called repeatedly until all the data associated with the context has been dumped. It returns the address from which the dumped data was read and the actual number of bytes dumped (which may be less than the number of bytes requested).

\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em handle}]Handle for dump context. \item[{\em req\_\-bytes}]Amount of data to dump, in bytes. \item[{\em addr\_\-p}]Pointer to location to return address of dumped data. \item[{\em act\_\-bytes\_\-p}]Pointer to location to return num bytes dumped. \item[{\em dest\_\-p}]Pointer to location to store dumped data.\end{description}
\end{Desc}
\begin{Desc}
\item[Returns:]A MEM MSG code. \end{Desc}


References \_\-MEM\_\-Descriptor::addr, \_\-MEM\_\-Descriptor::bytes, \_\-mem\_\-DumpContext::cb\_\-ptr, \_\-mem\_\-DumpContext::currentAddr, \_\-mem\_\-DumpContext::mapEntry, \_\-mem\_\-DumpContext::md, mem\_\-dumpCheckHandle(), mem\_\-dumpUpdateStatus(), MEM\_\-MSG, \_\-MEM\_\-Descriptor::memmap, \_\-mem\_\-mapEntry::read\_\-cb, and \_\-mem\_\-DumpContext::wrapped.\hypertarget{memdump_8c_4ac9b8d75006b4eba57d4d40a0887a3f}{
\index{memdump.c@{memdump.c}!MEM\_\-dumpGetInfo@{MEM\_\-dumpGetInfo}}
\index{MEM\_\-dumpGetInfo@{MEM\_\-dumpGetInfo}!memdump.c@{memdump.c}}
\subsubsection[{MEM\_\-dumpGetInfo}]{\setlength{\rightskip}{0pt plus 5cm}unsigned int MEM\_\-dumpGetInfo (const {\bf MEM\_\-DumpHandle} {\em handle}, \/  {\bf MEM\_\-DumpInfo} $\ast$ {\em info\_\-p})}}
\label{memdump_8c_4ac9b8d75006b4eba57d4d40a0887a3f}


Get detailed information about a Memory Dump context. 

Get information about a Memory Dump context. The information returned is a subset of the context details that are normally hidden from the user.

\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em handle}]Handle for context. \item[{\em info\_\-p}]Pointer to location to return context info.\end{description}
\end{Desc}
\begin{Desc}
\item[Returns:]A MEM MSG code. \end{Desc}


References \_\-MEM\_\-DumpInfo::current\_\-addr, \_\-mem\_\-DumpContext::currentAddr, \_\-mem\_\-DumpContext::md, \_\-MEM\_\-DumpInfo::md, mem\_\-dumpCheckHandle(), MEM\_\-MSG, \_\-mem\_\-DumpContext::status, \_\-MEM\_\-DumpInfo::status, \_\-mem\_\-DumpContext::wrapped, and \_\-MEM\_\-DumpInfo::wrapped.\hypertarget{memdump_8c_368be6f8c7e06b0a1c290441ff2d98c4}{
\index{memdump.c@{memdump.c}!MEM\_\-dumpInit@{MEM\_\-dumpInit}}
\index{MEM\_\-dumpInit@{MEM\_\-dumpInit}!memdump.c@{memdump.c}}
\subsubsection[{MEM\_\-dumpInit}]{\setlength{\rightskip}{0pt plus 5cm}unsigned int MEM\_\-dumpInit (void)}}
\label{memdump_8c_368be6f8c7e06b0a1c290441ff2d98c4}


Start the Memory Dump system. 

Start the Memory Dump system. This function should be called once to initialize the internal state associated with the Memory Dump telecommand handler.

\begin{Desc}
\item[Returns:]A MEM MSG code. \end{Desc}
\hypertarget{memdump_8c_75c6604751f15e63384b470625839e5c}{
\index{memdump.c@{memdump.c}!MEM\_\-dumpReleaseContext@{MEM\_\-dumpReleaseContext}}
\index{MEM\_\-dumpReleaseContext@{MEM\_\-dumpReleaseContext}!memdump.c@{memdump.c}}
\subsubsection[{MEM\_\-dumpReleaseContext}]{\setlength{\rightskip}{0pt plus 5cm}unsigned int MEM\_\-dumpReleaseContext ({\bf MEM\_\-DumpHandle} {\em handle})}}
\label{memdump_8c_75c6604751f15e63384b470625839e5c}


Release a Memory Dump context. 

Release a Memory Dump context so that the memory associated to it can be re-allocated. This is analogous to a destructor for a context.

\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em handle}]Handle for context to release.\end{description}
\end{Desc}
\begin{Desc}
\item[Returns:]A MEM MSG code. \end{Desc}


References mem\_\-dumpCheckHandle(), and MEM\_\-MSG.\hypertarget{memdump_8c_42962730925e0e46a85eed31e1f1625b}{
\index{memdump.c@{memdump.c}!mem\_\-dumpResetContext@{mem\_\-dumpResetContext}}
\index{mem\_\-dumpResetContext@{mem\_\-dumpResetContext}!memdump.c@{memdump.c}}
\subsubsection[{mem\_\-dumpResetContext}]{\setlength{\rightskip}{0pt plus 5cm}unsigned int mem\_\-dumpResetContext ({\bf mem\_\-DumpContext} $\ast$ {\em context\_\-p})\hspace{0.3cm}{\tt  \mbox{[}static\mbox{]}}}}
\label{memdump_8c_42962730925e0e46a85eed31e1f1625b}


Reset the state of a dump context. 

Reset the state of a dump context.

\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em context\_\-p}]Pointer to dump context.\end{description}
\end{Desc}
\begin{Desc}
\item[Returns:]A MEM MSG code. \end{Desc}


References MEM\_\-DUMP\_\-KEY\_\-VALID, and \_\-mem\_\-DumpContext::valid\_\-key.

Referenced by MEM\_\-dumpGetContext(), and MEM\_\-dumpStart().\hypertarget{memdump_8c_ab1298cafdcda22d8ee3d633e3b86e6e}{
\index{memdump.c@{memdump.c}!MEM\_\-dumpStart@{MEM\_\-dumpStart}}
\index{MEM\_\-dumpStart@{MEM\_\-dumpStart}!memdump.c@{memdump.c}}
\subsubsection[{MEM\_\-dumpStart}]{\setlength{\rightskip}{0pt plus 5cm}unsigned int MEM\_\-dumpStart ({\bf MEM\_\-DumpHandle} {\em handle}, \/  const {\bf MEM\_\-Descriptor} $\ast$ {\em md\_\-p})}}
\label{memdump_8c_ab1298cafdcda22d8ee3d633e3b86e6e}


Start a Memory Dump operation. Updates the Memory Dump context to reflect the start of a dump operation.

\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em handle}]Handle for dump context. \item[{\em md\_\-p}]Pointer to dump memory descriptor.\end{description}
\end{Desc}
\begin{Desc}
\item[Returns:]A MEM MSG code. \end{Desc}


References \_\-MEM\_\-Descriptor::addr, \_\-mem\_\-DumpContext::cb\_\-ptr, \_\-mem\_\-mapEntry::context\_\-p, \_\-mem\_\-DumpContext::currentAddr, \_\-mem\_\-DumpContext::mapEntry, \_\-mem\_\-DumpContext::md, mem\_\-dumpCheckHandle(), mem\_\-dumpResetContext(), mem\_\-dumpUpdateStatus(), Mem\_\-GatherPciHeader(), Mem\_\-GatherRegisterSet(), MEM\_\-MSG, mem\_\-ValidateDumpDescriptor(), \_\-MEM\_\-Descriptor::memmap, \_\-mem\_\-DumpSnap::pci, \_\-mem\_\-DumpSnap::reg, \_\-mem\_\-DumpContext::values, \_\-MEM\_\-Descriptor::words, and \_\-mem\_\-DumpContext::wrapped.\hypertarget{memdump_8c_ee7a0cbfdf2bfadc7ed05571b2bea341}{
\index{memdump.c@{memdump.c}!mem\_\-dumpUpdateStatus@{mem\_\-dumpUpdateStatus}}
\index{mem\_\-dumpUpdateStatus@{mem\_\-dumpUpdateStatus}!memdump.c@{memdump.c}}
\subsubsection[{mem\_\-dumpUpdateStatus}]{\setlength{\rightskip}{0pt plus 5cm}unsigned int mem\_\-dumpUpdateStatus ({\bf mem\_\-DumpContext} $\ast$ {\em context\_\-p}, \/  const unsigned int {\em status})\hspace{0.3cm}{\tt  \mbox{[}static\mbox{]}}}}
\label{memdump_8c_ee7a0cbfdf2bfadc7ed05571b2bea341}


Update dump context status. 

Update a dump context with the specified status.

\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em context\_\-p}]Pointer to dump context. \item[{\em status}]Most recent function status.\end{description}
\end{Desc}
\begin{Desc}
\item[Returns:]A MEM MSG code. \end{Desc}


References \_\-mem\_\-DumpContext::status.

Referenced by MEM\_\-CancelDump(), MEM\_\-dumpGetContext(), MEM\_\-dumpGetData(), and MEM\_\-dumpStart().\hypertarget{memdump_8c_655a89738aed9ec576bf5b25944a1cd5}{
\index{memdump.c@{memdump.c}!Mem\_\-GatherPciHeader@{Mem\_\-GatherPciHeader}}
\index{Mem\_\-GatherPciHeader@{Mem\_\-GatherPciHeader}!memdump.c@{memdump.c}}
\subsubsection[{Mem\_\-GatherPciHeader}]{\setlength{\rightskip}{0pt plus 5cm}void $\ast$ Mem\_\-GatherPciHeader (unsigned char $\ast$ {\em dest\_\-p}, \/  {\bf MEM\_\-Descriptor} $\ast$ {\em md\_\-p})\hspace{0.3cm}{\tt  \mbox{[}static\mbox{]}}}}
\label{memdump_8c_655a89738aed9ec576bf5b25944a1cd5}


Gather PCI device header info. 

Get a PCI Device Header dump and store it at the location defined by {\em dest\_\-p\/}. Returns the sum of {\em dest\_\-p\/} and the number of bytes used to dump the PCI device header.

\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em dest\_\-p}]Pointer to location to store PCI device header dump. \item[{\em md\_\-p}]Pointer to memory descriptor containing PCI address.\end{description}
\end{Desc}
\begin{Desc}
\item[Returns:]Sum of dest\_\-p and number of bytes used by PCI device header dump. \end{Desc}


References \_\-MEM\_\-Descriptor::addr, and MEM\_\-PCI\_\-CONFIG\_\-BYTES.

Referenced by MEM\_\-dumpStart().\hypertarget{memdump_8c_30ad26344cd9e0d035453cd75d0185b4}{
\index{memdump.c@{memdump.c}!Mem\_\-GatherRegisterSet@{Mem\_\-GatherRegisterSet}}
\index{Mem\_\-GatherRegisterSet@{Mem\_\-GatherRegisterSet}!memdump.c@{memdump.c}}
\subsubsection[{Mem\_\-GatherRegisterSet}]{\setlength{\rightskip}{0pt plus 5cm}void $\ast$ Mem\_\-GatherRegisterSet (void $\ast$ {\em ptr})\hspace{0.3cm}{\tt  \mbox{[}static\mbox{]}}}}
\label{memdump_8c_30ad26344cd9e0d035453cd75d0185b4}


Gather CPU register info. 

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

\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em ptr}]Pointer to location to store register dump.\end{description}
\end{Desc}
\begin{Desc}
\item[Returns:]Sum of ptr and number of bytes used by register dump. \end{Desc}


Referenced by MEM\_\-dumpStart().\hypertarget{memdump_8c_b5df896e08ca5a25bf406d11a44de4dd}{
\index{memdump.c@{memdump.c}!mem\_\-ValidateDumpDescriptor@{mem\_\-ValidateDumpDescriptor}}
\index{mem\_\-ValidateDumpDescriptor@{mem\_\-ValidateDumpDescriptor}!memdump.c@{memdump.c}}
\subsubsection[{mem\_\-ValidateDumpDescriptor}]{\setlength{\rightskip}{0pt plus 5cm}{\bf MEM\_\-Status} mem\_\-ValidateDumpDescriptor (const {\bf MEM\_\-Descriptor} $\ast$ {\em md}, \/  const {\bf mem\_\-mapEntry} $\ast$$\ast$ {\em mapEntry})}}
\label{memdump_8c_b5df896e08ca5a25bf406d11a44de4dd}


Validate arguments for memory dump. 

The code determines if a memory descriptor is valid and appropriate for a memory dump (a valid memory descriptor does not infer that it is valid for a dump operation). The address and range of the memory descriptor are checked against the memory map to ensure that the operation is valid.

This function also returns a pointer to the matching memory map entry when MEM\_\-SUCCESS is returned.

\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em md}]Memory descriptor to validate. \item[{\em mapEntry}]Pointer to location to store matching memory map entry pointer. Only valid as a return value if MEM\_\-SUCESS is returned. \end{description}
\end{Desc}
\begin{Desc}
\item[Return values:]
\begin{description}
\item[{\em MEM\_\-SUCESS}]Memory descriptor valid for dump and mapEntry valid. \item[{\em MEM\_\-BADMAP}]Memory map in descriptor not valid for memory dump. \item[{\em MEM\_\-OUTOFRNG}]Address and/or size out of range for dump. \item[{\em MEM\_\-BADACC}]Memory descriptor not readable or not properly 32-bit aligned. \item[{\em MEM\_\-UNKNOWN}]Coding error encountered. \end{description}
\end{Desc}


References \_\-MEM\_\-Descriptor::addr, MEM\_\-MAP\_\-ACCESS\_\-READ\_\-32, MEM\_\-MSG, Mem\_\-ValidateMemoryRange(), \_\-MEM\_\-Descriptor::memmap, and \_\-MEM\_\-Descriptor::words.

Referenced by MEM\_\-dumpStart().