Arthur Heymans has uploaded this change for review. ( https://review.coreboot.org/c/coreboot/+/47868 )
Change subject: soc/intel/xeon_sp: Fix final MTRR usage ......................................................................
soc/intel/xeon_sp: Fix final MTRR usage
The region top_of_ram -> cbmem_top is used by FSP, but is also just regular DRAM. Marking it as such improves the final MTRR solution a lot and fixes MTRR starvation depending on the setup.
Change-Id: I19ff7cf2d699b4cc34caccd91cafd6a284d699d3 Signed-off-by: Arthur Heymans arthur@aheymans.xyz --- M src/soc/intel/xeon_sp/uncore.c 1 file changed, 5 insertions(+), 0 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/68/47868/1
diff --git a/src/soc/intel/xeon_sp/uncore.c b/src/soc/intel/xeon_sp/uncore.c index 15a9f0f..94aabab 100644 --- a/src/soc/intel/xeon_sp/uncore.c +++ b/src/soc/intel/xeon_sp/uncore.c @@ -182,6 +182,11 @@ LOG_MEM_RESOURCE("low_ram", dev, index, base_kb, size_kb); ram_resource(dev, index++, base_kb, size_kb);
+ /* fsp_mem_base -> cbmem_top */ + base_kb = top_of_ram / KiB; + size_kb = ((uintptr_t)cbmem_top() - top_of_ram) / KiB; + reserved_ram_resource(dev, index++, base_kb, size_kb); + /* * FSP meomoy, CBMem regions are already added as reserved * Add TSEG and MESEG Regions as reserved memory
Angel Pons has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/47868 )
Change subject: soc/intel/xeon_sp: Fix final MTRR usage ......................................................................
Patch Set 1: Code-Review+2
Jonathan Zhang has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/47868 )
Change subject: soc/intel/xeon_sp: Fix final MTRR usage ......................................................................
Patch Set 1: Code-Review+1
Jonathan Zhang has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/47868 )
Change subject: soc/intel/xeon_sp: Fix final MTRR usage ......................................................................
Patch Set 1:
(1 comment)
https://review.coreboot.org/c/coreboot/+/47868/1//COMMIT_MSG Commit Message:
https://review.coreboot.org/c/coreboot/+/47868/1//COMMIT_MSG@9 PS1, Line 9: The region top_of_ram -> cbmem_top is used by FSP, but is also just This region has two subregions, one for FSP, another for cbmem.
Christian Walter has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/47868 )
Change subject: soc/intel/xeon_sp: Fix final MTRR usage ......................................................................
Patch Set 2: Code-Review+2
Hello build bot (Jenkins), Marc Jones, Jonathan Zhang, Johnny Lin, Christian Walter, Angel Pons, Patrick Rudolph,
I'd like you to reexamine a change. Please visit
https://review.coreboot.org/c/coreboot/+/47868
to look at the new patch set (#3).
Change subject: soc/intel/xeon_sp: Fix final MTRR usage ......................................................................
soc/intel/xeon_sp: Fix final MTRR usage
The region top_of_ram -> cbmem_top is used by FSP and cbmem, but is also just regular DRAM. Marking it as such improves the final MTRR solution a lot and fixes MTRR starvation depending on the setup.
Change-Id: I19ff7cf2d699b4cc34caccd91cafd6a284d699d3 Signed-off-by: Arthur Heymans arthur@aheymans.xyz --- M src/soc/intel/xeon_sp/uncore.c 1 file changed, 5 insertions(+), 0 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/68/47868/3
Arthur Heymans has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/47868 )
Change subject: soc/intel/xeon_sp: Fix final MTRR usage ......................................................................
Patch Set 3:
(1 comment)
https://review.coreboot.org/c/coreboot/+/47868/1//COMMIT_MSG Commit Message:
https://review.coreboot.org/c/coreboot/+/47868/1//COMMIT_MSG@9 PS1, Line 9: The region top_of_ram -> cbmem_top is used by FSP, but is also just
This region has two subregions, one for FSP, another for cbmem.
Done
Arthur Heymans has submitted this change. ( https://review.coreboot.org/c/coreboot/+/47868 )
Change subject: soc/intel/xeon_sp: Fix final MTRR usage ......................................................................
soc/intel/xeon_sp: Fix final MTRR usage
The region top_of_ram -> cbmem_top is used by FSP and cbmem, but is also just regular DRAM. Marking it as such improves the final MTRR solution a lot and fixes MTRR starvation depending on the setup.
Change-Id: I19ff7cf2d699b4cc34caccd91cafd6a284d699d3 Signed-off-by: Arthur Heymans arthur@aheymans.xyz Reviewed-on: https://review.coreboot.org/c/coreboot/+/47868 Reviewed-by: Christian Walter christian.walter@9elements.com Reviewed-by: Angel Pons th3fanbus@gmail.com Reviewed-by: Jonathan Zhang jonzhang@fb.com Tested-by: build bot (Jenkins) no-reply@coreboot.org --- M src/soc/intel/xeon_sp/uncore.c 1 file changed, 5 insertions(+), 0 deletions(-)
Approvals: build bot (Jenkins): Verified Angel Pons: Looks good to me, approved Jonathan Zhang: Looks good to me, but someone else must approve Christian Walter: Looks good to me, approved
diff --git a/src/soc/intel/xeon_sp/uncore.c b/src/soc/intel/xeon_sp/uncore.c index de29dea..8965b3b 100644 --- a/src/soc/intel/xeon_sp/uncore.c +++ b/src/soc/intel/xeon_sp/uncore.c @@ -200,6 +200,11 @@ LOG_MEM_RESOURCE("low_ram", dev, index, base_kb, size_kb); ram_resource(dev, index++, base_kb, size_kb);
+ /* fsp_mem_base -> cbmem_top */ + base_kb = top_of_ram / KiB; + size_kb = ((uintptr_t)cbmem_top() - top_of_ram) / KiB; + reserved_ram_resource(dev, index++, base_kb, size_kb); + /* * FSP meomoy, CBMem regions are already added as reserved * Add TSEG and MESEG Regions as reserved memory