lib/cbfs: Ensure cache buffer alignment in ramstage

The cache buffer is expected to be aligned to CONFIG_CBFS_CACHE_ALIGN by
the mem_pool_alloc function.

Change-Id: I153a4de5ae2b8549288946d0773009d586d5c65c
Signed-off-by: Jeremy Compostella <jeremy.compostella@intel.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/88299
Reviewed-by: Julius Werner <jwerner@chromium.org>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
This commit is contained in:
Jeremy Compostella 2025-07-03 17:13:08 -07:00 committed by Matt DeVillier
commit 454079c3bc

View file

@ -23,7 +23,7 @@
#if ENV_X86 && (ENV_POSTCAR || ENV_SMM)
struct mem_pool cbfs_cache = MEM_POOL_INIT(NULL, 0, 0);
#elif CONFIG(POSTRAM_CBFS_CACHE_IN_BSS) && ENV_RAMSTAGE
static u8 cache_buffer[CONFIG_RAMSTAGE_CBFS_CACHE_SIZE];
static u8 cache_buffer[CONFIG_RAMSTAGE_CBFS_CACHE_SIZE] __aligned(CONFIG_CBFS_CACHE_ALIGN);
struct mem_pool cbfs_cache =
MEM_POOL_INIT(cache_buffer, sizeof(cache_buffer), CONFIG_CBFS_CACHE_ALIGN);
#else