mbox series

[0/5] x86: Improve support for chain-loading U-Boot

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

Message

Simon Glass Dec. 21, 2019, 4:13 p.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 sometimes it is useful to boot
a bare-metal target, such as coral, from coreboot. That allows comparison
of operation between the bare metal version doing all the init itself and
relying on coreboot for some init.


Simon Glass (5):
  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
  dm: Avoid initing built-in devices 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   |  3 +++
 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 +++
 common/board_r.c                |  3 +++
 drivers/pci/pci-uclass.c        |  4 ++--
 10 files changed, 38 insertions(+), 4 deletions(-)

Comments

Andy Shevchenko Dec. 21, 2019, 4:59 p.m. UTC | #1
On Sat, Dec 21, 2019 at 6:13 PM Simon Glass <sjg@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 sometimes it is useful to boot
> a bare-metal target, such as coral, from coreboot. That allows comparison
> of operation between the bare metal version doing all the init itself and
> relying on coreboot for some init.
>

Thank you for sharing. May I ask what devices and configurations you
have tested this on?

P.S. I'll be able to test my case after xmas vacations (mid January).

> Simon Glass (5):
>   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
>   dm: Avoid initing built-in devices 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   |  3 +++
>  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 +++
>  common/board_r.c                |  3 +++
>  drivers/pci/pci-uclass.c        |  4 ++--
>  10 files changed, 38 insertions(+), 4 deletions(-)
>
> --
> 2.24.1.735.g03f4e72817-goog
>
Simon Glass Dec. 21, 2019, 6:15 p.m. UTC | #2
Hi Andy,

On Sat, 21 Dec 2019 at 10:00, Andy Shevchenko <andy.shevchenko@gmail.com> wrote:
>
> On Sat, Dec 21, 2019 at 6:13 PM Simon Glass <sjg@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 sometimes it is useful to boot
> > a bare-metal target, such as coral, from coreboot. That allows comparison
> > of operation between the bare metal version doing all the init itself and
> > relying on coreboot for some init.
> >
>
> Thank you for sharing. May I ask what devices and configurations you
> have tested this on?
>
> P.S. I'll be able to test my case after xmas vacations (mid January).

This is only on chromebook_coral. But I think it could work in a
similar way with any of the boards.

Merry Christmas!
Simon
Bin Meng Feb. 3, 2020, 11:02 a.m. UTC | #3
Hi Andy,

On Sun, Dec 22, 2019 at 1:00 AM Andy Shevchenko
<andy.shevchenko@gmail.com> wrote:
>
> On Sat, Dec 21, 2019 at 6:13 PM Simon Glass <sjg@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 sometimes it is useful to boot
> > a bare-metal target, such as coral, from coreboot. That allows comparison
> > of operation between the bare metal version doing all the init itself and
> > relying on coreboot for some init.
> >
>
> Thank you for sharing. May I ask what devices and configurations you
> have tested this on?
>
> P.S. I'll be able to test my case after xmas vacations (mid January).
>

Do you have any review comments to share?

Regards,
Bin
Andy Shevchenko Feb. 3, 2020, 12:30 p.m. UTC | #4
On Mon, Feb 3, 2020 at 1:02 PM Bin Meng <bmeng.cn@gmail.com> wrote:
> On Sun, Dec 22, 2019 at 1:00 AM Andy Shevchenko
> <andy.shevchenko@gmail.com> wrote:
> >
> > On Sat, Dec 21, 2019 at 6:13 PM Simon Glass <sjg@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 sometimes it is useful to boot
> > > a bare-metal target, such as coral, from coreboot. That allows comparison
> > > of operation between the bare metal version doing all the init itself and
> > > relying on coreboot for some init.
> > >
> >
> > Thank you for sharing. May I ask what devices and configurations you
> > have tested this on?
> >
> > P.S. I'll be able to test my case after xmas vacations (mid January).
> >
>
> Do you have any review comments to share?

Not for time being. Sorry, I'm busy with something else, but if there
is a branch with these patches available thru x86 U-Boot tree, it will
be easier to me to have a chance to test.
Simon Glass Feb. 3, 2020, 1:36 p.m. UTC | #5
Hi Andy,

On Mon, 3 Feb 2020 at 05:30, Andy Shevchenko <andy.shevchenko@gmail.com> wrote:
>
> On Mon, Feb 3, 2020 at 1:02 PM Bin Meng <bmeng.cn@gmail.com> wrote:
> > On Sun, Dec 22, 2019 at 1:00 AM Andy Shevchenko
> > <andy.shevchenko@gmail.com> wrote:
> > >
> > > On Sat, Dec 21, 2019 at 6:13 PM Simon Glass <sjg@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 sometimes it is useful to boot
> > > > a bare-metal target, such as coral, from coreboot. That allows comparison
> > > > of operation between the bare metal version doing all the init itself and
> > > > relying on coreboot for some init.
> > > >
> > >
> > > Thank you for sharing. May I ask what devices and configurations you
> > > have tested this on?
> > >
> > > P.S. I'll be able to test my case after xmas vacations (mid January).
> > >
> >
> > Do you have any review comments to share?
>
> Not for time being. Sorry, I'm busy with something else, but if there
> is a branch with these patches available thru x86 U-Boot tree, it will
> be easier to me to have a chance to test.

This one is u-boot-dm/cor3chain-working

I always push to the -dm tree before sending patches out, but don't
always mention it in the cover letter!

The ACPI patches are at dm/coral-working

Regards,
Simon