Source-Changes-HG archive

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

[src/trunk]: src/sys/arch/mvme68k/mvme68k Make the memory sizing code *really...



details:   https://anonhg.NetBSD.org/src/rev/cce7a4a16ed4
branches:  trunk
changeset: 472044:cce7a4a16ed4
user:      scw <scw%NetBSD.org@localhost>
date:      Mon Apr 19 19:15:50 1999 +0000

description:
Make the memory sizing code *really* work on mvme167.

diffstat:

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

diffs (60 lines):

diff -r 116ba5018038 -r cce7a4a16ed4 sys/arch/mvme68k/mvme68k/locore.s
--- a/sys/arch/mvme68k/mvme68k/locore.s Mon Apr 19 16:57:06 1999 +0000
+++ b/sys/arch/mvme68k/mvme68k/locore.s Mon Apr 19 19:15:50 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.49 1999/04/19 19:15:50 scw 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