coreboot/src/soc
Subrata Banik bc8bbeed3b soc/intel/cmn/tom: Cache TOM region early
This patch implements a module that can store the top_of_ram (TOM)
address into non-volatile space (CMOS) during the first boot and
use it across all consecutive boot.

As top_of_ram address is not known until FSP-M has exited, it
results into lacking of MTRR programming to cache the 16 MB TOM,
hence accessing that range during FSP-M and/or late romstage causing
long access times.

Purpose of this driver code is to cache the TOM (with a fixed size of
16MB) for all consecutive boots even before calling into the FSP.
Otherwise, this range remains un-cached until postcar boot stage
updates the MTRR programming. FSP-M and late romstage uses this
uncached TOM range for various purposes (like relocating services
between SPI mapped cached memory to DRAM based uncache memory) hence
having the ability to cache this range beforehand would help to
optimize the boot time (more than 50ms as applicable).

TEST=Able to build and boot google/rex to ChromeOS.

Without this patch:
  950:calling FspMemoryInit               936,811 (19,941)
  951:returning from FspMemoryInit        1,041,935 (105,123)

With this patch:
  950:calling FspMemoryInit               905,108 (20,103)
  951:returning from FspMemoryInit        987,038 (81,929)

Change-Id: I29d3e1df91c6057280bdf7fb6a4a356db31a408f
Signed-off-by: Subrata Banik <subratabanik@google.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/73272
Reviewed-by: Kapil Porwal <kapilporwal@google.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Arthur Heymans <arthur@aheymans.xyz>
Reviewed-by: Lean Sheng Tan <sheng.tan@9elements.com>
2023-03-13 14:11:31 +00:00
..
amd soc/amd/phoenix/mca.c: Remove excess MCA bank names 2023-03-13 14:01:58 +00:00
cavium treewide: Remove duplicated include <device/pci.h> 2023-02-01 03:03:34 +00:00
example/min86
intel soc/intel/cmn/tom: Cache TOM region early 2023-03-13 14:11:31 +00:00
mediatek soc/mediatek/mt8188: Enable lastbus debug hardware 2023-03-10 12:38:31 +00:00
nvidia treewide: stop calling custom TPM log "TCPA" 2023-01-11 16:00:55 +00:00
qualcomm Revert "soc/qualcomm: Increase SPI frequency to 75 MHz" 2023-02-24 19:28:24 +00:00
rockchip
samsung treewide: Fix old-style declarations 2023-01-17 04:23:49 +00:00
sifive/fu540
ti
ucb/riscv