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>
This commit is contained in:
@@ -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;
|
||||
|
@@ -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);
|
||||
|
||||
|
Reference in New Issue
Block a user