diff options
author | jkim <jkim@FreeBSD.org> | 2009-01-12 22:01:49 +0000 |
---|---|---|
committer | jkim <jkim@FreeBSD.org> | 2009-01-12 22:01:49 +0000 |
commit | 37d2c77dcc274c4ca6d12006a2b5860a0e80b516 (patch) | |
tree | 6b039c4e8dd51f9eb2b1226c7748fb427f49924f /sys/i386 | |
parent | 51aa008d017c1e1c01a70ae31e72cdb70b27f7e5 (diff) | |
download | FreeBSD-src-37d2c77dcc274c4ca6d12006a2b5860a0e80b516.zip FreeBSD-src-37d2c77dcc274c4ca6d12006a2b5860a0e80b516.tar.gz |
Add basic i386 support for VIA Nano processors.
Diffstat (limited to 'sys/i386')
-rw-r--r-- | sys/i386/i386/i686_mem.c | 12 | ||||
-rw-r--r-- | sys/i386/i386/identcpu.c | 14 | ||||
-rw-r--r-- | sys/i386/i386/initcpu.c | 1 |
3 files changed, 23 insertions, 4 deletions
diff --git a/sys/i386/i386/i686_mem.c b/sys/i386/i386/i686_mem.c index ab9aadf..fc88be1 100644 --- a/sys/i386/i386/i686_mem.c +++ b/sys/i386/i386/i686_mem.c @@ -678,9 +678,17 @@ i686_mem_drvinit(void *unused) return; if ((cpu_id & 0xf00) != 0x600 && (cpu_id & 0xf00) != 0xf00) return; - if (cpu_vendor_id != CPU_VENDOR_INTEL && - cpu_vendor_id != CPU_VENDOR_AMD) + switch (cpu_vendor_id) { + case CPU_VENDOR_INTEL: + case CPU_VENDOR_AMD: + break; + case CPU_VENDOR_CENTAUR: + if (cpu_exthigh >= 0x80000008) + break; + /* FALLTHROUGH */ + default: return; + } mem_range_softc.mr_op = &i686_mrops; } SYSINIT(i686memdev, SI_SUB_DRIVERS, SI_ORDER_FIRST, i686_mem_drvinit, NULL); diff --git a/sys/i386/i386/identcpu.c b/sys/i386/i386/identcpu.c index cf70af7..aa37776 100644 --- a/sys/i386/i386/identcpu.c +++ b/sys/i386/i386/identcpu.c @@ -606,6 +606,9 @@ printcpuinfo(void) case 0x6d0: strcpy(cpu_model, "VIA C7 Esther"); break; + case 0x6f0: + strcpy(cpu_model, "VIA Nano"); + break; default: strcpy(cpu_model, "VIA/IDT Unknown"); } @@ -856,6 +859,9 @@ printcpuinfo(void) ); } + if (cpu_vendor_id == CPU_VENDOR_CENTAUR) + print_via_padlock_info(); + if ((cpu_feature & CPUID_HTT) && cpu_vendor_id == CPU_VENDOR_AMD) cpu_feature &= ~CPUID_HTT; @@ -879,6 +885,11 @@ printcpuinfo(void) I386_CPU_MODEL(cpu_id) >= 0x3)) tsc_is_invariant = 1; break; + case CPU_VENDOR_CENTAUR: + if (I386_CPU_FAMILY(cpu_id) == 0x6 && + I386_CPU_MODEL(cpu_id) >= 0xf) + tsc_is_invariant = 1; + break; } if (tsc_is_invariant) printf("\n TSC: P-state invariant"); @@ -915,8 +926,6 @@ printcpuinfo(void) printf("\n CPU cache: write-through mode"); #endif } - if (cpu_vendor_id == CPU_VENDOR_CENTAUR) - print_via_padlock_info(); /* Avoid ugly blank lines: only print newline when we have to. */ if (*cpu_vendor || cpu_id) @@ -1568,6 +1577,7 @@ print_via_padlock_info(void) return; case 0x6a0: case 0x6d0: + case 0x6f0: break; default: return; diff --git a/sys/i386/i386/initcpu.c b/sys/i386/i386/initcpu.c index 6deea08..e1c38ba 100644 --- a/sys/i386/i386/initcpu.c +++ b/sys/i386/i386/initcpu.c @@ -686,6 +686,7 @@ initializecpu(void) /* fall through. */ case 0x6a0: case 0x6d0: + case 0x6f0: init_via(); break; default: |