coreboot-kgpe-d16/payloads/libpayload
Julius Werner 52e3f449ac libpayload: Increase USB EHCI transfer timeout
The EHCI driver defines a maximum transfer timeout of two seconds. The
comments state that during tests the maximum amount of required transfer
time was for the SCSI TEST_UNIT_READY command on certain devices. We
have now observed a USB device (Patriot Memory 13fe:3100) that can NAK
this command for slightly more than two seconds. It will also completely
fail if the timeout hits, since it gets confused by the subsequent CSW
retry/recovery mechanism and starts producing babble errors. This patch
increases the timeout to three seconds to circumvent this problem.

To test, boot a Falco from a red-black RageXT USB stick.

Change-Id: I3c4fef468fb16eacc5a487d76d025a78fb450e27
Signed-off-by: Julius Werner <jwerner@chromium.org>
Reviewed-on: https://gerrit.chromium.org/gerrit/63095
Reviewed-by: Aaron Durbin <adurbin@chromium.org>
Reviewed-by: Duncan Laurie <dlaurie@chromium.org>
Reviewed-by: Sameer Nanda <snanda@chromium.org>
Reviewed-on: http://review.coreboot.org/4379
Tested-by: build bot (Jenkins)
Reviewed-by: Patrick Georgi <patrick@georgi-clan.de>
2013-12-21 07:39:19 +01:00
..
arch libpayload: Get rid of a compiler warning 2013-12-12 22:03:22 +01:00
bin libpayload: Drop PowerPC architecture 2013-11-26 00:08:39 +01:00
configs libpayload: Update configs/defconfig file 2012-12-18 15:05:36 +01:00
crypto libpayload: fix wrong endian assumption in sha1.c 2013-11-24 05:40:19 +01:00
curses libpayload: Use longer delay in tinycurses' wgetch() 2013-06-26 20:51:07 +02:00
drivers libpayload: Increase USB EHCI transfer timeout 2013-12-21 07:39:19 +01:00
include libpayload: Add simple hexdump function 2013-12-16 17:53:58 +01:00
libc libpayload: Add simple hexdump function 2013-12-16 17:53:58 +01:00
libcbfs libpayload: expose cbfs ram functions 2013-12-12 22:22:12 +01:00
liblzma libpayload: Don't do unaligned accesses during LZMA decompression 2013-03-13 23:42:09 +01:00
libpci
sample libpayload/sample: Use settings from .xcompile file to build. 2013-10-17 01:54:43 +02:00
tests libpayload: initial test case + tiny "framework" 2013-03-22 00:35:32 +01:00
util libpayload: Fix xcompile 2013-11-25 23:36:27 +01:00
Config.in libpayload: Drop PowerPC architecture 2013-11-26 00:08:39 +01:00
Doxyfile
LICENSES
Makefile libpayload: Drop PowerPC architecture 2013-11-26 00:08:39 +01:00
Makefile.inc libpayload: Clean up CFLAGS 2013-12-05 15:44:31 +01: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.