Isaac Christensen (isaac.christensen@se-eng.com) just uploaded a new patch set to gerrit, which you can find at http://review.coreboot.org/6973
-gerrit
commit 8790956718b91446d0d9e69977d81d211821ccc7 Author: Marcelo Povoa marcelogp@chromium.org Date: Mon Feb 24 10:00:26 2014 -0800
cbmem: Fix 64-bit pointer related casts in dynamic_cbmem.c
Change-Id: I7a382d42e1552d13b1feffc37848674f304adee2 Signed-off-by: Marcelo Povoa marcelogp@chromium.org Reviewed-on: https://chromium-review.googlesource.com/187726 Reviewed-by: Aaron Durbin adurbin@chromium.org Reviewed-by: Stefan Reinauer reinauer@chromium.org Reviewed-by: David Hendricks dhendrix@chromium.org (cherry picked from commit 57bbca93f12e0ddbde3e673070483e13521dfbdd) Signed-off-by: Isaac Christensen isaac.christensen@se-eng.com --- src/lib/dynamic_cbmem.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-)
diff --git a/src/lib/dynamic_cbmem.c b/src/lib/dynamic_cbmem.c index 1382f1d..3a78316 100644 --- a/src/lib/dynamic_cbmem.c +++ b/src/lib/dynamic_cbmem.c @@ -107,7 +107,7 @@ static inline void *get_root(void) if (pointer->magic != CBMEM_POINTER_MAGIC) return NULL;
- return (void *)pointer->root; + return (void *)(uintptr_t)pointer->root; }
static inline void cbmem_entry_assign(struct cbmem_entry *entry, @@ -188,9 +188,9 @@ static inline int cbmem_fail_recovery(void) static int validate_entries(struct cbmem_root *root) { unsigned int i; - u32 current_end; + uintptr_t current_end;
- current_end = (u32)get_top_aligned(); + current_end = (uintptr_t)get_top_aligned();
printk(BIOS_DEBUG, "CBMEM: recovering %d/%d entries from root @ %p\n", root->num_entries, root->max_entries, root); @@ -270,14 +270,14 @@ int cbmem_recovery(int is_wakeup) static void *cbmem_base(void) { struct cbmem_root *root; - u32 low_addr; + uintptr_t low_addr;
root = get_root();
if (root == NULL) return NULL;
- low_addr = (u32)root; + low_addr = (uintptr_t)root;
/* Assume the lowest address is the last one added. */ if (root->num_entries > 0) { @@ -411,7 +411,7 @@ u64 cbmem_entry_size(const struct cbmem_entry *entry)
void *cbmem_entry_start(const struct cbmem_entry *entry) { - return (void *)entry->start; + return (void *)(uintptr_t)entry->start; }