Subject: Re: panic: uvm_page_physload: start >= end
To: None <port-powerpc@netbsd.org>
From: Izumi Tsutsui <tsutsui@ceres.dti.ne.jp>
List: port-powerpc
Date: 03/31/2002 01:08:27
In article <1f98mil.8pcwuz1fx721zM@[10.0.12.137]>
manu@netbsd.org wrote:
> I just rebuild a -current kernel, but I cannot boot it:
>
> >> NetBSD/macppc OpenFirmware Boot, Revision 1.2
> >> (matt@duel.local, Thu Nov 16 17:26:57 PST 2000)
> no active package3743552+217104 [100+430608+176997]=0x45b7b8
> start=0x100000
> [ using 608360 bytes of netbsd ELF symbol table ]
> panic: uvm_page_physload: start >= end
> Stopped in pid 0 () at cpu_Debugger+0x10: lwz r0, r1, 0x14
I also got the same panic on my Apus2000 (603ev with 64M RAM).
It seems some small fragments in mem_regions are created
after pmap_boot_find_memory() calls and uvm_page_physload()
is called with pfstart == pfend.
Some debug messages and my workaround patch are attached.
(but I guess pmap_boot_find_memory() should handle fragments
less than pagesize..)
---
Izumi Tsutsui
tsutsui@ceres.dti.ne.jp
---
>> NetBSD/macppc OpenFirmware Boot, Revision 1.6
>> (tsutsui@lancer, Sat Mar 30 02:41:21 JST 2002)
Cannot use bootpath
Using boot-device instead
2705648+193336 [156128+129230]=0x30993c
start=0x100000
[ using 285972 bytes of netbsd ELF symbol table ]
pmap_bootstrap: memory configuration:
pmap_bootstrap: mem start 0x0 size 0x4000000
pmap_bootstrap: avail start 0x4400 size 0x3efbc00
pmap_bootstrap: b-avail[0] start 0x4400 size 0x3efbc00
pmap_bootstrap: a-avail[0] start 0x4400 size 0xfc000
pmap_bootstrap: b-avail[1] start 0x413000 size 0x3aed000
pmap_bootstrap: a-avail[1] start 0x413000 size 0x3aed000
pmap_bootstrap: avail[0] start 0x4400 size 0xfc000
pmap_bootstrap: avail[1] start 0x413000 size 0x3aed000
pmap_boot_find_memory: size=80000, alignment=80000, at_end=0: 80000
pmap_boot_find_memory: b-avail[0] start 0x4400 size 0xfc000
pmap_boot_find_memory: a-avail[0] start 0x4400 size 0x7bc00
pmap_boot_find_memory: a-avail[1] start 0x100000 size 0x400
pmap_boot_find_memory: a-avail[2] start 0x413000 size 0x3aed000
pmap_boot_find_memory: size=8000, alignment=1000, at_end=0: 5000
pmap_boot_find_memory: b-avail[0] start 0x4400 size 0x7bc00
pmap_boot_find_memory: a-avail[0] start 0x4400 size 0xc00
pmap_boot_find_memory: a-avail[1] start 0xd000 size 0x73000
pmap_boot_find_memory: a-avail[2] start 0x100000 size 0x400
pmap_boot_find_memory: a-avail[3] start 0x413000 size 0x3aed000
pmap_boot_find_memory: size=4000, alignment=1000, at_end=1: 3efc000
pmap_boot_find_memory: b-avail[3] start 0x413000 size 0x3aed000
pmap_boot_find_memory: a-avail[3] start 0x413000 size 0x3ae9000
pmap_bootstrap: mp[0]: mp->start = 0x4400 mp->size 0xc00
pmap_bootstrap: mp[0]: pfstart = 0x4 pfend 0x5
pmap_bootstrap: mp[1]: mp->start = 0xd000 mp->size 0x73000
pmap_bootstrap: mp[1]: pfstart = 0xd pfend 0x80
pmap_bootstrap: mp[2]: mp->start = 0x100000 mp->size 0x400
pmap_bootstrap: mp[2]: pfstart = 0x100 pfend 0x100
panic: uvm_page_physload: start >= end
Stopped in pid 0 () at cpu_Debugger+0x10: lwz r0, r1, 0x14
db>
---
Index: pmap.c
===================================================================
RCS file: /cvsroot/syssrc/sys/arch/powerpc/mpc6xx/pmap.c,v
retrieving revision 1.38
diff -u -r1.38 pmap.c
--- pmap.c 2002/03/08 20:48:33 1.38
+++ pmap.c 2002/03/30 16:01:31
@@ -2805,7 +2805,7 @@
for (mp = avail, i = 0; i < avail_cnt; mp++, i++) {
paddr_t pfstart = atop(mp->start);
paddr_t pfend = atop(mp->start + mp->size);
- if (mp->size == 0)
+ if (mp->size == 0 || pfstart == pfend)
continue;
if (mp->start + mp->size <= SEGMENT_LENGTH) {
uvm_page_physload(pfstart, pfend, pfstart, pfend,