diff options
Diffstat (limited to 'src/drivers/amd')
-rw-r--r-- | src/drivers/amd/agesa/mtrr_fixme.c | 5 |
1 files changed, 2 insertions, 3 deletions
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, |