summaryrefslogtreecommitdiff
path: root/src/lib/selfboot.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/lib/selfboot.c')
-rw-r--r--src/lib/selfboot.c15
1 files changed, 7 insertions, 8 deletions
diff --git a/src/lib/selfboot.c b/src/lib/selfboot.c
index 164dce90de..bd4c1690ac 100644
--- a/src/lib/selfboot.c
+++ b/src/lib/selfboot.c
@@ -214,13 +214,13 @@ static int relocate_segment(unsigned long buffer, struct segment *seg)
static int build_self_segment_list(
struct segment *head,
- struct payload *payload, uintptr_t *entry)
+ struct prog *payload, uintptr_t *entry)
{
struct segment *new;
struct segment *ptr;
struct cbfs_payload_segment *segment, *first_segment;
struct cbfs_payload *cbfs_payload;
- cbfs_payload = prog_start(&payload->prog);
+ cbfs_payload = prog_start(payload);
memset(head, 0, sizeof(*head));
head->next = head->prev = head;
first_segment = segment = &cbfs_payload->segments;
@@ -311,7 +311,7 @@ static int build_self_segment_list(
static int load_self_segments(
struct segment *head,
- struct payload *payload)
+ struct prog *payload)
{
struct segment *ptr;
struct segment *last_non_empty;
@@ -365,10 +365,6 @@ static int load_self_segments(
return 0;
}
- /* Update the payload's bounce buffer data used when loading. */
- payload->bounce.data = (void *)(uintptr_t)bounce_buffer;
- payload->bounce.size = bounce_size;
-
for(ptr = head->next; ptr != head; ptr = ptr->next) {
unsigned char *dest, *src;
printk(BIOS_DEBUG, "Loading Segment: addr: 0x%016lx memsz: 0x%016lx filesz: 0x%016lx\n",
@@ -454,10 +450,13 @@ static int load_self_segments(
}
}
+ /* Update the payload's area with the bounce buffer information. */
+ prog_set_area(payload, (void *)(uintptr_t)bounce_buffer, bounce_size);
+
return 1;
}
-void *selfload(struct payload *payload)
+void *selfload(struct prog *payload)
{
uintptr_t entry = 0;
struct segment head;