xref: /titanic_44/usr/src/lib/libprtdiag/inc/display_sun4v.h (revision 9dd0f810214fdc8e1af881a9a5c4b6927629ff9e)
1 /*
2  * CDDL HEADER START
3  *
4  * The contents of this file are subject to the terms of the
5  * Common Development and Distribution License, Version 1.0 only
6  * (the "License").  You may not use this file except in compliance
7  * with the License.
8  *
9  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
10  * or http://www.opensolaris.org/os/licensing.
11  * See the License for the specific language governing permissions
12  * and limitations under the License.
13  *
14  * When distributing Covered Code, include this CDDL HEADER in each
15  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
16  * If applicable, add the following below this CDDL HEADER, with the
17  * fields enclosed by brackets "[]" replaced with your own identifying
18  * information: Portions Copyright [yyyy] [name of copyright owner]
19  *
20  * CDDL HEADER END
21  */
22 /*
23  * Copyright 2005 Sun Microsystems, Inc.  All rights reserved.
24  * Use is subject to license terms.
25  */
26 
27 #ifndef	_DISPLAY_SUN4V_H
28 #define	_DISPLAY_SUN4V_H
29 
30 #pragma ident	"%Z%%M%	%I%	%E% SMI"
31 
32 #ifdef	__cplusplus
33 extern "C" {
34 #endif
35 
36 #include <picl.h>
37 
38 #define	CLK_FREQ_TO_MHZ(x)	(((x) + 500000) / 1000000)
39 #define	MAXSTRLEN	256
40 #define	CPU_STRAND_NAC			"MB/CMP0/P"
41 #define	H20_IMPL			0x5678
42 #define	IS_H20(impl)			((impl) == H20_IMPL)
43 
44 #define	EM_INIT_FAIL		dgettext(TEXT_DOMAIN,\
45 	"picl_initialize failed: %s\n")
46 #define	EM_GET_ROOT_FAIL	dgettext(TEXT_DOMAIN,\
47 	"Getting root node failed: %s\n")
48 
49 void sun4v_display_pci(picl_nodehdl_t plafh);
50 void sun4v_display_memoryconf();
51 void sun4v_display_cpu_devices(picl_nodehdl_t plafh);
52 int sun4v_display_cpus(picl_nodehdl_t cpuh, void* args);
53 void sun4v_display_diaginfo(int flag, Prom_node *root, picl_nodehdl_t plafh);
54 int sun4v_display(Sys_tree *, Prom_node *, int, picl_nodehdl_t);
55 
56 #ifdef	__cplusplus
57 }
58 #endif
59 
60 #endif	/* _DISPLAY_SUN4V_H */
61