Re: [PATCH v1] MIPS: remove .bss to __rel_start overlay

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

 



On Tue, Jan 28, 2020 at 03:54:13PM +0300, Antony Pavlov wrote:
> On Tue, 28 Jan 2020 10:28:32 +0100
> Oleksij Rempel <o.rempel@xxxxxxxxxxxxxx> wrote:
> 
> Hi!
> 
> Have you tested the patch on real hardware?

here is a log from ar9331 based DPTechnics DPT-Module:
barebox 2020.01.0-00101-g70fcc51b10-dirty #815 Tue Jan 28 10:10:42 CET 2020


Board: DPTechnics DPT-Module
mdio_bus: miibus0: probed
ag71xx-gmac 19000000.ethernet@xxxxxxxxxxx: network device registered
ag71xx-gmac 1a000000.ethernet@xxxxxxxxxxx: probe failed: No such file or directory
m25p80 w25q128@00: w25q128 (16384 Kbytes)
netconsole: registered as netconsole-1
malloc space: 0x837a0000 -> 0x83f9ffff (size 8 MiB)
qca-art chosen:art@xxxx: bad MAC addr
qca-art chosen:art@xxxx: probe failed: error 84

Hit any to stop autoboot:    3
barebox@DPTechnics DPT-Module:/
barebox@DPTechnics DPT-Module:/
barebox@DPTechnics DPT-Module:/ iomem 
0x00000000 - 0xffffffff (size 0x00000000) iomem
  0x18020000 - 0x18020013 (size 0x00000014) 18020000.uart@xxxxxxxxxxx 
  0x18040000 - 0x18040033 (size 0x00000034) 18040000.gpio@xxxxxxxxxxx
  0x18050000 - 0x180500ff (size 0x00000100) 18050000.pll-controller@xxxxxxxxxxx
  0x18060008 - 0x1806000f (size 0x00000008) 18060008.wdt@xxxxxxxxxxx
  0x18070000 - 0x180700ff (size 0x00000100) 19000000.ethernet@xxxxxxxxxxx
  0x19000000 - 0x190001ff (size 0x00000200) 19000000.ethernet@xxxxxxxxxxx
  0x1f000000 - 0x1f00000f (size 0x00000010) 1f000000.spi@xxxxxxxxxxx
  0x80000000 - 0x83ffffff (size 0x04000000) kseg0_ram0
    0x83798000 - 0x8379ffff (size 0x00008000) stack
    0x837a0000 - 0x83f9ffff (size 0x00800000) malloc space
    0x83fa0000 - 0x83ff509f (size 0x000550a0) barebox
    0x83ff50a0 - 0x83ff99ff (size 0x00004960) barebox data
barebox@DPTechnics DPT-Module:/ go 0
## Starting application at 0x00000000 ...

Ooops, TLB miss on load or ifetch!

$ 0   : 00000000 00000020 00000000 80010000
$ 4   : 00000001 837d1930 00010000 00008000
$ 8   : 837a0008 837a9c68 837a9c68 837a9e14
$12   : 837a0000 0000000c 0000000c 837d1924
$16   : 00000000 83ff8764 00000002 837d192c
$20   : 00000001 8379feb8 00000002 837d261c
$24   : 00000000 00000000                  
$28   : 810b4520 8379fd38 00000000 83fc3568
Hi    : 00048150
Lo    : 20000000
epc   : 00000000
ra    : 83fc3568
Status: 10000002
Cause : 50008008
Config: 80208483

### ERROR ### Please RESET the board ###

The oops should confirm that iomem show correct information.

> 
> -- 
> Best regards,
>   Antony Pavlov
> 
> > .bss __rel_start (OVERLAY) was used to optimize RAM size used by
> > barebox. Since .bss and __rel_start overlap, we should clear bss only
> > after __rel_start was used.
> > 
> > There is a choice of moving .bss clear sequence after __rel_start or
> > remove this optimization. Since the use of this optimization is minimal
> > and danger to trap in to similar issue is still high, i prefer to remove
> > this optimization.
> > 
> > Fixes: 1e5aef61fc6a444 ("MIPS: reloc: init bss and cpu")
> > Signed-off-by: Oleksij Rempel <o.rempel@xxxxxxxxxxxxxx>
> > ---
> >  arch/mips/lib/barebox.lds.S | 2 +-
> >  1 file changed, 1 insertion(+), 1 deletion(-)
> > 
> > diff --git a/arch/mips/lib/barebox.lds.S b/arch/mips/lib/barebox.lds.S
> > index 693a778980..c954df41f3 100644
> > --- a/arch/mips/lib/barebox.lds.S
> > +++ b/arch/mips/lib/barebox.lds.S
> > @@ -59,7 +59,7 @@ SECTIONS
> >  
> >  	_end = .;
> >  
> > -	.bss __rel_start (OVERLAY) : {
> > +	.bss : {
> >  		__bss_start = .;
> >  		*(.sbss.*)
> >  		*(.bss.*)
> > -- 
> > 2.25.0
> > 
> 
> 
> _______________________________________________
> barebox mailing list
> barebox@xxxxxxxxxxxxxxxxxxx
> http://lists.infradead.org/mailman/listinfo/barebox
> 

-- 
Pengutronix e.K.                           |                             |
Steuerwalder Str. 21                       | http://www.pengutronix.de/  |
31137 Hildesheim, Germany                  | Phone: +49-5121-206917-0    |
Amtsgericht Hildesheim, HRA 2686           | Fax:   +49-5121-206917-5555 |

_______________________________________________
barebox mailing list
barebox@xxxxxxxxxxxxxxxxxxx
http://lists.infradead.org/mailman/listinfo/barebox




[Index of Archives]     [Linux Embedded]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [XFree86]

  Powered by Linux