diff options
author | Patrick Georgi <patrick.georgi@coresystems.de> | 2009-05-13 16:27:25 +0000 |
---|---|---|
committer | Patrick Georgi <patrick.georgi@coresystems.de> | 2009-05-13 16:27:25 +0000 |
commit | 5eceb32a79d4298a9f57bbe9fd5e06a83db0ce95 (patch) | |
tree | c57f79ae6290ab6744927ac98f13bccf65924d45 /src/boot/elfboot.c | |
parent | 8f047de352d26c353c1c6bc9649a4616fa66bbd6 (diff) | |
download | coreboot-5eceb32a79d4298a9f57bbe9fd5e06a83db0ce95.tar.xz |
Allow dynamic size for the {s,}elfboot bounce buffer.
Use that to fix selfboot with compressed payloads.
Signed-off-by: Patrick Georgi <patrick.georgi@coresystems.de>
Acked-by: Ronald G. Minnich <rminnich@gmail.com>
git-svn-id: svn://svn.coreboot.org/coreboot/trunk@4281 2b7e53f0-3cfb-0310-b3e9-8179ed1497e1
Diffstat (limited to 'src/boot/elfboot.c')
-rw-r--r-- | src/boot/elfboot.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/src/boot/elfboot.c b/src/boot/elfboot.c index acffb634da..e633962799 100644 --- a/src/boot/elfboot.c +++ b/src/boot/elfboot.c @@ -122,6 +122,8 @@ int verify_ip_checksum( * */ +static unsigned long bounce_size; + static unsigned long get_bounce_buffer(struct lb_memory *mem) { unsigned long lb_size; @@ -130,7 +132,8 @@ static unsigned long get_bounce_buffer(struct lb_memory *mem) int i; lb_size = (unsigned long)(&_eram_seg - &_ram_seg); /* Double coreboot size so I have somewhere to place a copy to return to */ - lb_size = lb_size + lb_size; + bounce_size = lb_size; + lb_size = bounce_size + lb_size; mem_entries = (mem->size - sizeof(*mem))/sizeof(mem->map[0]); buffer = 0; for(i = 0; i < mem_entries; i++) { @@ -610,7 +613,7 @@ int elfload(struct lb_memory *mem, post_code(0xfe); /* Jump to kernel */ - jmp_to_elf_entry(entry, bounce_buffer); + jmp_to_elf_entry(entry, bounce_buffer, bounce_size); return 1; out: |