coreboot-kgpe-d16/payloads/libpayload
Vadim Bendebury b7f82e9559 libpayload: arm: add code to clear bss
This adds some assembly code to clear .bss segment. It might have been
already cleared by the loader, but it is not guaranteed. This also
helps when the program is loaded by the debugger.

BUG=none
TEST=observed that .bss is now initialized when the program is
     restarted. Verified correct boundaries of the segment.

Original-Change-Id: I0aed0070da53881e4cf8c27049459040c006e765
Original-Signed-off-by: Vadim Bendebury <vbendeb@chromium.org>
Original-Reviewed-on: https://chromium-review.googlesource.com/201784
Original-Reviewed-by: Vincent Palatin <vpalatin@chromium.org>
Original-Reviewed-by: Trevor Bourget <tbourget@codeaurora.org>
(cherry picked from commit c89ecee5ddfc33a438d4d1926d3756a48f3c2576)
Signed-off-by: Marc Jones <marc.jones@se-eng.com>

Change-Id: Ic0c33d2a8ad22cd23b3ccb73c603cb14ae2aab29
Reviewed-on: http://review.coreboot.org/8060
Tested-by: build bot (Jenkins)
Reviewed-by: Stefan Reinauer <stefan.reinauer@coreboot.org>
2015-01-06 16:56:23 +01:00
..
arch libpayload: arm: add code to clear bss 2015-01-06 16:56:23 +01:00
bin libpaylod: fix lpgcc logic statement 2014-12-30 19:12:11 +01:00
configs libpayload: ipq8064: Add rudimentary timer driver 2015-01-04 00:07:38 +01:00
crypto libpayload: Change CONFIG_* to CONFIG_LP_* in the kconfig. 2014-08-05 18:44:08 +02:00
curses libpayload/PDcurses: avoid NULL deref 2015-01-03 23:58:22 +01:00
drivers ipq8064: Add work around for slow timer clock 2015-01-04 00:27:50 +01:00
include libpayload: Provide selfboot() external declaration in a common file 2015-01-04 00:27:20 +01:00
libc libpayload: Fix pointer related casts 2014-12-31 18:57:35 +01:00
libcbfs libpayload: Fix pointer related casts 2014-12-31 18:57:35 +01: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
sample libpayload: Fix missed CONFIG_ -> CONFIG_LP_ substitutions 2014-10-17 11:24:15 +02:00
tests libpayload: Change CONFIG_X86_SERIAL_CONSOLE to CONFIG_8250_SERIAL_CONSOLE 2014-08-28 01:40:48 +02:00
util libpayload: also support armv7-a toolchain 2014-10-16 15:54:16 +02:00
Config.in libpayload: ipq8064: Add rudimentary timer driver 2015-01-04 00:07:38 +01:00
Doxyfile
LICENSES
Makefile libpayload: Don't use default path for kconfig 2014-10-17 11:25:10 +02:00
Makefile.inc libpayload: Do not tolerate compilation warnings when building 2014-12-31 19:06:16 +01:00
README

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.