\hypertarget{mempriv_8h}{
\section{mempriv.h File Reference}
\label{mempriv_8h}\index{mempriv.h@{mempriv.h}}
}
Private MEM package definitions.  


{\tt \#include $<$MEM/MEM\_\-map.h$>$}\par
{\tt \#include $<$MSG/MSG\_\-pubdefs.h$>$}\par
\subsection*{Classes}
\begin{CompactItemize}
\item 
struct \hyperlink{struct__mem__mapEntry}{\_\-mem\_\-mapEntry}
\begin{CompactList}\small\item\em Memory map entry. \item\end{CompactList}\end{CompactItemize}
\subsection*{Defines}
\begin{CompactItemize}
\item 
\hypertarget{mempriv_8h_a8cecfc5c5c054d2875c03e77b7be15d}{
\#define \hyperlink{mempriv_8h_a8cecfc5c5c054d2875c03e77b7be15d}{TRUE}~(1)}
\label{mempriv_8h_a8cecfc5c5c054d2875c03e77b7be15d}

\begin{CompactList}\small\item\em Boolean true. \item\end{CompactList}\item 
\hypertarget{mempriv_8h_a93f0eb578d23995850d61f7d61c55c1}{
\#define \hyperlink{mempriv_8h_a93f0eb578d23995850d61f7d61c55c1}{FALSE}~(0)}
\label{mempriv_8h_a93f0eb578d23995850d61f7d61c55c1}

\begin{CompactList}\small\item\em Boolean false. \item\end{CompactList}\item 
\hypertarget{mempriv_8h_3acffbd305ee72dcd4593c0d8af64a4f}{
\#define \hyperlink{mempriv_8h_3acffbd305ee72dcd4593c0d8af64a4f}{MIN}(a, b)~(((a) $<$ (b) ) ? (a) : (b))}
\label{mempriv_8h_3acffbd305ee72dcd4593c0d8af64a4f}

\begin{CompactList}\small\item\em Standard definition for data minimum. \item\end{CompactList}\item 
\hypertarget{mempriv_8h_fa99ec4acc4ecb2dc3c2d05da15d0e3f}{
\#define \hyperlink{mempriv_8h_fa99ec4acc4ecb2dc3c2d05da15d0e3f}{MAX}(a, b)~(((a) $>$ (b) ) ? (a) : (b))}
\label{mempriv_8h_fa99ec4acc4ecb2dc3c2d05da15d0e3f}

\begin{CompactList}\small\item\em Standard definition for data maximum. \item\end{CompactList}\item 
\#define \hyperlink{mempriv_8h_80e190cfa91054f8d5f02a8669eb4d55}{MEM\_\-MSG}(\_\-status,...)~\_\-msg\_\-report ((\_\-status), 0, \_\-\_\-VA\_\-ARGS\_\-\_\-)
\begin{CompactList}\small\item\em MSG signaller. \item\end{CompactList}\end{CompactItemize}
\subsection*{Typedefs}
\begin{CompactItemize}
\item 
\hypertarget{mempriv_8h_a6ae3f031a8cdef89b08e1a4a221d1d4}{
typedef struct \hyperlink{struct__mem__mapEntry}{\_\-mem\_\-mapEntry} \hyperlink{mempriv_8h_a6ae3f031a8cdef89b08e1a4a221d1d4}{mem\_\-mapEntry}}
\label{mempriv_8h_a6ae3f031a8cdef89b08e1a4a221d1d4}

\begin{CompactList}\small\item\em Typedef for struct \hyperlink{struct__mem__mapEntry}{\_\-mem\_\-mapEntry}. \item\end{CompactList}\end{CompactItemize}
\subsection*{Functions}
\begin{CompactItemize}
\item 
unsigned int \hyperlink{mempriv_8h_7cbd73e6cc61830e081fee011f9ae1a1}{Mem\_\-ValidateMemoryRange} (const \hyperlink{struct__MEM__Descriptor}{MEM\_\-Descriptor} $\ast$md, const \hyperlink{MEM__map_8h_2bae3ac52980771990081eae1c7106dd}{MEM\_\-mapAccessType} accessType, const \hyperlink{struct__mem__mapEntry}{mem\_\-mapEntry} $\ast$$\ast$mapEntry)
\begin{CompactList}\small\item\em Validate memory descriptor against memory map table. \item\end{CompactList}\item 
void $\ast$ \hyperlink{mempriv_8h_3588dfdc87c2a26b16360b76b59d8471}{Mem\_\-WriteRegisterSet} (void $\ast$data\_\-p, void $\ast$mask\_\-p)
\begin{CompactList}\small\item\em Write CPU registers. \item\end{CompactList}\end{CompactItemize}


\subsection{Detailed Description}
Private MEM package definitions. 

Interface to functions that are private to the MEM package.



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

\subsection{Define Documentation}
\hypertarget{mempriv_8h_80e190cfa91054f8d5f02a8669eb4d55}{
\index{mempriv.h@{mempriv.h}!MEM\_\-MSG@{MEM\_\-MSG}}
\index{MEM\_\-MSG@{MEM\_\-MSG}!mempriv.h@{mempriv.h}}
\subsubsection[{MEM\_\-MSG}]{\setlength{\rightskip}{0pt plus 5cm}\#define MEM\_\-MSG(\_\-status, \/   {\em ...})~\_\-msg\_\-report ((\_\-status), 0, \_\-\_\-VA\_\-ARGS\_\-\_\-)}}
\label{mempriv_8h_80e190cfa91054f8d5f02a8669eb4d55}


MSG signaller. 

Configuration-dependent message signaller. For boot configuration, returns \_\-status. For application configuration, calls \_\-msg\_\-report().

\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em \_\-status}]The variable holding the status code. \item[{\em ...}]The message specific parameter values. \end{description}
\end{Desc}


Referenced by MEM\_\-CancelDump(), MEM\_\-CreateDescriptorFromDumpCommand(), MEM\_\-dumpGetContext(), MEM\_\-dumpGetData(), MEM\_\-dumpGetInfo(), MEM\_\-dumpReleaseContext(), MEM\_\-dumpStart(), MEM\_\-loadGetContext(), MEM\_\-loadGetInfo(), MEM\_\-loadPktMemory(), MEM\_\-loadPktPci(), MEM\_\-loadPktReg(), MEM\_\-loadReleaseContext(), mem\_\-loadStart(), MEM\_\-loadWrite(), MEM\_\-mapAddEntry(), mem\_\-ValidateDumpDescriptor(), and Mem\_\-ValidateMemoryRange().

\subsection{Function Documentation}
\hypertarget{mempriv_8h_7cbd73e6cc61830e081fee011f9ae1a1}{
\index{mempriv.h@{mempriv.h}!Mem\_\-ValidateMemoryRange@{Mem\_\-ValidateMemoryRange}}
\index{Mem\_\-ValidateMemoryRange@{Mem\_\-ValidateMemoryRange}!mempriv.h@{mempriv.h}}
\subsubsection[{Mem\_\-ValidateMemoryRange}]{\setlength{\rightskip}{0pt plus 5cm}unsigned int Mem\_\-ValidateMemoryRange (const {\bf MEM\_\-Descriptor} $\ast$ {\em md}, \/  const {\bf MEM\_\-mapAccessType} {\em accessType}, \/  const {\bf mem\_\-mapEntry} $\ast$$\ast$ {\em mapEntry})}}
\label{mempriv_8h_7cbd73e6cc61830e081fee011f9ae1a1}


Validate memory descriptor against memory map table. 

This function verifies that a memory descriptor is valid for a given set of access types. Potential access types are specified in {\em accessType\/} as a bitfield. If at least one of the access types specified is legal for the memory descriptor, a handle to the appropriate memory map entry is passed back for future use. If, instead, the caller wants to know if $\ast$all$\ast$ specified access types are valid, then this function must be called once for each type.

\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em md}]Pointer to memory descriptor to be validated. \item[{\em accessType}]Bitfield of types of accesses to validate. \item[{\em mapEntry}]Pointer to location to return map table entry handle.\end{description}
\end{Desc}
\begin{Desc}
\item[Return values:]
\begin{description}
\item[{\em MEM\_\-SUCCESS}]md is OK for accessType. \item[{\em MEM\_\-OUTOFRNG}]md does not fit in any memory map. \item[{\em MEM\_\-BADMAP}]md does not contain a legal memory map type. \item[{\em MEM\_\-BADACC}]accessType is not legal for md.\end{description}
\end{Desc}
This function verifies that a memory descriptor is valid for a given set of access types. Potential access types are specified in {\em accessType\/} as a bitfield. If at least one of the access types specified is legal for the memory descriptor, a handle to the appropriate memory map entry is passed back for future use. If, instead, the caller wants to know if $\ast$all$\ast$ specified access types are valid, then this function must be called once for each type.

\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em md}]Pointer to memory descriptor to be validated. \item[{\em accessType}]Bitfield of types of accesses to validate. \item[{\em mapEntry}]Pointer to location to return map table entry handle.\end{description}
\end{Desc}
\begin{Desc}
\item[Return values:]
\begin{description}
\item[{\em MEM\_\-SUCCESS}]md is OK for accessType. \item[{\em MEM\_\-OUTOFRNG}]md does not fit in any memory map. \item[{\em MEM\_\-BADMAP}]md does not contain a legal memory map type. \item[{\em MEM\_\-BADACC}]accessType is not legal for md. \end{description}
\end{Desc}


References \_\-mem\_\-mapEntry::access\_\-flags, \_\-MEM\_\-Descriptor::addr, \_\-MEM\_\-Descriptor::bytes, DIM, MEM\_\-MAP\_\-ACCESS\_\-16, MEM\_\-MAP\_\-ACCESS\_\-8, MEM\_\-MSG, \_\-MEM\_\-Descriptor::memmap, \_\-mem\_\-mapEntry::num\_\-bytes, and \_\-mem\_\-mapEntry::start\_\-addr.

Referenced by mem\_\-loadStart(), and mem\_\-ValidateDumpDescriptor().\hypertarget{mempriv_8h_3588dfdc87c2a26b16360b76b59d8471}{
\index{mempriv.h@{mempriv.h}!Mem\_\-WriteRegisterSet@{Mem\_\-WriteRegisterSet}}
\index{Mem\_\-WriteRegisterSet@{Mem\_\-WriteRegisterSet}!mempriv.h@{mempriv.h}}
\subsubsection[{Mem\_\-WriteRegisterSet}]{\setlength{\rightskip}{0pt plus 5cm}void $\ast$ Mem\_\-WriteRegisterSet (void $\ast$ {\em data\_\-p}, \/  void $\ast$ {\em mask\_\-p})}}
\label{mempriv_8h_3588dfdc87c2a26b16360b76b59d8471}


Write CPU registers. 

Writes a subset of the CPU registers.

\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em data\_\-p}]Pointer to array of data values to write. \item[{\em mask\_\-p}]Pointer to array of mask values to apply to the data.\end{description}
\end{Desc}
\begin{Desc}
\item[Returns:]Sum of {\em data\_\-p\/} and the number of bytes written. \end{Desc}
