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