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