From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:49806) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WiDIa-0005EW-GL for qemu-devel@nongnu.org; Wed, 07 May 2014 21:39:06 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1WiDIU-0007q1-H1 for qemu-devel@nongnu.org; Wed, 07 May 2014 21:39:00 -0400 Received: from mail-qg0-x22a.google.com ([2607:f8b0:400d:c04::22a]:42498) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WiDIU-0007pt-Cd for qemu-devel@nongnu.org; Wed, 07 May 2014 21:38:54 -0400 Received: by mail-qg0-f42.google.com with SMTP id q107so2065219qgd.15 for ; Wed, 07 May 2014 18:38:54 -0700 (PDT) From: "Edgar E. Iglesias" Date: Thu, 8 May 2014 11:35:08 +1000 Message-Id: <1399512908-23925-6-git-send-email-edgar.iglesias@gmail.com> In-Reply-To: <1399512908-23925-1-git-send-email-edgar.iglesias@gmail.com> References: <1399512908-23925-1-git-send-email-edgar.iglesias@gmail.com> Subject: [Qemu-devel] [PATCH v1 5/5] microblaze: boot: Don't hack the elf entry point List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Cc: peter.crosthwaite@xilinx.com, linux@roeck-us.net From: Peter Crosthwaite There was some modulo logic to ensure that Microblaze always booted into physical RAM regardless of the elf entry. Removed it, as QEMU should fail gracefully when given a bad elf, rather than attempt to run it. Signed-off-by: Peter Crosthwaite Signed-off-by: Edgar E. Iglesias --- hw/microblaze/boot.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hw/microblaze/boot.c b/hw/microblaze/boot.c index deeecfc..6bf36d0 100644 --- a/hw/microblaze/boot.c +++ b/hw/microblaze/boot.c @@ -148,7 +148,7 @@ void microblaze_load_kernel(MicroBlazeCPU *cpu, hwaddr ddr_base, big_endian, ELF_MACHINE, 0); } /* Always boot into physical ram. */ - boot_info.bootstrap_pc = ddr_base + (entry & 0x0fffffff); + boot_info.bootstrap_pc = (uint32_t)entry; /* If it wasn't an ELF image, try an u-boot image. */ if (kernel_size < 0) { -- 1.8.3.2