Port-mvme68k archive

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

Re: MVME177 panic: pmap_enter_ptpage (PR #45915 on 6.x)



In article <130919215244.M0114225%mirage.ceres.dti.ne.jp@localhost>,
Izumi Tsutsui  <tsutsui%ceres.dti.ne.jp@localhost> wrote:
>Hi,
>
>> The kernel you built for me booted right up.  That patch seems good. 
>Thank you.
>> (dmesg below)
>
>Thanks.
>I've committed the fix and will send a pullup request for
>netbsd-6 branches later.
>
>> I tried the netboot too but it didn't work.  It was a bit odd.  Part
>> of it was dumped
>> to the console.  It looks like starting at offset 0x4F7A (20,346) it
>> dumped to the
>> console.
>> 
>> Here's the first bit of console output:
>> Network Boot File load in progress... To abort hit <BREAK>
>> 
>> Bytes Received =&23784, Bytes Loaded =&23784
>> Bytes/Second   =&23784, Elapsed Time =1 Second(s)
>> [a bunch of unprintable...]NOp  @Nu>> %s MVME%x netboot (via %s) [%s]
> :
>
>After a few hours analysis, this seems caused by a bug of
>gcc-4.5.x's __asm() statement.
>
>Could you try the following netboot binary built from the same sources
>but using gcc-4.1.3 from 5.x?
>ftp://ftp.netbsd.org/pub/NetBSD/misc/tsutsui/mvme68k/netbsd-6_20130917/netboot-gcc413.bin
>
>mvme68k bootloaders uses "MVMEPROM_OUTSTR" function for putchar():
>http://nxr.netbsd.org/xref/src/sys/arch/mvme68k/stand/libbug/putchar.c?r=1.2#22
>http://nxr.netbsd.org/xref/src/sys/arch/mvme68k/stand/libbug/outstr.c?r=1.3#12
>http://nxr.netbsd.org/xref/src/sys/arch/mvme68k/include/prom.h?r=1.17#152
>
>The OUTSTR call takes two pointer args, start and end addresses
>of strings.  6.x's gcc-4.5.x seems to pass an incorrect start address
>so a bunch of garbages are put onto the screen.
>
>gcc-4.1.3 in 5.x generates the following insns from
>the mvmeprom_outstr() source:
>---
> movel %sp@(4),%d1
> movel %sp@(8),%d0
> movel %d0,%sp@-
> movel %d1,%sp@-
> trap #15
> .short MVMEPROM_OUTSTR
> rts
>---
>
>but gcc-4.5.3 in 6.x emits:
>---
> movel %sp@(8),%d0
> movel %d0,%sp@-
> movel %sp@(4),%d0
> movel %d0,%sp@-
> trap #15
> .short MVMEPROM_OUTSTR
> rts
>---
>so the second args are taken from a wrong (post-decremented) %sp address.
>Disabling optimization (passing -O0 instead of -Os) doesn't help.
>
>Does anyone have suggestion how this should be fixed?
>Rewrite outstr (and the similar outln) functions in asm?

Has this been fixed in 4.8? Can it be fixed in 4.5?

christos



Home | Main Index | Thread Index | Old Index