diff options
author | Elyes Haouas <ehaouas@noos.fr> | 2024-06-01 18:12:16 +0200 |
---|---|---|
committer | Felix Held <felix-coreboot@felixheld.de> | 2024-07-10 12:55:46 +0000 |
commit | e7fa24470dc3b3403eabd757a87cfb993f316b1a (patch) | |
tree | 6497bd70076905089fc81ed777cbec34486569c0 /src/lib | |
parent | a9997f891facaf3c855d7f2c9c6840acbf101193 (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')
-rw-r--r-- | src/lib/imd_cbmem.c | 14 | ||||
-rw-r--r-- | src/lib/prog_loaders.c | 4 |
2 files changed, 9 insertions, 9 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; diff --git a/src/lib/prog_loaders.c b/src/lib/prog_loaders.c index b2abbff575..49056cc024 100644 --- a/src/lib/prog_loaders.c +++ b/src/lib/prog_loaders.c @@ -60,7 +60,7 @@ static void run_ramstage_from_resume(struct prog *ramstage) stage_cache_load_stage(STAGE_RAMSTAGE, ramstage); ramstage->cbfs_type = CBFS_TYPE_STAGE; - prog_set_arg(ramstage, cbmem_top()); + prog_set_arg(ramstage, (void *)cbmem_top()); if (prog_entry(ramstage) != NULL) { printk(BIOS_DEBUG, "Jumping to image.\n"); @@ -126,7 +126,7 @@ void __noreturn run_ramstage(void) console_time_report(); /* This overrides the arg fetched from the relocatable module */ - prog_set_arg(&ramstage, cbmem_top()); + prog_set_arg(&ramstage, (void *)cbmem_top()); prog_run(&ramstage); |