]> git.saurik.com Git - apple/xnu.git/blob - iokit/Kernel/IOPMrootDomainInternal.h
xnu-4570.71.2.tar.gz
[apple/xnu.git] / iokit / Kernel / IOPMrootDomainInternal.h
1 /*
2 * Copyright (c) 2006-2007 Apple Inc. All rights reserved.
3 *
4 * @APPLE_LICENSE_HEADER_START@
5 *
6 * This file contains Original Code and/or Modifications of Original Code
7 * as defined in and that are subject to the Apple Public Source License
8 * Version 2.0 (the 'License'). You may not use this file except in
9 * compliance with the License. Please obtain a copy of the License at
10 * http://www.opensource.apple.com/apsl/ and read it before using this
11 * file.
12 *
13 * The Original Code and all software distributed under the License are
14 * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
15 * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
16 * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
17 * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
18 * Please see the License for the specific language governing rights and
19 * limitations under the License.
20 *
21 * @APPLE_LICENSE_HEADER_END@
22 */
23
24 /* DO NOT MODIFY THIS FILE
25 *
26 * This file is a partial mirror of
27 * AppleIntelCPUPowerManagement/pmioctl.h
28 * Changes may only be made to the original, pmioctl.h.
29 * This file must be updated only when pmioctl.h changes.
30 */
31
32 /*
33 * Defines the IOCTLs for dealing with the CPU power management KEXT.
34 */
35 #ifndef _IOPMROOTDOMAINIOCTLS_H_
36 #define _IOPMROOTDOMAINIOCTLS_H_
37
38 #include <sys/ioccom.h>
39 #include <i386/pmCPU.h>
40
41 #define PMIOCGETVARIDINFO _IOW('P', 25, uint64_t)
42 #define PMIOCGETVARNAMEINFO _IOW('P', 26, uint64_t)
43 #define PMIOCSETVARINFO _IOW('P', 27, uint64_t)
44
45 /*
46 * Data structures used by IOCTLs
47 */
48 #pragma pack(4)
49
50 #define PMVARNAMELEN 16
51
52 typedef enum
53 {
54 vUnknown = 0, /* Unknown type */
55 vBool = 1, /* Boolean value */
56 vInt = 2, /* signed integer value */
57 vUInt = 3, /* Unsigned integer value */
58 vChars = 4, /* 8 characters */
59 vInvalid = -1 /* invalid type */
60 } pmioctlVarType_t;
61
62 typedef struct pmioctlVaribleInfo
63 {
64 uint32_t varID; /* ID of variable */
65 uint8_t varName[PMVARNAMELEN+1];
66 pmioctlVarType_t varType; /* type of variable's value */
67 uint64_t varInitValue; /* variable's initial value */
68 uint64_t varCurValue; /* variable's current value */
69 } pmioctlVariableInfo_t;
70
71 #pragma pack()
72
73 #endif /* _IOPMROOTDOMAINIOCTLS_H_ */