-
Notifications
You must be signed in to change notification settings - Fork 6
Expand file tree
/
Copy pathK6INIT.H
More file actions
77 lines (70 loc) · 2.37 KB
/
K6INIT.H
File metadata and controls
77 lines (70 loc) · 2.37 KB
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
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
#include "cpu.h"
#include "vesabios.h"
#include "cpu_k6.h"
/* This structure holds all the arguments passed to the program. */
typedef struct {
bool quiet;
bool verbose;
bool printBARs;
bool chipsetTweaks;
/* MTRR Config */
struct { bool setup;
bool clear;
bool pci;
bool lfb;
size_t count;
cpu_K6_MemoryTypeRangeRegs toSet; } mtrr;
/* Write Ordering Config */
struct { bool setup;
u8 mode; } wOrder;
/* Write Allocate Config */
struct { bool setup;
bool hole;
u32 size; } wAlloc;
/* Multiplier Config */
struct { bool setup;
u8 integer;
u8 decimal; } multi;
/* L1 Cache Config */
struct { bool setup;
bool enable; } l1Cache;
/* L2 Cache Config */
struct { bool setup;
bool enable; } l2Cache;
/* Data Prefetch Config */
struct { bool setup;
bool enable; } prefetch;
} k6init_Parameters;
typedef enum {
K6 = 0,
K6_2,
K6_2_CXT,
K6_III,
K6_PLUS,
UNSUPPORTED_CPU
} k6init_CPUType;
typedef struct {
k6init_CPUType type;
const char *name;
bool supportsEFER;
bool supportsCxtFeatures;
bool supportsL2;
bool supportsMulti;
} k6init_CPUCaps;
/* This structure holds all the detected system info we may need for this program. */
typedef struct {
cpu_CPUIDVersionInfo cpuidInfo;
char cpuidString[13];
k6init_CPUCaps cpu;
cpu_K6_MemoryTypeRangeRegs mtrrs;
cpu_K6_WriteAllocateConfig whcr;
u32 memSize;
bool memHole;
bool vesaBIOSPresent;
vesa_BiosInfo vesaBiosInfo;
bool L1CacheEnabled;
bool L2CacheEnabled;
bool criticalError;
} k6init_SysInfo;
#define retPrintErrorIf(condition, message, value) if (condition) { vgacon_printError(message "\n", value); return false; }
bool chipset_autoConfig(const k6init_Parameters *params, const k6init_SysInfo *sysInfo);