On many x86 platforms the boot device is SPI which is memory mapped. However, in order to write to the boot device one needs to use the SPI api. Therefore, provide a common implementation of boot_device_rw() which has no mmap() functionality. It only reads, writes, and erases. This will be used in the existing infrastructure but in a SPI agnostic way. Two options are added: 1. BOOT_DEVICE_SPI_FLASH_RW_NOMMAP 2. BOOT_DEVICE_SPI_FLASH_RW_NOMMAP_EARLY The former is auto-selected when COMMON_CBFS_SPI_WRAPPER is not selected. The latter can be used to include the implementation in the early stages such as bootblock, verstage, and romstage. BUG=chrome-os-partner:56151 BRANCH=None TEST=None Signed-off-by: Aaron Durbin <adurbin@chromium.org> Reviewed-on: https://review.coreboot.org/16200 Reviewed-by: Furquan Shaikh <furquan@google.com> Reviewed-by: Martin Roth <martinroth@google.com> Change-Id: I2aa75f88409309e3f9b9bd79b52d27c0061139c8 Reviewed-on: https://chromium-review.googlesource.com/373362 Commit-Ready: Furquan Shaikh <furquan@chromium.org> Tested-by: Furquan Shaikh <furquan@chromium.org> Reviewed-by: Aaron Durbin <adurbin@chromium.org> |
||
|---|---|---|
| .. | ||
| tpm | ||
| adesto.c | ||
| amic.c | ||
| atmel.c | ||
| boot_device_rw_nommap.c | ||
| cbfs_spi.c | ||
| eon.c | ||
| gigadevice.c | ||
| Kconfig | ||
| macronix.c | ||
| Makefile.inc | ||
| spansion.c | ||
| spi_flash.c | ||
| spi_flash_internal.h | ||
| spiconsole.c | ||
| sst.c | ||
| stmicro.c | ||
| winbond.c | ||