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