soc/intel/systemagent.c: Fix memory type reporting

TOLUD stands for top of lower usable dram. Memory between cbmem_top and
TOLUD, even if stolen for another device/purpose can still be marked WB
cacheable. This will result in a cleaner MTRR setup.

Change-Id: Ic3d6f589c60e44a3dce9122d206397cac968647f
Signed-off-by: Arthur Heymans <arthur@aheymans.xyz>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/68405
Reviewed-by: Paul Menzel <paulepanter@mailbox.org>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Marc Jones <marc@marcjonesconsulting.com>
Reviewed-by: Sean Rhodes <sean@starlabs.systems>
Reviewed-by: Angel Pons <th3fanbus@gmail.com>
Reviewed-by: Lean Sheng Tan <sheng.tan@9elements.com>
This commit is contained in:
Arthur Heymans 2022-10-13 12:55:49 +02:00 committed by Martin L Roth
parent 6537216b7a
commit 9c2f3cc9d9
1 changed files with 1 additions and 1 deletions

View File

@ -210,7 +210,7 @@ static void sa_add_dram_resources(struct device *dev, int *resource_count)
/* top_of_ram -> TOLUD */ /* top_of_ram -> TOLUD */
base_k = top_of_ram; base_k = top_of_ram;
size_k = sa_map_values[SA_TOLUD_REG] - base_k; size_k = sa_map_values[SA_TOLUD_REG] - base_k;
mmio_resource_kb(dev, index++, base_k / KiB, size_k / KiB); reserved_ram_resource_kb(dev, index++, base_k / KiB, size_k / KiB);
/* 4GiB -> TOUUD */ /* 4GiB -> TOUUD */
upper_ram_end(dev, index++, sa_map_values[SA_TOUUD_REG]); upper_ram_end(dev, index++, sa_map_values[SA_TOUUD_REG]);