aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFelix Held <felix-coreboot@felixheld.de>2024-03-22 17:12:50 +0100
committerFelix Held <felix-coreboot@felixheld.de>2024-03-23 21:24:00 +0000
commit8387400a7b37bd99bcf24a26d87d063566b5c091 (patch)
tree8e002644a5a065b1a23aca86ed2257f8076a1c77
parent556373e354eda76e74d30cc9221ea6fa4c88a048 (diff)
soc/amd/common/cpu/noncar/memmap: make local variables const
Signed-off-by: Felix Held <felix-coreboot@felixheld.de> Change-Id: If3424df80655a150f27c7296a5683b528873816b Reviewed-on: https://review.coreboot.org/c/coreboot/+/81390 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Matt DeVillier <matt.devillier@amd.corp-partner.google.com> Reviewed-by: Marshall Dawson <marshalldawson3rd@gmail.com>
-rw-r--r--src/soc/amd/common/block/cpu/noncar/memmap.c9
1 files changed, 3 insertions, 6 deletions
diff --git a/src/soc/amd/common/block/cpu/noncar/memmap.c b/src/soc/amd/common/block/cpu/noncar/memmap.c
index 2aaba83039..488c209414 100644
--- a/src/soc/amd/common/block/cpu/noncar/memmap.c
+++ b/src/soc/amd/common/block/cpu/noncar/memmap.c
@@ -36,13 +36,10 @@ static const struct memmap_early_dram *memmap_get_early_dram_usage(void)
/* report SoC memory map up to cbmem_top */
void read_lower_soc_memmap_resources(struct device *dev, unsigned long *idx)
{
- uint32_t mem_usable = (uintptr_t)cbmem_top();
-
- uintptr_t early_reserved_dram_start, early_reserved_dram_end;
+ const uint32_t mem_usable = (uintptr_t)cbmem_top();
const struct memmap_early_dram *e = memmap_get_early_dram_usage();
-
- early_reserved_dram_start = e->base;
- early_reserved_dram_end = e->base + e->size;
+ const uintptr_t early_reserved_dram_start = e->base;
+ const uintptr_t early_reserved_dram_end = e->base + e->size;
/* 0x0 - 0x9ffff */
ram_range(dev, (*idx)++, 0, 0xa0000);