Merge branch 'master' into x86_64

Conflicts:
	build/jam/HaikuImage
	src/add-ons/kernel/generic/Jamfile
This commit is contained in:
Alex Smith
2012-11-18 19:18:00 +00:00
18 changed files with 1008 additions and 24 deletions
+5
View File
@@ -133,6 +133,7 @@ typedef struct acpi_data {
enum {
ACPI_ALLOCATE_BUFFER = -1,
ACPI_ALLOCATE_LOCAL_BUFFER = -2,
};
@@ -261,6 +262,10 @@ struct acpi_module_info {
/* Table Access */
status_t (*get_table)(const char *signature, uint32 instance,
void **tableHeader);
/* Register Access */
status_t (*read_bit_register)(uint32 regid, uint32 *val);
status_t (*write_bit_register)(uint32 regid, uint32 val);
};
+57
View File
@@ -0,0 +1,57 @@
/*
* Copyright 2012, Haiku, Inc. All Rights Reserved.
* Distributed under the terms of the MIT License.
*/
#ifndef _CPUIDLE_MODULE_H
#define _CPUIDLE_MODULE_H
#include <module.h>
#ifdef __cplusplus
extern "C" {
#endif
#define CPUIDLE_CSTATE_MAX 8
#define CSTATE_NAME_LENGTH 32
#define B_CPUIDLE_MODULE_NAME "generic/cpuidle/v1"
struct CpuidleStat {
uint64 usageCount;
bigtime_t usageTime;
};
struct CpuidleInfo {
int32 cstateSleep;
CpuidleStat stats[CPUIDLE_CSTATE_MAX];
};
struct CpuidleDevice;
struct CpuidleCstate {
char name[CSTATE_NAME_LENGTH];
int32 latency;
int32 (*EnterIdle)(int32 state, CpuidleDevice *device);
void *pData;
};
struct CpuidleDevice {
CpuidleCstate cStates[CPUIDLE_CSTATE_MAX];
int32 cStateCount;
};
struct CpuidleModuleInfo {
module_info info;
status_t (*AddDevice)(CpuidleDevice *device);
};
#ifdef __cplusplus
}
#endif
#endif // _CPUIDLE_MODULE_H