Source-Changes-HG archive

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

[src/trunk]: src/sys/arch/powerpc/powerpc Make sure that we use only inside o...



details:   https://anonhg.NetBSD.org/src/rev/286fd1889ecb
branches:  trunk
changeset: 475935:286fd1889ecb
user:      tsubai <tsubai%NetBSD.org@localhost>
date:      Mon Aug 30 07:59:19 1999 +0000

description:
Make sure that we use only inside of available memory region
in pmap_bootstrap.

diffstat:

 sys/arch/powerpc/powerpc/pmap.c |  8 +++++---
 1 files changed, 5 insertions(+), 3 deletions(-)

diffs (22 lines):

diff -r 9c0784d59770 -r 286fd1889ecb sys/arch/powerpc/powerpc/pmap.c
--- a/sys/arch/powerpc/powerpc/pmap.c   Mon Aug 30 05:12:58 1999 +0000
+++ b/sys/arch/powerpc/powerpc/pmap.c   Mon Aug 30 07:59:19 1999 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: pmap.c,v 1.23 1999/07/08 18:08:58 thorpej Exp $        */
+/*     $NetBSD: pmap.c,v 1.24 1999/08/30 07:59:19 tsubai Exp $ */
 
 /*
  * Copyright (C) 1995, 1996 Wolfgang Solfrank.
@@ -367,8 +367,10 @@
                /*
                 * Now page align the start and size of the region.
                 */
-               s = s & ~PGOFSET;
-               e = e & ~PGOFSET;
+               s = round_page(s);
+               e = trunc_page(e);
+               if (e < s)
+                       e = s;
                sz = e - s;
                /*
                 * Check whether some memory is left here.



Home | Main Index | Thread Index | Old Index