NetBSD Problem Report #17199
Received: (qmail 27534 invoked by uid 605); 9 Jun 2002 10:53:42 -0000
Message-Id: <20020609105337.4B6A08021@iller.boquist.net>
Date: Sun, 9 Jun 2002 12:53:37 +0200 (CEST)
From: urban@boquist.net
Sender: gnats-bugs-owner@netbsd.org
Reply-To: urban@boquist.net
To: gnats-bugs@gnats.netbsd.org
Subject: NetBSD-1.6_BETA unable to boot on old HP Vectra PC
X-Send-Pr-Version: 3.95
>Number: 17199
>Category: port-i386
>Synopsis: cannot boot: immediate panic in uvm_page_physload()
>Confidential: no
>Severity: serious
>Priority: high
>Responsible: port-i386-maintainer
>State: closed
>Class: sw-bug
>Submitter-Id: net
>Arrival-Date: Sun Jun 09 10:54:00 +0000 2002
>Closed-Date: Thu Sep 05 02:44:46 +0000 2002
>Last-Modified: Sat Nov 22 16:35:04 +0000 2008
>Originator: Urban Boquist
>Release: NetBSD-1.6_BETA (200205300000 snapshot from releng.netbsd.org)
>Organization:
Carlstedt Research & Technology AB, Sweden
>Environment:
System:
Architecture: i386
Machine: i386
>Description:
I tried to boot NetBSD-1.6_BETA on an old "HP Vectra VL Series 4
5/133" (Pentium-133).
With DEBUG_MEMLOAD the kernel startup goes:
BIOS MEMORY MAP (8 ENTRIES):
.
.
addr 0x1000000 size 0x3000000 type 0x1
.
.
loading 0x1000000-0x3000000 (0x1000-0x1000)
panic: uvm_page_physload: start >= end
The problem is in arch/i386/i386/machdep.c, in function init386(). The
code checks if a segment spans the magic 16M limit, and if it does
splits the segment and makes two calls to uvm_page_physload(). The
problem is that the code does not work as intended for the case where
a segment starts at exactly 16M. If that happens the code will result
in a call to uvm_page_physload() with zero size, which panics.
With the patch below, the system boots and runs without problems.
>How-To-Repeat:
Boot NetBSD-1.6* on HP Vectra VL 5/133.
>Fix:
Index: machdep.c
===================================================================
RCS file: /anoncvs/syssrc/sys/arch/i386/i386/machdep.c,v
retrieving revision 1.472
diff -u -r1.472 machdep.c
--- machdep.c 2002/05/31 17:46:51 1.472
+++ machdep.c 2002/06/09 10:40:28
@@ -2919,6 +2919,7 @@
tmp = (16 * 1024 * 1024);
else
tmp = seg_end;
+ if (seg_start != tmp) {
#ifdef DEBUG_MEMLOAD
printf("loading 0x%qx-0x%qx (0x%lx-0x%lx)\n",
seg_start, tmp,
@@ -2927,6 +2928,7 @@
uvm_page_physload(atop(seg_start),
atop(tmp), atop(seg_start),
atop(tmp), first16q);
+ }
seg_start = tmp;
}
@@ -2952,6 +2954,7 @@
tmp = (16 * 1024 * 1024);
else
tmp = seg_end1;
+ if (seg_start1 != tmp) {
#ifdef DEBUG_MEMLOAD
printf("loading 0x%qx-0x%qx (0x%lx-0x%lx)\n",
seg_start1, tmp,
@@ -2960,6 +2963,7 @@
uvm_page_physload(atop(seg_start1),
atop(tmp), atop(seg_start1),
atop(tmp), first16q);
+ }
seg_start1 = tmp;
}
# EOF
>Release-Note:
>Audit-Trail:
State-Changed-From-To: open->closed
State-Changed-By: erh
State-Changed-When: Wed Sep 4 19:43:04 PDT 2002
State-Changed-Why:
Fixed in a slightly different way in machdep.c 1.480. Change the <= 16M
check to < 16M so we don't try to split the segment in the first place.
From: James Chacon <jmc@netbsd.org>
To: gnats-bugs@gnats.netbsd.org
Cc:
Subject: pr/17199 CVS commit: [netbsd-1-6] src/sys/arch/i386/i386
Date: Sat, 8 Feb 2003 08:41:01 +0200 (EET)
Module Name: src
Committed By: jmc
Date: Sat Feb 8 06:41:01 UTC 2003
Modified Files:
src/sys/arch/i386/i386 [netbsd-1-6]: machdep.c
Log Message:
Pullup rev 1.480 (requested by kirill@lava.net and ok'd by erh for ticket #1148)
Adjust the check for what segments should go on the low priority
free list. If a segment starts exactly at 16M don't try to split
it because that causes the code to try to call uvm_page_physload
with a zero length segment. PR#17199
To generate a diff of this commit:
cvs rdiff -r1.471.4.2 -r1.471.4.3 src/sys/arch/i386/i386/machdep.c
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
From: Christoph Egger <cegger@netbsd.org>
To: gnats-bugs@gnats.NetBSD.org
Cc:
Subject: PR/17199 CVS commit: src/sys/arch/amd64/amd64
Date: Wed, 12 Nov 2008 01:33:44 +0000 (UTC)
Module Name: src
Committed By: cegger
Date: Wed Nov 12 01:33:44 UTC 2008
Modified Files:
src/sys/arch/amd64/amd64: machdep.c
Log Message:
reduce diff to i386/i386/machdep.c:init386()
- introduce add_mem_cluster() as done in i386
- apply rev. 1.480 from i386/i386/machdep.c: fixes PR 17199 for amd64
- apply rev. 1.492 from i386/i386/machdep.c: fixes PR 13399 for amd64
To generate a diff of this commit:
cvs rdiff -r1.106 -r1.107 src/sys/arch/amd64/amd64/machdep.c
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
From: Soren Jacobsen <snj@netbsd.org>
To: gnats-bugs@gnats.NetBSD.org
Cc:
Subject: PR/17199 CVS commit: [netbsd-5] src/sys/arch/amd64/amd64
Date: Tue, 18 Nov 2008 01:48:00 +0000 (UTC)
Module Name: src
Committed By: snj
Date: Tue Nov 18 01:48:00 UTC 2008
Modified Files:
src/sys/arch/amd64/amd64 [netbsd-5]: machdep.c
Log Message:
Pull up following revision(s) (requested by cegger in ticket #51):
sys/arch/amd64/amd64/machdep.c: revision 1.107
reduce diff to i386/i386/machdep.c:init386()
- introduce add_mem_cluster() as done in i386
- apply rev. 1.480 from i386/i386/machdep.c: fixes PR 17199 for amd64
- apply rev. 1.492 from i386/i386/machdep.c: fixes PR 13399 for amd64
To generate a diff of this commit:
cvs rdiff -r1.102.4.2 -r1.102.4.3 src/sys/arch/amd64/amd64/machdep.c
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
From: Manuel Bouyer <bouyer@netbsd.org>
To: gnats-bugs@gnats.NetBSD.org
Cc:
Subject: PR/17199 CVS commit: [netbsd-3] src/sys/arch/amd64/amd64
Date: Sat, 22 Nov 2008 16:28:43 +0000 (UTC)
Module Name: src
Committed By: bouyer
Date: Sat Nov 22 16:28:43 UTC 2008
Modified Files:
src/sys/arch/amd64/amd64 [netbsd-3]: machdep.c
Log Message:
Pull up following revision(s) (requested by cegger in ticket #1979):
sys/arch/amd64/amd64/machdep.c: revision 1.106, 1.107 via patch
cosmetic change (mostly to reduce diff to i386/i386/machdep.c:initi386):
use PRIx64 rather %qx
No functional changes intended.
reduce diff to i386/i386/machdep.c:init386()
- introduce add_mem_cluster() as done in i386
- apply rev. 1.480 from i386/i386/machdep.c: fixes PR 17199 for amd64
- apply rev. 1.492 from i386/i386/machdep.c: fixes PR 13399 for amd64
To generate a diff of this commit:
cvs rdiff -r1.31 -r1.31.10.1 src/sys/arch/amd64/amd64/machdep.c
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
From: Manuel Bouyer <bouyer@netbsd.org>
To: gnats-bugs@gnats.NetBSD.org
Cc:
Subject: PR/17199 CVS commit: [netbsd-4] src/sys/arch/amd64/amd64
Date: Sat, 22 Nov 2008 16:33:41 +0000 (UTC)
Module Name: src
Committed By: bouyer
Date: Sat Nov 22 16:33:41 UTC 2008
Modified Files:
src/sys/arch/amd64/amd64 [netbsd-4]: machdep.c
Log Message:
Pull up following revision(s) (requested by cegger in ticket #1233):
sys/arch/amd64/amd64/machdep.c: revision 1.106, 1.107 via patch
cosmetic change (mostly to reduce diff to i386/i386/machdep.c:initi386):
use PRIx64 rather %qx
No functional changes intended.
reduce diff to i386/i386/machdep.c:init386()
- introduce add_mem_cluster() as done in i386
- apply rev. 1.480 from i386/i386/machdep.c: fixes PR 17199 for amd64
- apply rev. 1.492 from i386/i386/machdep.c: fixes PR 13399 for amd64
To generate a diff of this commit:
cvs rdiff -r1.44.2.4 -r1.44.2.5 src/sys/arch/amd64/amd64/machdep.c
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
>Unformatted:
(Contact us)
$NetBSD: query-full-pr,v 1.39 2013/11/01 18:47:49 spz Exp $
$NetBSD: gnats_config.sh,v 1.8 2006/05/07 09:23:38 tsutsui Exp $
Copyright © 1994-2007
The NetBSD Foundation, Inc. ALL RIGHTS RESERVED.