From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1FP12q-0001r5-4g for qemu-devel@nongnu.org; Thu, 30 Mar 2006 12:34:52 -0500 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1FP12o-0001og-9O for qemu-devel@nongnu.org; Thu, 30 Mar 2006 12:34:50 -0500 Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1FP12o-0001od-3z for qemu-devel@nongnu.org; Thu, 30 Mar 2006 12:34:50 -0500 Received: from [64.233.166.176] (helo=pproxy.gmail.com) by monty-python.gnu.org with esmtp (Exim 4.52) id 1FP151-0006Ge-J5 for qemu-devel@nongnu.org; Thu, 30 Mar 2006 12:37:07 -0500 Received: by pproxy.gmail.com with SMTP id i49so125907pye for ; Thu, 30 Mar 2006 09:34:49 -0800 (PST) Message-ID: <442C16C3.1000105@gmail.com> Date: Thu, 30 Mar 2006 19:34:59 +0200 MIME-Version: 1.0 Subject: Re: [Qemu-devel] [PATCH] Add MIPS ELF loader References: <4428DE4B.6040802@gmail.com> <20060328130159.GA31939@networkno.de><442BDFC9.40009@gmail.com> <20060330135313.GA11525@networkno.de> <146901c65406$4d029670$e90d11ac@spb.in.rosprint.ru> In-Reply-To: <146901c65406$4d029670$e90d11ac@spb.in.rosprint.ru> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit From: Dirk Behme Reply-To: qemu-devel@nongnu.org List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Alexander Voropay , qemu-devel@nongnu.org Alexander Voropay wrote: > I'm trying to implement a mips_bios, unfortunately, quemu seems can't > run a code at the 0xbfc00000 region. > > See a http://pastebin.com/628591 > > The conventional 'move k0,zero' instruction (line 35) causes an general > exceprion to 0xbfc00380, see line 70 Try to change the following lines in hw/mips_r4k.c: //#define KERNEL_LOAD_ADDR 0x80010000 #define KERNEL_LOAD_ADDR 0xBFC00000 //cpu_register_physical_memory(0, ram_size, IO_MEM_RAM); cpu_register_physical_memory(0x1fc00000, ram_size, IO_MEM_RAM); //kernel_size = load_image(kernel_filename, // phys_ram_base + (kernel_base - 0x80000000)); kernel_size = load_image(kernel_filename, phys_ram_base); Works for me: (gdb) p/x $pc $1 = 0xbfc00000 (gdb) x/2i $pc 0xbfc00000 <_start>: b 0xbfc00400 0xbfc00004 <_start+4>: nop (gdb) x/2i 0x1fc00000 0x1fc00000: b 0x1fc00400 0x1fc00004: nop (gdb) Best regards Dirk