Felix Held has submitted this change. ( https://review.coreboot.org/c/coreboot/+/74614 )
Change subject: soc/amd/stoneyridge/memmap: use get_top_of_mem_below_4gb ......................................................................
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 --- M src/soc/amd/stoneyridge/memmap.c 1 file changed, 16 insertions(+), 3 deletions(-)
Approvals: build bot (Jenkins): Verified Martin Roth: Looks good to me, approved
diff --git a/src/soc/amd/stoneyridge/memmap.c b/src/soc/amd/stoneyridge/memmap.c index 8f73a8c..32d6d96 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 */