public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
From: Lukasz Majewski <lukma@denx.de>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH] fdt: Add warning about CONFIG_OF_EMBED
Date: Mon, 31 Dec 2018 12:26:02 +0100	[thread overview]
Message-ID: <20181231122602.3ac27262@jawa> (raw)
In-Reply-To: <CAPnjgZ0pWcduV-LrpfkUEdT+fz0AEiYS7q9nnCLtY2qFRPUzVA@mail.gmail.com>

Hi Simon,

> Hi Lukasz,
> 
> On Wed, 19 Dec 2018 at 03:11, Lukasz Majewski <lukma@denx.de> wrote:
> >
> > Dear Simon and Simon,
> >  
> > > Am 05.12.2018 um 14:57 schrieb Simon Glass:  
> > > > This option has crept into use with some boards. Add a warning
> > > > to try to prevent this.
> > > >
> > > > As an example:
> > > >     https://lists.denx.de/pipermail/u-boot/2017-September/304966.html  
> > >
> > > We have just discussed this in another thread. There seem to be
> > > ~109 defconfigs in the tree that enable OF_EMBED.
> > >
> > > I doubt all of them do this for fun, so we might want to collect
> > > the reasons they do so. I do know two:
> > >
> > > - socfpga_stratix10_defconfig needs this to get a correct
> > > u-boot-spl.hex
> > > - I would need it to ensure in SPL, the DTB is in one block with
> > > the other readonly parts. Without OF_EMBED, we have '.text',
> > > '.bss', DT.  
> >
> > Another use case is imx6:
> >
> > When I want to use SPL's embedded DTB for early init, with
> > OF_SEPARATE I get fdt_blob = (ulong *)&__bss_end; ,which points me
> > to 0x18200060, which is in DDR (and there is either garbage nor DDR
> > is not initialized at all).
> >
> > The above looks like the __bss_end is for u-boot proper.
> >
> > The workaround (for now) is to have OF_EMBED, which assigns
> > gd->fdt_blob = __dtb_dt_spl_begin [1], and this is a correct
> > address.
> >
> > Hence, I'm wondering if shall I assign:
> > gd->fdt_blob = __dtb_dt_spl_begin;
> >
> > in my early SPL code (and do not use fdt_setup() function at all in
> > SPL) ?  
> 
> Or you could update fdt_setup() to do what you want (perhaps with a
> new CONFIG?).

I've found the root cause of this problem....

For the board I had not defined CONFIG_SPL_SEPARATE_BSS. After
providing it the OF_SEPARATE can be used (and dtb is appended between
SPL binary and bss (in SDRAM) region.

> 
> >
> > Moreover, defining board_fdt_blob_setup() for _each_ IMX6 board
> > which would switch to DM_MMC in SPL seems like an no acceptable
> > solution.
> >
> >
> > [1] - ./spl/dts/dt-spl.dtb.S:3:.global __dtb_dt_spl_begin  --> Looks
> > like __dtb_dt_spl_begin is exactly for this purpose.  
> 
> Regards,
> Simon




Best regards,

Lukasz Majewski

--

DENX Software Engineering GmbH,      Managing Director: Wolfgang Denk
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-59 Fax: (+49)-8142-66989-80 Email: lukma at denx.de
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 488 bytes
Desc: OpenPGP digital signature
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20181231/bfb78132/attachment.sig>

  reply	other threads:[~2018-12-31 11:26 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-12-05 13:57 [U-Boot] [PATCH] fdt: Add warning about CONFIG_OF_EMBED Simon Glass
2018-12-05 14:22 ` Simon Goldschmidt
2018-12-05 15:57   ` Simon Glass
2018-12-05 16:08     ` Simon Goldschmidt
2018-12-05 16:32       ` Tom Rini
2018-12-19 10:11   ` Lukasz Majewski
2018-12-27 23:29     ` Simon Glass
2018-12-31 11:26       ` Lukasz Majewski [this message]
2018-12-31 16:23         ` Simon Glass
2018-12-06  1:32 ` Tom Rini
2018-12-13  0:47 ` [U-Boot] " Tom Rini

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=20181231122602.3ac27262@jawa \
    --to=lukma@denx.de \
    --cc=u-boot@lists.denx.de \
    /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