mail archive of the barebox mailing list
 help / color / mirror / Atom feed
From: Oleksij Rempel <o.rempel@pengutronix.de>
To: Antony Pavlov <antonynpavlov@gmail.com>
Cc: barebox@lists.infradead.org
Subject: Re: [PATCH v1] MIPS: remove .bss to __rel_start overlay
Date: Tue, 28 Jan 2020 14:39:21 +0100	[thread overview]
Message-ID: <20200128133921.cqjn3ys27lsuj6xc@pengutronix.de> (raw)
In-Reply-To: <20200128155413.68391b096ffdd891b76802b3@gmail.com>

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@pengutronix.de> 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@19000000.of: network device registered
ag71xx-gmac 1a000000.ethernet@1a000000.of: 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@0.of: bad MAC addr
qca-art chosen:art@0.of: 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@18020000.of 
  0x18040000 - 0x18040033 (size 0x00000034) 18040000.gpio@18040000.of
  0x18050000 - 0x180500ff (size 0x00000100) 18050000.pll-controller@18050000.of
  0x18060008 - 0x1806000f (size 0x00000008) 18060008.wdt@18060008.of
  0x18070000 - 0x180700ff (size 0x00000100) 19000000.ethernet@19000000.of
  0x19000000 - 0x190001ff (size 0x00000200) 19000000.ethernet@19000000.of
  0x1f000000 - 0x1f00000f (size 0x00000010) 1f000000.spi@1f000000.of
  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@pengutronix.de>
> > ---
> >  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@lists.infradead.org
> 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@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox

      reply	other threads:[~2020-01-28 13:39 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-01-28  9:28 Oleksij Rempel
2020-01-28 11:55 ` Antony Pavlov
2020-01-28 12:39   ` Oleksij Rempel
2020-01-28 13:06   ` Peter Mamonov
2020-01-28 13:43     ` Oleksij Rempel
2020-01-28 13:53       ` Oleksij Rempel
2020-01-28 14:42         ` Antony Pavlov
2020-01-28 12:54 ` Antony Pavlov
2020-01-28 13:39   ` Oleksij Rempel [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20200128133921.cqjn3ys27lsuj6xc@pengutronix.de \
    --to=o.rempel@pengutronix.de \
    --cc=antonynpavlov@gmail.com \
    --cc=barebox@lists.infradead.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox