Arthur Heymans has uploaded this change for review. ( https://review.coreboot.org/c/coreboot/+/36560 )
Change subject: lib/ext_stage_cache: Use uintptr_t * as argument ......................................................................
lib/ext_stage_cache: Use uintptr_t * as argument
This avoids a cast.
Change-Id: I0bfebfd86d7b20942a5026e6437feac9ec5cd37b Signed-off-by: Arthur Heymans arthur@aheymans.xyz --- M src/cpu/x86/smm/tseg_region.c M src/include/stage_cache.h M src/lib/ext_stage_cache.c 3 files changed, 6 insertions(+), 6 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/60/36560/1
diff --git a/src/cpu/x86/smm/tseg_region.c b/src/cpu/x86/smm/tseg_region.c index a8b8bb7..519db61 100644 --- a/src/cpu/x86/smm/tseg_region.c +++ b/src/cpu/x86/smm/tseg_region.c @@ -68,11 +68,11 @@ return 0; }
-void stage_cache_external_region(void **base, size_t *size) +void stage_cache_external_region(uintptr_t *base, size_t *size) { - if (smm_subregion(SMM_SUBREGION_CACHE, (uintptr_t *)base, size)) { + if (smm_subregion(SMM_SUBREGION_CACHE, base, size)) { printk(BIOS_ERR, "ERROR: No cache SMM subregion.\n"); - *base = NULL; + *base = 0; *size = 0; } } diff --git a/src/include/stage_cache.h b/src/include/stage_cache.h index 3c7d9fa..9f70711 100644 --- a/src/include/stage_cache.h +++ b/src/include/stage_cache.h @@ -52,7 +52,7 @@ #endif
/* Fill in parameters for the external stage cache, if utilized. */ -void stage_cache_external_region(void **base, size_t *size); +void stage_cache_external_region(uintptr_t *base, size_t *size);
/* Metadata associated with each stage. */ struct stage_cache { diff --git a/src/lib/ext_stage_cache.c b/src/lib/ext_stage_cache.c index 52c0d6f..f56a9a4 100644 --- a/src/lib/ext_stage_cache.c +++ b/src/lib/ext_stage_cache.c @@ -31,12 +31,12 @@ static void stage_cache_create_empty(void) { struct imd *imd; - void *base; + uintptr_t base; size_t size;
imd = imd_get(); stage_cache_external_region(&base, &size); - imd_handle_init(imd, size + (uintptr_t)base); + imd_handle_init(imd, size + base);
printk(BIOS_DEBUG, "External stage cache:\n"); imd_create_tiered_empty(imd, 4096, 4096, 1024, 32);
Hello build bot (Jenkins),
I'd like you to reexamine a change. Please visit
https://review.coreboot.org/c/coreboot/+/36560
to look at the new patch set (#4).
Change subject: lib/ext_stage_cache: Use uintptr_t * as argument ......................................................................
lib/ext_stage_cache: Use uintptr_t * as argument
This avoids a cast.
Change-Id: I0bfebfd86d7b20942a5026e6437feac9ec5cd37b Signed-off-by: Arthur Heymans arthur@aheymans.xyz --- M src/cpu/x86/smm/tseg_region.c M src/include/stage_cache.h M src/lib/ext_stage_cache.c 3 files changed, 8 insertions(+), 8 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/60/36560/4
Stefan Reinauer has abandoned this change. ( https://review.coreboot.org/c/coreboot/+/36560?usp=email )
Change subject: lib/ext_stage_cache: Use uintptr_t * as argument ......................................................................
Abandoned