blob: e710a21bb6e8dc0dd9d83a7bd49df69135cbcf7b [file] [log] [blame]
Linus Torvalds1da177e2005-04-16 15:20:36 -07001#include <linux/init.h>
2#include <linux/bitops.h>
3#include <linux/delay.h>
4#include <linux/pci.h>
5#include <asm/dma.h>
6#include <asm/io.h>
Juergen Beisertf25f64e2007-07-22 11:12:38 +02007#include <asm/processor-cyrix.h>
Dave Jones7ebad702008-01-30 13:30:39 +01008#include <asm/processor-flags.h>
Linus Torvalds1da177e2005-04-16 15:20:36 -07009#include <asm/timer.h>
Alan120fad72007-02-13 13:26:26 +010010#include <asm/pci-direct.h>
Alexey Dobriyane8edc6e2007-05-21 01:22:52 +040011#include <asm/tsc.h>
Linus Torvalds1da177e2005-04-16 15:20:36 -070012
13#include "cpu.h"
14
15/*
16 * Read NSC/Cyrix DEVID registers (DIR) to get more detailed info. about the CPU
17 */
Magnus Damm5f0f1c12006-09-26 10:52:36 +020018static void __cpuinit do_cyrix_devid(unsigned char *dir0, unsigned char *dir1)
Linus Torvalds1da177e2005-04-16 15:20:36 -070019{
20 unsigned char ccr2, ccr3;
21 unsigned long flags;
Paolo Ciarrocchiadf85262008-02-22 23:11:23 +010022
Linus Torvalds1da177e2005-04-16 15:20:36 -070023 /* we test for DEVID by checking whether CCR3 is writable */
24 local_irq_save(flags);
25 ccr3 = getCx86(CX86_CCR3);
26 setCx86(CX86_CCR3, ccr3 ^ 0x80);
27 getCx86(0xc0); /* dummy to change bus */
28
29 if (getCx86(CX86_CCR3) == ccr3) { /* no DEVID regs. */
30 ccr2 = getCx86(CX86_CCR2);
31 setCx86(CX86_CCR2, ccr2 ^ 0x04);
32 getCx86(0xc0); /* dummy */
33
34 if (getCx86(CX86_CCR2) == ccr2) /* old Cx486SLC/DLC */
35 *dir0 = 0xfd;
36 else { /* Cx486S A step */
37 setCx86(CX86_CCR2, ccr2);
38 *dir0 = 0xfe;
39 }
Paolo Ciarrocchiadf85262008-02-22 23:11:23 +010040 } else {
Linus Torvalds1da177e2005-04-16 15:20:36 -070041 setCx86(CX86_CCR3, ccr3); /* restore CCR3 */
42
43 /* read DIR0 and DIR1 CPU registers */
44 *dir0 = getCx86(CX86_DIR0);
45 *dir1 = getCx86(CX86_DIR1);
46 }
47 local_irq_restore(flags);
48}
49
50/*
51 * Cx86_dir0_msb is a HACK needed by check_cx686_cpuid/slop in bugs.h in
52 * order to identify the Cyrix CPU model after we're out of setup.c
53 *
54 * Actually since bugs.h doesn't even reference this perhaps someone should
55 * fix the documentation ???
56 */
Magnus Dammb4af3f72006-09-26 10:52:36 +020057static unsigned char Cx86_dir0_msb __cpuinitdata = 0;
Linus Torvalds1da177e2005-04-16 15:20:36 -070058
Magnus Dammb4af3f72006-09-26 10:52:36 +020059static char Cx86_model[][9] __cpuinitdata = {
Linus Torvalds1da177e2005-04-16 15:20:36 -070060 "Cx486", "Cx486", "5x86 ", "6x86", "MediaGX ", "6x86MX ",
61 "M II ", "Unknown"
62};
Magnus Dammb4af3f72006-09-26 10:52:36 +020063static char Cx486_name[][5] __cpuinitdata = {
Linus Torvalds1da177e2005-04-16 15:20:36 -070064 "SLC", "DLC", "SLC2", "DLC2", "SRx", "DRx",
65 "SRx2", "DRx2"
66};
Magnus Dammb4af3f72006-09-26 10:52:36 +020067static char Cx486S_name[][4] __cpuinitdata = {
Linus Torvalds1da177e2005-04-16 15:20:36 -070068 "S", "S2", "Se", "S2e"
69};
Magnus Dammb4af3f72006-09-26 10:52:36 +020070static char Cx486D_name[][4] __cpuinitdata = {
Linus Torvalds1da177e2005-04-16 15:20:36 -070071 "DX", "DX2", "?", "?", "?", "DX4"
72};
Magnus Dammb4af3f72006-09-26 10:52:36 +020073static char Cx86_cb[] __cpuinitdata = "?.5x Core/Bus Clock";
74static char cyrix_model_mult1[] __cpuinitdata = "12??43";
75static char cyrix_model_mult2[] __cpuinitdata = "12233445";
Linus Torvalds1da177e2005-04-16 15:20:36 -070076
77/*
78 * Reset the slow-loop (SLOP) bit on the 686(L) which is set by some old
79 * BIOSes for compatibility with DOS games. This makes the udelay loop
80 * work correctly, and improves performance.
81 *
82 * FIXME: our newer udelay uses the tsc. We don't need to frob with SLOP
83 */
84
Magnus Dammb4af3f72006-09-26 10:52:36 +020085static void __cpuinit check_cx686_slop(struct cpuinfo_x86 *c)
Linus Torvalds1da177e2005-04-16 15:20:36 -070086{
87 unsigned long flags;
Paolo Ciarrocchiadf85262008-02-22 23:11:23 +010088
Linus Torvalds1da177e2005-04-16 15:20:36 -070089 if (Cx86_dir0_msb == 3) {
90 unsigned char ccr3, ccr5;
91
92 local_irq_save(flags);
93 ccr3 = getCx86(CX86_CCR3);
Marcin Garskidb955172007-10-19 23:22:11 +020094 setCx86(CX86_CCR3, (ccr3 & 0x0f) | 0x10); /* enable MAPEN */
Linus Torvalds1da177e2005-04-16 15:20:36 -070095 ccr5 = getCx86(CX86_CCR5);
96 if (ccr5 & 2)
97 setCx86(CX86_CCR5, ccr5 & 0xfd); /* reset SLOP */
98 setCx86(CX86_CCR3, ccr3); /* disable MAPEN */
99 local_irq_restore(flags);
100
101 if (ccr5 & 2) { /* possible wrong calibration done */
102 printk(KERN_INFO "Recalibrating delay loop with SLOP bit reset\n");
103 calibrate_delay();
104 c->loops_per_jiffy = loops_per_jiffy;
105 }
106 }
107}
108
109
Magnus Dammb4af3f72006-09-26 10:52:36 +0200110static void __cpuinit set_cx86_reorder(void)
Linus Torvalds1da177e2005-04-16 15:20:36 -0700111{
112 u8 ccr3;
113
114 printk(KERN_INFO "Enable Memory access reorder on Cyrix/NSC processor.\n");
115 ccr3 = getCx86(CX86_CCR3);
Jan Engelhardt96de0e22007-10-19 23:21:04 +0200116 setCx86(CX86_CCR3, (ccr3 & 0x0f) | 0x10); /* enable MAPEN */
Linus Torvalds1da177e2005-04-16 15:20:36 -0700117
Jan Engelhardt96de0e22007-10-19 23:21:04 +0200118 /* Load/Store Serialize to mem access disable (=reorder it) */
Linus Torvalds1da177e2005-04-16 15:20:36 -0700119 setCx86(CX86_PCR0, getCx86(CX86_PCR0) & ~0x80);
120 /* set load/store serialize from 1GB to 4GB */
121 ccr3 |= 0xe0;
122 setCx86(CX86_CCR3, ccr3);
123}
124
Magnus Dammb4af3f72006-09-26 10:52:36 +0200125static void __cpuinit set_cx86_memwb(void)
Linus Torvalds1da177e2005-04-16 15:20:36 -0700126{
Linus Torvalds1da177e2005-04-16 15:20:36 -0700127 printk(KERN_INFO "Enable Memory-Write-back mode on Cyrix/NSC processor.\n");
128
129 /* CCR2 bit 2: unlock NW bit */
130 setCx86(CX86_CCR2, getCx86(CX86_CCR2) & ~0x04);
131 /* set 'Not Write-through' */
Dave Jones7ebad702008-01-30 13:30:39 +0100132 write_cr0(read_cr0() | X86_CR0_NW);
Linus Torvalds1da177e2005-04-16 15:20:36 -0700133 /* CCR2 bit 2: lock NW bit and set WT1 */
Paolo Ciarrocchiadf85262008-02-22 23:11:23 +0100134 setCx86(CX86_CCR2, getCx86(CX86_CCR2) | 0x14);
Linus Torvalds1da177e2005-04-16 15:20:36 -0700135}
136
Linus Torvalds1da177e2005-04-16 15:20:36 -0700137/*
138 * Configure later MediaGX and/or Geode processor.
139 */
140
Magnus Dammb4af3f72006-09-26 10:52:36 +0200141static void __cpuinit geode_configure(void)
Linus Torvalds1da177e2005-04-16 15:20:36 -0700142{
143 unsigned long flags;
TAKADA Yoshihitobcde1eb2007-02-13 13:26:25 +0100144 u8 ccr3;
Linus Torvalds1da177e2005-04-16 15:20:36 -0700145 local_irq_save(flags);
146
147 /* Suspend on halt power saving and enable #SUSP pin */
148 setCx86(CX86_CCR2, getCx86(CX86_CCR2) | 0x88);
149
150 ccr3 = getCx86(CX86_CCR3);
TAKADA Yoshihitobcde1eb2007-02-13 13:26:25 +0100151 setCx86(CX86_CCR3, (ccr3 & 0x0f) | 0x10); /* enable MAPEN */
Paolo Ciarrocchiadf85262008-02-22 23:11:23 +0100152
TAKADA Yoshihitobcde1eb2007-02-13 13:26:25 +0100153
154 /* FPU fast, DTE cache, Mem bypass */
155 setCx86(CX86_CCR4, getCx86(CX86_CCR4) | 0x38);
156 setCx86(CX86_CCR3, ccr3); /* disable MAPEN */
Paolo Ciarrocchiadf85262008-02-22 23:11:23 +0100157
Linus Torvalds1da177e2005-04-16 15:20:36 -0700158 set_cx86_memwb();
Paolo Ciarrocchiadf85262008-02-22 23:11:23 +0100159 set_cx86_reorder();
Paolo Ciarrocchiadf85262008-02-22 23:11:23 +0100160
Linus Torvalds1da177e2005-04-16 15:20:36 -0700161 local_irq_restore(flags);
162}
163
164
Magnus Dammb4af3f72006-09-26 10:52:36 +0200165static void __cpuinit init_cyrix(struct cpuinfo_x86 *c)
Linus Torvalds1da177e2005-04-16 15:20:36 -0700166{
167 unsigned char dir0, dir0_msn, dir0_lsn, dir1 = 0;
168 char *buf = c->x86_model_id;
169 const char *p = NULL;
170
Paolo Ciarrocchiadf85262008-02-22 23:11:23 +0100171 /*
172 * Bit 31 in normal CPUID used for nonstandard 3DNow ID;
173 * 3DNow is IDd by bit 31 in extended CPUID (1*32+31) anyway
174 */
Ingo Molnar1d007cd2008-02-26 08:52:27 +0100175 clear_cpu_cap(c, 0*32+31);
Linus Torvalds1da177e2005-04-16 15:20:36 -0700176
177 /* Cyrix used bit 24 in extended (AMD) CPUID for Cyrix MMX extensions */
Ingo Molnar1d007cd2008-02-26 08:52:27 +0100178 if (test_cpu_cap(c, 1*32+24)) {
179 clear_cpu_cap(c, 1*32+24);
180 set_cpu_cap(c, X86_FEATURE_CXMMX);
Linus Torvalds1da177e2005-04-16 15:20:36 -0700181 }
182
183 do_cyrix_devid(&dir0, &dir1);
184
185 check_cx686_slop(c);
186
187 Cx86_dir0_msb = dir0_msn = dir0 >> 4; /* identifies CPU "family" */
188 dir0_lsn = dir0 & 0xf; /* model or clock multiplier */
189
190 /* common case step number/rev -- exceptions handled below */
191 c->x86_model = (dir1 >> 4) + 1;
192 c->x86_mask = dir1 & 0xf;
193
194 /* Now cook; the original recipe is by Channing Corn, from Cyrix.
195 * We do the same thing for each generation: we work out
196 * the model, multiplier and stepping. Black magic included,
197 * to make the silicon step/rev numbers match the printed ones.
198 */
Paolo Ciarrocchiadf85262008-02-22 23:11:23 +0100199
Linus Torvalds1da177e2005-04-16 15:20:36 -0700200 switch (dir0_msn) {
201 unsigned char tmp;
202
203 case 0: /* Cx486SLC/DLC/SRx/DRx */
204 p = Cx486_name[dir0_lsn & 7];
205 break;
206
207 case 1: /* Cx486S/DX/DX2/DX4 */
208 p = (dir0_lsn & 8) ? Cx486D_name[dir0_lsn & 5]
209 : Cx486S_name[dir0_lsn & 3];
210 break;
211
212 case 2: /* 5x86 */
213 Cx86_cb[2] = cyrix_model_mult1[dir0_lsn & 5];
214 p = Cx86_cb+2;
215 break;
216
217 case 3: /* 6x86/6x86L */
218 Cx86_cb[1] = ' ';
219 Cx86_cb[2] = cyrix_model_mult1[dir0_lsn & 5];
220 if (dir1 > 0x21) { /* 686L */
221 Cx86_cb[0] = 'L';
222 p = Cx86_cb;
223 (c->x86_model)++;
224 } else /* 686 */
225 p = Cx86_cb+1;
226 /* Emulate MTRRs using Cyrix's ARRs. */
Ingo Molnar1d007cd2008-02-26 08:52:27 +0100227 set_cpu_cap(c, X86_FEATURE_CYRIX_ARR);
Linus Torvalds1da177e2005-04-16 15:20:36 -0700228 /* 6x86's contain this bug */
229 c->coma_bug = 1;
230 break;
231
232 case 4: /* MediaGX/GXm or Geode GXM/GXLV/GX1 */
233#ifdef CONFIG_PCI
Alan120fad72007-02-13 13:26:26 +0100234 {
235 u32 vendor, device;
Paolo Ciarrocchiadf85262008-02-22 23:11:23 +0100236 /*
237 * It isn't really a PCI quirk directly, but the cure is the
238 * same. The MediaGX has deep magic SMM stuff that handles the
239 * SB emulation. It throws away the fifo on disable_dma() which
240 * is wrong and ruins the audio.
241 *
242 * Bug2: VSA1 has a wrap bug so that using maximum sized DMA
243 * causes bad things. According to NatSemi VSA2 has another
244 * bug to do with 'hlt'. I've not seen any boards using VSA2
245 * and X doesn't seem to support it either so who cares 8).
246 * VSA1 we work around however.
247 */
Linus Torvalds1da177e2005-04-16 15:20:36 -0700248
249 printk(KERN_INFO "Working around Cyrix MediaGX virtual DMA bugs.\n");
250 isa_dma_bridge_buggy = 2;
Andreas Mohrcefc0112006-06-23 02:04:26 -0700251
Alan120fad72007-02-13 13:26:26 +0100252 /* We do this before the PCI layer is running. However we
253 are safe here as we know the bridge must be a Cyrix
254 companion and must be present */
255 vendor = read_pci_config_16(0, 0, 0x12, PCI_VENDOR_ID);
256 device = read_pci_config_16(0, 0, 0x12, PCI_DEVICE_ID);
Andreas Mohrcefc0112006-06-23 02:04:26 -0700257
Linus Torvalds1da177e2005-04-16 15:20:36 -0700258 /*
259 * The 5510/5520 companion chips have a funky PIT.
Paolo Ciarrocchiadf85262008-02-22 23:11:23 +0100260 */
Alan120fad72007-02-13 13:26:26 +0100261 if (vendor == PCI_VENDOR_ID_CYRIX &&
262 (device == PCI_DEVICE_ID_CYRIX_5510 || device == PCI_DEVICE_ID_CYRIX_5520))
john stultz5a90cf22007-05-02 19:27:08 +0200263 mark_tsc_unstable("cyrix 5510/5520 detected");
Alan120fad72007-02-13 13:26:26 +0100264 }
Andreas Mohrcefc0112006-06-23 02:04:26 -0700265#endif
Paolo Ciarrocchiadf85262008-02-22 23:11:23 +0100266 c->x86_cache_size = 16; /* Yep 16K integrated cache thats it */
Linus Torvalds1da177e2005-04-16 15:20:36 -0700267
268 /* GXm supports extended cpuid levels 'ala' AMD */
269 if (c->cpuid_level == 2) {
270 /* Enable cxMMX extensions (GX1 Datasheet 54) */
takada2632f012007-02-13 13:26:24 +0100271 setCx86(CX86_CCR7, getCx86(CX86_CCR7) | 1);
Paolo Ciarrocchiadf85262008-02-22 23:11:23 +0100272
takada2632f012007-02-13 13:26:24 +0100273 /*
274 * GXm : 0x30 ... 0x5f GXm datasheet 51
275 * GXlv: 0x6x GXlv datasheet 54
276 * ? : 0x7x
277 * GX1 : 0x8x GX1 datasheet 56
278 */
Paolo Ciarrocchiadf85262008-02-22 23:11:23 +0100279 if ((0x30 <= dir1 && dir1 <= 0x6f) || (0x80 <= dir1 && dir1 <= 0x8f))
Linus Torvalds1da177e2005-04-16 15:20:36 -0700280 geode_configure();
281 get_model_name(c); /* get CPU marketing name */
282 return;
Paolo Ciarrocchiadf85262008-02-22 23:11:23 +0100283 } else { /* MediaGX */
Linus Torvalds1da177e2005-04-16 15:20:36 -0700284 Cx86_cb[2] = (dir0_lsn & 1) ? '3' : '4';
285 p = Cx86_cb+2;
286 c->x86_model = (dir1 & 0x20) ? 1 : 2;
287 }
288 break;
289
Paolo Ciarrocchiadf85262008-02-22 23:11:23 +0100290 case 5: /* 6x86MX/M II */
291 if (dir1 > 7) {
Linus Torvalds1da177e2005-04-16 15:20:36 -0700292 dir0_msn++; /* M II */
293 /* Enable MMX extensions (App note 108) */
294 setCx86(CX86_CCR7, getCx86(CX86_CCR7)|1);
Paolo Ciarrocchiadf85262008-02-22 23:11:23 +0100295 } else {
Linus Torvalds1da177e2005-04-16 15:20:36 -0700296 c->coma_bug = 1; /* 6x86MX, it has the bug. */
297 }
298 tmp = (!(dir0_lsn & 7) || dir0_lsn & 1) ? 2 : 0;
299 Cx86_cb[tmp] = cyrix_model_mult2[dir0_lsn & 7];
300 p = Cx86_cb+tmp;
Paolo Ciarrocchiadf85262008-02-22 23:11:23 +0100301 if (((dir1 & 0x0f) > 4) || ((dir1 & 0xf0) == 0x20))
Linus Torvalds1da177e2005-04-16 15:20:36 -0700302 (c->x86_model)++;
303 /* Emulate MTRRs using Cyrix's ARRs. */
Ingo Molnar1d007cd2008-02-26 08:52:27 +0100304 set_cpu_cap(c, X86_FEATURE_CYRIX_ARR);
Linus Torvalds1da177e2005-04-16 15:20:36 -0700305 break;
306
307 case 0xf: /* Cyrix 486 without DEVID registers */
308 switch (dir0_lsn) {
309 case 0xd: /* either a 486SLC or DLC w/o DEVID */
310 dir0_msn = 0;
311 p = Cx486_name[(c->hard_math) ? 1 : 0];
312 break;
313
314 case 0xe: /* a 486S A step */
315 dir0_msn = 0;
316 p = Cx486S_name[0];
317 break;
318 }
319 break;
320
321 default: /* unknown (shouldn't happen, we know everyone ;-) */
322 dir0_msn = 7;
323 break;
324 }
325 strcpy(buf, Cx86_model[dir0_msn & 7]);
Paolo Ciarrocchiadf85262008-02-22 23:11:23 +0100326 if (p)
327 strcat(buf, p);
Linus Torvalds1da177e2005-04-16 15:20:36 -0700328 return;
329}
330
331/*
Jordan Crousef90b8112006-01-06 00:12:14 -0800332 * Handle National Semiconductor branded processors
333 */
Magnus Dammb4af3f72006-09-26 10:52:36 +0200334static void __cpuinit init_nsc(struct cpuinfo_x86 *c)
Jordan Crousef90b8112006-01-06 00:12:14 -0800335{
Paolo Ciarrocchiadf85262008-02-22 23:11:23 +0100336 /*
337 * There may be GX1 processors in the wild that are branded
Jordan Crousef90b8112006-01-06 00:12:14 -0800338 * NSC and not Cyrix.
339 *
340 * This function only handles the GX processor, and kicks every
341 * thing else to the Cyrix init function above - that should
342 * cover any processors that might have been branded differently
Andreas Mohrd6e05ed2006-06-26 18:35:02 +0200343 * after NSC acquired Cyrix.
Jordan Crousef90b8112006-01-06 00:12:14 -0800344 *
345 * If this breaks your GX1 horribly, please e-mail
346 * info-linux@ldcmail.amd.com to tell us.
347 */
348
349 /* Handle the GX (Formally known as the GX2) */
350
351 if (c->x86 == 5 && c->x86_model == 5)
352 display_cacheinfo(c);
353 else
354 init_cyrix(c);
355}
356
357/*
Linus Torvalds1da177e2005-04-16 15:20:36 -0700358 * Cyrix CPUs without cpuid or with cpuid not yet enabled can be detected
359 * by the fact that they preserve the flags across the division of 5/2.
360 * PII and PPro exhibit this behavior too, but they have cpuid available.
361 */
Paolo Ciarrocchiadf85262008-02-22 23:11:23 +0100362
Linus Torvalds1da177e2005-04-16 15:20:36 -0700363/*
364 * Perform the Cyrix 5/2 test. A Cyrix won't change
365 * the flags, while other 486 chips will.
366 */
367static inline int test_cyrix_52div(void)
368{
369 unsigned int test;
370
371 __asm__ __volatile__(
372 "sahf\n\t" /* clear flags (%eax = 0x0005) */
373 "div %b2\n\t" /* divide 5 by 2 */
374 "lahf" /* store flags into %ah */
375 : "=a" (test)
376 : "0" (5), "q" (2)
377 : "cc");
378
379 /* AH is 0x02 on Cyrix after the divide.. */
380 return (unsigned char) (test >> 8) == 0x02;
381}
382
Paolo Ciarrocchiadf85262008-02-22 23:11:23 +0100383static void __cpuinit cyrix_identify(struct cpuinfo_x86 *c)
Linus Torvalds1da177e2005-04-16 15:20:36 -0700384{
385 /* Detect Cyrix with disabled CPUID */
Paolo Ciarrocchiadf85262008-02-22 23:11:23 +0100386 if (c->x86 == 4 && test_cyrix_52div()) {
Linus Torvalds1da177e2005-04-16 15:20:36 -0700387 unsigned char dir0, dir1;
Paolo Ciarrocchiadf85262008-02-22 23:11:23 +0100388
Linus Torvalds1da177e2005-04-16 15:20:36 -0700389 strcpy(c->x86_vendor_id, "CyrixInstead");
Paolo Ciarrocchiadf85262008-02-22 23:11:23 +0100390 c->x86_vendor = X86_VENDOR_CYRIX;
391
392 /* Actually enable cpuid on the older cyrix */
393
394 /* Retrieve CPU revisions */
395
Linus Torvalds1da177e2005-04-16 15:20:36 -0700396 do_cyrix_devid(&dir0, &dir1);
397
Paolo Ciarrocchiadf85262008-02-22 23:11:23 +0100398 dir0 >>= 4;
399
Linus Torvalds1da177e2005-04-16 15:20:36 -0700400 /* Check it is an affected model */
Paolo Ciarrocchiadf85262008-02-22 23:11:23 +0100401
402 if (dir0 == 5 || dir0 == 3) {
TAKADA Yoshihitobcde1eb2007-02-13 13:26:25 +0100403 unsigned char ccr3;
Linus Torvalds1da177e2005-04-16 15:20:36 -0700404 unsigned long flags;
405 printk(KERN_INFO "Enabling CPUID on Cyrix processor.\n");
406 local_irq_save(flags);
407 ccr3 = getCx86(CX86_CCR3);
TAKADA Yoshihitobcde1eb2007-02-13 13:26:25 +0100408 setCx86(CX86_CCR3, (ccr3 & 0x0f) | 0x10); /* enable MAPEN */
409 setCx86(CX86_CCR4, getCx86(CX86_CCR4) | 0x80); /* enable cpuid */
410 setCx86(CX86_CCR3, ccr3); /* disable MAPEN */
Linus Torvalds1da177e2005-04-16 15:20:36 -0700411 local_irq_restore(flags);
412 }
413 }
Linus Torvalds1da177e2005-04-16 15:20:36 -0700414}
415
Magnus Damm95414932006-09-26 10:52:36 +0200416static struct cpu_dev cyrix_cpu_dev __cpuinitdata = {
Linus Torvalds1da177e2005-04-16 15:20:36 -0700417 .c_vendor = "Cyrix",
Paolo Ciarrocchiadf85262008-02-22 23:11:23 +0100418 .c_ident = { "CyrixInstead" },
Linus Torvalds1da177e2005-04-16 15:20:36 -0700419 .c_init = init_cyrix,
420 .c_identify = cyrix_identify,
421};
422
Thomas Petazzoni03ae5762008-02-15 12:00:23 +0100423cpu_vendor_dev_register(X86_VENDOR_CYRIX, &cyrix_cpu_dev);
Linus Torvalds1da177e2005-04-16 15:20:36 -0700424
Magnus Damm95414932006-09-26 10:52:36 +0200425static struct cpu_dev nsc_cpu_dev __cpuinitdata = {
Linus Torvalds1da177e2005-04-16 15:20:36 -0700426 .c_vendor = "NSC",
Paolo Ciarrocchiadf85262008-02-22 23:11:23 +0100427 .c_ident = { "Geode by NSC" },
Jordan Crousef90b8112006-01-06 00:12:14 -0800428 .c_init = init_nsc,
Linus Torvalds1da177e2005-04-16 15:20:36 -0700429};
430
Thomas Petazzoni03ae5762008-02-15 12:00:23 +0100431cpu_vendor_dev_register(X86_VENDOR_NSC, &nsc_cpu_dev);