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