mbox series

[0/6] x86: efi: Add a 64-bit coreboot payload

Message ID 20200405232240.209612-1-sjg@chromium.org
Headers show
Series x86: efi: Add a 64-bit coreboot payload | expand

Message

Simon Glass April 5, 2020, 11:22 p.m. UTC
This series creates a new 64-bit 'coreboot64' build which can be launched
from coreboot. It uses SPL to effect the jump to 64-bit mode.

This was done in an attempt to get the Ubuntu FirmwareTestSuite[1]
working. Unfortunately the latest version shows a splash screen and hangs,
perhaps due to some missing EFI support.

[1] https://wiki.ubuntu.com/FirmwareTestSuite


Simon Glass (6):
  x86: Allow building an SPL image for coreboot
  x86: Move work-around out of cpu_jump_to_64bit_uboot()
  x86: Update SPL for coreboot
  x86: cbfs: Drop unwanted declaration
  x86: coreboot: Allow building an SPL image
  x86: Add a 64-bit coreboot build

 Makefile                             |  6 ++++
 arch/x86/cpu/Makefile                |  4 ++-
 arch/x86/cpu/coreboot/Kconfig        |  1 +
 arch/x86/cpu/coreboot/Makefile       |  8 ++++-
 arch/x86/cpu/coreboot/coreboot.c     |  3 +-
 arch/x86/cpu/coreboot/coreboot_spl.c | 12 +++++++
 arch/x86/cpu/i386/cpu.c              | 10 ------
 arch/x86/cpu/intel_common/Makefile   |  2 ++
 arch/x86/cpu/x86_64/cpu.c            |  2 ++
 arch/x86/dts/coreboot-u-boot.dtsi    | 18 +++++++++++
 arch/x86/lib/spl.c                   | 23 ++++++++++---
 board/coreboot/coreboot/MAINTAINERS  |  7 ++++
 configs/coreboot64_defconfig         | 48 ++++++++++++++++++++++++++++
 doc/board/coreboot/coreboot.rst      | 10 ++++++
 include/cbfs.h                       |  2 +-
 15 files changed, 138 insertions(+), 18 deletions(-)
 create mode 100644 arch/x86/cpu/coreboot/coreboot_spl.c
 create mode 100644 arch/x86/dts/coreboot-u-boot.dtsi
 create mode 100644 configs/coreboot64_defconfig

Comments

Heinrich Schuchardt April 6, 2020, 5:19 a.m. UTC | #1
On 4/6/20 1:22 AM, Simon Glass wrote:
> This series creates a new 64-bit 'coreboot64' build which can be launched
> from coreboot. It uses SPL to effect the jump to 64-bit mode.
>
> This was done in an attempt to get the Ubuntu FirmwareTestSuite[1]
> working. Unfortunately the latest version shows a splash screen and hangs,
> perhaps due to some missing EFI support.

fwts exists as a snap package that can be run from the operating system.
I had not problem with running it on ARM64 systems. Cf.
https://snapcraft.io/fwts.

Do you relate to to the live image that gave you problems?

Best regards

Heinrich

>
> [1] https://wiki.ubuntu.com/FirmwareTestSuite
>
>
> Simon Glass (6):
>   x86: Allow building an SPL image for coreboot
>   x86: Move work-around out of cpu_jump_to_64bit_uboot()
>   x86: Update SPL for coreboot
>   x86: cbfs: Drop unwanted declaration
>   x86: coreboot: Allow building an SPL image
>   x86: Add a 64-bit coreboot build
>
>  Makefile                             |  6 ++++
>  arch/x86/cpu/Makefile                |  4 ++-
>  arch/x86/cpu/coreboot/Kconfig        |  1 +
>  arch/x86/cpu/coreboot/Makefile       |  8 ++++-
>  arch/x86/cpu/coreboot/coreboot.c     |  3 +-
>  arch/x86/cpu/coreboot/coreboot_spl.c | 12 +++++++
>  arch/x86/cpu/i386/cpu.c              | 10 ------
>  arch/x86/cpu/intel_common/Makefile   |  2 ++
>  arch/x86/cpu/x86_64/cpu.c            |  2 ++
>  arch/x86/dts/coreboot-u-boot.dtsi    | 18 +++++++++++
>  arch/x86/lib/spl.c                   | 23 ++++++++++---
>  board/coreboot/coreboot/MAINTAINERS  |  7 ++++
>  configs/coreboot64_defconfig         | 48 ++++++++++++++++++++++++++++
>  doc/board/coreboot/coreboot.rst      | 10 ++++++
>  include/cbfs.h                       |  2 +-
>  15 files changed, 138 insertions(+), 18 deletions(-)
>  create mode 100644 arch/x86/cpu/coreboot/coreboot_spl.c
>  create mode 100644 arch/x86/dts/coreboot-u-boot.dtsi
>  create mode 100644 configs/coreboot64_defconfig
>
Simon Glass April 6, 2020, 2:28 p.m. UTC | #2
Hi Heinrich,

On Sun, 5 Apr 2020 at 23:25, Heinrich Schuchardt <xypron.glpk at gmx.de> wrote:
>
> On 4/6/20 1:22 AM, Simon Glass wrote:
> > This series creates a new 64-bit 'coreboot64' build which can be launched
> > from coreboot. It uses SPL to effect the jump to 64-bit mode.
> >
> > This was done in an attempt to get the Ubuntu FirmwareTestSuite[1]
> > working. Unfortunately the latest version shows a splash screen and hangs,
> > perhaps due to some missing EFI support.
>
> fwts exists as a snap package that can be run from the operating system.
> I had not problem with running it on ARM64 systems. Cf.
> https://snapcraft.io/fwts.
>
> Do you relate to to the live image that gave you problems?

Yes that's right.

Regards,
Simon

>
> Best regards
>
> Heinrich
>
> >
> > [1] https://wiki.ubuntu.com/FirmwareTestSuite
> >
> >
> > Simon Glass (6):
> >   x86: Allow building an SPL image for coreboot
> >   x86: Move work-around out of cpu_jump_to_64bit_uboot()
> >   x86: Update SPL for coreboot
> >   x86: cbfs: Drop unwanted declaration
> >   x86: coreboot: Allow building an SPL image
> >   x86: Add a 64-bit coreboot build
> >
> >  Makefile                             |  6 ++++
> >  arch/x86/cpu/Makefile                |  4 ++-
> >  arch/x86/cpu/coreboot/Kconfig        |  1 +
> >  arch/x86/cpu/coreboot/Makefile       |  8 ++++-
> >  arch/x86/cpu/coreboot/coreboot.c     |  3 +-
> >  arch/x86/cpu/coreboot/coreboot_spl.c | 12 +++++++
> >  arch/x86/cpu/i386/cpu.c              | 10 ------
> >  arch/x86/cpu/intel_common/Makefile   |  2 ++
> >  arch/x86/cpu/x86_64/cpu.c            |  2 ++
> >  arch/x86/dts/coreboot-u-boot.dtsi    | 18 +++++++++++
> >  arch/x86/lib/spl.c                   | 23 ++++++++++---
> >  board/coreboot/coreboot/MAINTAINERS  |  7 ++++
> >  configs/coreboot64_defconfig         | 48 ++++++++++++++++++++++++++++
> >  doc/board/coreboot/coreboot.rst      | 10 ++++++
> >  include/cbfs.h                       |  2 +-
> >  15 files changed, 138 insertions(+), 18 deletions(-)
> >  create mode 100644 arch/x86/cpu/coreboot/coreboot_spl.c
> >  create mode 100644 arch/x86/dts/coreboot-u-boot.dtsi
> >  create mode 100644 configs/coreboot64_defconfig
> >
>
Andy Shevchenko April 17, 2020, 3:31 p.m. UTC | #3
On Sun, Apr 05, 2020 at 05:22:34PM -0600, Simon Glass wrote:
> This series creates a new 64-bit 'coreboot64' build which can be launched
> from coreboot. It uses SPL to effect the jump to 64-bit mode.
> 
> This was done in an attempt to get the Ubuntu FirmwareTestSuite[1]
> working. Unfortunately the latest version shows a splash screen and hangs,
> perhaps due to some missing EFI support.

On the first glance it should not break anyhow existing x86 systems.
LGTM.

> [1] https://wiki.ubuntu.com/FirmwareTestSuite
> 
> 
> Simon Glass (6):
>   x86: Allow building an SPL image for coreboot
>   x86: Move work-around out of cpu_jump_to_64bit_uboot()
>   x86: Update SPL for coreboot
>   x86: cbfs: Drop unwanted declaration
>   x86: coreboot: Allow building an SPL image
>   x86: Add a 64-bit coreboot build
> 
>  Makefile                             |  6 ++++
>  arch/x86/cpu/Makefile                |  4 ++-
>  arch/x86/cpu/coreboot/Kconfig        |  1 +
>  arch/x86/cpu/coreboot/Makefile       |  8 ++++-
>  arch/x86/cpu/coreboot/coreboot.c     |  3 +-
>  arch/x86/cpu/coreboot/coreboot_spl.c | 12 +++++++
>  arch/x86/cpu/i386/cpu.c              | 10 ------
>  arch/x86/cpu/intel_common/Makefile   |  2 ++
>  arch/x86/cpu/x86_64/cpu.c            |  2 ++
>  arch/x86/dts/coreboot-u-boot.dtsi    | 18 +++++++++++
>  arch/x86/lib/spl.c                   | 23 ++++++++++---
>  board/coreboot/coreboot/MAINTAINERS  |  7 ++++
>  configs/coreboot64_defconfig         | 48 ++++++++++++++++++++++++++++
>  doc/board/coreboot/coreboot.rst      | 10 ++++++
>  include/cbfs.h                       |  2 +-
>  15 files changed, 138 insertions(+), 18 deletions(-)
>  create mode 100644 arch/x86/cpu/coreboot/coreboot_spl.c
>  create mode 100644 arch/x86/dts/coreboot-u-boot.dtsi
>  create mode 100644 configs/coreboot64_defconfig
> 
> -- 
> 2.26.0.292.g33ef6b2f38-goog
>
Bin Meng April 23, 2020, 8:05 a.m. UTC | #4
Hi Simon,

On Mon, Apr 6, 2020 at 7:22 AM Simon Glass <sjg at chromium.org> wrote:
>
> This series creates a new 64-bit 'coreboot64' build which can be launched
> from coreboot. It uses SPL to effect the jump to 64-bit mode.

Adding 64-bit U-Boot as a coreboot payload is nice.

>
> This was done in an attempt to get the Ubuntu FirmwareTestSuite[1]

Yet I fail to understand why adding 64-bit U-Boot as the coreboot
payload could help running the Ubuntu Firmware Test Suite. Does 32-bit
U-Boot as the coreboot payload not work in this case?

> working. Unfortunately the latest version shows a splash screen and hangs,
> perhaps due to some missing EFI support.
>
> [1] https://wiki.ubuntu.com/FirmwareTestSuite
>
>

Regards,
Bin
Heinrich Schuchardt April 24, 2020, 6:01 a.m. UTC | #5
On 4/23/20 10:05 AM, Bin Meng wrote:
> Hi Simon,
>
> On Mon, Apr 6, 2020 at 7:22 AM Simon Glass <sjg at chromium.org> wrote:
>>
>> This series creates a new 64-bit 'coreboot64' build which can be launched
>> from coreboot. It uses SPL to effect the jump to 64-bit mode.
>
> Adding 64-bit U-Boot as a coreboot payload is nice.
>
>>
>> This was done in an attempt to get the Ubuntu FirmwareTestSuite[1]
>
> Yet I fail to understand why adding 64-bit U-Boot as the coreboot
> payload could help running the Ubuntu Firmware Test Suite. Does 32-bit
> U-Boot as the coreboot payload not work in this case?

coreboot_defconfig has CONFIG_EFI_LOADER=y so the firmware test suite
should work fine if you are running a 32 bit OS.

Of cause calling a 32bit UEFI from a 64bit OS is expected fail due to a
different ABI.

Best regards

Heinrich

>
>> working. Unfortunately the latest version shows a splash screen and hangs,
>> perhaps due to some missing EFI support.
>>
>> [1] https://wiki.ubuntu.com/FirmwareTestSuite
>>
>>
>
> Regards,
> Bin
>
Andy Shevchenko April 24, 2020, 9:28 a.m. UTC | #6
On Fri, Apr 24, 2020 at 08:01:32AM +0200, Heinrich Schuchardt wrote:
> On 4/23/20 10:05 AM, Bin Meng wrote:
> > Hi Simon,
> >
> > On Mon, Apr 6, 2020 at 7:22 AM Simon Glass <sjg at chromium.org> wrote:
> >>
> >> This series creates a new 64-bit 'coreboot64' build which can be launched
> >> from coreboot. It uses SPL to effect the jump to 64-bit mode.
> >
> > Adding 64-bit U-Boot as a coreboot payload is nice.
> >
> >>
> >> This was done in an attempt to get the Ubuntu FirmwareTestSuite[1]
> >
> > Yet I fail to understand why adding 64-bit U-Boot as the coreboot
> > payload could help running the Ubuntu Firmware Test Suite. Does 32-bit
> > U-Boot as the coreboot payload not work in this case?
> 
> coreboot_defconfig has CONFIG_EFI_LOADER=y so the firmware test suite
> should work fine if you are running a 32 bit OS.
> 
> Of cause calling a 32bit UEFI from a 64bit OS is expected fail due to a
> different ABI.

I'm wonder how Linux (64-bit) kernel with EFI stub enables boots on EFI 32-bit environment?

> >> working. Unfortunately the latest version shows a splash screen and hangs,
> >> perhaps due to some missing EFI support.
> >>
> >> [1] https://wiki.ubuntu.com/FirmwareTestSuite
Simon Glass April 24, 2020, 2:08 p.m. UTC | #7
Hi Bin,

On Thu, 23 Apr 2020 at 02:05, Bin Meng <bmeng.cn at gmail.com> wrote:
>
> Hi Simon,
>
> On Mon, Apr 6, 2020 at 7:22 AM Simon Glass <sjg at chromium.org> wrote:
> >
> > This series creates a new 64-bit 'coreboot64' build which can be launched
> > from coreboot. It uses SPL to effect the jump to 64-bit mode.
>
> Adding 64-bit U-Boot as a coreboot payload is nice.
>
> >
> > This was done in an attempt to get the Ubuntu FirmwareTestSuite[1]
>
> Yet I fail to understand why adding 64-bit U-Boot as the coreboot
> payload could help running the Ubuntu Firmware Test Suite. Does 32-bit
> U-Boot as the coreboot payload not work in this case?

That's right. They only provide a 64-bit EFI image.

We could presumably make 64-bit EFI images work on 32-bit U-Boot, but
it doesn't at present.

>
> > working. Unfortunately the latest version shows a splash screen and hangs,
> > perhaps due to some missing EFI support.
> >
> > [1] https://wiki.ubuntu.com/FirmwareTestSuite

Regards,
Simon