summaryrefslogtreecommitdiff
path: root/src/vendorcode
diff options
context:
space:
mode:
authorFelix Held <felix-coreboot@felixheld.de>2024-03-05 19:43:32 +0100
committerFelix Held <felix-coreboot@felixheld.de>2024-03-06 19:39:42 +0000
commitd4a1ba47b9ec17b5068573a9ca7819c1f2d00188 (patch)
tree1cf43fde3b0921daf769cea891f488581b0042a7 /src/vendorcode
parenta640b123f505e964524bf3f4dab3d8e89d754038 (diff)
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 <felix-coreboot@felixheld.de> Change-Id: I5885e9ad89ed9f0aa657c56804e98c352267267f Reviewed-on: https://review.coreboot.org/c/coreboot/+/81092 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Varshit Pandya <pandyavarshit@gmail.com>
Diffstat (limited to 'src/vendorcode')
-rw-r--r--src/vendorcode/amd/opensil/genoa_poc/memmap.c2
1 files changed, 1 insertions, 1 deletions
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);