6811333 Remove prom_printf() message in emlxs driver
[opensolaris.git] / usr / src / uts / common / sys / devfm.h
blobe9ad95b39f2c64ae0cc6d35da9f48b52c8059148
1 /*
2 * CDDL HEADER START
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.
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.
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]
19 * CDDL HEADER END
22 * Copyright 2008 Sun Microsystems, Inc. All rights reserved.
23 * Use is subject to license terms.
26 #ifndef _SYS_DEVFM_H
27 #define _SYS_DEVFM_H
29 #include <sys/types.h>
30 #include <sys/nvpair.h>
32 #ifdef __cplusplus
33 extern "C" {
34 #endif
36 #define FM_IOC_MAXBUFSZ 32768
37 #define FM_DRV_VERSION 1
39 #define FM_VERSIONS_VERSION "fm-versions-version"
40 #define FM_PAGE_OP_VERSION "page-operation-version"
41 #define FM_CPU_OP_VERSION "cpu-operation-version"
42 #define FM_CPU_INFO_VERSION "cpu-info-version"
45 * FMA driver ioctl interfaces
47 #define FM_IOC (0xFA << 16)
48 #define FM_IOC_VERSIONS (FM_IOC | 1)
49 #define FM_IOC_PAGE_RETIRE (FM_IOC | 2)
50 #define FM_IOC_PAGE_STATUS (FM_IOC | 3)
51 #define FM_IOC_PAGE_UNRETIRE (FM_IOC | 4)
53 #if defined(__x86)
54 #define FM_IOC_PHYSCPU_INFO (FM_IOC | 5)
55 #define FM_IOC_CPU_RETIRE (FM_IOC | 6)
56 #define FM_IOC_CPU_STATUS (FM_IOC | 7)
57 #define FM_IOC_CPU_UNRETIRE (FM_IOC | 8)
58 #endif /* __x86 */
61 * Types
63 typedef struct fm_ioc_data {
64 uint32_t fid_version; /* interface version */
65 size_t fid_insz; /* size of packed input nvlist */
66 caddr_t fid_inbuf; /* buf containing packed input nvl */
67 size_t fid_outsz; /* size of packed output nvlist */
68 caddr_t fid_outbuf; /* buf containing packed output nvl */
69 } fm_ioc_data_t;
71 #ifdef _KERNEL
72 typedef struct fm_ioc_data32 {
73 uint32_t fid_version; /* interface version */
74 size32_t fid_insz; /* size of packed input nvlist */
75 caddr32_t fid_inbuf; /* buf containing packed input nvl */
76 size32_t fid_outsz; /* size of packed output nvlist */
77 caddr32_t fid_outbuf; /* buf containing packed output nvl */
78 } fm_ioc_data32_t;
79 #endif /* _KERNEL */
82 * Constants
84 #define FM_PAGE_RETIRE_FMRI "fmri"
85 #define FM_PHYSCPU_INFO_CPUS "cpus"
86 #define FM_CPU_RETIRE_CHIP_ID "chip_id"
87 #define FM_CPU_RETIRE_CORE_ID "core_id"
88 #define FM_CPU_RETIRE_STRAND_ID "strand_id"
89 #define FM_CPU_RETIRE_OLDSTATUS "oldstatus"
92 * Properties set by FM_PHYSCPU_INFO
94 #define FM_PHYSCPU_INFO_VENDOR_ID "vendor_id"
95 #define FM_PHYSCPU_INFO_FAMILY "family"
96 #define FM_PHYSCPU_INFO_MODEL "model"
97 #define FM_PHYSCPU_INFO_STEPPING "stepping"
98 #define FM_PHYSCPU_INFO_CHIP_ID "chip_id"
99 #define FM_PHYSCPU_INFO_CORE_ID "core_id"
100 #define FM_PHYSCPU_INFO_STRAND_ID "strand_id"
101 #define FM_PHYSCPU_INFO_CHIP_REV "chip_rev"
102 #define FM_PHYSCPU_INFO_SOCKET_TYPE "socket_type"
103 #define FM_PHYSCPU_INFO_CPU_ID "cpuid"
105 #ifdef __cplusplus
107 #endif
109 #endif /* _SYS_DEVFM_H */