summaryrefslogtreecommitdiff
path: root/src/lib/imd_cbmem.c
diff options
context:
space:
mode:
authorElyes Haouas <ehaouas@noos.fr>2024-06-01 18:12:16 +0200
committerFelix Held <felix-coreboot@felixheld.de>2024-07-10 12:55:46 +0000
commite7fa24470dc3b3403eabd757a87cfb993f316b1a (patch)
tree6497bd70076905089fc81ed777cbec34486569c0 /src/lib/imd_cbmem.c
parenta9997f891facaf3c855d7f2c9c6840acbf101193 (diff)
cbmem_top: Change the return value to uintptr_t
Change-Id: Ib757c0548f6f643747ba8d70228b3d6dfa5182cd Signed-off-by: Elyes Haouas <ehaouas@noos.fr> Reviewed-on: https://review.coreboot.org/c/coreboot/+/82752 Reviewed-by: Jérémy Compostella <jeremy.compostella@intel.com> Reviewed-by: Jakub Czapiga <czapiga@google.com> Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Diffstat (limited to 'src/lib/imd_cbmem.c')
-rw-r--r--src/lib/imd_cbmem.c14
1 files changed, 7 insertions, 7 deletions
diff --git a/src/lib/imd_cbmem.c b/src/lib/imd_cbmem.c
index 91c86211f5..a88cf98d6c 100644
--- a/src/lib/imd_cbmem.c
+++ b/src/lib/imd_cbmem.c
@@ -15,17 +15,17 @@ uintptr_t _cbmem_top_ptr;
static struct imd imd;
-void *cbmem_top(void)
+uintptr_t cbmem_top(void)
{
if (ENV_CREATES_CBMEM) {
static uintptr_t top;
if (top)
- return (void *)top;
+ return top;
top = cbmem_top_chipset();
- return (void *)top;
+ return top;
}
if (ENV_POSTCAR || ENV_RAMSTAGE)
- return (void *)_cbmem_top_ptr;
+ return _cbmem_top_ptr;
dead_code();
}
@@ -55,7 +55,7 @@ static void cbmem_top_init_once(void)
/* The test is only effective on X86 and when address hits UC memory. */
if (ENV_X86)
- quick_ram_check_or_die((uintptr_t)cbmem_top() - sizeof(u32));
+ quick_ram_check_or_die(cbmem_top() - sizeof(u32));
}
void cbmem_initialize_empty_id_size(u32 id, u64 size)
@@ -64,7 +64,7 @@ void cbmem_initialize_empty_id_size(u32 id, u64 size)
cbmem_top_init_once();
- imd_handle_init(&imd, cbmem_top());
+ imd_handle_init(&imd, (void *)cbmem_top());
printk(BIOS_DEBUG, "CBMEM:\n");
@@ -95,7 +95,7 @@ int cbmem_initialize_id_size(u32 id, u64 size)
cbmem_top_init_once();
- imd_handle_init(&imd, cbmem_top());
+ imd_handle_init(&imd, (void *)cbmem_top());
if (imd_recover(&imd))
return 1;