summaryrefslogtreecommitdiff
path: root/sys/arch/mips64
diff options
context:
space:
mode:
authorMiod Vallat <miod@cvs.openbsd.org>2014-03-29 23:59:50 +0000
committerMiod Vallat <miod@cvs.openbsd.org>2014-03-29 23:59:50 +0000
commit30aecb4a91047bc67607a4736d317a98f5adffd7 (patch)
treed562489a08194c141982cc741ce9c3e3a4b448b1 /sys/arch/mips64
parent400e99c46f5fa56531015ba74096c3df72851d35 (diff)
Update the loongson codebase to recognize the so-called `EFI-like' interface
supposedly provided by newer PMON firmware (on Loongson 2Gq and Loongson 3A systems).
Diffstat (limited to 'sys/arch/mips64')
-rw-r--r--sys/arch/mips64/mips64/cpu.c17
1 files changed, 15 insertions, 2 deletions
diff --git a/sys/arch/mips64/mips64/cpu.c b/sys/arch/mips64/mips64/cpu.c
index ecc830e14ef..46d85d4b12b 100644
--- a/sys/arch/mips64/mips64/cpu.c
+++ b/sys/arch/mips64/mips64/cpu.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: cpu.c,v 1.53 2014/03/09 10:12:17 miod Exp $ */
+/* $OpenBSD: cpu.c,v 1.54 2014/03/29 23:59:49 miod Exp $ */
/*
* Copyright (c) 1997-2004 Opsycon AB (www.opsycon.se)
@@ -281,7 +281,20 @@ cpuattach(struct device *parent, struct device *dev, void *aux)
printf("R14000 FPU");
break;
case MIPS_LOONGSON2:
- printf("STC Loongson2%c FPU", 'C' + vers_min);
+ switch (ch->c1prid & 0xff) {
+ case 0x00:
+ case 0x02:
+ case 0x03:
+ printf("STC Loongson2%c FPU", 'C' + vers_min);
+ break;
+ case 0x05:
+ printf("STC Loongson3%c FPU", 'A' + vers_min - 5);
+ break;
+ default:
+ printf("Unknown STC Loongson FPU type (%02x)",
+ ch->c1prid & 0xff);
+ break;
+ }
displayver = 0;
break;
default: