coreboot-kgpe-d16/payloads/libpayload/include
Dan Ehrenberg 6addd40268 libpayload: Take flash parameters from coreboot
A payload may want to run erase operations on SPI NOR flash without
re-probing the device to get its properties. This patch passes up
three properties of flash to achieve that:
- The size of the flash device
- The sector size, i.e., the granularity of erase
- The command used for erase
The patch sends the parameters through coreboot and then libpayload.
The patch also includes a minor refactoring of the flash erase code.
Parameters are sent up for just one flash device. If multiple SPI
flash devices are probed, the second one will "win" and its
parameters will be sent up to the payload.

TEST=Observed parameters to be passed up to depthcharge through
libpayload and be used to correctly initialize flash and do an erase.
TEST=Winbond and Gigadevices spi flash drivers compile with the changes;
others don't, for seemingly unrelated reasons.
BRANCH=none
BUG=chromium:446377

Change-Id: I92b7ff0ce66af8d096ec09a4c900829ef6c867e0
Signed-off-by: Patrick Georgi <pgeorgi@chromium.org>
Original-Commit-Id: 988c8c68bbfcdfa69d497ea5f806567bc80f8126
Original-Change-Id: Ie2b3a7f5b6e016d212f4f9bac3fabd80daf2ce72
Original-Signed-off-by: Dan Ehrenberg <dehrenberg@chromium.org>
Original-Reviewed-on: https://chromium-review.googlesource.com/239570
Original-Reviewed-by: Vadim Bendebury <vbendeb@chromium.org>
Reviewed-on: http://review.coreboot.org/9727
Tested-by: build bot (Jenkins)
Reviewed-by: Stefan Reinauer <stefan.reinauer@coreboot.org>
2015-04-17 09:21:12 +02:00
..
arm/arch arm: Dump additional fault registers in abort handlers 2015-04-08 09:28:37 +02:00
arm64/arch arm64: Increase dma region size to 32MiB 2015-04-14 12:07:42 +02:00
arpa
mips/arch libpayload: arch/mips: add virt/bus/phy_to_bus/phy/virt operations 2015-03-21 11:09:29 +01:00
pci
storage libpayload: Change CONFIG_* to CONFIG_LP_* in the kconfig. 2014-08-05 18:44:08 +02:00
sys
usb libpayload: Add dwc2 usb driver 2015-04-14 10:42:54 +02:00
x86/arch libpayload: Add support for memory barriers 2015-03-19 23:24:16 +01:00
assert.h
cbfs.h libpayload: Provide selfboot() external declaration in a common file 2015-01-04 00:27:20 +01:00
cbfs_core.h CBFS: Automate ROM image layout and remove hardcoded offsets 2015-04-14 09:01:27 +02:00
cbfs_ram.h libpayload: expose cbfs ram functions 2013-12-12 22:22:12 +01:00
coreboot_tables.h libpayload: Take flash parameters from coreboot 2015-04-17 09:21:12 +02:00
ctype.h
die.h libpayload: Add a new "die" function to fatally signal programming errors. 2014-09-15 17:37:13 +02:00
endian.h libpayload: Expand setbits_le32() and fix readl() const-ness 2015-01-12 05:56:01 +01:00
errno.h
exception.h libpayload: Rework exception hook interface 2015-01-09 07:05:15 +01:00
gdb.h libpayload: Add remote GDB support 2015-01-09 07:06:51 +01:00
getopt.h
inttypes.h
ipchksum.h libpayload: Add a new "die" function to fatally signal programming errors. 2014-09-15 17:37:13 +02:00
kconfig.h libpayload: Change CONFIG_* to CONFIG_LP_* in the kconfig. 2014-08-05 18:44:08 +02:00
keycodes.h
lar.h
libpayload.h libpayload arm64: Add functions for reading memranges 2015-03-21 13:36:04 +01:00
limits.h
lzma.h LZMA: Add a version of ulzma which takes the input and output buffer sizes. 2014-08-10 22:29:51 +02:00
malloc.h
multiboot_tables.h
panel.h
pci.h
queue.h libpayload: Add OpenBSD queue implementation 2015-03-19 23:23:36 +01:00
stdarg.h
stddef.h ARM: API to Map Physical Address to Wipe Memory above 4GB 2014-12-09 18:39:34 +01:00
stdint.h
stdio.h
stdlib.h libpayload: provide basic 64bit division implementation 2015-03-21 01:39:59 +01:00
string.h libpayload: UTF-16LE to ASCII conversion 2015-03-20 09:59:48 +01:00
strings.h
swab.h libpayload: arch/mips: Add basic MIPS architecture support 2015-03-21 11:07:50 +01:00
sysinfo.h libpayload: Take flash parameters from coreboot 2015-04-17 09:21:12 +02:00
term.h
unistd.h
video_console.h