f42fdabe65
Not that good an idea to start with. Coccinelle patch: @@ @@ -void ( -uhci_reg_mask8 | -uhci_reg_mask16 | -uhci_reg_mask32 ) - (...) { ... } @@ @@ -void ( -uhci_reg_mask8 | -uhci_reg_mask16 | -uhci_reg_mask32 ) - (...); @@ expression ctrl, reg, ormask; @@ -uhci_reg_mask32 (ctrl, reg, ~0, ormask) +uhci_reg_write32 (ctrl, reg, uhci_reg_read32 (ctrl, reg) | ormask) @@ expression ctrl, reg, ormask; @@ -uhci_reg_mask16 (ctrl, reg, ~0, ormask) +uhci_reg_write16 (ctrl, reg, uhci_reg_read16 (ctrl, reg) | ormask) @@ expression ctrl, reg, ormask; @@ -uhci_reg_mask8 (ctrl, reg, ~0, ormask) +uhci_reg_write8 (ctrl, reg, uhci_reg_read8 (ctrl, reg) | ormask) @@ expression ctrl, reg, andmask; @@ -uhci_reg_mask32 (ctrl, reg, andmask, 0) +uhci_reg_write32 (ctrl, reg, uhci_reg_read32 (ctrl, reg) & andmask) @@ expression ctrl, reg, andmask; @@ -uhci_reg_mask16 (ctrl, reg, andmask, 0) +uhci_reg_write16 (ctrl, reg, uhci_reg_read16 (ctrl, reg) & andmask) @@ expression ctrl, reg, andmask; @@ -uhci_reg_mask16 (ctrl, reg, andmask, 0) +uhci_reg_write16 (ctrl, reg, uhci_reg_read16 (ctrl, reg) & andmask) Change-Id: Id0eb8327293831e54249d43fd06d50963c793699 Signed-off-by: Patrick Georgi <patrick.georgi@secunet.com> Reviewed-on: http://review.coreboot.org/477 Tested-by: build bot (Jenkins) Reviewed-by: Stefan Reinauer <stefan.reinauer@coreboot.org> |
||
---|---|---|
.. | ||
arch | ||
bin | ||
configs | ||
crypto | ||
curses | ||
drivers | ||
include | ||
lib | ||
libc | ||
libcbfs | ||
liblzma | ||
libpci | ||
sample | ||
util | ||
Config.in | ||
Doxyfile | ||
LICENSES | ||
Makefile | ||
Makefile.inc | ||
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 ------------ $ svn co svn://coreboot.org/coreboot/trunk/payloads/libpayload $ cd 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.