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
|
Index: src/config/Options.lb
===================================================================
RCS file: /cvsroot/freebios/freebios2/src/config/Options.lb,v
retrieving revision 1.56
diff -u -r1.56 Options.lb
--- src/config/Options.lb 14 Jan 2005 21:54:16 -0000 1.56
+++ src/config/Options.lb 26 Jan 2005 09:50:04 -0000
@@ -815,3 +815,13 @@
export never
comment "Configure briQ with PowerPC G4"
end
+###############################################
+# Options for amd k8
+###############################################
+define ALLOW_HT_OVERCLOCKING
+ default 0
+ export always
+ comment "Allow K8 and AMD8131 to operate at maximum speed"
+end
+
+
Index: src/devices/hypertransport.c
===================================================================
RCS file: /cvsroot/freebios/freebios2/src/devices/hypertransport.c,v
retrieving revision 1.12
diff -u -r1.12 hypertransport.c
--- src/devices/hypertransport.c 19 Jan 2005 01:19:37 -0000 1.12
+++ src/devices/hypertransport.c 26 Jan 2005 09:50:04 -0000
@@ -7,6 +7,9 @@
#include <device/hypertransport.h>
#include <part/hard_reset.h>
#include <part/fallback_boot.h>
+#if (ALLOW_HT_OVERCLOCKING==1) && (USE_FALLBACK_IMAGE==0)
+#include <pc80/mc146818rtc.h>
+#endif
static device_t ht_scan_get_devs(device_t *old_devices)
{
@@ -29,6 +32,9 @@
{
/* Handle bugs in valid hypertransport frequency reporting */
unsigned freq_cap;
+#if (ALLOW_HT_OVERCLOCKING==1) && (USE_FALLBACK_IMAGE==0)
+ int on;
+#endif
freq_cap = pci_read_config16(dev, pos);
freq_cap &= ~(1 << HT_FREQ_VENDOR); /* Ignore Vendor HT frequencies */
@@ -36,7 +42,12 @@
/* AMD 8131 Errata 48 */
if ((dev->vendor == PCI_VENDOR_ID_AMD) &&
(dev->device == PCI_DEVICE_ID_AMD_8131_PCIX)) {
+#if (ALLOW_HT_OVERCLOCKING==1) && (USE_FALLBACK_IMAGE==0)
+ on=0; get_option(&on, "amd8131_800MHz");
+ if(!on) freq_cap &= ~(1 << HT_FREQ_800Mhz);
+#else
freq_cap &= ~(1 << HT_FREQ_800Mhz);
+#endif
}
/* AMD 8151 Errata 23 */
if ((dev->vendor == PCI_VENDOR_ID_AMD) &&
@@ -45,7 +56,12 @@
}
/* AMD K8 Unsupported 1Ghz? */
if ((dev->vendor == PCI_VENDOR_ID_AMD) && (dev->device == 0x1100)) {
+#if (ALLOW_HT_OVERCLOCKING==1) && (USE_FALLBACK_IMAGE==0)
+ on=0; get_option(&on, "amdk8_1GHz");
+ if(!on) freq_cap &= ~(1 << HT_FREQ_1000Mhz);
+#else
freq_cap &= ~(1 << HT_FREQ_1000Mhz);
+#endif
}
return freq_cap;
}
Index: src/northbridge/amd/amdk8/coherent_ht.c
===================================================================
RCS file: /cvsroot/freebios/freebios2/src/northbridge/amd/amdk8/coherent_ht.c,v
retrieving revision 1.40
diff -u -r1.40 coherent_ht.c
--- src/northbridge/amd/amdk8/coherent_ht.c 7 Jan 2005 21:12:05 -0000 1.40
+++ src/northbridge/amd/amdk8/coherent_ht.c 26 Jan 2005 09:50:04 -0000
@@ -266,7 +266,13 @@
/* AMD 8131 Errata 48 */
if (id == (PCI_VENDOR_ID_AMD | (PCI_DEVICE_ID_AMD_8131_PCIX << 16))) {
- freq_cap &= ~(1 << HT_FREQ_800Mhz);
+#if (ALLOW_HT_OVERCLOCKING==1) && (USE_FALLBACK_IMAGE==0)
+ if(!read_option(CMOS_VSTART_amd8131_800MHz,
+ CMOS_VLEN_amd8131_800MHz, 0))
+ freq_cap &= ~(1 << HT_FREQ_800Mhz);
+#else
+ freq_cap &= ~(1 << HT_FREQ_800Mhz);
+#endif
}
/* AMD 8151 Errata 23 */
if (id == (PCI_VENDOR_ID_AMD | (PCI_DEVICE_ID_AMD_8151_SYSCTRL << 16))) {
@@ -274,7 +280,13 @@
}
/* AMD K8 Unsupported 1Ghz? */
if (id == (PCI_VENDOR_ID_AMD | (0x1100 << 16))) {
- freq_cap &= ~(1 << HT_FREQ_1000Mhz);
+#if (ALLOW_HT_OVERCLOCKING==1) && (USE_FALLBACK_IMAGE==0)
+ if(!read_option(CMOS_VSTART_amdk8_1GHz,
+ CMOS_VLEN_amdk8_1GHz, 0))
+ freq_cap &= ~(1 << HT_FREQ_1000Mhz);
+#else
+ freq_cap &= ~(1 << HT_FREQ_1000Mhz);
+#endif
}
return freq_cap;
}
Index: src/northbridge/amd/amdk8/incoherent_ht.c
===================================================================
RCS file: /cvsroot/freebios/freebios2/src/northbridge/amd/amdk8/incoherent_ht.c,v
retrieving revision 1.15
diff -u -r1.15 incoherent_ht.c
--- src/northbridge/amd/amdk8/incoherent_ht.c 20 Jan 2005 20:41:17 -0000 1.15
+++ src/northbridge/amd/amdk8/incoherent_ht.c 26 Jan 2005 09:50:04 -0000
@@ -1,6 +1,7 @@
/*
This should be done by Eric
- 2004.12 yhlu add multi ht chain dynamically support
+ 2004.12 yhlu add multi ht chain dynamically support
+ 2005.01 stepan add HT overclocking feature
*/
#include <device/pci_def.h>
#include <device/pci_ids.h>
@@ -96,7 +97,13 @@
/* AMD 8131 Errata 48 */
if (id == (PCI_VENDOR_ID_AMD | (PCI_DEVICE_ID_AMD_8131_PCIX << 16))) {
+#if (ALLOW_HT_OVERCLOCKING==1) && (USE_FALLBACK_IMAGE==0)
+ if(!read_option(CMOS_VSTART_amd8131_800MHz,
+ CMOS_VLEN_amd8131_800MHz, 0))
+ freq_cap &= ~(1 << HT_FREQ_800Mhz);
+#else
freq_cap &= ~(1 << HT_FREQ_800Mhz);
+#endif
}
/* AMD 8151 Errata 23 */
if (id == (PCI_VENDOR_ID_AMD | (PCI_DEVICE_ID_AMD_8151_SYSCTRL << 16))) {
@@ -104,7 +111,13 @@
}
/* AMD K8 Unsupported 1Ghz? */
if (id == (PCI_VENDOR_ID_AMD | (0x1100 << 16))) {
+#if (ALLOW_HT_OVERCLOCKING==1) && (USE_FALLBACK_IMAGE==0)
+ if(!read_option(CMOS_VSTART_amdk8_1GHz,
+ CMOS_VLEN_amdk8_1GHz, 0))
+ freq_cap &= ~(1 << HT_FREQ_1000Mhz);
+#else
freq_cap &= ~(1 << HT_FREQ_1000Mhz);
+#endif
}
return freq_cap;
}
|