From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1IdxEl-0003oe-MJ for qemu-devel@nongnu.org; Fri, 05 Oct 2007 20:09:43 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1IdxEh-0003mL-Vy for qemu-devel@nongnu.org; Fri, 05 Oct 2007 20:09:43 -0400 Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1IdxEh-0003mI-Om for qemu-devel@nongnu.org; Fri, 05 Oct 2007 20:09:39 -0400 Received: from pop-satin.atl.sa.earthlink.net ([207.69.195.63]) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1IdxEh-0000Oq-Co for qemu-devel@nongnu.org; Fri, 05 Oct 2007 20:09:39 -0400 Received: from user-142h2k8.cable.mindspring.com ([72.40.138.136] helo=earthlink.net) by pop-satin.atl.sa.earthlink.net with esmtp (Exim 3.36 #1) id 1IdxEg-0001JP-00 for qemu-devel@nongnu.org; Fri, 05 Oct 2007 20:09:38 -0400 Message-ID: <4706D241.3060806@earthlink.net> Date: Fri, 05 Oct 2007 20:09:37 -0400 From: Robert Reif MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="------------000602080200070400040708" Subject: [Qemu-devel] [PATCH] Add support to sparc for loading a real bios image. Reply-To: qemu-devel@nongnu.org List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org This is a multi-part message in MIME format. --------------000602080200070400040708 Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit Add support to sparc for loading a real bios image. --------------000602080200070400040708 Content-Type: text/plain; name="bios.diff.txt" Content-Transfer-Encoding: 7bit Content-Disposition: inline; filename="bios.diff.txt" Index: hw/sun4m.c =================================================================== RCS file: /sources/qemu/qemu/hw/sun4m.c,v retrieving revision 1.52 diff -p -u -r1.52 sun4m.c --- hw/sun4m.c 5 Oct 2007 13:08:35 -0000 1.52 +++ hw/sun4m.c 6 Oct 2007 00:05:16 -0000 @@ -49,7 +49,7 @@ #define KERNEL_LOAD_ADDR 0x00004000 #define CMDLINE_ADDR 0x007ff000 #define INITRD_LOAD_ADDR 0x00800000 -#define PROM_SIZE_MAX (256 * 1024) +#define PROM_SIZE_MAX (512 * 1024) #define PROM_PADDR 0xff0000000ULL #define PROM_VADDR 0xffd00000 #define PROM_FILENAME "openbios-sparc32" @@ -435,9 +435,12 @@ static void sun4m_load_kernel(long vram_ snprintf(buf, sizeof(buf), "%s/%s", bios_dir, bios_name); ret = load_elf(buf, PROM_PADDR - PROM_VADDR, NULL, NULL, NULL); if (ret < 0) { - fprintf(stderr, "qemu: could not load prom '%s'\n", + ret = load_image(buf, phys_ram_base + prom_offset); + if (ret < 0) { + fprintf(stderr, "qemu: could not load prom '%s'\n", buf); - exit(1); + exit(1); + } } kernel_size = 0; --------------000602080200070400040708--