GLAST/LAT >
DAQ and FSW >
FSW >
Doxygen Index >
VXW / V7-0-3
Constituent: vxw_symbol     Tag: rad750
Interface Data Structures File List Data Fields Globals
ppciMCP.c File Reference
Power PCI bridge MCP (machine check) routines. More...
#include "vxWorks.h"
#include "config.h"
#include "vxLib.h"
#include "intLib.h"
#include "drv/ppci/asmFns.h"
#include "drv/ppci/ppciRegs.h"
#include "drv/ppci/ppciMCP.h"
Include dependency graph for ppciMCP.c:
|
Functions |
int | ppciMCPClear (void) |
| Clear MCP in the Power PCI bridge.
|
STATUS | sysMemProbe (char *adrs, int mode, int length, char *pVal) |
| Safely probe memory addresses.
|
void | ppciMCPInit (void) |
| Initialize PowerPCI bridge MCP related resources.
|
Detailed Description
Power PCI bridge MCP (machine check) routines.
-----------------------------------------------------------------------------
Restrictions:
- Machine check must be enabled in the Power PC MSR and HID0 registers outside of this module.
- The Received Master Abort bit in the PCI core status register must be masked (so that it does not cause an interrupt).
- Machine checks are only cleared as far as the 60X Error Status Register MCP bits. Any other status bits that are set at the time of error generation are left alone (e.g., PCI status reg, other 60X Error Status bits). This leaves a cummulative error history in the various hardware regs.
- The NMI signal is masked such that it does not generate a machine check. The standard VxWorks machine check exception handler suspends the task executing when the machine check occurs. So in order to support NMI, you'd have to either replace the standard handler or figure out how resume the "offending" task.
Change History:
Date Pgm Description -------- --- ------------------------------------------------------ 02/07/00 DS Created.
-----------------------------------------------------------------------------
Function Documentation
int ppciMCPClear |
( |
void |
|
) |
|
|
|
Clear MCP in the Power PCI bridge.
----------------------------------------------------------------------------
This routine clears the conditions generating the machine check signal in the Power PCI bridge by clearing the 60X error status reg.
Note: If at some time in the future it is determined that further action should be taken upon a machine check (e.g., querying and clear other Power PCI error status regs), this is the place to do it.
- Returns:
- The contents of the 60X error status prior to being cleared.
---------------------------------------------------------------------------- |
void ppciMCPInit |
( |
void |
|
) |
|
|
|
Initialize PowerPCI bridge MCP related resources.
----------------------------------------------------------------------------
This routine is called from ppciInit() to initialize the MCP resources.
---------------------------------------------------------------------------- |
STATUS sysMemProbe |
( |
char * |
adrs, |
|
|
int |
mode, |
|
|
int |
length, |
|
|
char * |
pVal |
|
) |
|
|
|
Safely probe memory addresses.
----------------------------------------------------------------------------
This routine is hooked into VxWorks so that it is called by vxMemProbe rather than vxMemArchProbe. The Power PC vxMemArchProbe has a couple shortcomings when it comes to accessing PCI resources:
- On reads, MCP is presented asynchronously. The way vxMemProbeSup and vxMemProbeTrap are implemented, a late MCP causes unpredictable corruption of the system. Also, MCP is not cleared (as the probe routine temporarily replaces the machine check exception handler).
- On writes, the only indication of failure is in the PCI status register, so there's no way VxWorks can detect it. So this routine wraps a call to vxMemArchProbe, disabling machine check and checking the status register for a failed access (read or write).
- Parameters:
-
| adrs | Address to probe. |
| mode | Read (0) or write (1). |
| length | Number of bytes: 1, 2 or 4. |
| pVal | Dest for read, data for write. |
---------------------------------------------------------------------------- |
Generated on Fri Dec 14 02:54:23 2007 by
1.4.4