[U-Boot] [PATCH v1 0/4] arm: socfgpa: support of-platdata

Simon Goldschmidt simon.k.r.goldschmidt at gmail.com
Tue Jan 8 06:53:31 UTC 2019


On Mon, Jan 7, 2019 at 10:59 PM Lukasz Majewski <lukma at denx.de> wrote:
>
> Hi Simon,
>
> > This is an initial attempt to support OF_PLATDATA for socfpga gen5.
> >
> > There are two motivations for this:
> > a) reduce code size to eventually support secure boot (where SPL has
> > to authenticate the next stage by loading/checking U-Boot from a FIT
> >    image)
> > b) to support the cyclone 5 boot ROM's CRC check on the SPL in SRAM
> >    (on warm-restart), all bytes to check need to be in one piece. With
> >    OF_SEPARATE, this is not the case (.bss is between .rodata and the
> >    DTB). Since OF_EMBEDDED has been discouraged, OF_PLATDATA seems to
> >    be a good solution.
>
> I'm not an expert with SOCFPGA nor your application, but maybe
> selecting: "SPL_SEPARATE_BSS" would fix your issue?
>
> This option allows putting on IMX6 SPL the DTB blob into OCRAM (internal
> RAM), before the DDR is setup (so it would be possible to calculate
> CRC).

In socfpga, the whole SPL is copied into OCRAM by the boot ROM and executed
from there. How can OF_SEPARATE help here? I tried enabling it but the SPL map
file does not change. The only difference is there is no padding
between the binary
and the DTB ('u-boot-spl-nodtb.bin' vs 'u-boot-spl-dtb.bin')

Regards,
Simon

>
> I've stumbled upon such issue when I wanted to switch from OF_EMBEDDED
> to OF_SEPARATE.
>
> >
> > This series enables booting from MMC with OF_PLATDATA. Booting from
> > SPI does not yet work (I'm working on that, but it's tougher than
> > expected).
> >
> > Tested on the socrates board. To use it:
> > - use socfpga_socrates_defconfig
> > - disable CONFIG_SPL_SPI_FLASH_SUPPORT, CONFIG_SPL_SPI_SUPPORT and
> >   CONFIG_SPL_DM_RESET (those don't work yet)
> > - enable CONFIG_DESIGNWARE_SERIAL (required for console)
> >
> >
> > Simon Goldschmidt (4):
> >   arm: socfpga: imply SPL config instead of select
> >   arm: socfpga: fix compiling with OF_PLATDATA
> >   serial: add an of-platdata driver for "snps,dw-apb-uart"
> >   mmc: socfpga: support of-platdata
> >
> >  arch/arm/Kconfig               |  4 ++--
> >  arch/arm/mach-socfpga/misc.c   |  2 +-
> >  drivers/mmc/socfpga_dw_mmc.c   | 28 ++++++++++++++++++++---
> >  drivers/serial/Kconfig         | 10 ++++++++
> >  drivers/serial/Makefile        |  1 +
> >  drivers/serial/serial_dw_apb.c | 42
> > ++++++++++++++++++++++++++++++++++ 6 files changed, 81 insertions(+),
> > 6 deletions(-) create mode 100644 drivers/serial/serial_dw_apb.c
> >
>
>
>
>
> 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


More information about the U-Boot mailing list