VoodooTSCSync

VoodooTSCSync Svn Source Tree

Root/VoodooTSCSync.h

Source at commit HEAD created 5 years 1 month ago.
By cosmo1t, moved from googlecode to here
1/* Do what you want with this.
2 This work originates from the ideas of Turbo and the
3 frustrations of cosmo1t the dell owner.
4 *
5 */
6
7
8#include <IOKit/IOService.h>
9#include <IOKit/IOLib.h>
10#include <i386/proc_reg.h>
11
12
13
14//reg define
15#define MSR_IA32_TSC 0x00000010
16
17
18
19//extern fucntion defined in mp.c from xnu
20extern "C" void mp_rendezvous_no_intrs(
21void (*action_func)(void *),
22void *arg);
23extern "C" void mp_broadcast(
24 void (*action_func)(void *),
25 void *arg);
26
27extern "C" void rtc_clock_napped(uint64_t base, uint64_t tsc_base);
28
29/* You can get rid of this if you want, it was used for debugging purposes testing the IOCpuNumber matching**/
30//IOLock * lock;
31//int countCalled;
32
33class org_voodoo_driver_VoodooTSCSync : public IOService
34
35{
36
37OSDeclareDefaultStructors(org_voodoo_driver_VoodooTSCSync)
38private:
39void doTSC(void);
40public:
41
42
43 virtual bool init(OSDictionary *dictionary = 0);
44 virtual bool start(IOService *provider);
45 virtual void stop(IOService *provider);
46 virtual IOReturn setPowerState(unsigned long powerStateOrdinal, IOService *whatDevice);
47};
48

Archive Download this file

Revision: HEAD