mbox series

[v2,0/4] x86: Improve support for chain-loading U-Boot

Message ID 20200219024559.233483-1-sjg@chromium.org
Headers show
Series x86: Improve support for chain-loading U-Boot | expand

Message

Simon Glass Feb. 19, 2020, 2:45 a.m. UTC
This little series adds a few checks into the code to allow better
operation when booting a build from a previous-state loader such as
coreboot.

At present we have a 'coreboot' target but this runs very different code
from the bare-metal targets, such as coral. There is very little in common
between them.

It is useful to be able to boot the same U-Boot on a device, with or
without a first-stage bootloader. For example, with chromebook_coral, it
is helpful for testing to be able to boot the same U-Boot (complete with
FSP) on bare metal and from coreboot. It allows checking of things like
CPU speed, comparing registers, ACPI tables and the like.

The idea is to change ll_boot_init() to false, and rebuild without changing
anything else.

This series makes the most important changes to allow coral to boot on
coreboot.

Changes in v2:
- Drop the other check in interrupt_init() which is not needed now
- Drop patch 'dm: Avoid initing built-in devices when chain loading'

Simon Glass (4):
  x86: fsp: Allow skipping init code when chain loading
  x86: apl: Skip init code when chain loading
  x86: cpu: Skip init code when chain loading
  pci: Avoid auto-config when chain loading

 arch/x86/cpu/apollolake/fsp_s.c |  2 ++
 arch/x86/cpu/cpu.c              |  4 +++-
 arch/x86/cpu/i386/interrupt.c   |  6 ++++--
 arch/x86/lib/fsp/fsp_dram.c     |  8 ++++++++
 arch/x86/lib/fsp/fsp_graphics.c |  3 +++
 arch/x86/lib/fsp2/fsp_dram.c    | 10 ++++++++++
 arch/x86/lib/fsp2/fsp_init.c    |  2 +-
 arch/x86/lib/init_helpers.c     |  3 +++
 drivers/pci/pci-uclass.c        |  4 ++--
 9 files changed, 36 insertions(+), 6 deletions(-)

Comments

Andy Shevchenko Feb. 19, 2020, 9:37 a.m. UTC | #1
On Wed, Feb 19, 2020 at 4:46 AM Simon Glass <sjg at chromium.org> wrote:
>
> This little series adds a few checks into the code to allow better
> operation when booting a build from a previous-state loader such as
> coreboot.
>
> At present we have a 'coreboot' target but this runs very different code
> from the bare-metal targets, such as coral. There is very little in common
> between them.
>
> It is useful to be able to boot the same U-Boot on a device, with or
> without a first-stage bootloader. For example, with chromebook_coral, it
> is helpful for testing to be able to boot the same U-Boot (complete with
> FSP) on bare metal and from coreboot. It allows checking of things like
> CPU speed, comparing registers, ACPI tables and the like.
>
> The idea is to change ll_boot_init() to false, and rebuild without changing
> anything else.
>
> This series makes the most important changes to allow coral to boot on
> coreboot.

Is there any patchwork instance or branch which I may use for testing?

> Changes in v2:
> - Drop the other check in interrupt_init() which is not needed now
> - Drop patch 'dm: Avoid initing built-in devices when chain loading'
>
> Simon Glass (4):
>   x86: fsp: Allow skipping init code when chain loading
>   x86: apl: Skip init code when chain loading
>   x86: cpu: Skip init code when chain loading
>   pci: Avoid auto-config when chain loading
>
>  arch/x86/cpu/apollolake/fsp_s.c |  2 ++
>  arch/x86/cpu/cpu.c              |  4 +++-
>  arch/x86/cpu/i386/interrupt.c   |  6 ++++--
>  arch/x86/lib/fsp/fsp_dram.c     |  8 ++++++++
>  arch/x86/lib/fsp/fsp_graphics.c |  3 +++
>  arch/x86/lib/fsp2/fsp_dram.c    | 10 ++++++++++
>  arch/x86/lib/fsp2/fsp_init.c    |  2 +-
>  arch/x86/lib/init_helpers.c     |  3 +++
>  drivers/pci/pci-uclass.c        |  4 ++--
>  9 files changed, 36 insertions(+), 6 deletions(-)
>
> --
> 2.25.0.265.gbab2e86ba0-goog
>
Simon Glass Feb. 20, 2020, 3:04 a.m. UTC | #2
Hi Andy,

On Wed, 19 Feb 2020 at 02:37, Andy Shevchenko <andy.shevchenko at gmail.com> wrote:
>
> On Wed, Feb 19, 2020 at 4:46 AM Simon Glass <sjg at chromium.org> wrote:
> >
> > This little series adds a few checks into the code to allow better
> > operation when booting a build from a previous-state loader such as
> > coreboot.
> >
> > At present we have a 'coreboot' target but this runs very different code
> > from the bare-metal targets, such as coral. There is very little in common
> > between them.
> >
> > It is useful to be able to boot the same U-Boot on a device, with or
> > without a first-stage bootloader. For example, with chromebook_coral, it
> > is helpful for testing to be able to boot the same U-Boot (complete with
> > FSP) on bare metal and from coreboot. It allows checking of things like
> > CPU speed, comparing registers, ACPI tables and the like.
> >
> > The idea is to change ll_boot_init() to false, and rebuild without changing
> > anything else.
> >
> > This series makes the most important changes to allow coral to boot on
> > coreboot.
>
> Is there any patchwork instance or branch which I may use for testing?

Yes I always push to u-boot-dm before sending.

This one is in branch cor3chain-working

It will be collected into patchwork automatically, normally a few
minutes after sending.

Regards,
Simon