coreboot/payloads/libpayload/libc
Subrata Banik 61d74dc8f7 payloads: Propagate SPI flash address mode flag to libpayload
This commit extends libpayload's understanding of SPI flash devices by
adding a flags field to both struct cb_spi_flash and struct
sysinfo_t.spi_flash.

The new CB_SPI_FLASH_FLAG_IN_4BYTE_ADDR_MODE flag will be populated
from the coreboot table's lb_spi_flash entry. This allows payloads to
reliably determine if the SPI flash is currently configured for 4-byte
addressing, enabling more robust flash operations without needing to
re-probe or re-enforce the mode.

Note: `erase_cmd` type was changed from uint32_t to uint8_t. This is
because only the lowest byte of the original uint32_t was ever used.
The change ensures proper sizing, maintains compatibility with older
coreboot tables, and makes the remaining space available for new fields.

BUG=b:417900125
TEST=Able to build google/bluey.

Change-Id: I101a50f899e82e9412024a049a9df59c5813313a
Signed-off-by: Subrata Banik <subratabanik@google.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/88182
Reviewed-by: Paul Menzel <paulepanter@mailbox.org>
Reviewed-by: Julius Werner <jwerner@chromium.org>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2025-06-28 02:40:48 +00:00
..
args.c treewide: Remove "this file is part of" lines 2020-05-11 17:11:40 +00:00
console.c treewide: Remove "this file is part of" lines 2020-05-11 17:11:40 +00:00
coreboot.c payloads: Propagate SPI flash address mode flag to libpayload 2025-06-28 02:40:48 +00:00
ctype.c treewide: Remove "this file is part of" lines 2020-05-11 17:11:40 +00:00
fmap.c libpayload: Remove legacy CBFS API 2024-02-22 21:18:39 +00:00
fpmath.c libpayload: Add simple 32.32 fixed-point math API 2020-07-09 00:32:11 +00:00
getopt_long.c commonlib: Change GCD function to always use 64 bits 2024-02-08 13:13:58 +00:00
hexdump.c treewide: Remove "this file is part of" lines 2020-05-11 17:11:40 +00:00
lib.c treewide: Move stdlib.h to commonlib 2024-03-15 10:09:43 +00:00
libgcc.c treewide: Remove "this file is part of" lines 2020-05-11 17:11:40 +00:00
lp_vboot.c libpayload: Add vboot and reboot utility functions 2023-09-18 15:42:31 +00:00
Makefile.mk libpayload: Unify selfboot() implementations 2025-02-11 20:59:57 +00:00
malloc.c libpayload: Add dma_allocator_range() 2023-11-21 13:50:53 +00:00
memory.c libpayload: Use Kconfig for architecture memcpy, not weak symbols 2025-05-22 19:27:24 +00:00
printf.c libpayload: Fix clang fallthrough warning 2023-08-28 02:12:25 +00:00
qsort.c libpayload: Fix whitespace errors 2013-06-27 14:46:43 +02:00
rand.c treewide: Remove "this file is part of" lines 2020-05-11 17:11:40 +00:00
readline.c treewide: Remove "this file is part of" lines 2020-05-11 17:11:40 +00:00
selfboot.c libpayload: Unify selfboot() implementations 2025-02-11 20:59:57 +00:00
string.c commonlib/bsd: Add strcat() and strncat() functions 2024-08-14 03:09:20 +00:00
strlcpy.c libpayload: Implement strlcpy 2011-07-07 22:29:35 +02:00
sysinfo.c treewide: Remove "this file is part of" lines 2020-05-11 17:11:40 +00:00
time.c libpayload: Use Kconfig instead of weak symbol for arch_ndelay() 2025-05-22 19:27:30 +00:00