[coreboot-gerrit] Patch set updated for coreboot: cbmem: Fix cbmem_add_bootmem()
Andrey Petrov (andrey.petrov@intel.com)
gerrit at coreboot.org
Fri Mar 11 08:32:21 CET 2016
Andrey Petrov (andrey.petrov at intel.com) just uploaded a new patch set to gerrit, which you can find at https://review.coreboot.org/14033
-gerrit
commit 71ea970f8dfe4e437318d9c478e5f1b2785bed49
Author: Andrey Petrov <andrey.petrov at intel.com>
Date: Thu Mar 10 22:14:41 2016 -0800
cbmem: Fix cbmem_add_bootmem()
Change 13363 (555d6c2) introduced a bug where cbmem_add_bootmem() was
converted to use a new function. Unfortunately instead of passing a
pointer, NULL was passed due to type confusion. This change fixes that
problem by passing address of stack variable instead of NULL.
Change-Id: Ib8e1add3547cda01f71bf1dea14d3e58bdd99730
Signed-off-by: Andrey Petrov <andrey.petrov at intel.com>
---
src/lib/imd_cbmem.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/src/lib/imd_cbmem.c b/src/lib/imd_cbmem.c
index e75c538..a078071 100644
--- a/src/lib/imd_cbmem.c
+++ b/src/lib/imd_cbmem.c
@@ -272,11 +272,11 @@ void cbmem_region_used(uintptr_t *base, size_t *size)
void cbmem_add_bootmem(void)
{
- void *base = NULL;
+ uintptr_t base = 0;
size_t size = 0;
- cbmem_region_used(base, &size);
- bootmem_add_range((uintptr_t)base, size, LB_MEM_TABLE);
+ cbmem_region_used(&base, &size);
+ bootmem_add_range(base, size, LB_MEM_TABLE);
}
#if ENV_RAMSTAGE
More information about the coreboot-gerrit
mailing list