aboutsummaryrefslogtreecommitdiff
path: root/hw/nseries.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/nseries.c
parent0f89cc7b6c33418f268126cc908b222e0d052f69 (diff)
downloadqemu-e03c22a98cf5deffd0dec2f9ff88a600aa330bc4.zip
qemu-e03c22a98cf5deffd0dec2f9ff88a600aa330bc4.tar.gz
qemu-e03c22a98cf5deffd0dec2f9ff88a600aa330bc4.tar.bz2
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/nseries.c')
-rw-r--r--hw/nseries.c7
1 files changed, 0 insertions, 7 deletions
diff --git a/hw/nseries.c b/hw/nseries.c
index 0273eee..04a028d 100644
--- a/hw/nseries.c
+++ b/hw/nseries.c
@@ -1016,7 +1016,6 @@ static void n8x0_boot_init(void *opaque)
n800_dss_init(&s->blizzard);
/* CPU setup */
- s->cpu->env->regs[15] = s->cpu->env->boot_info->loader_start;
s->cpu->env->GE = 0x5;
/* If the machine has a slided keyboard, open it */
@@ -1317,11 +1316,6 @@ static void n8x0_init(ram_addr_t ram_size, const char *boot_device,
if (usb_enabled)
n8x0_usb_setup(s);
- /* Setup initial (reset) machine state */
-
- /* Start at the OneNAND bootloader. */
- s->cpu->env->regs[15] = 0;
-
if (kernel_filename) {
/* Or at the linux loader. */
binfo->kernel_filename = kernel_filename;
@@ -1330,7 +1324,6 @@ static void n8x0_init(ram_addr_t ram_size, const char *boot_device,
arm_load_kernel(s->cpu->env, binfo);
qemu_register_reset(n8x0_boot_init, s);
- n8x0_boot_init(s);
}
if (option_rom[0] && (boot_device[0] == 'n' || !kernel_filename)) {