summary refs log tree commit diff stats
path: root/hw/omap_sx1.c
diff options
context:
space:
mode:
authorLars Munch <lars@segv.dk>2010-05-08 22:43:35 +0200
committerAurelien Jarno <aurelien@aurel32.net>2010-05-31 19:40:41 +0200
commite03c22a98cf5deffd0dec2f9ff88a600aa330bc4 (patch)
treedbb06162b962ef194e422e40641d559b31087662 /hw/omap_sx1.c
parent0f89cc7b6c33418f268126cc908b222e0d052f69 (diff)
downloadfocaccia-qemu-e03c22a98cf5deffd0dec2f9ff88a600aa330bc4.tar.gz
focaccia-qemu-e03c22a98cf5deffd0dec2f9ff88a600aa330bc4.zip
arm: fix arm kernel boot for non zero start addr
Booting an arm kernel has been broken a while when booting from non zero start
address. This is due to the order of events: board init loads the kernel and
sets register 15 to the start address and then qemu_system_reset reset the cpu
making register 15 zero again.

This patch fixes the usage of the register 15 start address trick in
combination with arm_load_kernel.

Signed-off-by: Lars Munch <lars@segv.dk>
Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
Diffstat (limited to 'hw/omap_sx1.c')
-rw-r--r--hw/omap_sx1.c5
1 files changed, 0 insertions, 5 deletions
diff --git a/hw/omap_sx1.c b/hw/omap_sx1.c
index ca0a7d1005..2e9879f0ef 100644
--- a/hw/omap_sx1.c
+++ b/hw/omap_sx1.c
@@ -195,15 +195,10 @@ static void sx1_init(ram_addr_t ram_size,
 
     /* Load the kernel.  */
     if (kernel_filename) {
-        /* Start at bootloader.  */
-        cpu->env->regs[15] = sx1_binfo.loader_start;
-
         sx1_binfo.kernel_filename = kernel_filename;
         sx1_binfo.kernel_cmdline = kernel_cmdline;
         sx1_binfo.initrd_filename = initrd_filename;
         arm_load_kernel(cpu->env, &sx1_binfo);
-    } else {
-        cpu->env->regs[15] = 0x00000000;
     }
 
     /* TODO: fix next line */