From owner-freebsd-arm@FreeBSD.ORG Fri Sep 28 10:17:16 2007 Return-Path: Delivered-To: freebsd-arm@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 0712D16A419 for ; Fri, 28 Sep 2007 10:17:16 +0000 (UTC) (envelope-from marius.nuennerich@gmx.de) Received: from mail.gmx.net (mail.gmx.net [213.165.64.20]) by mx1.freebsd.org (Postfix) with SMTP id 6E30A13C468 for ; Fri, 28 Sep 2007 10:17:15 +0000 (UTC) (envelope-from marius.nuennerich@gmx.de) Received: (qmail invoked by alias); 28 Sep 2007 10:17:14 -0000 Received: from f048043250.adsl.alicedsl.de (EHLO sol.hackerzberg.local) [78.48.43.250] by mail.gmx.net (mp002) with SMTP; 28 Sep 2007 12:17:14 +0200 X-Authenticated: #5707313 X-Provags-ID: V01U2FsdGVkX1/1RuR+EVz1WtmQFFiknykzLKZMvEi2EjwS/cdbsu LLHhrb/ZqVnBI0 Date: Fri, 28 Sep 2007 12:17:20 +0200 From: Marius Nuennerich To: freebsd-arm@freebsd.org Message-ID: <20070928121720.22823a58@sol.hackerzberg.local> In-Reply-To: <20070928102332.GA23400@ci0.org> References: <20070928011740.01026dcd@sol.hackerzberg.local> <200709272351.l8RNp0pn066924@casselton.net> <20070928113044.4a2dcdac@sol.hackerzberg.local> <20070928102332.GA23400@ci0.org> X-Mailer: Claws Mail 2.9.1 (GTK+ 2.10.12; i386-portbld-freebsd6.1) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-Y-GMX-Trusted: 0 Subject: FreeBSD and qemu-neo1973 (was: Re: Comment bug in locore.S?) X-BeenThere: freebsd-arm@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Porting FreeBSD to the StrongARM Processor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 28 Sep 2007 10:17:16 -0000 On Fri, 28 Sep 2007 12:23:32 +0200 Olivier Houchard wrote: > On Fri, Sep 28, 2007 at 11:30:44AM +0200, Marius Nuennerich wrote: > > On Thu, 27 Sep 2007 18:51:00 -0500 (CDT) > > Mark Tinguely wrote: > > > > > > > > How about saving the jump address in another register also before the jump: > > > > > > ldr r10, .Lvirt_done > > > ldr pc, .Lvirt_done > > > > I tried this but used r9, anyway the register isn't used otherwise and > > it's contents is R09=c00002a4 after qemu crashes. Is it possible that > > this would be the right address if the kernel would start at 0x30000000 > > and not on 0x30008000 physical address? > > Ah good point. KERNVIRTADDR should be 0xc0008000, not 0xc0000000. > As we're mapping it with sections, we don't have enough granularity to map it > to 0xc0000000. OK, I changed KERNVIRTADDR in the kernel config. qemu still crashes with qemu: fatal: Trying to execute code outside RAM or ROM at 0xc00082ac which should be mapped. But now it doesn't print an A as the last letter over serial line, it's an f. What I don't understand is the the jump to 0xc00082a4 seems to be OK now but a few instructions later it goes boom. Maybe this is the strb instruction for printing chars. Could it be that this won't work after jumping to 0xc... ? Why does the printing of f still work before the ldr? Is there a description available what KERNVIRTADDR, KERNPHYSADDR, PHYSADDR, KERNBASE, et al. mean?