coreboot-kgpe-d16/payloads/libpayload
Julius Werner 59e9080dcb endian: Fix bebitenc() to actually encode big-endian
bebitenc() just runs a downward loop over the same body as lebitenc().
That doesn't give you a byte-swapped result, it gives you the same final
value, just starting from the other side to fill it in. (Also, it
confused i++ and i--, so it really gives you a compiler error.)

The correct code needs to have the array index inverted relative to the
bit shift index to produce a big endian result.

Change-Id: I5c2da3a196334844ce23468bd0124bbe2f378c46
Signed-off-by: Julius Werner <jwerner@chromium.org>
Reviewed-on: https://review.coreboot.org/22322
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Aaron Durbin <adurbin@chromium.org>
2017-11-06 20:46:37 +00:00
..
arch
bin
configs
crypto
curses
drivers libpayload/storage: Add Sunrise Point AHCI PCI id 2017-09-02 15:33:50 +00:00
gdb
include endian: Fix bebitenc() to actually encode big-endian 2017-11-06 20:46:37 +00:00
libc libpayload: add time() 2017-08-21 16:53:20 +00:00
libcbfs
liblz4
liblzma
libpci
sample
tests
Doxyfile
Kconfig libpayload: video: Add support for font scaling with a factor 2017-08-03 20:37:07 +00:00
LICENSES
LICENSE_GPL
Makefile
Makefile.inc copy & update test routines from what-jenkins-does 2017-08-11 15:24:56 +00: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 https://www.coreboot.org for details on coreboot.


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

 $ git clone https://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 https://www.coreboot.org/Libpayload.

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


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

See LICENSES.