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/mvme68k/mvme68k pullup 1.48->1.49, as per Stev...



details:   https://anonhg.NetBSD.org/src/rev/d2307c8765ac
branches:  netbsd-1-4
changeset: 468375:d2307c8765ac
user:      perry <perry%NetBSD.org@localhost>
date:      Mon Apr 19 19:51:13 1999 +0000

description:
pullup 1.48->1.49, as per Steve Woodford's request, which said:
  This fixes a memory sizing problem which wasn't apparent until I tried a
  16Mb mvme167.

diffstat:

 sys/arch/mvme68k/mvme68k/locore.s |  32 +++++++++++++++++++++++---------
 1 files changed, 23 insertions(+), 9 deletions(-)

diffs (60 lines):

diff -r 6c697c277d27 -r d2307c8765ac sys/arch/mvme68k/mvme68k/locore.s
--- a/sys/arch/mvme68k/mvme68k/locore.s Mon Apr 19 16:29:40 1999 +0000
+++ b/sys/arch/mvme68k/mvme68k/locore.s Mon Apr 19 19:51:13 1999 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: locore.s,v 1.48 1999/03/24 05:51:06 mrg Exp $  */
+/*     $NetBSD: locore.s,v 1.48.2.1 1999/04/19 19:51:13 perry Exp $    */
 
 /*
  * Copyright (c) 1988 University of Utah.
@@ -63,6 +63,22 @@
 ASLOCAL(bug_vbr)
        .long   0
 
+#ifndef MVME147
+/*
+ * Convert MEMC040 'msiz' bits into the
+ * corresponding RAM size.
+ */
+ASLOCAL(memc_msiz)
+       .long   0x00400000
+       .long   0x00800000
+       .long   0x01000000
+       .long   0x02000000
+       .long   0x04000000
+       .long   0x08000000
+       .long   0x00400000
+       .long   0x00400000
+#endif
+
 #include <mvme68k/mvme68k/vectors.s>
 
 
@@ -320,11 +336,10 @@
         * Figure out the size of onboard DRAM by querying
         * the memory controller ASIC(s)
         */
-       movql   #0x07,d1
-       andb    0xfff43008,d1           | MEMC040/MEMECC Controller #1
-       addql   #1,d1
-       movql   #23,d0
-       lsll    d0,d1                   | Convert to size of RAM, in bytes
+       movql   #0x07,d0
+       andb    0xfff43008,d0           | MEMC040/MEMECC Controller #1
+       ASRELOC(memc_msiz, a0)
+       movl    a0@(d0:w:4),d1          | Compute how many bytes of RAM
 
 #if 0
        lea     0xfff43008,a0           | MEMC040/MEMECC Controller #1
@@ -560,9 +575,8 @@
        movl    sp,d1                   | Save current stack pointer value
        movql   #0x07,d0
        andb    a0@,d0                  | Access MEMC040/MEMECC
-       addql   #1,d0
-       movql   #23,d1
-       lsll    d1,d0                   | Convert to size of RAM, in bytes
+       ASRELOC(memc_msiz,a0)
+       movl    a0@(d0:w:4),d0          | Compute how many bytes of RAM
 Lmemc040ret:
        movl    sp@+,a1@(8)             | Restore original bus error handler
        moveml  sp@+,#0x0303



Home | Main Index | Thread Index | Old Index