All of lore.kernel.org
 help / color / mirror / Atom feed
From: Graeme Russ <graeme.russ@gmail.com>
To: u-boot@lists.denx.de
Subject: [U-Boot] U-Boot-x86 / coreboot Integration
Date: Wed, 11 May 2011 00:33:56 +1000	[thread overview]
Message-ID: <4DC94CD4.2050904@gmail.com> (raw)

Hi All,

I figured it might be best to start a new, clean thread dealing with the
technical design aspects of bootstrapping U-Boot from coreboot.

I am extremely excited about this as the x86 U-Boot maintainer, but even
more so by the idea of two very mature and respected FLOSS projects
potentially becoming greater than the sum of their parts :)

OK, enough with the warm and fuzzies. Lets look first at a few facts (as I
understand them - please feel free to correct me):
 - U-Boot is a bootloader for embedded systems - A market segment
   dominated by ARM, PPC et al - i.e. NOT x86
 - coreboot is a 'BIOS' replacement for mainstream PC's - A market segment
   dominated by x86
 - Both are principally designed as 'primary bootloaders' - i.e. intended
   to be executed at CPU reset and responsible for low level hardware
   initialisation
 - U-Boot has no support for modern x86 PC hardware (North and South
   bridges, Dual-Core x86 CPUs, microcode, ACPI, APM etc)
 - coreboot is 'dumb' (No command line, scripting etc) As I understand it
   you build a 'payload' into the coreboot image which coreboot simply runs
   after it has performed necessary low-level hardware initialisation
 - U-Boot is 'smart' (command line, scripting, network support, environment
   variables etc) but currently lacks the ability to perform low level
   hardware initialisation of x86 PC hardware
 - coreboot launches a 'payload' which is (typically) an ELF executable
   linked to 'libpayload'. libpayload provides access to some primitive
   libc functionality, I/O and coreboot generated data structures
 - Our primary target OS is GNU/Linux (of course!)
 - The majority of U-Boot and coreboot is licensed under the 'GPLv2 or (at
   your option) any later version'

So coreboot and U-Boot are a good complement to each other so bringing
U-Boot to x86 PC mainboards via coreboot looks like a good idea - Now the
politics ;)
 - The U-Boot source 'must' be self contained - No external libraries.
   Incorporating license compatible source is OK
 - coreboot payloads should be in ELF (linked to libpayload)
 - There should be minimal intrusion into the core U-Boot build scripts
   (Makefiles, mk.configs etc) - I would assume the same applies to
   coreboot build files as well. Hacking the U-Boot x86 specific build
   files should be fine
 - Everything should 'just work' with a recent GNU toolchain (gcc,
   binutils etc)
 - U-Boot relocates to 'Top of RAM' - This is a fundamental architectural
   design and not x86 specific. This feature should be retained for
   consistency with other U-Boot arches
 - Do we care about legacy BIOS support (SeaBIOS) for now (I think not)?

So, a few questions
 - How much of libpayload would we need to bring into U-Boot to provide
   bare minimal payload delivery? U-Boot already contains it's own minimal
   libc routines.
 - How do we get VGA and USB keyboard support working? Do other U-Boot
   boards implement console on anything other than serial?
 - Can we add relocation support to the coreboot ELF loader?
 - Does coreboot relocate into RAM? If so, what is the target address? What
   guarantee is there that the target address is valid?
 - Could coreboot benefit from U-Boot's 'load to top of RAM' philosophy?
 - Is it worth playing around with segment registers to 'relocate' U-Boot
 - What hardware should be initialised in coreboot and what should be
   initialised in U-Boot? (political question ;)
 - What about Chipset Microcode (CMC)
 - What about System Management Mode (SMM)

I think a good start would be to create a new U-Boot target which includes
a stripped down libpayload in the U-Boot source. This target can exclude
most of the assembler startup code (resetvec.S, start16.S, start.S). I
assume the coreboot ELF loader (or libpayload) takes care of setting up the
C environment (stack etc).

We can start with U-Boot linked to a fixed location in RAM and skip
relocations then work on either extending coreboot to perform relocation
fixups or have U-Boot perform the fixups based on RAM information read from
cbtable

             reply	other threads:[~2011-05-10 14:33 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-05-10 14:33 Graeme Russ [this message]
2011-05-10 16:08 ` [U-Boot] [coreboot] U-Boot-x86 / coreboot Integration Peter Stuge
2011-05-10 18:15   ` Wolfgang Denk
2011-05-10 23:44   ` Graeme Russ
2011-05-11  0:23     ` Kevin O'Connor
2011-05-11  0:40       ` Graeme Russ
2011-05-11  0:46         ` Peter Stuge
2011-05-11  1:05           ` Graeme Russ
2011-05-11  1:16           ` Kevin O'Connor
2011-05-11  0:53         ` Kevin O'Connor
2011-05-11  3:12       ` Graeme Russ
2011-05-11  3:20         ` Kevin O'Connor
2011-05-11  3:27           ` Graeme Russ
2011-05-11  3:51             ` Kevin O'Connor
2011-05-11  6:51               ` Wolfgang Denk
2011-05-10 18:03 ` [U-Boot] " Wolfgang Denk
2011-05-11  0:11   ` Graeme Russ
2011-05-11  0:38     ` [U-Boot] [coreboot] " Kevin O'Connor
2011-05-11  6:47     ` [U-Boot] " Wolfgang Denk
2011-05-15 19:20 ` [U-Boot] [coreboot] " Rudolf Marek

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=4DC94CD4.2050904@gmail.com \
    --to=graeme.russ@gmail.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.