1 #include <linux/kernel.h>
2 #include <linux/init.h>
3 #include <linux/string.h>
4 #include <asm/processor.h>
9 * Detect a NexGen CPU running without BIOS hypercode new enough
10 * to have CPUID. (Thanks to Herbert Oppmann)
13 static int __init deep_magic_nexgen_probe(void)
17 __asm__ __volatile__ (
18 " movw $0x5555, %%ax\n"
26 : "=a" (ret) : : "cx", "dx" );
30 static void __init init_nexgen(struct cpuinfo_x86 * c)
32 c->x86_cache_size = 256; /* A few had 1 MB... */
35 static void __init nexgen_identify(struct cpuinfo_x86 * c)
37 /* Detect NexGen with old hypercode */
38 if ( deep_magic_nexgen_probe() ) {
39 strcpy(c->x86_vendor_id, "NexGenDriven");
44 static struct cpu_dev nexgen_cpu_dev __initdata = {
46 .c_ident = { "NexGenDriven" },
48 { .vendor = X86_VENDOR_NEXGEN,
50 .model_names = { [1] = "Nx586" }
53 .c_init = init_nexgen,
54 .c_identify = nexgen_identify,
57 int __init nexgen_init_cpu(void)
59 cpu_devs[X86_VENDOR_NEXGEN] = &nexgen_cpu_dev;
63 //early_arch_initcall(nexgen_init_cpu);