summaryrefslogtreecommitdiff
path: root/src/lib/selfboot.c
diff options
context:
space:
mode:
authorRonald G. Minnich <rminnich@google.com>2013-11-11 10:36:28 -0800
committerRonald G. Minnich <rminnich@gmail.com>2013-11-18 21:22:38 +0100
commitef4020957e009f2861522549927069d6e9d39959 (patch)
tree4993c191f84a0c5ca01a2a35e5f0adc6f8c76cb7 /src/lib/selfboot.c
parent7fda0e8e61682e66c956d3759a0ce39486dad747 (diff)
downloadcoreboot-ef4020957e009f2861522549927069d6e9d39959.tar.xz
cbfs: 64-bit cleanups
cbfs used u32 in a number of cases where uintptr_t was correct. This change builds for both 64-bit and 32-bit boards. Change-Id: If42c722a8a9e8d565d3827f65ed6c2cb8e90ba60 Signed-off-by: Ronald G. Minnich <rminnich@google.com> Reviewed-on: http://review.coreboot.org/4037 Tested-by: build bot (Jenkins) Reviewed-by: Vladimir Serbinenko <phcoder@gmail.com> Reviewed-by: Aaron Durbin <adurbin@google.com>
Diffstat (limited to 'src/lib/selfboot.c')
-rw-r--r--src/lib/selfboot.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/src/lib/selfboot.c b/src/lib/selfboot.c
index f69ad1435b..222eae2871 100644
--- a/src/lib/selfboot.c
+++ b/src/lib/selfboot.c
@@ -305,7 +305,7 @@ static int relocate_segment(unsigned long buffer, struct segment *seg)
static int build_self_segment_list(
struct segment *head,
struct lb_memory *mem,
- struct cbfs_payload *payload, u32 *entry)
+ struct cbfs_payload *payload, uintptr_t *entry)
{
struct segment *new;
struct segment *ptr;
@@ -332,8 +332,9 @@ static int build_self_segment_list(
new->s_memsz = ntohl(segment->mem_len);
new->compression = ntohl(segment->compression);
- new->s_srcaddr = (u32) ((unsigned char *)first_segment)
- + ntohl(segment->offset);
+ new->s_srcaddr = (uintptr_t)
+ ((unsigned char *)first_segment)
+ + ntohl(segment->offset);
new->s_filesz = ntohl(segment->len);
printk(BIOS_DEBUG, " New segment dstaddr 0x%lx memsize 0x%lx srcaddr 0x%lx filesize 0x%lx\n",
new->s_dstaddr, new->s_memsz, new->s_srcaddr, new->s_filesz);
@@ -504,7 +505,7 @@ static int load_self_segments(
void *selfload(struct lb_memory *mem, struct cbfs_payload *payload)
{
- u32 entry=0;
+ uintptr_t entry = 0;
struct segment head;
/* Preprocess the self segments */