cbfs: Pull handling of the CBFS_CACHE mem_pool into CBFS core
This patch pulls control of the memory pool serving allocations from the CBFS_CACHE memlayout area into cbfs.c and makes it a core part of the CBFS API. Previously, platforms would independently instantiate this as part of boot_device_ro() (mostly through cbfs_spi.c). The new cbfs_cache pool is exported as a global so these platforms can still use it to directly back rdev_mmap() on their boot device, but the cbfs_cache can now also use it to directly make allocations itself. This is used to allow transparent decompression support in cbfs_map(). Signed-off-by: Julius Werner <jwerner@chromium.org> Change-Id: I0d52b6a8f582a81a19fd0fd663bb89eab55a49d9 Reviewed-on: https://review.coreboot.org/c/coreboot/+/49333 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Aaron Durbin <adurbin@chromium.org>
This commit is contained in:
@@ -32,9 +32,9 @@ DECLARE_OPTIONAL_REGION(timestamp)
|
||||
DECLARE_REGION(preram_cbmem_console)
|
||||
DECLARE_REGION(cbmem_init_hooks)
|
||||
DECLARE_REGION(stack)
|
||||
DECLARE_REGION(preram_cbfs_cache)
|
||||
DECLARE_REGION(postram_cbfs_cache)
|
||||
DECLARE_REGION(cbfs_cache)
|
||||
DECLARE_OPTIONAL_REGION(preram_cbfs_cache)
|
||||
DECLARE_OPTIONAL_REGION(postram_cbfs_cache)
|
||||
DECLARE_OPTIONAL_REGION(cbfs_cache)
|
||||
DECLARE_REGION(cbfs_mcache)
|
||||
DECLARE_REGION(fmap_cache)
|
||||
DECLARE_REGION(tpm_tcpa_log)
|
||||
|
Reference in New Issue
Block a user