Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion src/arch/x86/image/bzimage.c
Original file line number Diff line number Diff line change
Expand Up @@ -626,7 +626,8 @@ static int bzimage_exec ( struct image *image ) {
*/
bzimg.pm_sz = ( bzimg.pm_sz + LZ_ALIGN - 1 ) & ~( LZ_ALIGN - 1 );

lz_set_bzimage ( lz, bzimg.rm_kernel, bzimg.pm_kernel + bzimg.pm_sz );
lz_set ( lz, bzimg.rm_kernel, bzimg.pm_kernel + bzimg.pm_sz,
LZ_PROTO_LINUX_BOOT );
bzimg.pm_sz += SLB_SIZE;
}

Expand Down
4 changes: 2 additions & 2 deletions src/arch/x86/image/elfboot.c
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ static int elfboot_exec ( struct image *image ) {
int rc;

/* Load the image using core ELF support */
if ( ( rc = elf_load ( image, &entry, &max ) ) != 0 ) {
if ( ( rc = elf_load ( image, NULL, &entry, &max ) ) != 0 ) {
DBGC ( image, "ELF %p could not load: %s\n",
image, strerror ( rc ) );
return rc;
Expand Down Expand Up @@ -129,7 +129,7 @@ static int elfboot_probe ( struct image *image ) {

/* Check that this image uses flat physical addressing */
if ( ( rc = elf_segments ( image, &ehdr, elfboot_check_segment,
&entry, &max ) ) != 0 ) {
NULL, &entry, &max ) ) != 0 ) {
DBGC ( image, "Unloadable ELF image\n" );
return rc;
}
Expand Down
9 changes: 5 additions & 4 deletions src/arch/x86/image/landing_zone.c
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,8 @@ struct sl_header {

struct lz_header {
u8 uuid[16];
u32 slaunch_loader_size;
u32 zero_page_addr;
u32 boot_protocol;
u32 proto_struct;
u8 msb_key_hash[20];
} __attribute__ (( packed ));

Expand All @@ -33,7 +33,7 @@ static physaddr_t target;
* @v image LZ file
* @v zeropage Address of zero page
*/
int lz_set_bzimage ( struct image *image, userptr_t zeropage, userptr_t tgt ) {
int lz_set ( struct image *image, userptr_t zeropage, userptr_t tgt, int proto ) {
target = user_to_phys ( tgt, 0 );
int rc;

Expand All @@ -54,7 +54,8 @@ int lz_set_bzimage ( struct image *image, userptr_t zeropage, userptr_t tgt ) {
DBGC ( image, "LZ %p writing zeropage address: 0x%lx\n", image,
user_to_phys ( zeropage, 0 ) );

hdr->zero_page_addr = user_to_phys ( zeropage, 0 );
hdr->boot_protocol = proto;
hdr->proto_struct = user_to_phys ( zeropage, 0 );
return 0;
}

Expand Down
2 changes: 1 addition & 1 deletion src/arch/x86/image/multiboot.c
Original file line number Diff line number Diff line change
Expand Up @@ -372,7 +372,7 @@ static int multiboot_load_elf ( struct image *image, physaddr_t *entry,
int rc;

/* Load ELF image*/
if ( ( rc = elf_load ( image, entry, max ) ) != 0 ) {
if ( ( rc = elf_load ( image, NULL, entry, max ) ) != 0 ) {
DBGC ( image, "MULTIBOOT %p ELF image failed to load: %s\n",
image, strerror ( rc ) );
return rc;
Expand Down
Loading