coreboot-kgpe-d16/src/lib
Vadim Bendebury adcb095e9e Provide a common CBFS wrapper for SPI storage
Coreboot has all necessary infrastructure to use the proper SPI flash
interface in bootblock for CBFS. This patch creates a common CBFS
wrapper which can be enabled on different platforms as required.

COMMON_CBFS_SPI_WRAPPER, a new configuration option, enables the
common CBFS interface and prevents default inclusion of all SPI chip
drivers, only explicitly configured ones will be included when the new
feature is enabled. Since the wrapper uses the same driver at all
stages, enabling the new feature will also make it necessary to
include the SPI chip drivers in bootblock and romstage images.

init_default_cbfs_media() can now be common for different platforms,
and as such is defined in the library.

BUG=none
TEST=manual
   . with this change and the rest of the patches coreboot on AP148
     comes up all the way to attempting to boot the payload (reading
     earlier stages from the SPI flash along the way).

Original-Change-Id: Ia887bb7f386a0e23a110e38001d86f9d43fadf2c
Original-Signed-off-by: Vadim Bendebury <vbendeb@chromium.org>
Original-Reviewed-on: https://chromium-review.googlesource.com/197800
Original-Tested-by: Vadim Bendebury <vbendeb@google.com>
Original-Reviewed-by: Aaron Durbin <adurbin@chromium.org>
Original-Reviewed-by: David Hendricks <dhendrix@chromium.org>
(cherry picked from commit 60eb16ebe624f9420c6191afa6ba239b8e83a6e6)
Signed-off-by: Marc Jones <marc.jones@se-eng.com>

Change-Id: I7b0bf3dda915c227659ab62743e405312dedaf41
Reviewed-on: http://review.coreboot.org/7932
Tested-by: build bot (Jenkins)
Reviewed-by: Edward O'Callaghan <eocallaghan@alterapraxis.com>
2014-12-30 19:29:47 +01:00
..
loaders Rename coreboot_ram stage to ramstage 2014-04-26 13:27:09 +02:00
bootmem.c coreboot: introduce notion of bootmem for memory map at boot 2014-03-03 21:47:27 +01:00
bootmode.c ChromeOS: Remove oprom_is_loaded 2014-05-01 15:39:26 +02:00
cbfs.c aarch64: Fix 64-bit pointer related casts 2014-12-09 18:40:09 +01:00
cbfs_core.c lib/cbfs: Use linker symbols over .c include in cbfs.c 2014-11-19 00:13:26 +01:00
cbfs_core.h lib/cbfs: Use linker symbols over .c include in cbfs.c 2014-11-19 00:13:26 +01:00
cbfs_spi.c Provide a common CBFS wrapper for SPI storage 2014-12-30 19:29:47 +01:00
cbmem.c CBMEM console: Fix boards with BROKEN_CAR_MIGRATE 2014-12-16 20:41:02 +01:00
cbmem_console.c CBMEM console: Fix boards with BROKEN_CAR_MIGRATE 2014-12-16 20:41:02 +01:00
cbmem_info.c cbmem: use a single id to name mapping table 2014-12-30 19:17:47 +01:00
clog2.c src/lib/clog2.c: Fix style and clarity, remove some cruft 2014-06-20 08:06:51 +02:00
compute_ip_checksum.c lib: Fix spelling 2013-07-10 20:17:51 +02:00
coreboot_table.c Export board-status info. 2014-11-26 23:18:47 +01:00
debug.c Myles suspected this hangs certain machines, so back it out. 2010-04-15 12:43:07 +00:00
delay.c - Major cleanup of the bootpath 2003-07-19 04:28:22 +00:00
dynamic_cbmem.c CBMEM console: Fix boards with BROKEN_CAR_MIGRATE 2014-12-16 20:41:02 +01:00
edid.c edid: fill reserved bits fields in cb_framebuffer 2014-12-29 11:14:34 +01:00
fallback_boot.c lib: Fix spelling 2013-07-10 20:17:51 +02:00
gcc.c lib: Trivial - drop trailing blank lines at EOF 2014-07-08 13:52:15 +02:00
gcov-glue.c coverage: use boot state callbacks 2013-05-01 07:08:44 +02:00
gcov-io.c Implement GCC code coverage analysis 2013-01-12 19:09:55 +01:00
gcov-io.h lib: Fix spelling 2013-07-10 20:17:51 +02:00
gcov-iov.h Implement GCC code coverage analysis 2013-01-12 19:09:55 +01:00
generic_dump_spd.c Since some people disapprove of white space cleanups mixed in regular commits 2010-04-27 06:56:47 +00:00
generic_sdram.c Remove duplicate line from pci_ids.h. 2010-10-07 23:02:06 +00:00
halt.c Introduce halt() 2014-11-30 12:20:05 +01:00
hardwaremain.c ACPI: Allocate S3 resume backup in CBMEM earlier 2014-10-19 06:15:00 +02:00
hexdump.c lib/hexdump: Use size_t for length parameter of hexdump32() 2014-05-05 08:59:05 +02:00
jpeg.c Since some people disapprove of white space cleanups mixed in regular commits 2010-04-27 06:56:47 +00:00
jpeg.h Random cosmetic fixes (trivial). 2010-02-22 16:41:49 +00:00
libgcov.c Fix whitespace leaked into tree 2013-09-17 21:04:35 +02:00
lzma.c lib/lzma.c: Use header over .c include 2014-11-19 00:13:44 +01:00
lzmadecode.c RISCV: get RISCV to build again 2014-12-04 19:17:51 +01:00
lzmadecode.h Since some people disapprove of white space cleanups mixed in regular commits 2010-04-27 06:56:47 +00:00
Makefile.inc Provide a common CBFS wrapper for SPI storage 2014-12-30 19:29:47 +01:00
malloc.c lib/malloc.c: Remove pre-proc guard around include 2014-11-11 12:33:01 +01:00
memchr.c Add an implementation for the memchr library function 2012-03-09 20:00:53 +01:00
memcmp.c - Initial checkin of the freebios2 tree 2003-04-22 19:02:15 +00:00
memcpy.c fix compiler warnings (trivial) 2009-01-20 21:40:16 +00:00
memmove.c tidy 2004-03-13 03:40:29 +00:00
memrange.c mtrr: only add prefetchable resources as WRCOMB for VGA devices 2014-02-09 22:08:53 +01:00
memset.c fix compiler warnings (trivial) 2009-01-20 21:40:16 +00:00
ramstage_cache.c RELOCATABLE_RAMSTAGE: Fix weak symbols with ramstage_cache 2014-12-28 19:56:58 +01:00
ramtest.c ramtest.c: Add silent ram_check 2013-06-10 22:30:39 +02:00
reg_script.c baytrail: add more iosf access functions 2014-05-10 06:31:00 +02:00
rmodule.c x86: provide symmetry between arm for cache_sync_instructions() 2014-12-09 18:40:50 +01:00
rmodule.ld src/lib/rmodule.ld: DISCARD (.note|.note.*) sections 2014-11-12 18:13:37 +01:00
selfboot.c Rename coreboot_ram stage to ramstage 2014-04-26 13:27:09 +02:00
stack.c stack check: cosmetics 2014-09-12 22:03:53 +02:00
thread.c Possible thread stack implementation. 2014-08-07 23:55:15 +02:00
timer_queue.c coreboot: add timer queue implementation 2013-05-01 07:19:12 +02:00
timestamp.c SMP: Add arch-agnostic boot_cpu() 2014-02-11 21:55:30 +01:00
trace.c GPLv2 notice: Unify all files to just use one space in »MA 02110-1301« 2013-03-01 10:16:08 +01:00
uart_ipq806.c ipq8064: prepare UART driver for use in coreboot 2014-12-05 20:22:47 +01:00
version.c Export board-status info. 2014-11-26 23:18:47 +01:00