From 7a366603071629a471dc82131dbde2394d7d0133 Mon Sep 17 00:00:00 2001 From: enami Date: Tue, 9 Jan 2001 03:45:49 +0000 Subject: [PATCH] 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. --- sys/arch/i386/i386/machdep.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/sys/arch/i386/i386/machdep.c b/sys/arch/i386/i386/machdep.c index 413fab940772..d488008543fe 100644 --- a/sys/arch/i386/i386/machdep.c +++ b/sys/arch/i386/i386/machdep.c @@ -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 @@ init386(first_avail) * 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