Chameleon

Chameleon Svn Source Tree

Root/branches/meklort/i386/libsaio/cpu.h

Source at commit 365 created 13 years 11 months ago.
By azimutz, Restoring needed code to avoid dsdt loading as ssdt, when the path is specified by the user plus, cached patch search code with verbose enabled.
1/*
2 * Copyright 2008 Islam Ahmed Zaid. All rights reserved. <azismed@gmail.com>
3 * AsereBLN: 2009: cleanup and bugfix
4 */
5
6#ifndef __LIBSAIO_CPU_H
7#define __LIBSAIO_CPU_H
8
9#include "libsaio.h"
10
11extern void scan_cpu(PlatformInfo_t *);
12
13#define bit(n)(1UL << (n))
14#define bitmask(h,l)((bit(h)|(bit(h)-1)) & ~(bit(l)-1))
15#define bitfield(x,h,l)(((x) & bitmask(h,l)) >> l)
16
17#defineIA32_PERF_STATUS0x198
18#define MSR_FLEX_RATIO0x194
19#defineMSR_PLATFORM_INFO0xCE
20#define K8_FIDVID_STATUS0xC0010042
21#define K10_COFVID_STATUS0xC0010071
22
23#define DEFAULT_FSB100000 /* for now, hardcoding 100MHz for old CPUs */
24
25// DFE: This constant comes from older xnu:
26#define CLKNUM1193182/* formerly 1193167 */
27
28// DFE: These two constants come from Linux except CLOCK_TICK_RATE replaced with CLKNUM
29#define CALIBRATE_TIME_MSEC30/* 30 msecs */
30#define CALIBRATE_LATCH((CLKNUM * CALIBRATE_TIME_MSEC + 1000/2)/1000)
31
32#endif /* !__LIBSAIO_CPU_H */
33

Archive Download this file

Revision: 365