Source-Changes-HG archive

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

[src/trunk]: src/sys/arch/i386/i386 If there remains no memory in a segment a...



details:   https://anonhg.NetBSD.org/src/rev/a99222bd4b26
branches:  trunk
changeset: 501907:a99222bd4b26
user:      enami <enami%NetBSD.org@localhost>
date:      Tue Jan 09 03:45:49 2001 +0000

description:
If there remains no memory in a segment after we chopped off ``the last
page,'' skip the segment.  Fixes boot problem on Compaq ProLiant ML370
reported at current-users by Mark Davies.

diffstat:

 sys/arch/i386/i386/machdep.c |  7 +++++--
 1 files changed, 5 insertions(+), 2 deletions(-)

diffs (22 lines):

diff -r c0a539933b41 -r a99222bd4b26 sys/arch/i386/i386/machdep.c
--- a/sys/arch/i386/i386/machdep.c      Tue Jan 09 03:13:39 2001 +0000
+++ b/sys/arch/i386/i386/machdep.c      Tue Jan 09 03:45:49 2001 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: machdep.c,v 1.426 2001/01/01 22:13:54 thorpej Exp $    */
+/*     $NetBSD: machdep.c,v 1.427 2001/01/09 03:45:49 enami Exp $      */
 
 /*-
  * Copyright (c) 1996, 1997, 1998, 2000 The NetBSD Foundation, Inc.
@@ -1882,8 +1882,11 @@
                         * XXX Chop the last page off the size so that
                         * XXX it can fit in avail_end.
                         */
-                       if (seg_end == 0x100000000ULL)
+                       if (seg_end == 0x100000000ULL) {
                                seg_end -= PAGE_SIZE;
+                               if (seg_end <= seg_start)
+                                       continue;
+                       }
 
                        /*
                         * Allocate the physical addresses used by RAM



Home | Main Index | Thread Index | Old Index