coreboot/src/cpu/x86
Matt DeVillier 5dd0181f7b cpu/x86/mtrr: Exclude ranges above 4G if temporary MTRRs exhausted
mtrr_use_temp_range() is used to temporarily cache the area(s) of RAM
to which the SPI flash is mapped, in order to speed up reading the
payload out of flash in preparation for execution. On systems with more
than 32GiB of RAM, there are not enough MTRRs available to map the
"permanent" regions below 4GiB, these temporary regions below 4GiB, and
any RAM above 4GiB due to fragmentation in the various ranges, as well
as limitations on the area covered by a single MTRR due to how they
are stored in the CPU registers.

As a workaround, if the number of MTRRs needed for the temporary map
exceeds the maximum available for  the system, retry calc_var-mtrrs()
with `above4gb` set to false.

TEST=build/boot starlabs/starbook_mtl with > 32GB RAM, verify temporary
MTRRs are able to be assigned via cbmem console log, and no boot delays
in payload loading/decompression due to the SPI flash not being cached.

Change-Id: Ia9f9a1537e7e0c2f7ce21067eceb1549d0f9ea5b
Signed-off-by: Matt DeVillier <matt.devillier@gmail.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/86941
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Shuo Liu <shuo.liu@intel.com>
2025-03-24 14:54:30 +00:00
..
64bit cpu/x86/64bit: Allow to map more of the address space 2025-02-26 17:11:59 +00:00
cache cpu: Rename Makefiles from .inc to .mk 2024-01-24 08:35:01 +00:00
lapic cpu/x86/lapic: Always have LAPIC enabled 2024-08-11 17:06:41 +00:00
mtrr cpu/x86/mtrr: Exclude ranges above 4G if temporary MTRRs exhausted 2025-03-24 14:54:30 +00:00
name cpu: Rename Makefiles from .inc to .mk 2024-01-24 08:35:01 +00:00
pae cpu/x86/pae/pgtbl.c: extract reusable code from memset_pae() 2024-05-29 13:04:30 +00:00
smm treewide: Rename PM4LE -> PML4E 2025-02-25 17:33:36 +00:00
tsc cpu: Rename Makefiles from .inc to .mk 2024-01-24 08:35:01 +00:00
backup_default_smm.c cpu/x86: Clean up includes 2022-10-26 16:37:34 +00:00
copy_data_section.inc x86: Add .data section support for pre-memory stages 2023-09-14 21:02:07 +00:00
early_reset.S
entry16.S commonlib/console/post_code.h: Change post code prefix to POSTCODE 2023-06-23 15:06:04 +00:00
entry32.S commonlib/console/post_code.h: Change post code prefix to POSTCODE 2023-06-23 15:06:04 +00:00
Kconfig cpu/x86/64bit: Allow to map more of the address space 2025-02-26 17:11:59 +00:00
Kconfig.debug_cpu arch to cpu: Add SPDX license headers to Kconfig files 2024-02-18 01:58:52 +00:00
Makefile.mk lib: Remove heap from rmodules 2024-02-26 10:10:07 +00:00
mp_init.c cpu/x86/topology: Simplify CPU topology initialization 2024-12-17 17:24:15 +00:00
reset16.S
sipi_vector.S cpu/x86/(sipi|smm): Pass on CR3 from ramstage 2024-02-28 12:12:59 +00:00
smi_trigger.c cpu/x86/smi_trigger: use call_smm 2024-01-11 22:35:32 +00:00
smm_start32_offset.h.template cpu/x86/mp_init.c: Generate a C header to get start32 offset 2023-04-06 15:19:00 +00:00
topology.c cpu/x86/topology: Fix FSP-S crash caused by shared core ID 2025-01-17 16:50:31 +00:00