From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1IdOJz-0002mu-AL for qemu-devel@nongnu.org; Thu, 04 Oct 2007 06:52:47 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1IdOJx-0002mi-SY for qemu-devel@nongnu.org; Thu, 04 Oct 2007 06:52:47 -0400 Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1IdOJx-0002mf-NT for qemu-devel@nongnu.org; Thu, 04 Oct 2007 06:52:45 -0400 Received: from [85.186.197.132] (helo=swpark.galati.ro) by monty-python.gnu.org with smtp (Exim 4.60) (envelope-from ) id 1IdOJx-0000EO-2a for qemu-devel@nongnu.org; Thu, 04 Oct 2007 06:52:45 -0400 Message-ID: <4704C5EC.4040603@comsys.ro> Date: Thu, 04 Oct 2007 13:52:28 +0300 From: Vlad Lungu MIME-Version: 1.0 Subject: Re: [Qemu-devel] U-Boot patch for qemu -M mips References: <4702185B.3010807@comsys.ro> <20071002164027.GG16772@networkno.de> <470352E7.8050200@comsys.ro> <20071003133706.GM16772@networkno.de> <47039DDF.7050004@comsys.ro> <20071003194744.GO16772@networkno.de> In-Reply-To: <20071003194744.GO16772@networkno.de> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit 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 Thiemo Seufer wrote: > Vlad Lungu wrote: > >> Thiemo Seufer wrote: >> >>> Vlad Lungu wrote: >>> [snip] >>> >>> >>>>>> +long int initdram(int board_type) >>>>>> +{ >>>>>> + /* Sdram is setup by assembler code */ >>>>>> + /* If memory could be changed, we should return the true value >>>>>> here */ >>>>>> + return MEM_SIZE*1024*1024; >>>>>> >>>>>> >>>>> Qemu gets the amount of RAM passed via a command line switch, the >>>>> qemu-mips emulation sets up a Linux kernel like "command line" in >>>>> memory where u-boot could parse it from. >>>>> >>>>> >>>>> >>>> Does it, or just when you pass -kernel to it? I'll check. >>>> >>>> >>> Hm, you are right, it does that only for -kernel. Would it make sense >>> to change that in Qemu? >>> >>> >> IDK. Maybe I can probe the RAM size in U-Boot , or if this does not work, >> > > mips_r4k implements no probable memory controller, so this won't work. > I say let's stick it into a "DIP-switch", so nobody can overwrite it by mistake. And you don't have to parse it. >> put some info somewhere (RAM, register, >> emulated DIP-dwitch), like RAM size, endianness of the CPU. >> > > Endianness is rather pointless. If your U-Boot binary doesn't explode > immediately you got the right endianness. :-) > > It doesn't actually explode, it sort of almost hits the exception handler and freezes there. I don't have a mipsel gdb at hand to watch it, but it should be fun. pc=EPC 0xbfc00380 ds 0006 STATUS 0x00400006 CAUSE 0x00000428 CONFIG0 0x80000082 CONFIG1 0x9e190c8b