diff options
author | Takuya ASADA <syuu@cvs.openbsd.org> | 2010-09-13 21:59:08 +0000 |
---|---|---|
committer | Takuya ASADA <syuu@cvs.openbsd.org> | 2010-09-13 21:59:08 +0000 |
commit | adbda52fbb890551925233cce5dda0908c890d5c (patch) | |
tree | 3e25a173d41bc2fa520c71eb06a13b687e083a78 | |
parent | d0cd63a90f50fe5328147657a1a166d40d4978d8 (diff) |
Added OCTEON in cpu type. ok miod@
-rw-r--r-- | sys/arch/mips64/include/cpu.h | 3 | ||||
-rw-r--r-- | sys/arch/mips64/mips64/cpu.c | 15 |
2 files changed, 13 insertions, 5 deletions
diff --git a/sys/arch/mips64/include/cpu.h b/sys/arch/mips64/include/cpu.h index c2aa30758d7..cbd48fcee14 100644 --- a/sys/arch/mips64/include/cpu.h +++ b/sys/arch/mips64/include/cpu.h @@ -1,4 +1,4 @@ -/* $OpenBSD: cpu.h,v 1.61 2010/09/12 18:30:19 miod Exp $ */ +/* $OpenBSD: cpu.h,v 1.62 2010/09/13 21:59:07 syuu Exp $ */ /*- * Copyright (c) 1992, 1993 @@ -544,6 +544,7 @@ void cpu_startclock(struct cpu_info *); #define MIPS_R4000 0x04 /* MIPS R4000/4400 CPU ISA III */ #define MIPS_R3LSI 0x05 /* LSI Logic R3000 derivate ISA I */ #define MIPS_R6000A 0x06 /* MIPS R6000A CPU ISA II */ +#define MIPS_OCTEON 0x06 /* Cavium OCTEON MIPS64R2*/ #define MIPS_R3IDT 0x07 /* IDT R3000 derivate ISA I */ #define MIPS_R10000 0x09 /* MIPS R10000/T5 CPU ISA IV */ #define MIPS_R4200 0x0a /* MIPS R4200 CPU (ICE) ISA III */ diff --git a/sys/arch/mips64/mips64/cpu.c b/sys/arch/mips64/mips64/cpu.c index 7ddd8b3a09a..640bd9796e9 100644 --- a/sys/arch/mips64/mips64/cpu.c +++ b/sys/arch/mips64/mips64/cpu.c @@ -1,4 +1,4 @@ -/* $OpenBSD: cpu.c,v 1.34 2010/09/09 10:59:01 syuu Exp $ */ +/* $OpenBSD: cpu.c,v 1.35 2010/09/13 21:59:07 syuu Exp $ */ /* * Copyright (c) 1997-2004 Opsycon AB (www.opsycon.se) @@ -169,6 +169,9 @@ cpuattach(struct device *parent, struct device *dev, void *aux) printf("STC Loongson2%c CPU", 'C' + vers_min); displayver = 0; break; + case MIPS_OCTEON: + printf("Cavium OCTEON CPU"); + break; default: printf("Unknown CPU type (0x%x)", ch->type); break; @@ -178,9 +181,13 @@ cpuattach(struct device *parent, struct device *dev, void *aux) printf(" %d MHz, ", ch->clock / 1000000); displayver = 1; - fptype = (ch->c1prid >> 8) & 0xff; - vers_maj = (ch->c1prid >> 4) & 0x0f; - vers_min = ch->c1prid & 0x0f; + if (ch->type == MIPS_OCTEON) + fptype = MIPS_SOFT; + else { + fptype = (ch->c1prid >> 8) & 0xff; + vers_maj = (ch->c1prid >> 4) & 0x0f; + vers_min = ch->c1prid & 0x0f; + } switch (fptype) { case MIPS_SOFT: printf("Software FP emulation"); |