From d4a1ba47b9ec17b5068573a9ca7819c1f2d00188 Mon Sep 17 00:00:00 2001 From: Felix Held Date: Tue, 5 Mar 2024 19:43:32 +0100 Subject: vc/amd/opensil/genoa_poc/memmap: use get_top_of_mem_below_4gb Use get_top_of_mem_below_4gb instead of open-coding the functionality. Signed-off-by: Felix Held Change-Id: I5885e9ad89ed9f0aa657c56804e98c352267267f Reviewed-on: https://review.coreboot.org/c/coreboot/+/81092 Tested-by: build bot (Jenkins) Reviewed-by: Varshit Pandya --- src/vendorcode/amd/opensil/genoa_poc/memmap.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/vendorcode/amd/opensil/genoa_poc') diff --git a/src/vendorcode/amd/opensil/genoa_poc/memmap.c b/src/vendorcode/amd/opensil/genoa_poc/memmap.c index 39b27ec293..31e6f0406c 100644 --- a/src/vendorcode/amd/opensil/genoa_poc/memmap.c +++ b/src/vendorcode/amd/opensil/genoa_poc/memmap.c @@ -110,7 +110,7 @@ void add_opensil_memmap(struct device *dev, unsigned long *idx) mem_usable); // Account for UMA and TSEG - const uint32_t top_mem = ALIGN_DOWN(rdmsr(TOP_MEM).lo, 1 * MiB); + const uint32_t top_mem = ALIGN_DOWN(get_top_of_mem_below_4gb(), 1 * MiB); if (mem_usable != top_mem) reserved_ram_from_to(dev, (*idx)++, mem_usable, top_mem); -- cgit v1.2.3