Source-Changes-HG archive

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

[src/trunk]: src/sys/arch/vax/vax Detect 4000/VLC correctly + make halt/reboo...



details:   https://anonhg.NetBSD.org/src/rev/61cda3df9584
branches:  trunk
changeset: 511067:61cda3df9584
user:      ragge <ragge%NetBSD.org@localhost>
date:      Tue Jun 12 11:24:50 2001 +0000

description:
Detect 4000/VLC correctly + make halt/reboot work.
>From Michael L. Hitch (mhitch%montana.edu@localhost).

diffstat:

 sys/arch/vax/vax/ka48.c   |   6 ++++++
 sys/arch/vax/vax/locore.c |  11 ++++++-----
 2 files changed, 12 insertions(+), 5 deletions(-)

diffs (50 lines):

diff -r 23c158772e53 -r 61cda3df9584 sys/arch/vax/vax/ka48.c
--- a/sys/arch/vax/vax/ka48.c   Tue Jun 12 10:30:04 2001 +0000
+++ b/sys/arch/vax/vax/ka48.c   Tue Jun 12 11:24:50 2001 +0000
@@ -142,9 +142,14 @@
        ka48_cache_enable();
 }
 
+#define        KA48_CPMBX      0x38
+#define        KA48_HLT_HALT   0xcf    /* 11001111 */
+#define        KA48_HLT_BOOT   0x8b    /* 10001011 */
+
 static void
 ka48_halt()
 {
+       ((u_int8_t *) clk_page)[KA48_CPMBX] = KA48_HLT_HALT;
        asm("halt");
 }
 
@@ -152,5 +157,6 @@
 ka48_reboot(arg)
        int arg;
 {
+       ((u_int8_t *) clk_page)[KA48_CPMBX] = KA48_HLT_BOOT;
        asm("halt");
 }
diff -r 23c158772e53 -r 61cda3df9584 sys/arch/vax/vax/locore.c
--- a/sys/arch/vax/vax/locore.c Tue Jun 12 10:30:04 2001 +0000
+++ b/sys/arch/vax/vax/locore.c Tue Jun 12 11:24:50 2001 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: locore.c,v 1.60 2001/06/05 11:25:11 ragge Exp $        */
+/*     $NetBSD: locore.c,v 1.61 2001/06/12 11:24:50 ragge Exp $        */
 /*
  * Copyright (c) 1994, 1998 Ludd, University of Lule}, Sweden.
  * All rights reserved.
@@ -162,10 +162,11 @@
 #if VAX48 || VAXANY
        case VAX_BTYP_48:
                dep_call = &ka48_calls;
-               if (vax_confdata & 0x80)
-                       strcat(cpu_model, "3100/m{30,40}");
-               else
-                       strcat(cpu_model, "4000 VLC");
+               switch (vax_siedata & 3) {
+               case 1: strcpy(cpu_model, "MicroVAX 3100/m{30,40}"); break;
+               case 2: strcpy(cpu_model, "VAXstation 4000 VLC"); break;
+               default: strcpy(cpu_model, "unknown SOC"); break;
+               }
                break;
 #endif
 #if VAX49 || VAXANY



Home | Main Index | Thread Index | Old Index