ppmio.h (7c478bd9) ppmio.h (5cff7825)
1/*
2 * CDDL HEADER START
3 *
4 * The contents of this file are subject to the terms of the
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.
5 * Common Development and Distribution License (the "License").
6 * You may not use this file except in compliance 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/*
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/*
23 * Copyright 1999-2002 Sun Microsystems, Inc. All rights reserved.
22 * Copyright 2007 Sun Microsystems, Inc. All rights reserved.
24 * Use is subject to license terms.
25 */
26
27#ifndef _SYS_PPMIO_H
28#define _SYS_PPMIO_H
29
30#pragma ident "%Z%%M% %I% %E% SMI"
31

--- 4 unchanged lines hidden (view full) ---

36#endif
37
38#define PPMIOC ('p' << 8)
39#define PPMIOCSET (PPMIOC | 1)
40#define PPMIOCGET (PPMIOC | 2)
41#define PPMGET_DPWR (PPMIOC | 3)
42#define PPMGET_DOMBYDEV (PPMIOC | 4)
43#define PPMGET_DEVBYDOM (PPMIOC | 5)
23 * Use is subject to license terms.
24 */
25
26#ifndef _SYS_PPMIO_H
27#define _SYS_PPMIO_H
28
29#pragma ident "%Z%%M% %I% %E% SMI"
30

--- 4 unchanged lines hidden (view full) ---

35#endif
36
37#define PPMIOC ('p' << 8)
38#define PPMIOCSET (PPMIOC | 1)
39#define PPMIOCGET (PPMIOC | 2)
40#define PPMGET_DPWR (PPMIOC | 3)
41#define PPMGET_DOMBYDEV (PPMIOC | 4)
42#define PPMGET_DEVBYDOM (PPMIOC | 5)
43/*
44 * The following two ioctls are used for testing purposes only.
45 */
46#if defined(__x86)
47#define PPMGET_NORMAL (PPMIOC | 6)
48#define PPMSET_NORMAL (PPMIOC | 7)
49#endif
44
45/*
46 * PPMIOCGET
47 * Note: this ioctl command is available for Excalibur and Grover
48 * only, but will be removed in future, replacing with PPMGET_DPWR
49 */
50typedef struct ppmreq {
51 int ppmdev;

--- 28 unchanged lines hidden (view full) ---

80 * PPMGET_DEVBYDOM
81 */
82struct ppm_bydom {
83 char *domain; /* domain name */
84 char *devlist; /* domain device list */
85 size_t size; /* size of devlist buffer */
86};
87
50
51/*
52 * PPMIOCGET
53 * Note: this ioctl command is available for Excalibur and Grover
54 * only, but will be removed in future, replacing with PPMGET_DPWR
55 */
56typedef struct ppmreq {
57 int ppmdev;

--- 28 unchanged lines hidden (view full) ---

86 * PPMGET_DEVBYDOM
87 */
88struct ppm_bydom {
89 char *domain; /* domain name */
90 char *devlist; /* domain device list */
91 size_t size; /* size of devlist buffer */
92};
93
94/*
95 * PPM[GS]ET_NORM
96 */
97struct ppm_norm {
98 char *path; /* device prom path */
99 int norm; /* normal level */
100};
88
89#ifdef _SYSCALL32
90/*
91 * kernel view of ILP32 data structure
92 */
93struct ppm_dpwr32 {
94 caddr32_t domain; /* domain name */
95 int32_t level; /* domain power level */

--- 5 unchanged lines hidden (view full) ---

101 size32_t size; /* size of domlist buffer */
102};
103
104struct ppm_bydom32 {
105 caddr32_t domain; /* domain name */
106 caddr32_t devlist; /* domain device list */
107 size32_t size; /* size of devlist buffer */
108};
101
102#ifdef _SYSCALL32
103/*
104 * kernel view of ILP32 data structure
105 */
106struct ppm_dpwr32 {
107 caddr32_t domain; /* domain name */
108 int32_t level; /* domain power level */

--- 5 unchanged lines hidden (view full) ---

114 size32_t size; /* size of domlist buffer */
115};
116
117struct ppm_bydom32 {
118 caddr32_t domain; /* domain name */
119 caddr32_t devlist; /* domain device list */
120 size32_t size; /* size of devlist buffer */
121};
122
123struct ppm_norm32 {
124 caddr32_t path; /* device prom path */
125 int32_t norm; /* normal level */
126};
109#endif /* _SYSCALL32 */
110
111/*
112 * .level may be the following
113 */
114#define PPMIO_POWER_OFF 0
115#define PPMIO_POWER_ON 1
116#define PPMIO_LED_BLINKING 2
117#define PPMIO_LED_SOLIDON 3
118/* (s10) */
119#define PPM_IDEV_POWER_OFF PPMIO_POWER_OFF
120#define PPM_IDEV_POWER_ON PPMIO_POWER_ON
121
122
123#ifdef __cplusplus
124}
125#endif
126
127#endif /* _SYS_PPMIO_H */
127#endif /* _SYSCALL32 */
128
129/*
130 * .level may be the following
131 */
132#define PPMIO_POWER_OFF 0
133#define PPMIO_POWER_ON 1
134#define PPMIO_LED_BLINKING 2
135#define PPMIO_LED_SOLIDON 3
136/* (s10) */
137#define PPM_IDEV_POWER_OFF PPMIO_POWER_OFF
138#define PPM_IDEV_POWER_ON PPMIO_POWER_ON
139
140
141#ifdef __cplusplus
142}
143#endif
144
145#endif /* _SYS_PPMIO_H */