All of lore.kernel.org
 help / color / mirror / Atom feed
From: Tom Rini <trini@konsulko.com>
To: u-boot@lists.denx.de
Subject: [PATCH 0/5] qemu-arm64: Allow booting via Trusted Firmware
Date: Tue, 29 Sep 2020 09:01:53 -0400	[thread overview]
Message-ID: <20200929130153.GG14816@bill-the-cat> (raw)
In-Reply-To: <20200924001715.30975-1-andre.przywara@arm.com>

On Thu, Sep 24, 2020 at 01:17:10AM +0100, Andre Przywara wrote:

> U-Boot on QEMU-arm64 can be used in two configurations: Loaded directly
> via QEMU's -bios option, or as a non-secure payload (BL33) via
> ARM Trusted Firmware-A (TF-A).
> In the latter case we need to define CONFIG_TFABOOT, to accommodate
> the first flash bank being secure only, and manually set SYS_TEXT_BASE
> to the address configured in TF-A (currently 0x60000000).
> 
> To avoid this poorly documented adventure, we enable a position
> independent build, and also let the flash regions be always detected
> through the DTB. This results in a single build to work under both
> scenarios, and also allows to move the BL33 load address in TF-A to
> something lower in the future.
> 
> For this to work, we have to first make PIE work when booted from ROM.
> While writing to ROM should not hurt, it might trigger CFI flash
> sequences, and indeed crashes for me in the middle of the fixup routine.
> This is covered by patch 1/5, which skips the whole fixup routine if the
> offset is actually 0 (as it is in our case).
> Also we have to decouple the relative initial stack pointer from the
> PIE option, as we always need to use the fixed version, pointing to
> RAM (patch 2/5).
> Patch 3/5 drops the hard-coded flash address, instead U-Boot can already
> read all required information from QEMU's DTB.
> Patch 4/5 is a cleanup, while the last patch enables the PIE build.
> 
> With this series the very same u-boot.bin file works when directly loaded
> from the QEMU command line (-bios), but also when embedded into TF-A's
> fip.bin, removing the need for case-specific build options.
> 
> Please have a look!

This sounds very useful.  Would it be possible to extend CI to create
the files for the TF-A case and also run that through test.py?

-- 
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 659 bytes
Desc: not available
URL: <https://lists.denx.de/pipermail/u-boot/attachments/20200929/25066e7f/attachment.sig>

      parent reply	other threads:[~2020-09-29 13:01 UTC|newest]

Thread overview: 22+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-09-24  0:17 [PATCH 0/5] qemu-arm64: Allow booting via Trusted Firmware Andre Przywara
2020-09-24  0:17 ` [PATCH 1/5] arm64: PIE: Skip fixups if distance is zero Andre Przywara
2020-09-24 14:45   ` André Przywara
2020-09-24 14:49     ` Ard Biesheuvel
2020-09-24 20:22     ` Stephen Warren
2020-09-25  9:08       ` André Przywara
2020-09-24  0:17 ` [PATCH 2/5] arm64: PIE: Allow fixed stack pointer Andre Przywara
2020-09-24  0:17 ` [PATCH 3/5] qemu-arm: Remove need to specify flash banks Andre Przywara
2020-09-24  0:17 ` [PATCH 4/5] qemu: Drop ARCH_SUPPORT_TFABOOT Andre Przywara
2020-09-29 13:23   ` Tom Rini
2020-09-29 17:13     ` André Przywara
2020-09-29 17:21       ` Tom Rini
2020-09-24  0:17 ` [PATCH 5/5] qemu-arm64: Enable POSITION_INDEPENDENT Andre Przywara
2020-09-24 20:25   ` Stephen Warren
2020-09-24  7:57 ` [PATCH 0/5] qemu-arm64: Allow booting via Trusted Firmware Amit Tomar
2020-09-24  8:39   ` André Przywara
2020-09-24  8:44   ` Heinrich Schuchardt
2020-09-24  9:13     ` Amit Tomar
2020-09-24  9:26     ` André Przywara
2020-09-24  8:52   ` Ard Biesheuvel
2020-09-24  9:10     ` Amit Tomar
2020-09-29 13:01 ` Tom Rini [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=20200929130153.GG14816@bill-the-cat \
    --to=trini@konsulko.com \
    --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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.