\hypertarget{SIB_8c}{
\section{SIB.c File Reference}
\label{SIB_8c}\index{SIB.c@{SIB.c}}
}
Function definitions for SIB utility driver.  


{\tt \#include \char`\"{}vx\-Works.h\char`\"{}}\par
{\tt \#include \char`\"{}pci.h\char`\"{}}\par
{\tt \#include \char`\"{}mv2600.h\char`\"{}}\par
{\tt \#include \char`\"{}string.h\char`\"{}}\par
{\tt \#include \char`\"{}drv/pci/pci\-Config\-Lib.h\char`\"{}}\par
{\tt \#include \char`\"{}drv/sib/sib.h\char`\"{}}\par
{\tt \#include \char`\"{}SIB/SIB.h\char`\"{}}\par
{\tt \#include \char`\"{}MSG/MSG\_\-pubdefs.h\char`\"{}}\par


Include dependency graph for SIB.c:\begin{figure}[H]
\begin{center}
\leavevmode
\includegraphics[width=362pt]{SIB_8c__incl}
\end{center}
\end{figure}
\subsection*{Defines}
\begin{CompactItemize}
\item 
\#define \hyperlink{SIB_8c_a0}{SIB\_\-MSG}(\_\-status, \_\-param)\ \_\-msg\_\-report((\_\-status), 0, 1, (\_\-param))
\item 
\#define \hyperlink{SIB_8c_a1}{SIB\_\-NULL\_\-ADDR}\ 0xffffffff
\item 
\#define \hyperlink{SIB_8c_a2}{SIB\_\-SUMT\_\-REG\_\-SIZE}\ 0x80
\end{CompactItemize}
\subsection*{Functions}
\begin{CompactItemize}
\item 
unsigned int \hyperlink{SIB_8c_a3}{SIB\_\-scan} (\hyperlink{struct__SIB__Info}{SIB\_\-Info} $\ast$info)
\item 
unsigned int \hyperlink{SIB_8c_a4}{SIB\_\-query} (\hyperlink{struct__SIB__Info}{SIB\_\-Info} $\ast$info)
\begin{CompactList}\small\item\em Get SIB addressing information. \item\end{CompactList}\end{CompactItemize}


\subsection{Detailed Description}
Function definitions for SIB utility driver. 

\begin{Desc}
\item[Author:]D.L. Wood\end{Desc}


\subsection{Define Documentation}
\hypertarget{SIB_8c_a0}{
\index{SIB.c@{SIB.c}!SIB_MSG@{SIB\_\-MSG}}
\index{SIB_MSG@{SIB\_\-MSG}!SIB.c@{SIB.c}}
\subsubsection[SIB\_\-MSG]{\setlength{\rightskip}{0pt plus 5cm}\#define SIB\_\-MSG(\_\-status, \_\-param)\ \_\-msg\_\-report((\_\-status), 0, 1, (\_\-param))}}
\label{SIB_8c_a0}


Configuration-dependent message signaller. For boot configuration, a no-op. For application configuration, calls MSG\_\-signal().

\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em \_\-status}]The variable holding the status code. \item[{\em \_\-param}]The message specific parameter value. \end{description}
\end{Desc}
\hypertarget{SIB_8c_a1}{
\index{SIB.c@{SIB.c}!SIB_NULL_ADDR@{SIB\_\-NULL\_\-ADDR}}
\index{SIB_NULL_ADDR@{SIB\_\-NULL\_\-ADDR}!SIB.c@{SIB.c}}
\subsubsection[SIB\_\-NULL\_\-ADDR]{\setlength{\rightskip}{0pt plus 5cm}\#define SIB\_\-NULL\_\-ADDR\ 0xffffffff}}
\label{SIB_8c_a1}


A value to use for a missing register address. \hypertarget{SIB_8c_a2}{
\index{SIB.c@{SIB.c}!SIB_SUMT_REG_SIZE@{SIB\_\-SUMT\_\-REG\_\-SIZE}}
\index{SIB_SUMT_REG_SIZE@{SIB\_\-SUMT\_\-REG\_\-SIZE}!SIB.c@{SIB.c}}
\subsubsection[SIB\_\-SUMT\_\-REG\_\-SIZE]{\setlength{\rightskip}{0pt plus 5cm}\#define SIB\_\-SUMT\_\-REG\_\-SIZE\ 0x80}}
\label{SIB_8c_a2}


The size in bytes of the Summit internal register memory space. 

\subsection{Function Documentation}
\hypertarget{SIB_8c_a4}{
\index{SIB.c@{SIB.c}!SIB_query@{SIB\_\-query}}
\index{SIB_query@{SIB\_\-query}!SIB.c@{SIB.c}}
\subsubsection[SIB\_\-query]{\setlength{\rightskip}{0pt plus 5cm}unsigned int SIB\_\-query (\hyperlink{struct__SIB__Info}{SIB\_\-Info} $\ast$ {\em info})}}
\label{SIB_8c_a4}


Get SIB addressing information. 

Obtain the addresses and sizes of the SIB board memory regions and registers. The BSP function pci\-Find\-Device() is used to scan the bus for an SIB board. Both the flight/EM model and evaluation model SIB boards are recognized. This function only supports a single instance of the SIB board on the PCI bus, so the first board found is queried. The {\em info\/} structure is filled in with the SIB hardware values upon success. Because the evaluation model SIB board does not include the PDU/GASU or heater control hardware, those registers are marked with address 0xffffffff.

The addresses which are returned in the {\em info\/} structure are already mapped into CPU local address space and ready for direct use by client drivers. Users should note, however, that the SIB memory regions reside on the little-endian c\-PCI bus and byte ordering must be taken into account on PPC targets.

This function is optimized so that the c\-PCI bus scan is only done on the first call. Thereafter, a cached copy of the \hyperlink{SIB_8h_a0}{SIB\_\-Info} structure is kept.

\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em info}]Pointer to an SIB information structure filled in upon return.\end{description}
\end{Desc}
\begin{Desc}
\item[Returns:]An SIB MSG code.\end{Desc}


Here is the call graph for this function:\begin{figure}[H]
\begin{center}
\leavevmode
\includegraphics[width=104pt]{SIB_8c_a4_cgraph}
\end{center}
\end{figure}
\hypertarget{SIB_8c_a3}{
\index{SIB.c@{SIB.c}!SIB_scan@{SIB\_\-scan}}
\index{SIB_scan@{SIB\_\-scan}!SIB.c@{SIB.c}}
\subsubsection[SIB\_\-scan]{\setlength{\rightskip}{0pt plus 5cm}unsigned int SIB\_\-scan (\hyperlink{struct__SIB__Info}{SIB\_\-Info} $\ast$ {\em info})\hspace{0.3cm}{\tt  \mbox{[}static\mbox{]}}}}
\label{SIB_8c_a3}


Obtain the addresses and sizes of the SIB board memory regions and registers. The BSP function pci\-Find\-Device() is used to scan the bus for an SIB board. The SIB mapping information is taken from the board PCI configuration header, and any addresses are mapped to local CPU addresses.

\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em info}]Pointer to an SIB information structure filled in upon return.\end{description}
\end{Desc}
\begin{Desc}
\item[Returns:]An SIB MSG code.\end{Desc}
