From 5927873b925e1aaca5929ccb8b7e1ff7bb0c7256 Mon Sep 17 00:00:00 2001 From: Felix Held Date: Thu, 20 Apr 2023 13:24:26 +0200 Subject: soc/amd/stoneyridge/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: Ic673deb725a541c7535ae769f589cd82ea42a561 Reviewed-on: https://review.coreboot.org/c/coreboot/+/74614 Tested-by: build bot (Jenkins) Reviewed-by: Martin Roth --- src/soc/amd/stoneyridge/memmap.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) (limited to 'src/soc/amd') diff --git a/src/soc/amd/stoneyridge/memmap.c b/src/soc/amd/stoneyridge/memmap.c index 8f73a8cf12..32d6d96a5b 100644 --- a/src/soc/amd/stoneyridge/memmap.c +++ b/src/soc/amd/stoneyridge/memmap.c @@ -13,9 +13,7 @@ uintptr_t cbmem_top_chipset(void) { - msr_t tom = rdmsr(TOP_MEM); - - if (!tom.lo) + if (!get_top_of_mem_below_4gb()) return 0; /* 8MB alignment to keep MTRR usage low */ -- cgit v1.2.3