[U-Boot] [PATCH v4 0/8] x86: Add basic Slim Bootloader payload support

Park, Aiden aiden.park at intel.com
Mon Jul 15 18:01:34 UTC 2019


Hi Andy,

> -----Original Message-----
> From: Andy Shevchenko [mailto:andy.shevchenko at gmail.com]
> Sent: Monday, July 15, 2019 2:33 AM
> To: Park, Aiden <aiden.park at intel.com>
> Cc: U-Boot Mailing List <u-boot at lists.denx.de>; Simon Glass
> <sjg at chromium.org>; Bin Meng <bmeng.cn at gmail.com>
> Subject: Re: [U-Boot] [PATCH v4 0/8] x86: Add basic Slim Bootloader payload
> support
> 
> On Mon, Jul 15, 2019 at 12:31 PM Andy Shevchenko
> <andy.shevchenko at gmail.com> wrote:
> >
> > On Mon, Jul 15, 2019 at 12:58 AM Park, Aiden <aiden.park at intel.com>
> wrote:
> > >
> > > This patch is to enable U-Boot as a payload which runs on top of Slim
> Bootloader(https://github.com/slimbootloader/slimbootloader) boot
> firmware for x86 platforms.
> > >
> > > The Slim Bootloader is designed with multi-stage architecture for the
> execution from reset vector to OS hand-off, and supports qemu, Apollolake,
> Whiskeylake and Coffeelake platforms consuming Intel
> FSP(https://github.com/IntelFsp/FSP) for silicon initialization including CAR
> and memory initialization.
> > > As multi-stage architecture, the Slim Bootloader adopts payload concept
> which is responsible for OS load from media devices and boot OS and it
> supports 32-bit PE32, EFI FV, ELF and RAW format payloads.
> > > The Slim Bootloader generate HOB(Hand Off Block) list pointer, which has
> debug serial port info, memory map info, performance data info and etc.,
> and passes it to a payload. U-Boot configures serial port, dram, pci, tsc and
> others with the information from the HOB.
> > >
> > > The compiled U-Boot supports usb, sata and sd/mmc boot which have
> been verified on qemu and other supported platforms.
> > >
> >
> > Thanks for the series. I have some questions.
> >
> > Is it chained bootloader in the sense of how it's done? Can it use
> > rather SPL part of U-Boot? Can it simple run Linux kernel as an EFI
> > payload?
> >
> > Very briefly looking I didn't notice (may be simple missed it) the use
> > of X86_32BIT_INIT. Why do you not use it (it it's the case)?
> 
> s/X86_32BIT_INIT/LOAD_FROM_32_BIT/
> 
Thanks for your comment. X86_LOAD_FROM_32_BIT is already defined in
configs/slimbootloader_defconfig. In fact, this is not necessary
because Slim Bootloader has already done GDT setup before loading U-Boot,
and gdt re-config is done in arch_setup_gd().
X86_LOAD_FROM_32_BIT is required only if protected mode switch is done but
gdt still covers real mode address space only. Slim Bootloader already
initialized memory and configured GDT for 32bit address space,
so X86_LOAD_FROM_32_BIT is not necessary for Slim Bootloader.
If you don't mind, let me remove X86_LOAD_FROM_32_BIT from def_config.

Slim Bootloader is chained boot firmware(Stage1A/B -> Stage2 -> Payload)
with Intel FSP 2.x binary, and it is executed from reset vector.
* Stage1A: Reset vector, CAR init with FSP-T
* Stage1B: Memory init with FSP-M, CAR teardown, Continue execution in memory
* Stage2 : Rest of Silicon init with FSP-S, Create HOB, Hand-off to Payload
* Payload: Payload init with HOB, Load OS from media, Booting OS
Stage1A/B/2 focus on silicon configuration and rich payloads access media,
load and boot OS.
Slim Bootloader supports UEFI and OsLoader payloads currently.
* UEFI    : Support same environment as UEFI BIOS. Boot Windows/Linux.
* OsLoader: Default payload. Light-weight. Support Linux boot.
> >
> > Bin, may you give me couple of days to briefly review this in order to
> > see if there is any similarities with what Intel Edison firmware is
> > doing?
> >
> > P.S. Aiden, please, Cc me for the next series.
> >
> > > Changes in v4:
> > >   * Use arch/x86/cpu/start.S with CONFIG_SYS_SLIMBOOTLOADER
> condition
> > >   * Update U-boot or u-boot to U-Boot in commit message
> > >   * Add static keyword in static function
> > >
> > > Changes in v3:
> > >   * Add a brief description about Slim Bootloader in 1st patch
> > >   * Add a common HOB library to be used by both FSP and Slim Bootloader
> > >   * Move board/slimbootloader/slimbootloader to
> board/intel/slimbootloader
> > >   * Add more description board/intel/slimbootloader/README
> > >   * Fix comments from the code review
> > >
> > > Changes in v2:
> > >   * Split a single patch to 8 patches
> > >   * Add more comment for each structure and functions
> > >
> > > Aiden Park (8):
> > >   x86: Add new slimbootloader CPU type
> > >   x86: Add a common hob library
> > >   x86: slimbootloader: Add memory configuration
> > >   x86: slimbootloader: Add serial driver
> > >   x86: slimbootloader: Set TSC information for timer driver
> > >   x86: slimbootloader: Add a slimbootloader device tree
> > >   board: intel: Add new slimbootloader board
> > >   x86: Skip setting up MTRRs in slimbootloader
> > >
> > >  arch/x86/Kconfig                              |   1 +
> > >  arch/x86/cpu/Makefile                         |   1 +
> > >  arch/x86/cpu/slimbootloader/Kconfig           |  26 ++
> > >  arch/x86/cpu/slimbootloader/Makefile          |   5 +
> > >  arch/x86/cpu/slimbootloader/car.S             |  14 +
> > >  arch/x86/cpu/slimbootloader/dram.c            | 151 +++++++++++
> > >  arch/x86/cpu/slimbootloader/serial.c          |  69 +++++
> > >  arch/x86/cpu/slimbootloader/slimbootloader.c  |  55 ++++
> > >  arch/x86/cpu/start.S                          |   6 +-
> > >  arch/x86/dts/Makefile                         |   1 +
> > >  arch/x86/dts/slimbootloader.dts               |  27 ++
> > >  .../asm/arch-slimbootloader/slimbootloader.h  | 121 +++++++++
> > >  arch/x86/include/asm/fsp/fsp_hob.h            | 183 +------------
> > >  arch/x86/include/asm/fsp/fsp_support.h        |  37 +--
> > >  arch/x86/include/asm/fsp/fsp_types.h          |   8 -
> > >  arch/x86/include/asm/global_data.h            |   2 +-
> > >  arch/x86/include/asm/hob.h                    | 250 ++++++++++++++++++
> > >  arch/x86/lib/Makefile                         |   3 +-
> > >  arch/x86/lib/asm-offsets.c                    |   2 +-
> > >  arch/x86/lib/fsp/fsp_support.c                |  78 +-----
> > >  arch/x86/lib/hob.c                            | 104 ++++++++
> > >  arch/x86/lib/init_helpers.c                   |   3 +-
> > >  board/intel/Kconfig                           |  14 +
> > >  board/intel/slimbootloader/Kconfig            |  51 ++++
> > >  board/intel/slimbootloader/Makefile           |   5 +
> > >  board/intel/slimbootloader/README             | 133 ++++++++++
> > >  board/intel/slimbootloader/slimbootloader.c   |  17 ++
> > >  board/intel/slimbootloader/start.S            |   9 +
> > >  configs/slimbootloader_defconfig              |  22 ++
> > >  include/configs/slimbootloader.h              |  59 +++++
> > >  30 files changed, 1150 insertions(+), 307 deletions(-)  create mode
> > > 100644 arch/x86/cpu/slimbootloader/Kconfig
> > >  create mode 100644 arch/x86/cpu/slimbootloader/Makefile
> > >  create mode 100644 arch/x86/cpu/slimbootloader/car.S  create mode
> > > 100644 arch/x86/cpu/slimbootloader/dram.c
> > >  create mode 100644 arch/x86/cpu/slimbootloader/serial.c
> > >  create mode 100644 arch/x86/cpu/slimbootloader/slimbootloader.c
> > >  create mode 100644 arch/x86/dts/slimbootloader.dts  create mode
> > > 100644 arch/x86/include/asm/arch-slimbootloader/slimbootloader.h
> > >  create mode 100644 arch/x86/include/asm/hob.h  create mode 100644
> > > arch/x86/lib/hob.c  create mode 100644
> > > board/intel/slimbootloader/Kconfig
> > >  create mode 100644 board/intel/slimbootloader/Makefile
> > >  create mode 100644 board/intel/slimbootloader/README  create mode
> > > 100644 board/intel/slimbootloader/slimbootloader.c
> > >  create mode 100644 board/intel/slimbootloader/start.S
> > >  create mode 100644 configs/slimbootloader_defconfig  create mode
> > > 100644 include/configs/slimbootloader.h
> > >
> > > --
> > > 2.20.1
> > >
> > > _______________________________________________
> > > U-Boot mailing list
> > > U-Boot at lists.denx.de
> > > https://lists.denx.de/listinfo/u-boot
> >
> >
> >
> > --
> > With Best Regards,
> > Andy Shevchenko
> 
> 
> 
> --
> With Best Regards,
> Andy Shevchenko

Best Regards,
Aiden


More information about the U-Boot mailing list