From e7fa24470dc3b3403eabd757a87cfb993f316b1a Mon Sep 17 00:00:00 2001 From: Elyes Haouas Date: Sat, 1 Jun 2024 18:12:16 +0200 Subject: cbmem_top: Change the return value to uintptr_t MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Change-Id: Ib757c0548f6f643747ba8d70228b3d6dfa5182cd Signed-off-by: Elyes Haouas Reviewed-on: https://review.coreboot.org/c/coreboot/+/82752 Reviewed-by: Jérémy Compostella Reviewed-by: Jakub Czapiga Tested-by: build bot (Jenkins) --- src/drivers/amd/agesa/mtrr_fixme.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'src/drivers/amd/agesa') diff --git a/src/drivers/amd/agesa/mtrr_fixme.c b/src/drivers/amd/agesa/mtrr_fixme.c index 39c3d26f1f..9db1fe5a1f 100644 --- a/src/drivers/amd/agesa/mtrr_fixme.c +++ b/src/drivers/amd/agesa/mtrr_fixme.c @@ -44,8 +44,7 @@ void fixup_cbmem_to_UC(int s3resume) * writeback possible. */ - uintptr_t top_of_ram = (uintptr_t)cbmem_top(); - top_of_ram = ALIGN_UP(top_of_ram, 4 * MiB); + const uintptr_t top_of_ram = ALIGN_UP(cbmem_top(), 4 * MiB); set_range_uc(top_of_ram - 4 * MiB, 4 * MiB); set_range_uc(top_of_ram - 8 * MiB, 4 * MiB); @@ -78,7 +77,7 @@ static void recover_postcar_frame(struct postcar_frame *pcf) * speed make them WB after CAR teardown. */ if (s3resume) { - uintptr_t top_of_ram = (uintptr_t)cbmem_top(); + uintptr_t top_of_ram = cbmem_top(); top_of_ram = ALIGN_DOWN(top_of_ram, 4 * MiB); postcar_frame_add_mtrr(pcf, top_of_ram - 4 * MiB, 4 * MiB, -- cgit v1.2.3