ia64/xen-unstable

changeset 1170:3180669cb85d

bitkeeper revision 1.787 (4051bc4ehrQHo7L4maQXzA3WoPbfmw)

setup.c, config.in:
Detect and support VIA C3 processors.
author kaf24@scramble.cl.cam.ac.uk
date Fri Mar 12 13:34:06 2004 +0000 (2004-03-12)
parents 523427204b5a
children 81897ae013e0
files xen/arch/i386/setup.c xenolinux-2.4.25-sparse/arch/xeno/config.in xenolinux-2.4.25-sparse/arch/xeno/kernel/setup.c
line diff
     1.1 --- a/xen/arch/i386/setup.c	Fri Mar 12 11:47:09 2004 +0000
     1.2 +++ b/xen/arch/i386/setup.c	Fri Mar 12 13:34:06 2004 +0000
     1.3 @@ -203,8 +203,11 @@ void __init identify_cpu(struct cpuinfo_
     1.4          break;
     1.5      case X86_VENDOR_UNKNOWN:  /* Connectix Virtual PC reports this */
     1.6  	break;
     1.7 +    case X86_VENDOR_CENTAUR:
     1.8 +        break;
     1.9      default:
    1.10 -        panic("Only support Intel processors (P6+)\n");
    1.11 +        printk("Unknown CPU identifier (%d): continuing anyway, "
    1.12 +               "but might fail.\n", c->x86_vendor);
    1.13      }
    1.14  	
    1.15      printk("CPU caps: %08x %08x %08x %08x\n",
     2.1 --- a/xenolinux-2.4.25-sparse/arch/xeno/config.in	Fri Mar 12 11:47:09 2004 +0000
     2.2 +++ b/xenolinux-2.4.25-sparse/arch/xeno/config.in	Fri Mar 12 13:34:06 2004 +0000
     2.3 @@ -39,7 +39,9 @@ choice 'Processor family' \
     2.4  	"Pentium-Pro/Celeron/Pentium-II		CONFIG_M686 \
     2.5  	 Pentium-III/Celeron(Coppermine)	CONFIG_MPENTIUMIII \
     2.6  	 Pentium-4				CONFIG_MPENTIUM4 \
     2.7 -	 Athlon/Duron/K7			CONFIG_MK7" Pentium-Pro
     2.8 +	 Athlon/Duron/K7			CONFIG_MK7 \
     2.9 +	 Opteron/Athlon64/Hammer/K8             CONFIG_MK8 \
    2.10 +	 VIA-C3-2                               CONFIG_MVIAC3_2" Pentium-Pro
    2.11  
    2.12     define_bool CONFIG_X86_WP_WORKS_OK y
    2.13     define_bool CONFIG_X86_INVLPG y
    2.14 @@ -64,10 +66,16 @@ fi
    2.15  if [ "$CONFIG_MPENTIUM4" = "y" ]; then
    2.16     define_int  CONFIG_X86_L1_CACHE_SHIFT 7
    2.17  fi
    2.18 +if [ "$CONFIG_MK8" = "y" ]; then
    2.19 +   define_bool CONFIG_MK7 y
    2.20 +fi
    2.21  if [ "$CONFIG_MK7" = "y" ]; then
    2.22     define_int  CONFIG_X86_L1_CACHE_SHIFT 6
    2.23     define_bool CONFIG_X86_USE_3DNOW y
    2.24  fi
    2.25 +if [ "$CONFIG_MVIAC3_2" = "y" ]; then
    2.26 +   define_int  CONFIG_X86_L1_CACHE_SHIFT 5
    2.27 +fi
    2.28  
    2.29  if [ "$CONFIG_EXPERIMENTAL" = "y" ]; then
    2.30     tristate 'BIOS Enhanced Disk Drive calls determine boot disk (EXPERIMENTAL)' CONFIG_EDD
     3.1 --- a/xenolinux-2.4.25-sparse/arch/xeno/kernel/setup.c	Fri Mar 12 11:47:09 2004 +0000
     3.2 +++ b/xenolinux-2.4.25-sparse/arch/xeno/kernel/setup.c	Fri Mar 12 13:34:06 2004 +0000
     3.3 @@ -48,6 +48,7 @@
     3.4  #include <linux/netdevice.h>
     3.5  #include <linux/rtnetlink.h>
     3.6  #include <linux/tqueue.h>
     3.7 +#include <net/pkt_sched.h> /* dev_(de)activate */
     3.8  
     3.9  /*
    3.10   * Point at the empty zero page to start with. We map the real shared_info
    3.11 @@ -444,6 +445,39 @@ static void __init display_cacheinfo(str
    3.12             l2size, ecx & 0xFF);
    3.13  }
    3.14  
    3.15 +static void __init init_c3(struct cpuinfo_x86 *c)
    3.16 +{
    3.17 +    /* Test for Centaur Extended Feature Flags presence */
    3.18 +    if (cpuid_eax(0xC0000000) >= 0xC0000001) {
    3.19 +        /* store Centaur Extended Feature Flags as
    3.20 +         * word 5 of the CPU capability bit array
    3.21 +         */
    3.22 +        c->x86_capability[5] = cpuid_edx(0xC0000001);
    3.23 +    }
    3.24 +   
    3.25 +    switch (c->x86_model) {
    3.26 +    case 9:	/* Nehemiah */
    3.27 +    default:
    3.28 +        get_model_name(c);
    3.29 +        display_cacheinfo(c);
    3.30 +        break;
    3.31 +    }
    3.32 +}
    3.33 +
    3.34 +static void __init init_centaur(struct cpuinfo_x86 *c)
    3.35 +{
    3.36 +    /* Bit 31 in normal CPUID used for nonstandard 3DNow ID;
    3.37 +       3DNow is IDd by bit 31 in extended CPUID (1*3231) anyway */
    3.38 +    clear_bit(0*32+31, &c->x86_capability);
    3.39 +  
    3.40 +    switch (c->x86) {
    3.41 +    case 6:
    3.42 +        init_c3(c);
    3.43 +        break;
    3.44 +    default:
    3.45 +        panic("Unsupported Centaur CPU (%i)\n", c->x86);
    3.46 +    }
    3.47 +}
    3.48  
    3.49  static int __init init_amd(struct cpuinfo_x86 *c)
    3.50  {
    3.51 @@ -630,6 +664,8 @@ void __init get_cpu_vendor(struct cpuinf
    3.52          c->x86_vendor = X86_VENDOR_INTEL;
    3.53      else if (!strcmp(v, "AuthenticAMD"))
    3.54          c->x86_vendor = X86_VENDOR_AMD;
    3.55 +    else if (!strcmp(v, "CentaurHauls"))
    3.56 +        c->x86_vendor = X86_VENDOR_CENTAUR;
    3.57      else
    3.58          c->x86_vendor = X86_VENDOR_UNKNOWN;
    3.59  }
    3.60 @@ -819,8 +855,12 @@ void __init identify_cpu(struct cpuinfo_
    3.61          init_intel(c);
    3.62          break;
    3.63  
    3.64 +    case X86_VENDOR_CENTAUR:
    3.65 +        init_centaur(c);
    3.66 +        break;
    3.67 +        
    3.68      default:
    3.69 -        panic("Unsupported CPU vendor\n");
    3.70 +        printk("Unsupported CPU vendor (%d) -- please report!\n");
    3.71      }
    3.72  	
    3.73      printk(KERN_DEBUG "CPU: After vendor init, caps: %08x %08x %08x %08x\n",