aboutsummaryrefslogtreecommitdiff
path: root/src/soc/amd/stoneyridge
diff options
context:
space:
mode:
authorFelix Held <felix-coreboot@felixheld.de>2023-04-20 13:24:26 +0200
committerFelix Held <felix-coreboot@felixheld.de>2023-04-21 15:15:00 +0000
commit5927873b925e1aaca5929ccb8b7e1ff7bb0c7256 (patch)
tree372b76eaeab716ce11f657a07b82766e37c3a1a7 /src/soc/amd/stoneyridge
parent392cf2f8f842b3d1705927e9b784032d88296a0d (diff)
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 <felix-coreboot@felixheld.de> Change-Id: Ic673deb725a541c7535ae769f589cd82ea42a561 Reviewed-on: https://review.coreboot.org/c/coreboot/+/74614 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Martin Roth <martin.roth@amd.corp-partner.google.com>
Diffstat (limited to 'src/soc/amd/stoneyridge')
-rw-r--r--src/soc/amd/stoneyridge/memmap.c4
1 files changed, 1 insertions, 3 deletions
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 */