--- xeno-unstable.bk/xen/arch/i386/setup.c.orig 2004-03-12 08:05:58.000000000 +0000 +++ xeno-unstable.bk/xen/arch/i386/setup.c 2004-03-12 10:25:19.000000000 +0000 @@ -203,6 +203,8 @@ break; case X86_VENDOR_UNKNOWN: /* Connectix Virtual PC reports this */ break; + case X86_VENDOR_CENTAUR: /* e.g. Via C3-II Nehemiah */ + break; default: panic("Only support Intel processors (P6+)\n"); } --- xeno-unstable.bk/xenolinux-2.4.25-sparse/arch/xeno/config.in.orig 2004-03-12 09:27:24.000000000 +0000 +++ xeno-unstable.bk/xenolinux-2.4.25-sparse/arch/xeno/config.in 2004-03-12 09:36:21.000000000 +0000 @@ -39,7 +39,8 @@ "Pentium-Pro/Celeron/Pentium-II CONFIG_M686 \ Pentium-III/Celeron(Coppermine) CONFIG_MPENTIUMIII \ Pentium-4 CONFIG_MPENTIUM4 \ - Athlon/Duron/K7 CONFIG_MK7" Pentium-Pro + Athlon/Duron/K7 CONFIG_MK7 \ + VIA-C3-2 CONFIG_MVIAC3_2" Pentium-Pro define_bool CONFIG_X86_WP_WORKS_OK y define_bool CONFIG_X86_INVLPG y @@ -68,6 +69,9 @@ define_int CONFIG_X86_L1_CACHE_SHIFT 6 define_bool CONFIG_X86_USE_3DNOW y fi +if [ "$CONFIG_MVIAC3_2" = "y" ]; then + define_int CONFIG_X86_L1_CACHE_SHIFT 5 +fi if [ "$CONFIG_EXPERIMENTAL" = "y" ]; then tristate 'BIOS Enhanced Disk Drive calls determine boot disk (EXPERIMENTAL)' CONFIG_EDD --- xeno-unstable.bk/xenolinux-2.4.25-sparse/arch/xeno/kernel/setup.c.orig 2004-03-12 08:42:45.000000000 +0000 +++ xeno-unstable.bk/xenolinux-2.4.25-sparse/arch/xeno/kernel/setup.c 2004-03-12 10:33:11.000000000 +0000 @@ -48,6 +48,7 @@ #include #include #include +#include /* dev_(de)activate */ /* * Point at the empty zero page to start with. We map the real shared_info @@ -444,6 +445,39 @@ l2size, ecx & 0xFF); } +static void __init init_c3(struct cpuinfo_x86 *c) +{ + /* Test for Centaur Extended Feature Flags presence */ + if (cpuid_eax(0xC0000000) >= 0xC0000001) { + /* store Centaur Extended Feature Flags as + * word 5 of the CPU capability bit array + */ + c->x86_capability[5] = cpuid_edx(0xC0000001); + } + + switch (c->x86_model) { + case 9: /* Nehemiah */ + default: + get_model_name(c); + display_cacheinfo(c); + break; + } +} + +static void __init init_centaur(struct cpuinfo_x86 *c) +{ + /* Bit 31 in normal CPUID used for nonstandard 3DNow ID; + 3DNow is IDd by bit 31 in extended CPUID (1*32+31) anyway */ + clear_bit(0*32+31, &c->x86_capability); + + switch (c->x86) { + case 6: + init_c3(c); + break; + deafult: + panic("Unsupported Centaur CPU (%i)\n", c->x86); + } +} static int __init init_amd(struct cpuinfo_x86 *c) { @@ -630,6 +664,8 @@ c->x86_vendor = X86_VENDOR_INTEL; else if (!strcmp(v, "AuthenticAMD")) c->x86_vendor = X86_VENDOR_AMD; + else if (!strcmp(v, "CentaurHauls")) + c->x86_vendor = X86_VENDOR_CENTAUR; else c->x86_vendor = X86_VENDOR_UNKNOWN; } @@ -819,8 +856,12 @@ init_intel(c); break; + case X86_VENDOR_CENTAUR: + init_centaur(c); + break; + default: - panic("Unsupported CPU vendor\n"); + panic("Unsupported CPU vendor (%i)\n", c->x86_vendor); } printk(KERN_DEBUG "CPU: After vendor init, caps: %08x %08x %08x %08x\n",