Home | History | Annotate | Line # | Download | only in include
logout.h revision 1.2
      1  1.2  thorpej /* $NetBSD: logout.h,v 1.2 2000/06/08 03:10:06 thorpej Exp $ */
      2  1.1   mjacob 
      3  1.1   mjacob /*
      4  1.1   mjacob  * Copyright (c) 1998 by Matthew Jacob
      5  1.1   mjacob  * NASA AMES Research Center.
      6  1.1   mjacob  * All rights reserved.
      7  1.1   mjacob  *
      8  1.1   mjacob  * Redistribution and use in source and binary forms, with or without
      9  1.1   mjacob  * modification, are permitted provided that the following conditions
     10  1.1   mjacob  * are met:
     11  1.1   mjacob  * 1. Redistributions of source code must retain the above copyright
     12  1.1   mjacob  *    notice immediately at the beginning of the file, without modification,
     13  1.1   mjacob  *    this list of conditions, and the following disclaimer.
     14  1.1   mjacob  * 2. Redistributions in binary form must reproduce the above copyright
     15  1.1   mjacob  *    notice, this list of conditions and the following disclaimer in the
     16  1.1   mjacob  *    documentation and/or other materials provided with the distribution.
     17  1.1   mjacob  * 3. The name of the author may not be used to endorse or promote products
     18  1.1   mjacob  *    derived from this software without specific prior written permission.
     19  1.1   mjacob  *
     20  1.1   mjacob  * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
     21  1.1   mjacob  * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
     22  1.1   mjacob  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
     23  1.1   mjacob  * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE FOR
     24  1.1   mjacob  * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
     25  1.1   mjacob  * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
     26  1.1   mjacob  * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
     27  1.1   mjacob  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
     28  1.1   mjacob  * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
     29  1.1   mjacob  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
     30  1.1   mjacob  * SUCH DAMAGE.
     31  1.1   mjacob  */
     32  1.1   mjacob 
     33  1.1   mjacob /*
     34  1.1   mjacob  * Various Alpha OSF/1 PAL Logout error defintions.
     35  1.1   mjacob  */
     36  1.1   mjacob 
     37  1.1   mjacob /*
     38  1.1   mjacob  * Information gathered from: OSF/1 header files.
     39  1.1   mjacob  */
     40  1.1   mjacob 
     41  1.1   mjacob 
     42  1.1   mjacob /*
     43  1.1   mjacob  * EV5 Specific OSF/1 Pal Code Exception Logout Area Definitions
     44  1.1   mjacob  * (inspired from OSF/1 Header files).
     45  1.1   mjacob  */
     46  1.1   mjacob 
     47  1.1   mjacob /*
     48  1.1   mjacob  * EV5 Specific common logout frame header.
     49  1.1   mjacob  * *Almost* identical to the generic logout header listed in alpha_cpu.h.
     50  1.1   mjacob  */
     51  1.1   mjacob 
     52  1.1   mjacob typedef struct {
     53  1.1   mjacob 	unsigned int	la_frame_size;		/* frame size */
     54  1.1   mjacob 	unsigned int	la_flags;		/* flags; see alpha_cpu.h */
     55  1.1   mjacob 	unsigned int	la_cpu_offset;		/* offset to cpu area */
     56  1.1   mjacob 	unsigned int	la_system_offset;	/* offset to system area */
     57  1.1   mjacob 	unsigned long	mcheck_code;		/* machine check code */
     58  1.1   mjacob } mc_hdr_ev5;
     59  1.1   mjacob 
     60  1.1   mjacob /* Machine Check Codes */
     61  1.1   mjacob #define	EV5_CORRECTED		0x86L
     62  1.1   mjacob #define	SYSTEM_CORRECTED	0x201L
     63  1.1   mjacob 
     64  1.1   mjacob /*
     65  1.1   mjacob  * EV5 Specific Machine Check logout frame for uncorrectable errors.
     66  1.1   mjacob  * This is used to log uncorrectable errors such as double bit ECC errors.
     67  1.1   mjacob  *
     68  1.1   mjacob  * This typically resides in the cpu offset area of the logout frame.
     69  1.1   mjacob  */
     70  1.1   mjacob 
     71  1.1   mjacob typedef struct {
     72  1.1   mjacob 	u_int64_t	shadow[8];	/* Shadow reg. 8-14, 25		*/
     73  1.1   mjacob 	u_int64_t	paltemp[24];	/* PAL TEMP REGS.		*/
     74  1.1   mjacob 	u_int64_t	exc_addr;	/* Address of excepting ins.	*/
     75  1.1   mjacob 	u_int64_t	exc_sum;	/* Summary of arithmetic traps.	*/
     76  1.1   mjacob 	u_int64_t	exc_mask;	/* Exception mask.		*/
     77  1.1   mjacob 	u_int64_t	pal_base;	/* Base address for PALcode.	*/
     78  1.1   mjacob 	u_int64_t	isr;		/* Interrupt Status Reg.	*/
     79  1.1   mjacob 	u_int64_t	icsr;		/* CURRENT SETUP OF EV5 IBOX	*/
     80  1.1   mjacob 	u_int64_t	ic_perr_stat;	/*
     81  1.1   mjacob 					 * I-CACHE Reg:
     82  1.1   mjacob 					 *	<13> IBOX Timeout
     83  1.1   mjacob 					 *	<12> TAG parity
     84  1.1   mjacob 					 *	<11> Data parity
     85  1.1   mjacob 					 */
     86  1.1   mjacob 	u_int64_t	dc_perr_stat;	/* D-CACHE error Reg:
     87  1.1   mjacob 					 * Bits set to 1:
     88  1.1   mjacob 					 *  <2> Data error in bank 0
     89  1.1   mjacob 					 *  <3> Data error in bank 1
     90  1.1   mjacob 					 *  <4> Tag error in bank 0
     91  1.1   mjacob 					 *  <5> Tag error in bank 1
     92  1.1   mjacob 					 */
     93  1.1   mjacob 	u_int64_t	va;		/* Effective VA of fault or miss. */
     94  1.1   mjacob 	u_int64_t	mm_stat;	/*
     95  1.1   mjacob 					 * Holds the reason for D-stream
     96  1.1   mjacob 					 * fault or D-cache parity errors
     97  1.1   mjacob 					 */
     98  1.1   mjacob 	u_int64_t	sc_addr;	/*
     99  1.1   mjacob 					 * Address that was being accessed
    100  1.1   mjacob 					 * when EV5 detected Secondary cache
    101  1.1   mjacob 					 * failure.
    102  1.1   mjacob 					 */
    103  1.1   mjacob 	u_int64_t	sc_stat;	/*
    104  1.1   mjacob 					 * Helps determine if the error was
    105  1.1   mjacob 					 * TAG/Data parity(Secondary Cache)
    106  1.1   mjacob 					 */
    107  1.1   mjacob 	u_int64_t	bc_tag_addr;	/* Contents of EV5 BC_TAG_ADDR	  */
    108  1.1   mjacob 	u_int64_t	ei_addr;	/*
    109  1.1   mjacob 					 * Physical address of any transfer
    110  1.1   mjacob 					 * that is logged in the EV5 EI_STAT
    111  1.1   mjacob 					 */
    112  1.1   mjacob 	u_int64_t	fill_syndrome;	/* For correcting ECC errors.	  */
    113  1.1   mjacob 	u_int64_t	ei_stat;	/*
    114  1.1   mjacob 					 * Helps identify reason of any
    115  1.1   mjacob 					 * processor uncorrectable error
    116  1.1   mjacob 					 * at its external interface.
    117  1.1   mjacob 					 */
    118  1.1   mjacob 	u_int64_t	ld_lock;	/* Contents of EV5 LD_LOCK register*/
    119  1.1   mjacob } mc_uc_ev5;
    120  1.1   mjacob #define	EV5_IC_PERR_IBOXTMO	0x2000
    121  1.1   mjacob 
    122  1.1   mjacob /*
    123  1.1   mjacob  * EV5 Specific Machine Check logout frame for correctable errors.
    124  1.1   mjacob  *
    125  1.1   mjacob  * This is used to log correctable errors such as Single bit ECC errors.
    126  1.1   mjacob  */
    127  1.1   mjacob typedef struct {
    128  1.1   mjacob 	u_int64_t	ei_addr;	/*
    129  1.1   mjacob 					 * Physical address of any transfer
    130  1.1   mjacob 					 * that is logged in the EV5 EI_STAT
    131  1.1   mjacob 					 */
    132  1.1   mjacob 	u_int64_t	fill_syndrome;	/* For correcting ECC errors.	  */
    133  1.1   mjacob 	u_int64_t	ei_stat;	/*
    134  1.1   mjacob 					 * Helps identify reason of any
    135  1.1   mjacob 					 * processor uncorrectable error
    136  1.1   mjacob 					 * at its external interface.
    137  1.1   mjacob 					 */
    138  1.1   mjacob 	u_int64_t	isr;		/* Interrupt Status Reg. 	  */
    139  1.1   mjacob } mc_cc_ev5;
    140  1.1   mjacob 
    141  1.1   mjacob 
    142  1.1   mjacob #ifdef	_KERNEL
    143  1.2  thorpej extern void ev5_logout_print(mc_hdr_ev5 *, mc_uc_ev5 *);
    144  1.1   mjacob #endif
    145