summaryrefslogtreecommitdiff
path: root/sys
diff options
context:
space:
mode:
authoraymeric <aymeric@NetBSD.org>2000-11-29 09:56:02 +0000
committeraymeric <aymeric@NetBSD.org>2000-11-29 09:56:02 +0000
commit5deecf29d2bb4ec99cc9537aadf52f3e44d8a1a7 (patch)
tree46e44a3fa705175fa9578502e19321e246350aab /sys
parent3c1b8a2b35d8a1190ebffdcc4343332754be498d (diff)
Fall back to previous memory segments detection code if BIOS reports no
correct memory segment. This prevents some systems from losing with `can't find end of memory'. Discussed with Bill Sommerfeld.
Diffstat (limited to 'sys')
-rw-r--r--sys/arch/i386/i386/machdep.c10
1 files changed, 8 insertions, 2 deletions
diff --git a/sys/arch/i386/i386/machdep.c b/sys/arch/i386/i386/machdep.c
index 72a5089ad1a..5cc6aee8e67 100644
--- a/sys/arch/i386/i386/machdep.c
+++ b/sys/arch/i386/i386/machdep.c
@@ -1,4 +1,4 @@
-/* $NetBSD: machdep.c,v 1.420 2000/11/22 16:41:56 jdolecek Exp $ */
+/* $NetBSD: machdep.c,v 1.421 2000/11/29 09:56:02 aymeric Exp $ */
/*-
* Copyright (c) 1996, 1997, 1998, 2000 The NetBSD Foundation, Inc.
@@ -1922,7 +1922,13 @@ init386(first_avail)
physmem += atop(mem_clusters[mem_cluster_cnt].size);
mem_cluster_cnt++;
}
- } else {
+ }
+
+ /*
+ * If the loop above didn't find any valid segment, fall back to
+ * former code.
+ */
+ if (mem_cluster_cnt == 0) {
/*
* Allocate the physical addresses used by RAM from the iomem
* extent map. This is done before the addresses are