mail archive of the barebox mailing list
 help / color / mirror / Atom feed
From: Trent Piepho <tpiepho@kymetacorp.com>
To: "s.trumtrar@pengutronix.de" <s.trumtrar@pengutronix.de>
Cc: "barebox@lists.infradead.org" <barebox@lists.infradead.org>
Subject: Re: [PATCH 0/7] SoCFPGA: add support for Arria10
Date: Wed, 5 Apr 2017 18:55:12 +0000	[thread overview]
Message-ID: <1491418512.18442.119.camel@kymetacorp.com> (raw)
In-Reply-To: <73o9wbxq5n.fsf@pengutronix.de>

On Wed, 2017-04-05 at 09:35 +0200, Steffen Trumtrar wrote:
> Trent Piepho <tpiepho@kymetacorp.com> writes:

> >
> > U-Boot is able to load a FPGA image with a single bootloader.  A U-Boot
> > image can be made that is small enough run in 256 kB yet has enough
> > drivers to load an FPGA image from eMMC or NOR flash into the FPGA and
> > then enable SDRAM.
> >
> > It seems like this might be possible for barebox as well.  If enough
> > drivers to load the FPGA were part of the PBL.
> 
> Of course this is also possible with barebox. The reason that the
> support is not added yet, is that I do not have any Arria10 board that
> needs or uses this; even with the provided vendor U-Boot.
> This series is just groundwork for future development.

Any A10 board should be able to use CvP, as Altera calls it, to load the
FPGA image from a processor accessible memory like QSPI or mmc or even
perhaps NFS.  While most of the dev kits seem to have an EPCQ flash so
this isn't necessary, after you have used JTAG to reprogram that EPCQ
flash at 20 minutes each time, the drawbacks become more apparent!

Being able to use barebox to NFS load the image or copy an image into
eMMC at far faster rate than EPCQ NOR flash over JTAG would be really
nice.

U-Boot doesn't have a PBL.  It does this by building a somewhat stripped
u-boot that fits, uncompressed, into 256 kB.  It uses the qspi or mmc
drivers (pretty sure only one will fit!) to stream the image into the
FPGA before enabling SDRAM.

Barebox is larger than u-boot so this might not work.  Try making a <
224 kB _uncompressed_ barebox.  It has to be pretty stripped.  It's
already a pain that u-boot can't have mmc, qspi, and network support at
the same time.  A barebox that runs inside 256 kB would be even more
limited.

But, barebox has the ability to use a compressed image plus a PBL.
Maybe this can let barebox do better than u-boot on arria10?

One could try to place the drivers needed to load the FPGA into the PBL,
have the PBL code load the FPGA and enable SDRAM, then uncompress the
not-stripped main barebox.

The difficulty would be getting the drivers needed to load the FPGA to
run from PBL context.  Then fitting those uncompressed drivers and PBL
code plus the compressed main barebox into a 224kB image.

One could also try a two barebox solution like Cyclone5, where one
builds barebox twice in an xloader and main configuration.  In that
case, it might make sense for the xloader to NOT use a PBL.  The reason
PBL works on C5, is because the code to enable SDRAM isn't that large
and fits in the PBL.  On A10, enabling SDRAM means finding and streaming
a file in a filesystem on MMC into the FPGA.  Much more complex if you
want to leverage the existing drivers.  The PBL will be so large that
the extra code to uncompress and relocate barebox is larger than any
savings of having what's not in the PBL be compressed.
_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox

      reply	other threads:[~2017-04-05 18:55 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-04-03 10:55 Steffen Trumtrar
2017-04-03 10:55 ` [PATCH 1/7] ARM: socfpga: rename socfpga->cyclone5 Steffen Trumtrar
2017-04-03 10:55 ` [PATCH 2/7] clk: socfpga: move driver to subdirectory Steffen Trumtrar
2017-04-03 10:55 ` [PATCH 3/7] net: designware: add dwmac-3.72a compatible Steffen Trumtrar
2017-04-03 10:55 ` [PATCH 4/7] ARM: socfpga: add arria10 support Steffen Trumtrar
2017-04-04 18:58   ` Trent Piepho
2017-04-03 10:55 ` [PATCH 5/7] clk: socfpga: add arria10 clk drivers Steffen Trumtrar
2017-04-03 10:55 ` [PATCH 6/7] ARM: socfpga: add support for reflex achilles board Steffen Trumtrar
2017-04-03 10:55 ` [PATCH 7/7] ARM: socfpga: add arria10 defconfig Steffen Trumtrar
2017-04-04 17:52 ` [PATCH 0/7] SoCFPGA: add support for Arria10 Trent Piepho
2017-04-05  7:35   ` Steffen Trumtrar
2017-04-05 18:55     ` Trent Piepho [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=1491418512.18442.119.camel@kymetacorp.com \
    --to=tpiepho@kymetacorp.com \
    --cc=barebox@lists.infradead.org \
    --cc=s.trumtrar@pengutronix.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