coreboot/src/include
Julius Werner cefe89ee79 lib/fmap: Add optional pre-RAM cache
This patch adds an optional pre-RAM cache for the FMAP which most
platforms should be able to use, complementing the recently added
post-RAM FMAP cache in CBMEM. vboot systems currently read the FMAP
about half a dozen times from flash in verstage, which will all be
coalesced into a single read with this patch. It will also help
future vboot improvements since when FMAP reads become "free" vboot
doesn't need to keep track of so much information separately.

In order to make sure we have a single, well-defined point where the new
cache is first initialized, eliminate the build-time hardcoding of the
CBFS section offsets, so that all CBFS accesses explicitly read the
FMAP.

Add FMAP_CACHEs to all platforms that can afford it (other than the
RISC-V things where I have no idea how they work), trying to take the
space from things that look like they were oversized anyway (pre-RAM
consoles and CBFS caches).

Change-Id: I2820436776ef620bdc4481b5cd4b6957764248ea
Signed-off-by: Julius Werner <jwerner@chromium.org>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/36657
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Arthur Heymans <arthur@aheymans.xyz>
Reviewed-by: Aaron Durbin <adurbin@chromium.org>
Reviewed-by: Joel Kitching <kitching@google.com>
2019-11-14 03:30:11 +00:00
..
boot src: Use 'include <boot/coreboot_tables.h>' when appropriate 2019-10-27 17:48:30 +00:00
console console,boot_state: Exclude printk() from reported times 2019-11-11 10:31:29 +00:00
cpu arch/x86: Drop some __SMM__ guards 2019-11-08 07:46:23 +00:00
device include/device: add pci mmio cfg address helpers 2019-11-11 10:25:40 +00:00
efi include/efi/efi_datatype: Convert EFI datatypes as per coreboot specification 2019-03-09 04:25:31 +00:00
pc80 cpu/x86: Move calibrate_tsc_with_pit() to drivers/pc80 2019-11-02 06:28:28 +00:00
smp coreboot: Replace all IS_ENABLED(CONFIG_XXX) with CONFIG(XXX) 2019-03-08 08:33:24 +00:00
superio superio/hwm5_conf: factor out HWM access from ITE env_ctrl 2019-10-08 18:06:56 +00:00
sys src/include: Add guards on all header files 2017-08-01 23:04:15 +00:00
adainit.h coreboot: Replace all IS_ENABLED(CONFIG_XXX) with CONFIG(XXX) 2019-03-08 08:33:24 +00:00
assert.h src/include/assert.h: add noreturn attribute to dead_code() 2019-05-17 07:16:50 +00:00
b64_decode.h lib: add base64 decoder 2015-04-22 08:50:54 +02:00
base3.h tree: drop last paragraph of GPL copyright header 2015-10-31 21:37:39 +01:00
bcd.h tree: drop last paragraph of GPL copyright header 2015-10-31 21:37:39 +01:00
boardid.h ec/google/chromeec: Update google_chromeec_get_board_version prototype 2018-09-20 17:15:26 +00:00
boot_device.h boot_device: Constify argument 2019-05-12 07:47:45 +00:00
bootblock_common.h lib/bootblock: Add simplified entry with basetime 2019-08-26 21:11:31 +00:00
bootmem.h lib/bootmem: Prepare for OpenSBI 2019-07-31 10:57:30 +00:00
bootmode.h vboot: deprecate physical dev switch 2019-03-27 06:13:27 +00:00
bootsplash.h lib/coreboot_table: Show splashscreen in lb_table_init 2019-09-15 11:10:58 +00:00
bootstate.h coreboot: Replace all IS_ENABLED(CONFIG_XXX) with CONFIG(XXX) 2019-03-08 08:33:24 +00:00
cbfs.h cbfs: Make cbfs_master_header_props() externally available 2019-11-14 03:30:03 +00:00
cbmem.h lib/cbmem: Remove the cbmem_top_init() hook 2019-11-10 15:39:00 +00:00
cper.h coreboot: Replace all IS_ENABLED(CONFIG_XXX) with CONFIG(XXX) 2019-03-08 08:33:24 +00:00
crc_byte.h lib: add calculate crc byte by byte 2019-11-06 13:58:53 +00:00
ctype.h add ctype.h header 2019-06-24 21:15:14 +00:00
delay.h cpu/x86/lapic: Refactor timer_fsb() 2019-09-19 09:28:55 +00:00
device_tree.h device_tree: Update comment style to C89 2019-06-21 09:23:19 +00:00
dimm_info_util.h src/*: normalize Google copyright headers 2018-09-28 07:13:00 +00:00
edid.h lib: edid: Move manufacturer name from private extra to public info 2019-08-15 03:04:08 +00:00
elog.h ELOG: Introduce elog_gsmi variants 2019-11-09 10:49:47 +00:00
endian.h endian.h: Add be32dec/be32enc family of functions 2019-05-23 08:42:44 +00:00
fallback.h pc80: Move set_boot_successful() 2016-12-13 19:15:22 +01:00
fit.h fit: Add overlay support 2019-06-21 09:22:31 +00:00
fit_payload.h lib: Add FIT payload support 2018-06-19 18:10:05 +00:00
fmap.h fmap: Add get_fmap_flash_offset() 2019-09-27 21:59:44 +00:00
gic.h coreboot: Replace all IS_ENABLED(CONFIG_XXX) with CONFIG(XXX) 2019-03-08 08:33:24 +00:00
gpio.h gpio: Change gpio_baseX_value() function return types to unsigned 2018-08-03 18:10:02 +00:00
halt.h Move compiler.h to commonlib 2018-10-08 16:57:27 +00:00
imd.h cbmem: add coreboot table records for each cbmem entry 2015-11-03 00:19:46 +01:00
inttypes.h include, lib: Add <inttypes.h> printf macros 2019-08-10 08:47:08 +00:00
ip_checksum.h src/include: Wrap lines at 80 columns 2017-03-13 17:23:37 +01:00
kconfig.h kconfig: Drop IS_ENABLED() macro 2019-06-04 13:33:40 +00:00
lib.h Move calls to quick_ram_check() before CBMEM init 2019-03-27 08:26:16 +00:00
list.h lib/devicetree: Integrate flattened devicetree support 2018-04-30 09:33:32 +00:00
main_decl.h arches: lib: add main_decl.h for main() declaration 2016-02-11 23:29:08 +01:00
memlayout.h lib/fmap: Add optional pre-RAM cache 2019-11-14 03:30:11 +00:00
memory_info.h src/soc/intel/common/smbios: Add addtional infos to dimm_info 2019-06-06 11:32:52 +00:00
memrange.h lib/memrange: Introduce method to clone memrange 2018-04-11 15:11:04 +00:00
mmio.h include: introduce update* for mmio operations 2019-11-11 10:26:55 +00:00
mrc_cache.h drivers/mrc_cache: Add missing include file to mrc_cache.h 2017-12-18 16:07:09 +00:00
nhlt.h lib/hardwaremain: Fix more ACPI/IOAPIC typos 2019-01-31 04:34:53 +00:00
option.h coreboot: Replace all IS_ENABLED(CONFIG_XXX) with CONFIG(XXX) 2019-03-08 08:33:24 +00:00
program_loading.h Program loading: Handoff cbmem_top via calling arguments 2019-10-30 08:33:07 +00:00
ramdetect.h lib: ramdetect: Register exception handlers for ARMv8 2019-08-26 07:14:03 +00:00
random.h arch/x86: add functions to generate random numbers 2017-02-20 04:46:10 +01:00
reg_script.h coreboot: Replace all IS_ENABLED(CONFIG_XXX) with CONFIG(XXX) 2019-03-08 08:33:24 +00:00
region_file.h lib: add region file support 2016-12-08 16:10:28 +01:00
reset.h reset: Finalize move to new API 2018-10-31 15:29:42 +00:00
rmodule.h coreboot: Replace all IS_ENABLED(CONFIG_XXX) with CONFIG(XXX) 2019-03-08 08:33:24 +00:00
romstage_handoff.h src/*: normalize Google copyright headers 2018-09-28 07:13:00 +00:00
rtc.h src/include: Open brace on same line as enum or struct 2017-03-12 15:46:23 +01:00
rules.h security/vboot: Fix regression with VBOOT_STARTS_IN_ROMSTAGE 2019-09-17 08:17:23 +00:00
sar.h vendorcode/google: support multiple SAR filenames 2018-12-17 14:26:10 +00:00
sdram_mode.h src/include: Remove spaces before tabs 2017-03-12 15:45:37 +01:00
smbios.h SMBIOS: Add 'CXL FLexbus 1.0' memory array location 2019-11-11 22:36:55 +00:00
smmstore.h smmstore: make smmstore's SMM handler code follow everything else 2018-12-05 13:31:22 +00:00
spd.h src/lib/dimm_info_util.c: Add methods to convert from SMBIOS to SPD 2018-04-11 14:41:59 +00:00
spd_bin.h lib/spd_bin: Extend DDR4 spd information 2019-09-09 13:30:10 +00:00
spd_ddr2.h src/include: Add guards on all header files 2017-08-01 23:04:15 +00:00
spi-generic.h drivers/spi/spi_flash.c: Add SPI vendor IDs 2019-09-04 22:40:46 +00:00
spi_bitbang.h spi: Add helper functions for bit-banging 2018-04-03 00:34:52 +00:00
spi_flash.h spi_flash: Add Dual SPI support 2019-06-10 18:02:33 +00:00
stage_cache.h lib/stage_cache: Refactor Kconfig options 2019-08-08 04:50:33 +00:00
stddef.h Split MAYBE_STATIC to _BSS and _NONZERO variants 2019-08-26 20:56:29 +00:00
stdint.h include, lib: Add <inttypes.h> printf macros 2019-08-10 08:47:08 +00:00
stdlib.h src: Remove duplicated round up function 2018-11-29 12:17:45 +00:00
string.h string: implement strspn, strcspn, atol 2019-08-10 01:32:19 +00:00
swab.h src: Add missing include <stdint.h> 2018-11-01 11:25:07 +00:00
symbols.h lib/fmap: Add optional pre-RAM cache 2019-11-14 03:30:11 +00:00
thread.h src/: Replace some __PRE_RAM__ use 2019-09-14 11:16:17 +00:00
timer.h coreboot: Replace all IS_ENABLED(CONFIG_XXX) with CONFIG(XXX) 2019-03-08 08:33:24 +00:00
timestamp.h timestamps: Remove TIMESTAMP_CACHE_IN_BSS 2019-09-13 19:48:26 +00:00
trace.h lib/trace: Replace __PRE_RAM__ use 2019-09-23 21:38:50 +00:00
types.h ec/google/chromeec: Update ec_commands.h 2019-08-23 20:22:04 +00:00
uuid.h lib/uuid: Add UUID parsing function 2019-11-01 11:38:22 +00:00
vbe.h src: Use 'include <boot/coreboot_tables.h>' when appropriate 2019-10-27 17:48:30 +00:00
version.h ACPI: Correct asl_compiler_revision value 2019-02-21 19:07:31 +00:00
watchdog.h coreboot: Replace all IS_ENABLED(CONFIG_XXX) with CONFIG(XXX) 2019-03-08 08:33:24 +00:00
wrdd.h Remove extra newlines from the end of all coreboot files. 2016-07-31 18:19:33 +02:00