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>
This commit is contained in:
@@ -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);
|
||||
|
||||
|
Reference in New Issue
Block a user