Source-Changes-HG archive

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

[src/netbsd-1-5]: src/sys/arch/sparc/stand/common Pullup 1.9 [pk]:



details:   https://anonhg.NetBSD.org/src/rev/a37ab557380b
branches:  netbsd-1-5
changeset: 490064:a37ab557380b
user:      tv <tv%NetBSD.org@localhost>
date:      Wed Nov 01 03:25:10 2000 +0000

description:
Pullup 1.9 [pk]:
Align the DVMA mapping on NBPSG boundaries.

diffstat:

 sys/arch/sparc/stand/common/dvma.c |  14 +++++++++-----
 1 files changed, 9 insertions(+), 5 deletions(-)

diffs (43 lines):

diff -r 3f846715510f -r a37ab557380b sys/arch/sparc/stand/common/dvma.c
--- a/sys/arch/sparc/stand/common/dvma.c        Wed Nov 01 03:24:23 2000 +0000
+++ b/sys/arch/sparc/stand/common/dvma.c        Wed Nov 01 03:25:10 2000 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: dvma.c,v 1.8 2000/06/18 23:03:45 fvdl Exp $    */
+/*     $NetBSD: dvma.c,v 1.8.2.1 2000/11/01 03:25:10 tv Exp $  */
 /*
  * Copyright (c) 1995 Gordon W. Ross
  * All rights reserved.
@@ -63,9 +63,13 @@
        int nseg;
        extern int start;
 
-       /* Align our address base with the DVMA segment */
+       /*
+        * Align our address base with the DVMA segment.
+        * Allocate one DVMA segment to cover the stack, which
+        * grows downward from `start'.
+        */
        dmava = DVMA_BASE;
-       base_va = segva = (((int)&start) & DVMA_BASE) - 0x40000;
+       base_va = segva = (((int)&start) & -NBPSG) - NBPSG;
 
        /* Then double-map the DVMA adresses */
        nseg = (DVMA_MAPLEN + NBPSG - 1) >> SGSHIFT;
@@ -91,7 +95,7 @@
 #ifndef BOOTXX
        /* Make sure the address is in the DVMA map. */
        if (va < 0 || va >= DVMA_MAPLEN)
-               panic("dvma_mapin");
+               panic("dvma_mapin: va %x (DMA base %x)", va+base_va, base_va);
 #endif
 
        va += DVMA_BASE;
@@ -114,7 +118,7 @@
 #ifndef BOOTXX
        /* Make sure the address is in the DVMA map. */
        if (va < 0 || va >= DVMA_MAPLEN)
-               panic("dvma_mapout");
+               panic("dvma_mapout: va %x (DMA base %x)", va+base_va, base_va);
 #endif
 
        va += base_va;



Home | Main Index | Thread Index | Old Index