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-2001 by Sun Microsystems, Inc.
24*03831d35Sstevel  * All rights reserved.
25*03831d35Sstevel  */
26*03831d35Sstevel 
27*03831d35Sstevel #ifndef	_DISPLAY_SUN4U_H
28*03831d35Sstevel #define	_DISPLAY_SUN4U_H
29*03831d35Sstevel 
30*03831d35Sstevel #include <pdevinfo_sun4u.h>
31*03831d35Sstevel 
32*03831d35Sstevel #ifdef	__cplusplus
33*03831d35Sstevel extern "C" {
34*03831d35Sstevel #endif
35*03831d35Sstevel 
36*03831d35Sstevel /*
37*03831d35Sstevel  * Define the memory decode bits for easier reading.  These are from
38*03831d35Sstevel  * the Sunfire Programmer's Manual.
39*03831d35Sstevel  */
40*03831d35Sstevel #define	MEM_SIZE_64M   0x4
41*03831d35Sstevel #define	MEM_SIZE_256M  0xb
42*03831d35Sstevel #define	MEM_SIZE_1G    0xf
43*03831d35Sstevel #define	MEM_SIZE_2G    0x2
44*03831d35Sstevel 
45*03831d35Sstevel #define	MEM_SPEED_50ns 0x0
46*03831d35Sstevel #define	MEM_SPEED_60ns 0x3
47*03831d35Sstevel #define	MEM_SPEED_70ns 0x2
48*03831d35Sstevel #define	MEM_SPEED_80ns 0x1
49*03831d35Sstevel 
50*03831d35Sstevel /*
51*03831d35Sstevel  * If a QLC card is present in the system, the following values are needed
52*03831d35Sstevel  * to decode what type of a QLC card it is.
53*03831d35Sstevel  */
54*03831d35Sstevel #define	AMBER_SUBSYSTEM_ID	0x4082
55*03831d35Sstevel #define	CRYSTAL_SUBSYSTEM_ID	0x4083
56*03831d35Sstevel 
57*03831d35Sstevel #define	AMBER_CARD_NAME		"Amber"
58*03831d35Sstevel #define	CRYSTAL_CARD_NAME	"Crystal+"
59*03831d35Sstevel 
60*03831d35Sstevel #define	MAX_QLC_MODEL_LEN	10
61*03831d35Sstevel 
62*03831d35Sstevel /*
63*03831d35Sstevel  * Define strings in this structure as arrays instead of pointers so
64*03831d35Sstevel  * that copying is easier.
65*03831d35Sstevel  */
66*03831d35Sstevel struct io_card {
67*03831d35Sstevel 	int  display;		    /* Should we display this card? */
68*03831d35Sstevel 	int  node_id;		    /* Node ID */
69*03831d35Sstevel 	int  board;		    /* Board number */
70*03831d35Sstevel 	char bus_type[MAXSTRLEN];   /* Type of bus this IO card is on */
71*03831d35Sstevel 	int  schizo_portid;	    /* portid of the Schizo for this card */
72*03831d35Sstevel 	char pci_bus;		    /* PCI bus A or B */
73*03831d35Sstevel 	int  slot;		    /* Slot number */
74*03831d35Sstevel 	char slot_str[MAXSTRLEN];   /* Slot description string */
75*03831d35Sstevel 	int  freq;		    /* Frequency (in MHz) */
76*03831d35Sstevel 	char status[MAXSTRLEN];	    /* Card status */
77*03831d35Sstevel 	char name[MAXSTRLEN];	    /* Card name */
78*03831d35Sstevel 	char model[MAXSTRLEN];	    /* Card model */
79*03831d35Sstevel 	int  dev_no;		    /* device number */
80*03831d35Sstevel 	int  func_no;		    /* function number */
81*03831d35Sstevel 	char notes[MAXSTRLEN];	    /* notes */
82*03831d35Sstevel 	struct io_card *next;
83*03831d35Sstevel };
84*03831d35Sstevel 
85*03831d35Sstevel /* used to determine whether slot (int) or slot_str(char*) should be used */
86*03831d35Sstevel #define	PCI_SLOT_IS_STRING	(-99)
87*03831d35Sstevel 
88*03831d35Sstevel int display(Sys_tree *, Prom_node *, struct system_kstat_data *, int);
89*03831d35Sstevel 
90*03831d35Sstevel #ifdef	__cplusplus
91*03831d35Sstevel }
92*03831d35Sstevel #endif
93*03831d35Sstevel 
94*03831d35Sstevel #endif	/* _DISPLAY_SUN4U_H */
95