-
Notifications
You must be signed in to change notification settings - Fork 5
/
Copy pathK10Processor.h
172 lines (128 loc) · 4.02 KB
/
K10Processor.h
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
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
class K10Processor: protected Processor {
private:
//Private methods for HT Link support
DWORD getHTLinkSpeed(DWORD link, DWORD Sublink);
DWORD getHTLinkWidth(DWORD link, DWORD Sublink, DWORD *WidthIn,
DWORD *WidthOut, bool *pfCoherent, bool *pfUnganged);
DWORD getHTLinkDistributionTarget(DWORD link, DWORD *DstLnk,
DWORD *DstNode);
void printRoute(DWORD);
int getDramFrequency (DWORD device);
bool getDDR3Mode (DWORD device);
bool getDramValid (DWORD device);
//DRAM timing register Low
void getDramTimingLow(
DWORD device, // 0 or 1
DWORD *Tcl, DWORD *Trcd, DWORD *Trp, DWORD *Trtp, DWORD *Tras,
DWORD *Trc, DWORD *Twr, DWORD *Trrd, DWORD *Tcwl, DWORD *T_mode, DWORD *T_faw);
//DRAM timing register High
void getDramTimingHigh(DWORD device, DWORD *TrwtWB,
DWORD *TrwtTO, DWORD *Twtr, DWORD *Twrrd, DWORD *Twrwr,
DWORD *Trdrd, DWORD *Tref, DWORD *Trfc0, DWORD *Trfc1,
DWORD *Trfc2, DWORD *Trfc3, DWORD *MaxRdLatency);
int boostSupported;
bool isPsiThresholdValid(DWORD);
public:
K10Processor ();
static bool isProcessorSupported ();
void showFamilySpecs ();
void showHTC();
void showHTLink();
void showDramTimings ();
float convertVIDtoVcore (DWORD);
DWORD convertVcoretoVID (float);
void convertFreqtoFDEx(DWORD, int *, int *, int, int, int);
void convertFreqtoFD(DWORD, int *, int *);
DWORD convertFDtoFreq (DWORD, DWORD);
void convertNBFreqtoFD(DWORD, int *, int *);
DWORD convertNBFDtoFreq(DWORD, DWORD);
void setVID (PState , DWORD);
void setFID (PState , float);
void setDID (PState , float);
DWORD getVID (PState);
float getFID (PState);
float getDID (PState);
void setFrequency (PState , DWORD);
void setVCore (PState, float);
DWORD getFrequency (PState);
float getVCore (PState);
bool getPVIMode ();
void pStateEnable (PState) ;
void pStateDisable (PState);
bool pStateEnabled (PState);
void setMaximumPState (PState);
PState getMaximumPState ();
void forcePState (PState);
void setNBVid (PState, DWORD);
void setNBDid (PState, DWORD);
// DWORD getNBVid ();
DWORD getNBVid (PState);
DWORD getNBDid (PState);
DWORD getNBFid ();
void setNBFid (DWORD);
bool setNBFrequency(PState, DWORD);
DWORD getNBFrequency(PState);
DWORD getMaxNBFrequency ();
DWORD minVID ();
DWORD maxVID ();
DWORD maxVIDByCore( DWORD core );
DWORD minVIDByCore( DWORD core );
DWORD startupPState ();
DWORD maxCPUFrequency ();
DWORD getNumBoostStates(void);
void setNumBoostStates(DWORD);
DWORD getBoost(void);
void setBoost(bool);
//Virtual method to modify DRAM timings -- Needs testing, only for DDR3 at the moment
DWORD setDramTiming(
DWORD device, // 0 or 1
DWORD Tcl, DWORD Trcd, DWORD Trp, DWORD Trtp, DWORD Tras,
DWORD Trc, DWORD Twr, DWORD Trrd, DWORD Tcwl, DWORD T_mode);
DWORD getTctlRegister (void);
DWORD getTctlMaxDiff (void);
DWORD getSlamTime (void);
void setSlamTime (DWORD);
/*DWORD getAltVidSlamTime (void);
void setAltVidSlamTime (DWORD);*/
DWORD getStepUpRampTime (void);
DWORD getStepDownRampTime (void);
void setStepUpRampTime (DWORD);
void setStepDownRampTime (DWORD);
//HTC Section - Read status
bool HTCisCapable ();
bool HTCisEnabled ();
bool HTCisActive ();
bool HTChasBeenActive ();
DWORD HTCTempLimit ();
bool HTCSlewControl ();
DWORD HTCHystTemp ();
DWORD HTCPStateLimit ();
bool HTCLocked ();
DWORD getAltVID ();
//HTC Section - Change status
void HTCEnable ();
void HTCDisable ();
void HTCsetTempLimit (DWORD);
void HTCsetHystLimit (DWORD);
void setAltVid (DWORD);
//PSI_L bit
bool getPsiEnabled ();
DWORD getPsiThreshold ();
void setPsiEnabled (bool);
void setPsiThreshold (DWORD);
//HyperTransport Section
void setHTLinkSpeed (DWORD, DWORD);
//Various settings
bool getC1EStatus ();
void setC1EStatus (bool);
// Autocheck mode
void checkMode ();
//Performance counters
void perfCounterGetInfo ();
void perfCounterGetValue (unsigned int);
void perfMonitorCPUUsage ();
void perfMonitorFPUUsage ();
void perfMonitorDCMA ();
//Scaler helper methods
void getCurrentStatus (struct procStatus *pStatus, DWORD core);
};