Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/arch/next68k/next68k Use explicit CPU strings and remove...
details: https://anonhg.NetBSD.org/src/rev/0967e75a0687
branches: trunk
changeset: 373339:0967e75a0687
user: tsutsui <tsutsui%NetBSD.org@localhost>
date: Fri Feb 03 22:57:05 2023 +0000
description:
Use explicit CPU strings and remove hp300 derived stuff.
diffstat:
sys/arch/next68k/next68k/machdep.c | 48 +++++++++++--------------------------
1 files changed, 15 insertions(+), 33 deletions(-)
diffs (115 lines):
diff -r 2c75f2df6d6e -r 0967e75a0687 sys/arch/next68k/next68k/machdep.c
--- a/sys/arch/next68k/next68k/machdep.c Fri Feb 03 22:01:42 2023 +0000
+++ b/sys/arch/next68k/next68k/machdep.c Fri Feb 03 22:57:05 2023 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: machdep.c,v 1.117 2023/01/27 15:21:52 tsutsui Exp $ */
+/* $NetBSD: machdep.c,v 1.118 2023/02/03 22:57:05 tsutsui Exp $ */
/*
* Copyright (c) 1998 Darrin B. Jewell
@@ -40,7 +40,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.117 2023/01/27 15:21:52 tsutsui Exp $");
+__KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.118 2023/02/03 22:57:05 tsutsui Exp $");
#include "opt_ddb.h"
#include "opt_kgdb.h"
@@ -321,7 +321,7 @@
void
identifycpu(void)
{
- const char *mc, *mmu_str, *fpu_str, *cache_str;
+ const char *cpu_str, *mmu_str, *fpu_str, *cache_str;
extern int turbo;
/*
@@ -329,21 +329,23 @@
*/
switch (cputype) {
case CPU_68040:
- mc = "40";
+ cpu_str = "MC68040";
cpuspeed = turbo ? 33 : 25;
delay_divisor = 759 / cpuspeed;
break;
case CPU_68030:
- mc = "30";
+ cpu_str = "MC68030";
cpuspeed = 25;
delay_divisor = 2048 / cpuspeed;
break;
+#if 0
case CPU_68020:
- mc = "20";
+ cpu_str = "MC68020";
break;
+#endif
default:
printf("\nunknown cputype %d\n", cputype);
- goto lose;
+ panic("startup");
}
/*
@@ -354,14 +356,13 @@
case MMU_68030:
mmu_str = "+MMU";
break;
+#if 0
case MMU_68851:
mmu_str = ", MC68851 MMU";
break;
- case MMU_HP:
- mmu_str = ", HP MMU";
- break;
+#endif
default:
- printf("MC680%s: unknown MMU type %d\n", mc, mmutype);
+ printf("%s: unknown MMU type %d\n", cpu_str, mmutype);
panic("startup");
}
@@ -376,7 +377,7 @@
fpu_str = ", MC68882 FPU";
break;
case FPU_68881:
- fpu_str = ", MHz MC68881 FPU";
+ fpu_str = ", MC68881 FPU";
break;
default:
fpu_str = ", unknown FPU";
@@ -387,30 +388,11 @@
*/
if (cputype == CPU_68040)
cache_str = ", 4k on-chip physical I/D caches";
- else {
-#if defined(ENABLE_HP_CODE)
- switch (ectype) {
- case EC_VIRT:
- cache_str = ", virtual-address cache";
- break;
- case EC_PHYS:
- cache_str = ", physical-address cache";
- break;
- default:
- cache_str = "";
- break;
- }
-#else
+ else
cache_str = "";
-#endif
- }
- cpu_setmodel("NeXT/MC680%s CPU%s%s%s", mc, mmu_str, fpu_str, cache_str);
+ cpu_setmodel("NeXT/%s CPU%s%s%s", cpu_str, mmu_str, fpu_str, cache_str);
printf("%s\n", cpu_getmodel());
-
- return;
- lose:
- panic("startup");
}
/*
Home |
Main Index |
Thread Index |
Old Index