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 (the "License"). 6 * You may not use this file except in compliance with the License. 7 * 8 * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE 9 * or http://www.opensolaris.org/os/licensing. 10 * See the License for the specific language governing permissions 11 * and limitations under the License. 12 * 13 * When distributing Covered Code, include this CDDL HEADER in each 14 * file and include the License file at usr/src/OPENSOLARIS.LICENSE. 15 * If applicable, add the following below this CDDL HEADER, with the 16 * fields enclosed by brackets "[]" replaced with your own identifying 17 * information: Portions Copyright [yyyy] [name of copyright owner] 18 * 19 * CDDL HEADER END 20 */ 21 /* 22 * Copyright 2006 Sun Microsystems, Inc. All rights reserved. 23 * Use is subject to license terms. 24 */ 25 26 #ifndef _CHIP_H 27 #define _CHIP_H 28 29 #pragma ident "%Z%%M% %I% %E% SMI" 30 31 #include <kstat.h> 32 #include <libnvpair.h> 33 #include <fm/libtopo.h> 34 35 #ifdef __cplusplus 36 extern "C" { 37 #endif 38 39 #define CHIP_VERSION TOPO_VERSION 40 41 #define MCT_NODE_NAME "memory-controller" 42 #define CHAN_NODE_NAME "dram-channel" 43 #define CPU_NODE_NAME "cpu" 44 #define CS_NODE_NAME "chip-select" 45 #define DIMM_NODE_NAME "dimm" 46 #define RANK_NODE_NAME "rank" 47 48 #define CHIP_PGROUP "chip-properties" 49 #define MCT_PGROUP MCT_NODE_NAME "-properties" 50 #define CHAN_PGROUP CHAN_NODE_NAME "-properties" 51 #define CS_PGROUP CS_NODE_NAME "-properties" 52 #define DIMM_PGROUP DIMM_NODE_NAME "-properties" 53 #define RANK_PGROUP RANK_NODE_NAME "-properties" 54 55 /* 56 * CHIP_PGROUP properties 57 */ 58 #define CHIP_VENDOR_ID "vendor-id" 59 #define CHIP_FAMILY "family" 60 #define CHIP_MODEL "model" 61 #define CHIP_STEPPING "stepping" 62 63 typedef struct chip { 64 kstat_ctl_t *chip_kc; 65 kstat_t **chip_cpustats; 66 uint_t chip_ncpustats; 67 } chip_t; 68 69 #ifdef __cplusplus 70 } 71 #endif 72 73 #endif /* _CHIP_H */ 74