coreboot for the Switch
Find a file
Ronald G. Minnich 0044d53a10 This set of changes creates irq tables for alix1c and adds the functions
from v2 to install them. Linux boots fine and all interrupts
seem to work correctly -- the network comes up, USB hot plug works, 
I can mount the USB disk, etc. 

To enable pirq tables for a given mainboard, simply add the 
select PIRQ_TABLE (see below) to the Kconfig for that board. 

Again, this code builds and boots linux on the alix1c.

I think, with this change, we are very close to moving ALL LX boards to 
v3 and deprecating v2. The major remaining fix is to add an empty LAR 
entry to fill empty space in LAR and speed up the LAR file search 
process. 

Signed-off-by: Ronald G. Minnich <rminnich@gmail.com>
Acked-by: Stefan Reinauer <stepan@coresystems.de>

Index: include/tables.h
Add prototype, conditioned on CONFIG_PIRQ_TABLE

Index: util/x86emu/vm86.c
Comment out 'debug trap' code that scribbles vectors at 0x4000. 
I don't know why this is here, but I'd like to leave it #if'ed out --
somebody, at some point, thought we needed it. To reenable, we will need
to move stage2 code or these magic vectors. 

Index: arch/x86/Makefile
Add support for conditional compilation of pirq support code. 

Index: arch/x86/pirq_routing.c
Add this file from v2. 

Index: arch/x86/archtables.c
Add call to write_pirq_routing_table (controlled by #ifdef
CONFIG_PIRQ_TABLE)

Index: arch/x86/Kconfig
Add new config variable: PIRQ_TABLE

Index: device/device.c
Fix some trivial bugs. 

Index: mainboard/pcengines/alix1c/Makefile
Add pirq table code for stage2

Index: mainboard/pcengines/alix1c/dts
Modify dts to properly set southbridge variables

Index: mainboard/pcengines/alix1c/irq_tables.c
Add code from v2 for the alix1c. 

Index: mainboard/pcengines/Kconfig
Add 'select PIRQ_TABLE'

Index: include/arch/x86/pirq_routing.h
Add include file from v2.
Remove all the SLOTCOUNT nonsense. This hack was only needed
for a very early version of gcc 3.x, where they screwed up the 
creation of struct members that used the [] syntax for variable-length
array at the end of the struct. 

Index: include/device/pci.h
Add prototype



git-svn-id: svn://coreboot.org/repository/coreboot-v3@582 f3766cd6-281f-0410-b1cd-43a5c92072e9
2008-02-09 16:32:59 +00:00
arch/x86 This set of changes creates irq tables for alix1c and adds the functions 2008-02-09 16:32:59 +00:00
device This set of changes creates irq tables for alix1c and adds the functions 2008-02-09 16:32:59 +00:00
doc/design Now version 3: LinuxBIOS -> coreboot rename. 2008-01-27 18:54:57 +00:00
include This set of changes creates irq tables for alix1c and adds the functions 2008-02-09 16:32:59 +00:00
lib Now version 3: LinuxBIOS -> coreboot rename. 2008-01-27 18:54:57 +00:00
mainboard This set of changes creates irq tables for alix1c and adds the functions 2008-02-09 16:32:59 +00:00
northbridge If there is a problem loading VSA we should stop here instead of failing in PCI scan later. 2008-02-07 16:09:24 +00:00
southbridge This is a subtle error. An operations struct, to work as a constructor, must initialize 2008-02-07 16:17:21 +00:00
superio Fix compilation after switch to explicit dts naming. 2008-01-31 03:08:32 +00:00
util This set of changes creates irq tables for alix1c and adds the functions 2008-02-09 16:32:59 +00:00
COPYING filling in 2006-10-06 19:19:14 +00:00
HACKING Now version 3: LinuxBIOS -> coreboot rename. 2008-01-27 18:54:57 +00:00
Kconfig Now version 3: LinuxBIOS -> coreboot rename. 2008-01-27 18:54:57 +00:00
Makefile This patch adds support for make defconfig in v3. Those that port v3 2008-02-07 16:50:44 +00:00
README Now version 3: LinuxBIOS -> coreboot rename. 2008-01-27 18:54:57 +00:00
Rules.make Now version 3: LinuxBIOS -> coreboot rename. 2008-01-27 18:54:57 +00:00

-------------------------------------------------------------------------------
coreboot README
-------------------------------------------------------------------------------

Coreboot is a Free Software project aimed at replacing the proprietary
BIOS you can find in most of today's computers.

It performs just a little bit of hardware initialization and then executes
one of many possible payloads.


Payloads
--------

After the basic initialization of the hardware has been performed, any
desired "payload" can be started by coreboot. Examples include:

 * A Linux kernel
 * FILO (a simple bootloader with filesystem support)
 * GRUB2 (a free bootloader; support is in development)
 * OpenBIOS (a free IEEE1275-1994 Open Firmware implementation)
 * Open Firmware (a free IEEE1275-1994 Open Firmware implementation)
 * SmartFirmware (a free IEEE1275-1994 Open Firmware implementation)
 * GNUFI (a free, UEFI-compatible firmware)
 * Etherboot (for network booting and booting from raw IDE or FILO)
 * ADLO (for booting Windows 2000 or OpenBSD)
 * Plan 9 (a distributed operating system)
 * memtest86 (for testing your RAM)


Supported Hardware
------------------

Coreboot supports a wide range of chipsets, devices, and mainboards.

For details please consult:

 * http://www.coreboot.org/Supported_Motherboards
 * http://www.coreboot.org/Supported_Chipsets_and_Devices


Build Requirements
------------------

 * gcc / g++
 * make
 * bison
 * flex
 * libncurses5-dev

Optional (for generating/viewing documentation):

 * lyx
 * doxygen


Building And Installing
-----------------------

Note: Currently only the x86 QEMU target is supported in coreboot-v3.

1) Build a payload:

  THIS IS NOT IMPLEMENTED YET. PLEASE BUILD YOUR PAYLOAD MANUALLY.

  $ make payload

  This step is optional. The 'make payload' command will execute a
  helper tool which allows you to easily build and configure a wide
  variety of payloads. The result of this step is usually a file
  called 'payload.elf' in the top-level directory.

2) Configure coreboot:

  $ make menuconfig

  Select at least the desired mainboard vendor, the mainboard device, and
  the size of your ROM chip. Per default coreboot will look for a file
  called 'payload.elf' in the current directory and use that as the payload.

  If that's not what you want, you can change the path/filename of the
  payload to use some other payload file. Or you can choose 'No payload'
  in the configuration menu, in which case the resulting coreboot ROM image
  will not contain any payload. You'll have to manually add a payload
  later using the 'lar' utility for the coreboot ROM image to be useful.

3) Build the coreboot ROM image:

  $ make

  The generated ROM image is the file coreboot.rom in the build/ directory.

4) Flash the coreboot ROM image on a BIOS chip:

  $ flashrom -wv coreboot.rom

  NOTE: This step will OVERWRITE the current BIOS located on the ROM chip!
  Make sure you have adequate backup facilities before performing this
  step, otherwise you might not be able to recover in case of problems.
  If you have any questions, please contact us on the mailing list!

  The 'flashrom' tool is located in util/flashrom where you can build it
  from source code by typing 'make'. Alternatively, your favorite Linux
  distribution might ship a 'flashrom' package which provides the 'flashrom'
  program in (e.g.) /usr/sbin. On Debian GNU/Linux systems you can get
  the flashrom package via 'apt-get install flashrom'.


Testing coreboot Without Modifying Your Hardware
-------------------------------------------------

If you want to test coreboot without any risks before you really decide
to use it on your hardware, you can use the QEMU system emulator to run
coreboot virtually in QEMU.

The required steps are:

  $ make menuconfig

    Select 'Emulated systems' as mainboard vendor and 'QEMU x86' as
    mainboard model.

  $ make

  $ qemu -L build -hda /dev/zero -serial stdio

  This will run coreboot in QEMU and output all debugging messages (which
  are usually emitted to a serial console) on stdout. It will not do
  anything useful beyond that, as you provided no virtual harddrive to
  QEMU (-hda /dev/zero).

  If you have a full QEMU hard drive image (say /tmp/qemu.img) with a Linux
  distribution installed, you can boot that Linux kernel by using a proper
  FILO payload with coreboot and typing:

  $ qemu -L build -hda /tmp/qemu.img -serial stdio

  Installing a Linux distribution in QEMU and building the FILO payload is
  beyond the scope of this document.


Website and Mailing List
------------------------

Further details on the project, a FAQ, many HOWTOs, news, development
guidelines and more can be found on the coreboot website:

  http://www.coreboot.org

You can contact us directly on the coreboot mailing list:

  http://www.coreboot.org/Mailinglist


Copyright and License
---------------------

The copyright on coreboot is owned by quite a large number of individual
developers and companies. Please check the individual source files for details.

Coreboot is licensed under the terms of the GNU General Public License (GPL).
Some files are licensed under the "GPL (version 2, or any later version)",
and some files are licensed under the "GPL, version 2". For some parts,
which were derived from other Free Software projects, other (GPL-compatible)
licenses may apply. Please check the individual source files for details.

This makes the resulting coreboot images licensed under the GPL, version 2.