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/soc/intel/denverton_ns/acpi.c | 2 +- src/soc/intel/denverton_ns/memmap.c | 4 +--- src/soc/intel/denverton_ns/systemagent.c | 4 ++-- 3 files changed, 4 insertions(+), 6 deletions(-) (limited to 'src/soc/intel/denverton_ns') diff --git a/src/soc/intel/denverton_ns/acpi.c b/src/soc/intel/denverton_ns/acpi.c index afda045a42..207f4df31d 100644 --- a/src/soc/intel/denverton_ns/acpi.c +++ b/src/soc/intel/denverton_ns/acpi.c @@ -56,7 +56,7 @@ static const acpi_cstate_t cstate_map[] = { void soc_fill_gnvs(struct global_nvs *gnvs) { /* Top of Low Memory (start of resource allocation) */ - gnvs->tolm = (uintptr_t)cbmem_top(); + gnvs->tolm = cbmem_top(); /* MMIO Low/High & TSEG base and length */ gnvs->mmiob = (u32)get_top_of_low_memory(); diff --git a/src/soc/intel/denverton_ns/memmap.c b/src/soc/intel/denverton_ns/memmap.c index f607d0f0df..957605964e 100644 --- a/src/soc/intel/denverton_ns/memmap.c +++ b/src/soc/intel/denverton_ns/memmap.c @@ -41,14 +41,12 @@ void smm_region(uintptr_t *start, size_t *size) void fill_postcar_frame(struct postcar_frame *pcf) { - uintptr_t top_of_ram; - /* * We need to make sure ramstage will be run cached. At this point exact * location of ramstage in cbmem is not known. Instruct postcar to cache * 16 megs under cbmem top which is a safe bet to cover ramstage. */ - top_of_ram = (uintptr_t)cbmem_top(); + const uintptr_t top_of_ram = cbmem_top(); postcar_frame_add_mtrr(pcf, top_of_ram - 16 * MiB, 16 * MiB, MTRR_TYPE_WRBACK); diff --git a/src/soc/intel/denverton_ns/systemagent.c b/src/soc/intel/denverton_ns/systemagent.c index 6c5149bb9f..e8bcba77fb 100644 --- a/src/soc/intel/denverton_ns/systemagent.c +++ b/src/soc/intel/denverton_ns/systemagent.c @@ -240,10 +240,10 @@ static void mc_add_dram_resources(struct device *dev) reserved_ram_from_to(dev, index++, 0xc0000, 1 * MiB); /* 0x100000 -> cbmem_top() */ - ram_from_to(dev, index++, 1 * MiB, (uintptr_t)cbmem_top()); + ram_from_to(dev, index++, 1 * MiB, cbmem_top()); /* cbmem_top() -> TSEG */ - mmio_from_to(dev, index++, (uintptr_t)cbmem_top(), mc_values[TSEG_REG]); + mmio_from_to(dev, index++, cbmem_top(), mc_values[TSEG_REG]); /* TSEG -> TOLUD */ reserved_ram_from_to(dev, index++, mc_values[TSEG_REG], mc_values[TOLUD_REG]); -- cgit v1.2.3