diff options
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); |