-
Notifications
You must be signed in to change notification settings - Fork 1
/
config.h.in
62 lines (49 loc) · 1.06 KB
/
config.h.in
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
/*
* Size of the cache line
*/
#define BYTE_SIZE (1 << 8)
/*
* Parameters for cache/TLB
*/
#define CACHE_LINE 64
#define PAGE_SIZE 4096
#define HUGE_PAGE_SIZE (1024 * 2048)
#define CACHE_MAX_DESC (BYTE_SIZE)
#define TLB_MAX_DESC (BYTE_SIZE)
/*
* Just a guess for the number. We can make it larger since there
* are not much copy of this information
*/
#define TLB_SUPPORT_PAGE_SIZE_CNT 8
/*
* Magic staff related with cpu frequency
*/
#define CPUFREQ_DETECT_LOOP_SIZE 30
#define CPUFREQ_DETECT_TIME_UPPER 100 /* 100 ms */
#define CPUFREQ_MIN_HINT 5E8 /* 500MHz */
#define CPUFREQ_MAX_HINT 5E9 /* 5GHz */
/*
* Walking on the pages, total memory we reference
*/
#define TOTAL_MEM_SMALL 32 * 1024 * 1024
#define TOTAL_MEM_LARGE 256 * 1024 * 1024
/*
* Check whether it has sched functions
*/
#cmakedefine HAVE_SCHED
/*
* Check whether it supports CPUID
*/
#cmakedefine HAVE_CPUID
/*
* Check whether it supports RDTSC
*/
#cmakedefine HAVE_RDTSC
/*
* Debug flag
*/
#cmakedefine USE_DEBUG
/*
* Identify
*/
#cmakedefine HAVE_HUGE_TLB