Now that each loader sets up its own context, there is no need to pass in the address or set up the context ourselves.
Signed-off-by: Mark Cave-Ayland mark.cave-ayland@ilande.co.uk --- arch/amd64/context.c | 4 +--- arch/ppc/qemu/context.c | 4 +--- arch/sparc32/boot.c | 2 +- arch/sparc32/context.c | 4 +--- arch/sparc64/context.c | 4 +--- arch/unix/boot.c | 2 +- arch/x86/context.c | 4 +--- include/libopenbios/initprogram.h | 2 +- libopenbios/initprogram.c | 2 +- 9 files changed, 9 insertions(+), 19 deletions(-)
diff --git a/arch/amd64/context.c b/arch/amd64/context.c index 8837cbb..a47b2cf 100644 --- a/arch/amd64/context.c +++ b/arch/amd64/context.c @@ -147,12 +147,10 @@ struct context *switch_to(struct context *ctx) }
/* Start ELF image */ -unsigned int start_elf(unsigned long entry_point) +unsigned int start_elf(void) { struct context *ctx = client_ctx;
- arch_init_program(); - ctx = switch_to(ctx); return ctx->eax; } diff --git a/arch/ppc/qemu/context.c b/arch/ppc/qemu/context.c index cbf2380..717f942 100644 --- a/arch/ppc/qemu/context.c +++ b/arch/ppc/qemu/context.c @@ -156,12 +156,10 @@ struct context *switch_to(struct context *ctx) }
/* Start ELF Boot image */ -unsigned int start_elf(unsigned long entry_point) +unsigned int start_elf(void) { struct context *ctx = client_ctx;
- arch_init_program(); - ctx = switch_to(ctx); return ctx->regs[REG_R3]; } diff --git a/arch/sparc32/boot.c b/arch/sparc32/boot.c index 35fd473..d458658 100644 --- a/arch/sparc32/boot.c +++ b/arch/sparc32/boot.c @@ -201,6 +201,6 @@ void boot(void) feval("load-state >ls.entry !");
arch_init_program(); - start_elf(kernel_image); + start_elf(); } } diff --git a/arch/sparc32/context.c b/arch/sparc32/context.c index 44abc74..8ff8e92 100644 --- a/arch/sparc32/context.c +++ b/arch/sparc32/context.c @@ -129,12 +129,10 @@ struct context *switch_to(struct context *ctx) }
/* Start ELF Boot image */ -unsigned int start_elf(unsigned long entry_point) +unsigned int start_elf(void) { struct context *ctx = client_ctx;
- arch_init_program(); - ctx = switch_to(ctx); return ctx->regs[REG_O0]; } diff --git a/arch/sparc64/context.c b/arch/sparc64/context.c index ed4d878..18ed336 100644 --- a/arch/sparc64/context.c +++ b/arch/sparc64/context.c @@ -138,12 +138,10 @@ struct context *switch_to(struct context *ctx) }
/* Start ELF Boot image */ -unsigned int start_elf(unsigned long entry_point) +unsigned int start_elf(void) { struct context *ctx = client_ctx;
- arch_init_program(); - ctx = switch_to(ctx);
return 0; diff --git a/arch/unix/boot.c b/arch/unix/boot.c index 63a623d..ce84bb7 100644 --- a/arch/unix/boot.c +++ b/arch/unix/boot.c @@ -85,7 +85,7 @@ boot( void ) }
unsigned int -start_elf(unsigned long address) +start_elf(void) { return 0; } diff --git a/arch/x86/context.c b/arch/x86/context.c index 6bb2f69..3f6e95c 100644 --- a/arch/x86/context.c +++ b/arch/x86/context.c @@ -153,12 +153,10 @@ struct context *switch_to(struct context *ctx) }
/* Start ELF Boot image */ -unsigned int start_elf(unsigned long entry_point) +unsigned int start_elf(void) { struct context *ctx = client_ctx;
- arch_init_program(); - ctx = switch_to(ctx); return ctx->eax; } diff --git a/include/libopenbios/initprogram.h b/include/libopenbios/initprogram.h index 33f2723..5464435 100644 --- a/include/libopenbios/initprogram.h +++ b/include/libopenbios/initprogram.h @@ -18,7 +18,7 @@ #define _H_INITPROGRAM
extern struct context * volatile __context; -extern unsigned int start_elf(unsigned long address); +extern unsigned int start_elf(void);
extern int arch_init_program(void); extern void init_program(void); diff --git a/libopenbios/initprogram.c b/libopenbios/initprogram.c index e87f930..49b5dc2 100644 --- a/libopenbios/initprogram.c +++ b/libopenbios/initprogram.c @@ -124,7 +124,7 @@ void go(void)
printk("\nJumping to entry point " FMT_ucellx " for type " FMT_ucellx "...\n", address, type);
- image_retval = start_elf((unsigned long)address); + image_retval = start_elf();
printk("Image returned with return value %#x\n", image_retval); }