1*1708Sstevel /* 2*1708Sstevel * CDDL HEADER START 3*1708Sstevel * 4*1708Sstevel * The contents of this file are subject to the terms of the 5*1708Sstevel * Common Development and Distribution License, Version 1.0 only 6*1708Sstevel * (the "License"). You may not use this file except in compliance 7*1708Sstevel * with the License. 8*1708Sstevel * 9*1708Sstevel * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE 10*1708Sstevel * or http://www.opensolaris.org/os/licensing. 11*1708Sstevel * See the License for the specific language governing permissions 12*1708Sstevel * and limitations under the License. 13*1708Sstevel * 14*1708Sstevel * When distributing Covered Code, include this CDDL HEADER in each 15*1708Sstevel * file and include the License file at usr/src/OPENSOLARIS.LICENSE. 16*1708Sstevel * If applicable, add the following below this CDDL HEADER, with the 17*1708Sstevel * fields enclosed by brackets "[]" replaced with your own identifying 18*1708Sstevel * information: Portions Copyright [yyyy] [name of copyright owner] 19*1708Sstevel * 20*1708Sstevel * CDDL HEADER END 21*1708Sstevel */ 22*1708Sstevel /* 23*1708Sstevel * Copyright (c) 1999 by Sun Microsystems, Inc. 24*1708Sstevel * All rights reserved. 25*1708Sstevel */ 26*1708Sstevel 27*1708Sstevel #ifndef _RESET_INFO_H 28*1708Sstevel #define _RESET_INFO_H 29*1708Sstevel 30*1708Sstevel #pragma ident "%Z%%M% %I% %E% SMI" 31*1708Sstevel 32*1708Sstevel #ifdef __cplusplus 33*1708Sstevel extern "C" { 34*1708Sstevel #endif 35*1708Sstevel 36*1708Sstevel /* 37*1708Sstevel * All of the following data structures and defines come from sun4u server 38*1708Sstevel * POST. If the data in POST changes, then these structures must reflect 39*1708Sstevel * those changes. 40*1708Sstevel */ 41*1708Sstevel 42*1708Sstevel #include <sys/fhc.h> /* To get MAX_BOARDS constant */ 43*1708Sstevel 44*1708Sstevel /* BDA bit assignments */ 45*1708Sstevel #define BOARD_PRESENT (1<<0) 46*1708Sstevel #define BOARD_OK (1<<1) 47*1708Sstevel #define BOARD_TYPE_MSK (7<<2) 48*1708Sstevel #define BOARD_TYPE(x) (((x) & BOARD_TYPE_MSK) >> 2) 49*1708Sstevel 50*1708Sstevel /* Board state mask and defines */ 51*1708Sstevel #define BD_STATE_MASK 0x3 52*1708Sstevel #define BD_LPM_FZN 0 53*1708Sstevel #define BD_ONLINE_FAIL 1 54*1708Sstevel #define BD_NOT_PRESENT 2 55*1708Sstevel #define BD_ONLINE_NORMAL 3 56*1708Sstevel 57*1708Sstevel /* define CPU 0 fields */ 58*1708Sstevel #define CPU0_PRESENT (1<<8) 59*1708Sstevel #define CPU0_OK (1<<9) 60*1708Sstevel #define CPU0_FAIL_CODE_MSK (7<<10) 61*1708Sstevel 62*1708Sstevel /* define CPU 1 fields */ 63*1708Sstevel #define CPU1_PRESENT (1<<16) 64*1708Sstevel #define CPU1_OK (1<<17) 65*1708Sstevel #define CPU1_FAIL_CODE_MSK (7<<18) 66*1708Sstevel 67*1708Sstevel /* supported board types */ 68*1708Sstevel #define CPU_TYPE 0 69*1708Sstevel #define MEM_TYPE 1 /* CPU/MEM board with only memory */ 70*1708Sstevel #define IO_TYPE1 2 71*1708Sstevel #define IO_TYPE2 3 72*1708Sstevel #define IO_TYPE3 4 73*1708Sstevel #define IO_TYPE4 5 /* same as IO TYPE 1 but no HM or PHY chip */ 74*1708Sstevel #define CLOCK_TYPE 7 75*1708Sstevel 76*1708Sstevel /* for CPU type UPA ports */ 77*1708Sstevel typedef struct { 78*1708Sstevel u_longlong_t afsr; /* Fault status register for CPU */ 79*1708Sstevel u_longlong_t afar; /* Fault address register for CPU */ 80*1708Sstevel } cpu_reset_state; 81*1708Sstevel 82*1708Sstevel /* For the clock board */ 83*1708Sstevel typedef struct { 84*1708Sstevel unsigned long clk_ssr_1; /* reset status for the clock board */ 85*1708Sstevel } clock_reset_state; 86*1708Sstevel 87*1708Sstevel struct board_info { 88*1708Sstevel u_longlong_t board_desc; 89*1708Sstevel cpu_reset_state cpu[2]; /* could be a CPU */ 90*1708Sstevel u_longlong_t ac_error_status; 91*1708Sstevel u_longlong_t dc_shadow_chain; 92*1708Sstevel uint_t fhc_csr; 93*1708Sstevel uint_t fhc_rcsr; 94*1708Sstevel }; 95*1708Sstevel 96*1708Sstevel struct reset_info { 97*1708Sstevel int length; /* size of the structure */ 98*1708Sstevel int version; /* Version of the structure */ 99*1708Sstevel struct board_info bd_reset_info[MAX_BOARDS]; 100*1708Sstevel clock_reset_state clk; /* one clock board */ 101*1708Sstevel unsigned char tod_timestamp[7]; 102*1708Sstevel }; 103*1708Sstevel 104*1708Sstevel #ifdef __cplusplus 105*1708Sstevel } 106*1708Sstevel #endif 107*1708Sstevel 108*1708Sstevel #endif /* _RESET_INFO_H */ 109