Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/netbsd-1-4]: src/sys/arch/x68k/x68k pullup 1.67->1.68 (minoura)



details:   https://anonhg.NetBSD.org/src/rev/76b6ff49c8aa
branches:  netbsd-1-4
changeset: 469060:76b6ff49c8aa
user:      perry <perry%NetBSD.org@localhost>
date:      Fri Jun 25 20:40:14 1999 +0000

description:
pullup 1.67->1.68 (minoura)

diffstat:

 sys/arch/x68k/x68k/machdep.c |  30 ++++++++++++++++--------------
 1 files changed, 16 insertions(+), 14 deletions(-)

diffs (95 lines):

diff -r ee8f211e038d -r 76b6ff49c8aa sys/arch/x68k/x68k/machdep.c
--- a/sys/arch/x68k/x68k/machdep.c      Fri Jun 25 20:38:20 1999 +0000
+++ b/sys/arch/x68k/x68k/machdep.c      Fri Jun 25 20:40:14 1999 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: machdep.c,v 1.60.2.5 1999/06/24 16:01:51 perry Exp $   */
+/*     $NetBSD: machdep.c,v 1.60.2.6 1999/06/25 20:40:14 perry Exp $   */
 
 /*
  * Copyright (c) 1988 University of Utah.
@@ -192,8 +192,11 @@
  * On the 68020/68030, the value of delay_divisor is roughly
  * 2048 / cpuspeed (where cpuspeed is in MHz).
  *
- * On the 68040/68060(?), the value of delay_divisor is roughly
+ * On the 68040, the value of delay_divisor is roughly
  * 759 / cpuspeed (where cpuspeed is in MHz).
+ *
+ * On the 68060, the value of delay_divisor is reported to be
+ * 128 / cpuspeed (where cpuspeed is in MHz).
  */
 int    delay_divisor = 140;    /* assume some reasonable value to start */
 static int cpuspeed;           /* MPU clock (in MHz) */
@@ -217,14 +220,6 @@
        config_console();
 
        /*
-        * cpuspeed is now used only for print.
-        */
-       if (mmutype == MMU_68040) /* 68040/060 */
-               cpuspeed = (759 / delay_divisor);
-       else                    /* 68030 */
-               cpuspeed = (2048 / delay_divisor);
-
-       /*
         * Initialize the console before we print anything out.
         */
        cninit();
@@ -533,7 +528,7 @@
 /*
  * Info for CTL_HW
  */
-char   cpu_model[120];
+char   cpu_model[96];          /* max 85 chars */
 extern char version[];
 static char *fpu_descr[] = {
 #ifdef FPU_EMULATE
@@ -552,6 +547,7 @@
 {
         /* there's alot of XXX in here... */
        char *cpu_type, *mach, *mmu, *fpu;
+       char clock[16];
 
        /*
         * check machine type constant
@@ -583,14 +579,20 @@
                break;
        }
 
+       cpuspeed = 2048 / delay_divisor;
+       sprintf(clock, "%dMHz", cpuspeed);
        switch (cputype) {
        case CPU_68060:
                cpu_type = "m68060";
                mmu = "/MMU";
+               cpuspeed = 128 / delay_divisor;
+               sprintf(clock, "%d/%dMHz", cpuspeed*2, cpuspeed);
                break;
        case CPU_68040:
                cpu_type = "m68040";
                mmu = "/MMU";
+               cpuspeed = 759 / delay_divisor;
+               sprintf(clock, "%d/%dMHz", cpuspeed*2, cpuspeed);
                break;
        case CPU_68030:
                cpu_type = "m68030";
@@ -610,8 +612,8 @@
                fpu = fpu_descr[fputype];
        else
                fpu = ", unknown FPU";
-       sprintf(cpu_model, "X68%s (%s CPU%s%s, %dMHz clock)",
-               mach, cpu_type, mmu, fpu, cpuspeed);
+       sprintf(cpu_model, "X68%s (%s CPU%s%s, %s clock)",
+               mach, cpu_type, mmu, fpu, clock);
        printf("%s\n", cpu_model);
 }
 
@@ -1386,7 +1388,7 @@
        pmap_remove(pmap_kernel(), mem_v, mem_v+NBPG);
        pmap_remove(pmap_kernel(), base_v, base_v+NBPG);
 
-       DPRINTF ((" End."));
+       DPRINTF ((" End.\n"));
 
        DPRINTF (("Returning from mem_exists. result = %d\n", exists));
 



Home | Main Index | Thread Index | Old Index