fmap: Map less space in fallback path without CBFS verification

This is a fixup to CB:78914 which inadvertently broke the RK3288 SoC.
Unfortunately we can only accommodate very little PRERAM_CBFS_CACHE in
the tiny SRAM for that chip, so we would not be able to map an entire
FMAP. Solve this problem for now by mapping less space when CBFS
verification is disabled, and disallowing CBFS verification on that SoC.

Change-Id: I2e419d157dc26bb70a6dd62e44dc6607e51cf791
Signed-off-by: Julius Werner <jwerner@chromium.org>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/78971
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Yu-Ping Wu <yupingso@google.com>
This commit is contained in:
Julius Werner
2023-11-09 12:20:59 -08:00
committed by Felix Held
parent 432e92688e
commit c827c9b216
2 changed files with 5 additions and 1 deletions

View File

@@ -130,7 +130,8 @@ static int find_fmap_directory(struct region_device *fmrd)
if (boot == NULL)
return -1;
fmap = rdev_mmap(boot, offset, FMAP_SIZE);
fmap = rdev_mmap(boot, offset,
CONFIG(CBFS_VERIFICATION) ? FMAP_SIZE : sizeof(struct fmap));
if (fmap == NULL)
return -1;

View File

@@ -8,6 +8,9 @@
#include <soc/timer.h>
#include <symbols.h>
_Static_assert(!CONFIG(CBFS_VERIFICATION),
"RK3288 doesn't have enough PRERAM_CBFS_CACHE to support the FMAP mapping needed for CBFS verification");
void bootblock_soc_init(void)
{
rkclk_init();