xref: /illumos-gate/usr/src/lib/fm/topo/modules/i86pc/chip/chip.h (revision 60405de4d8688d96dd05157c28db3ade5c9bc234)
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 2006 Sun Microsystems, Inc.  All rights reserved.
24  * Use is subject to license terms.
25  */
26 
27 #ifndef _CHIP_H
28 #define	_CHIP_H
29 
30 #pragma ident	"%Z%%M%	%I%	%E% SMI"
31 
32 #include <kstat.h>
33 #include <libnvpair.h>
34 #include <fm/libtopo.h>
35 
36 #ifdef __cplusplus
37 extern "C" {
38 #endif
39 
40 #define	CHIP_VERSION		TOPO_VERSION
41 
42 #define	MC_NODE_NAME	"memory-controller"
43 #define	CPU_NODE_NAME	"cpu"
44 #define	CS_NODE_NAME	"chip-select"
45 #define	DIMM_NODE_NAME	"dimm"
46 
47 #define	CHIP_PGROUP	"chip-properties"
48 #define	CS_PGROUP	"chip-select-properties"
49 #define	MC_PGROUP	"memory-contoller-properties"
50 #define	DIMM_PGROUP	"dimm-properties"
51 
52 /*
53  * CHIP_PGROUP properties
54  */
55 #define	CHIP_VENDOR_ID	"vendor-id"
56 #define	CHIP_FAMILY	"family"
57 #define	CHIP_MODEL	"model"
58 #define	CHIP_STEPPING	"stepping"
59 
60 typedef struct chip {
61 	kstat_ctl_t *chip_kc;
62 	kstat_t **chip_cpustats;
63 	uint_t chip_ncpustats;
64 } chip_t;
65 
66 #ifdef __cplusplus
67 }
68 #endif
69 
70 #endif /* _CHIP_H */
71