coreboot-kgpe-d16/payloads/libpayload
Julius Werner 813f305e26 arm: Put exception_stack into BSS
"Hey guys, I have this awesome idea! How about we put a huge array
filled with 0xa5 into the data segment of our uncompressed romstage
for no particular reason? Give our SPI driver something to do so it
doesn't get too bored, you know?"

Guess it pays off to just hexdump our image and sanity-check it top to
bottom every once in a while...

Also reduces the size because 8K is crazy just to print a bunch of
registers (256 bytes ought to be enough for anybody).

Old-Change-Id: Icec0a711a1b5140d2ebcd98338ec638a4b6262fa
Signed-off-by: Julius Werner <jwerner@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/176762
Reviewed-by: Gabe Black <gabeblack@chromium.org>
Reviewed-by: Ronald Minnich <rminnich@chromium.org>
Reviewed-by: David Hendricks <dhendrix@chromium.org>
(cherry picked from commit 61c360a1c3f445535c9ff383a389e643cfe4527c)

arm: Remove exception_test()

The exception_test() mechanism might have been useful when exceptions
were first implemented, but now that they are pretty stable it's really
not necessary anymore (especially not on every single boot in production
Chromebooks). It forces a simple unaligned access, and as we start
having exceptions in stages that might not have paging turned on yet,
it's better to remove that completely.

Also removed the duplicated implementations of SCTLR-stuff and switched
to the existing ones in cache.h.

Old-Change-Id: I85e66269f5e2f2dfd3e8aaaa18441493514b62f8
Signed-off-by: Julius Werner <jwerner@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/177101
Reviewed-by: David Hendricks <dhendrix@chromium.org>
Reviewed-by: Gabe Black <gabeblack@chromium.org>
(cherry picked from commit d0706b848572fbea26e0e432ec5827503b9603c9)

Squashed 2 exception related commits.

Change-Id: Id2c115ee39a0732c375472afc0194436e2f5e069
Signed-off-by: Isaac Christensen <isaac.christensen@se-eng.com>
Reviewed-on: http://review.coreboot.org/6885
Tested-by: build bot (Jenkins)
Reviewed-by: Stefan Reinauer <stefan.reinauer@coreboot.org>
2014-09-13 02:02:04 +02:00
..
arch arm: Put exception_stack into BSS 2014-09-13 02:02:04 +02:00
bin ARM: Generalize armv7 as arm. 2014-09-08 18:59:23 +02:00
configs ARM: Generalize armv7 as arm. 2014-09-08 18:59:23 +02:00
crypto libpayload: Change CONFIG_* to CONFIG_LP_* in the kconfig. 2014-08-05 18:44:08 +02:00
curses libpayload: Change CONFIG_* to CONFIG_LP_* in the kconfig. 2014-08-05 18:44:08 +02:00
drivers libpayload: usbhid: Fix typo on descriptor parsing 2014-09-10 19:36:50 +02:00
include tegra124/nyan: rougly stable code base 2014-09-11 23:13:52 +02:00
libc libpayload: dma_malloc: Prevent warm reboot problems and add debugging 2014-08-14 23:41:44 +02:00
libcbfs cbfs: Fix overwalk on file scan 2014-08-10 22:25:07 +02:00
liblzma LZMA: Add a version of ulzma which takes the input and output buffer sizes. 2014-08-10 22:29:51 +02:00
libpci libpayload: minor cleanups 2012-04-04 00:40:31 +02:00
sample ARM: Generalize armv7 as arm. 2014-09-08 18:59:23 +02:00
tests libpayload: Change CONFIG_X86_SERIAL_CONSOLE to CONFIG_8250_SERIAL_CONSOLE 2014-08-28 01:40:48 +02:00
util ARM: Generalize armv7 as arm. 2014-09-08 18:59:23 +02:00
Config.in ARM: Generalize armv7 as arm. 2014-09-08 18:59:23 +02:00
Doxyfile Run doxygen -u on doxygen configuration files 2010-06-28 10:40:38 +00:00
LICENSES
Makefile ARM: Generalize armv7 as arm. 2014-09-08 18:59:23 +02:00
Makefile.inc ARM: Generalize armv7 as arm. 2014-09-08 18:59:23 +02:00
README libpayload, superiotool: README: Prepend `coreboot/` to path of change directory line 2013-04-04 17:22:15 +02:00

README

-------------------------------------------------------------------------------
libpayload README
-------------------------------------------------------------------------------

libpayload is a minimal library to support standalone payloads
that can be booted with firmware like coreboot. It handles the setup
code, and provides common C library symbols such as malloc() and printf().

Note: This is _not_ a standard library for use with an operating system,
rather it's only useful for coreboot payload development!
See http://coreboot.org for details on coreboot.


Installation
------------

 $ git clone http://review.coreboot.org/p/coreboot.git

 $ cd coreboot/payloads/libpayload

 $ make menuconfig

 $ make

 $ sudo make install (optional, will install into /opt per default)

As libpayload is for 32bit x86 systems only, you might have to install the
32bit libgcc version, otherwise your payloads will fail to compile.
On Debian systems you'd do 'apt-get install gcc-multilib' for example.


Usage
-----

Here's an example of a very simple payload (hello.c) and how to build it:

 #include <libpayload.h>

 int main(void)
 {
     printf("Hello, world!\n");
     return 0;
 }

Building the payload using the 'lpgcc' compiler wrapper:

 $ lpgcc -o hello.elf hello.c

Please see the sample/ directory for details.


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

The main website is http://www.coreboot.org/Libpayload.

For additional information, patches, and discussions, please join the
coreboot mailing list at http://coreboot.org/Mailinglist, where most
libpayload developers are subscribed.


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

See LICENSES.