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>
This commit is contained in:
Lars Munch 2010-05-08 22:43:35 +02:00 committed by Aurelien Jarno
parent 0f89cc7b6c
commit e03c22a98c
9 changed files with 1 additions and 30 deletions

View file

@ -243,7 +243,6 @@ static void palmte_init(ram_addr_t ram_size,
rom_size = load_image_targphys(option_rom[0], OMAP_CS0_BASE,
flash_size);
rom_loaded = 1;
cpu->env->regs[15] = 0x00000000;
}
if (rom_size < 0) {
fprintf(stderr, "%s: error loading '%s'\n",
@ -258,9 +257,6 @@ static void palmte_init(ram_addr_t ram_size,
/* Load the kernel. */
if (kernel_filename) {
/* Start at bootloader. */
cpu->env->regs[15] = palmte_binfo.loader_start;
palmte_binfo.kernel_filename = kernel_filename;
palmte_binfo.kernel_cmdline = kernel_cmdline;
palmte_binfo.initrd_filename = initrd_filename;