Attention is currently required from: Arthur Heymans, Julius Werner, Karthik Ramasubramanian, Maximilian Brune.
Hello build bot (Jenkins),
I'd like you to reexamine a change. Please visit
https://review.coreboot.org/c/coreboot/+/77885?usp=email
to look at the new patch set (#24).
Change subject: x86: Add ramstage CBFS cache support ......................................................................
x86: Add ramstage CBFS cache support
This commit introduces the x86 `RAMSTAGE_CBFS_CACHE_SIZE' Kconfig to set the ramstage CBFS cache size. A cache size of zero disables the CBFS cache feature. The default size is 16 KB which seems a reasonable minimal value large enough to satisfy basic needs such as the decompression of a small configuration file. This setting can be adjusted depending on the platform needs and capabilities.
To support S3 suspend/resume use-case, the CBFS cache memory cannot be released to the Operating System. There are two options to meet this requirement:
1. Define a static CBFS cache buffer (located in the .bss section) 2. Create a new CBMEM entry
Option #2 seems more powerful but considering that:
1. The CBFS cache is actually not a cache but just a scratch pad designed to be isolated between stages 2. postcar is a very short stage not really needing CBFS cache 3. The static initialization of the `cbfs_cache' global variable (cf. src/lib/cbfs.c) offer a simple and robust design
=> It is simpler to use a static buffer and limit the support to ramstage.
Since some AMD SoCs (cf. `SOC_AMD_COMMON_BLOCK_NONCAR' Kconfig) defines a `_cbfs_cache' region, an extra `POSTRAM_CBFS_CACHE_IN_BSS' Kconfig must be set to enable the use of a static buffer as the CBFS cache scratchpad.
TEST=Decompression of vbt.bin in ramstage on rex using cbfs_map()
Change-Id: I7fbb1b51cda9f84842992e365b16c5ced1010b89 Signed-off-by: Jeremy Compostella jeremy.compostella@intel.com --- M src/arch/x86/Kconfig M src/lib/cbfs.c 2 files changed, 23 insertions(+), 0 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/85/77885/24