From owner-freebsd-arm@FreeBSD.ORG Thu Sep 27 15:18:19 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 78ACB16A419 for ; Thu, 27 Sep 2007 15:18:19 +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 BE28F13C455 for ; Thu, 27 Sep 2007 15:18:18 +0000 (UTC) (envelope-from marius.nuennerich@gmx.de) Received: (qmail invoked by alias); 27 Sep 2007 15:18:16 -0000 Received: from f049170050.adsl.alicedsl.de (EHLO sol.hackerzberg.local) [78.49.170.50] by mail.gmx.net (mp032) with SMTP; 27 Sep 2007 17:18:16 +0200 X-Authenticated: #5707313 X-Provags-ID: V01U2FsdGVkX18EqrtP9+YEPnAGDpdrFQQNisNc0hv7UjxJYyHID3 VtDYdGemHXqvGc Date: Thu, 27 Sep 2007 17:18:22 +0200 From: Marius Nuennerich To: freebsd-arm@freebsd.org Message-ID: <20070927171822.0bdec7d9@sol.hackerzberg.local> 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: 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: Thu, 27 Sep 2007 15:18:19 -0000 Hi all, I'm still trying to boot FreeBSD on the neo1973. So far I managed to put bytes over the serial console so I can see where I am. At the moment the (virtual) machine crashes in locore.S (1.16) line 170: ldr pc, .Lvirt_done qemu: fatal: Trying to execute code outside RAM or ROM at 0xc0008??? Which I don't understand because the section should be mapped by the MMU to 0x30008??? at that time. In line 137 the sequence in the comment is described as /* # of sections, PA|attr, VA */ but in line 185 the order is n_sec, VA, PA|attr Is the comment wrong? Any idea why the mapping doesn't work? I needed to map the uart with MMU_INIT(0x50000000, 0x50000000, 1, L1_TYPE_S|L1_S_AP(AP_KRW)) which worked (I can still put chars after the mmu gets enabled). Kind regards Marius From owner-freebsd-arm@FreeBSD.ORG Thu Sep 27 16:21:04 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 E2A3F16A417 for ; Thu, 27 Sep 2007 16:21:04 +0000 (UTC) (envelope-from mlfbsd@dong.ci0.org) Received: from dong.ci0.org (dong.ci0.org [IPv6:2001:7a8:2066:1::1]) by mx1.freebsd.org (Postfix) with ESMTP id 07DDD13C45D for ; Thu, 27 Sep 2007 16:21:03 +0000 (UTC) (envelope-from mlfbsd@dong.ci0.org) Received: from dong.ci0.org (localhost.ci0.org [127.0.0.1]) by dong.ci0.org (8.13.8/8.13.8) with ESMTP id l8RH3e0M011641; Thu, 27 Sep 2007 19:03:41 +0200 (CEST) (envelope-from mlfbsd@dong.ci0.org) Received: (from mlfbsd@localhost) by dong.ci0.org (8.14.1/8.13.8/Submit) id l8RH3epU011640; Thu, 27 Sep 2007 19:03:40 +0200 (CEST) (envelope-from mlfbsd) Date: Thu, 27 Sep 2007 19:03:39 +0200 From: Olivier Houchard To: Marius Nuennerich Message-ID: <20070927170339.GA11021@ci0.org> References: <20070927171822.0bdec7d9@sol.hackerzberg.local> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20070927171822.0bdec7d9@sol.hackerzberg.local> User-Agent: Mutt/1.4.1i Cc: freebsd-arm@freebsd.org Subject: 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: Thu, 27 Sep 2007 16:21:05 -0000 On Thu, Sep 27, 2007 at 05:18:22PM +0200, Marius Nuennerich wrote: > Hi all, > Hi Marius, > I'm still trying to boot FreeBSD on the neo1973. So far I managed to > put bytes over the serial console so I can see where I am. At the > moment the (virtual) machine crashes in locore.S (1.16) line 170: > ldr pc, .Lvirt_done > > qemu: fatal: Trying to execute code outside RAM or ROM at 0xc0008??? > > Which I don't understand because the section should be mapped by the > MMU to 0x30008??? at that time. > > In line 137 the sequence in the comment is described as > /* # of sections, PA|attr, VA */ > but in line 185 the order is > n_sec, VA, PA|attr > > Is the comment wrong? > No the comment is right, 0xc0000000 should be mapped. Did you define STARTUP_PAGETABLE_ADDR ? It's not marked as such, but it is mandatory now. > Any idea why the mapping doesn't work? > I needed to map the uart with > MMU_INIT(0x50000000, 0x50000000, 1, L1_TYPE_S|L1_S_AP(AP_KRW)) > which worked (I can still put chars after the mmu gets enabled). > > > Kind regards > Marius Regards, Olivier From owner-freebsd-arm@FreeBSD.ORG Thu Sep 27 16:30:26 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 8E84616A418 for ; Thu, 27 Sep 2007 16:30:26 +0000 (UTC) (envelope-from tinguely@casselton.net) Received: from casselton.net (casselton.net [63.165.140.2]) by mx1.freebsd.org (Postfix) with ESMTP id 28FA713C467 for ; Thu, 27 Sep 2007 16:30:26 +0000 (UTC) (envelope-from tinguely@casselton.net) Received: from casselton.net (localhost [127.0.0.1]) by casselton.net (8.13.8/8.13.8) with ESMTP id l8RGULUV032253; Thu, 27 Sep 2007 11:30:21 -0500 (CDT) (envelope-from tinguely@casselton.net) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=casselton.net; s=ccnMail; t=1190910621; bh=ouXpMATADCrg9kmGLIjBFWLA03eNNa2YKKt5iUq s4vQ=; h=Received:Date:From:Message-Id:To:Subject:Cc:In-Reply-To; b=URI7iZ5w8rtKWBpevix3RSc+zzE293xKSQwdOXSvZWUniM5uZ1cK+wLE5e8dALGDa ykuINPQM90by2D7k6JJW3rfZ70fh0DwcX26rmWFNTC7RtaWX7YqsSyLitQ/g1hgKxnz LqRUkpkCWjOB6dOuiek/0UgwifNmxgZVjM2qlSg= Received: (from tinguely@localhost) by casselton.net (8.13.8/8.13.8/Submit) id l8RGULjE032252; Thu, 27 Sep 2007 11:30:21 -0500 (CDT) (envelope-from tinguely) Date: Thu, 27 Sep 2007 11:30:21 -0500 (CDT) From: Mark Tinguely Message-Id: <200709271630.l8RGULjE032252@casselton.net> To: marius.nuennerich@gmx.de, mlfbsd@ci0.org In-Reply-To: <20070927170339.GA11021@ci0.org> Cc: freebsd-arm@freebsd.org Subject: 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: Thu, 27 Sep 2007 16:30:26 -0000 I would have guessed that line 137 comment is wrong. 137: ldmia r4!, {r1,r2,r3} /* # of sections, PA|attr, VA */ (2b loop) 131: str r3, [r0, r2] Where r0 is the startup page table, r2 is the VA offset into table and r3 is the PA|attr to be put in the table. --Mark Tinguely From owner-freebsd-arm@FreeBSD.ORG Thu Sep 27 20:41:29 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 345BB16A41A for ; Thu, 27 Sep 2007 20:41:29 +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 6F30913C48E for ; Thu, 27 Sep 2007 20:41:28 +0000 (UTC) (envelope-from marius.nuennerich@gmx.de) Received: (qmail invoked by alias); 27 Sep 2007 20:41:26 -0000 Received: from f049170050.adsl.alicedsl.de (EHLO sol.hackerzberg.local) [78.49.170.50] by mail.gmx.net (mp055) with SMTP; 27 Sep 2007 22:41:26 +0200 X-Authenticated: #5707313 X-Provags-ID: V01U2FsdGVkX1+fVTtyTfyfcdGLan11GkFHpKKTM2+jNG1tUyoo0I HXl3DlTuE+trFw Date: Thu, 27 Sep 2007 22:41:33 +0200 From: Marius Nuennerich To: freebsd-arm@freebsd.org Message-ID: <20070927224133.5fc9b24f@sol.hackerzberg.local> In-Reply-To: <20070927170339.GA11021@ci0.org> References: <20070927171822.0bdec7d9@sol.hackerzberg.local> <20070927170339.GA11021@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: 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: Thu, 27 Sep 2007 20:41:29 -0000 On Thu, 27 Sep 2007 19:03:39 +0200 Olivier Houchard wrote: > On Thu, Sep 27, 2007 at 05:18:22PM +0200, Marius Nuennerich wrote: > > Hi all, > > > > Hi Marius, > > > I'm still trying to boot FreeBSD on the neo1973. So far I managed to > > put bytes over the serial console so I can see where I am. At the > > moment the (virtual) machine crashes in locore.S (1.16) line 170: > > ldr pc, .Lvirt_done > > > > qemu: fatal: Trying to execute code outside RAM or ROM at 0xc0008??? > > > > Which I don't understand because the section should be mapped by the > > MMU to 0x30008??? at that time. > > > > In line 137 the sequence in the comment is described as > > /* # of sections, PA|attr, VA */ > > but in line 185 the order is > > n_sec, VA, PA|attr > > > > Is the comment wrong? > > > > No the comment is right, 0xc0000000 should be mapped. > Did you define STARTUP_PAGETABLE_ADDR ? It's not marked as such, but it is > mandatory now. Yes, in the kernel config there are these lines: makeoptions KERNPHYSADDR=0x30008000 makeoptions KERNVIRTADDR=0xc0000000 options KERNPHYSADDR=0x30008000 options KERNVIRTADDR=0xc0000000 options PHYSADDR=0x30000000 options STARTUP_PAGETABLE_ADDR=0x30800000 It's from Andrew Turners config file which he posted on http://wiki.openmoko.org/wiki/FreeBSD in the tarball. From owner-freebsd-arm@FreeBSD.ORG Thu Sep 27 20:42:36 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 3164616A418 for ; Thu, 27 Sep 2007 20:42:36 +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 65C3A13C478 for ; Thu, 27 Sep 2007 20:42:35 +0000 (UTC) (envelope-from marius.nuennerich@gmx.de) Received: (qmail invoked by alias); 27 Sep 2007 20:42:34 -0000 Received: from f049170050.adsl.alicedsl.de (EHLO sol.hackerzberg.local) [78.49.170.50] by mail.gmx.net (mp026) with SMTP; 27 Sep 2007 22:42:34 +0200 X-Authenticated: #5707313 X-Provags-ID: V01U2FsdGVkX18GGwh9YRwGk4YhzJ8QVB9hYTUXmtiYezVyYMG47u 4NiXd+ckVwX+1X Date: Thu, 27 Sep 2007 22:42:41 +0200 From: Marius Nuennerich To: freebsd-arm@freebsd.org Message-ID: <20070927224241.69ea49fa@sol.hackerzberg.local> In-Reply-To: <200709271630.l8RGULjE032252@casselton.net> References: <20070927170339.GA11021@ci0.org> <200709271630.l8RGULjE032252@casselton.net> 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: 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: Thu, 27 Sep 2007 20:42:36 -0000 On Thu, 27 Sep 2007 11:30:21 -0500 (CDT) Mark Tinguely wrote: > > I would have guessed that line 137 comment is wrong. > > 137: ldmia r4!, {r1,r2,r3} /* # of sections, PA|attr, VA */ > > (2b loop) > 131: str r3, [r0, r2] > > Where r0 is the startup page table, r2 is the VA offset into table and > r3 is the PA|attr to be put in the table. So is my understanding. As is the order of values on line 185. From owner-freebsd-arm@FreeBSD.ORG Thu Sep 27 20:49:14 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 6934E16A418 for ; Thu, 27 Sep 2007 20:49:14 +0000 (UTC) (envelope-from mlfbsd@dong.ci0.org) Received: from dong.ci0.org (dong.ci0.org [IPv6:2001:7a8:2066:1::1]) by mx1.freebsd.org (Postfix) with ESMTP id 81F3013C45A for ; Thu, 27 Sep 2007 20:49:13 +0000 (UTC) (envelope-from mlfbsd@dong.ci0.org) Received: from dong.ci0.org (localhost.ci0.org [127.0.0.1]) by dong.ci0.org (8.13.8/8.13.8) with ESMTP id l8RLVsYf015685; Thu, 27 Sep 2007 23:31:55 +0200 (CEST) (envelope-from mlfbsd@dong.ci0.org) Received: (from mlfbsd@localhost) by dong.ci0.org (8.14.1/8.13.8/Submit) id l8RLVsDp015684; Thu, 27 Sep 2007 23:31:54 +0200 (CEST) (envelope-from mlfbsd) Date: Thu, 27 Sep 2007 23:31:54 +0200 From: Olivier Houchard To: Marius Nuennerich Message-ID: <20070927213154.GA15654@ci0.org> References: <20070927170339.GA11021@ci0.org> <200709271630.l8RGULjE032252@casselton.net> <20070927224241.69ea49fa@sol.hackerzberg.local> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20070927224241.69ea49fa@sol.hackerzberg.local> User-Agent: Mutt/1.4.1i Cc: freebsd-arm@freebsd.org Subject: 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: Thu, 27 Sep 2007 20:49:14 -0000 On Thu, Sep 27, 2007 at 10:42:41PM +0200, Marius Nuennerich wrote: > On Thu, 27 Sep 2007 11:30:21 -0500 (CDT) > Mark Tinguely wrote: > > > > > I would have guessed that line 137 comment is wrong. > > > > 137: ldmia r4!, {r1,r2,r3} /* # of sections, PA|attr, VA */ > > > > (2b loop) > > 131: str r3, [r0, r2] > > > > Where r0 is the startup page table, r2 is the VA offset into table and > > r3 is the PA|attr to be put in the table. > > So is my understanding. As is the order of values on line 185. Fair enough, the comment is wrong, I'll fix it. Thanks ! Olivier From owner-freebsd-arm@FreeBSD.ORG Thu Sep 27 20:54: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 313C816A47A for ; Thu, 27 Sep 2007 20:54: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 69EFF13C45A for ; Thu, 27 Sep 2007 20:54:15 +0000 (UTC) (envelope-from marius.nuennerich@gmx.de) Received: (qmail invoked by alias); 27 Sep 2007 20:54:14 -0000 Received: from f049170050.adsl.alicedsl.de (EHLO sol.hackerzberg.local) [78.49.170.50] by mail.gmx.net (mp045) with SMTP; 27 Sep 2007 22:54:14 +0200 X-Authenticated: #5707313 X-Provags-ID: V01U2FsdGVkX1/WluogTRvW6qhAPei1H3W44YvZ8emNXBrm8qJ+hC 3uGXjrdg9xP0+L Date: Thu, 27 Sep 2007 22:54:21 +0200 From: Marius Nuennerich To: freebsd-arm@freebsd.org Message-ID: <20070927225421.149ef269@sol.hackerzberg.local> In-Reply-To: <20070927213154.GA15654@ci0.org> References: <20070927170339.GA11021@ci0.org> <200709271630.l8RGULjE032252@casselton.net> <20070927224241.69ea49fa@sol.hackerzberg.local> <20070927213154.GA15654@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: 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: Thu, 27 Sep 2007 20:54:16 -0000 On Thu, 27 Sep 2007 23:31:54 +0200 Olivier Houchard wrote: > On Thu, Sep 27, 2007 at 10:42:41PM +0200, Marius Nuennerich wrote: > > On Thu, 27 Sep 2007 11:30:21 -0500 (CDT) > > Mark Tinguely wrote: > > > > > > > > I would have guessed that line 137 comment is wrong. > > > > > > 137: ldmia r4!, {r1,r2,r3} /* # of sections, PA|attr, VA */ > > > > > > (2b loop) > > > 131: str r3, [r0, r2] > > > > > > Where r0 is the startup page table, r2 is the VA offset into table and > > > r3 is the PA|attr to be put in the table. > > > > So is my understanding. As is the order of values on line 185. > > Fair enough, the comment is wrong, I'll fix it. > > Thanks ! Thank _you_ :-) From owner-freebsd-arm@FreeBSD.ORG Thu Sep 27 20:58:59 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 B697716A4A1 for ; Thu, 27 Sep 2007 20:58:59 +0000 (UTC) (envelope-from mlfbsd@dong.ci0.org) Received: from dong.ci0.org (dong.ci0.org [IPv6:2001:7a8:2066:1::1]) by mx1.freebsd.org (Postfix) with ESMTP id B530013C448 for ; Thu, 27 Sep 2007 20:58:58 +0000 (UTC) (envelope-from mlfbsd@dong.ci0.org) Received: from dong.ci0.org (localhost.ci0.org [127.0.0.1]) by dong.ci0.org (8.13.8/8.13.8) with ESMTP id l8RLffAb015812; Thu, 27 Sep 2007 23:41:41 +0200 (CEST) (envelope-from mlfbsd@dong.ci0.org) Received: (from mlfbsd@localhost) by dong.ci0.org (8.14.1/8.13.8/Submit) id l8RLffnF015811; Thu, 27 Sep 2007 23:41:41 +0200 (CEST) (envelope-from mlfbsd) Date: Thu, 27 Sep 2007 23:41:41 +0200 From: Olivier Houchard To: Marius Nuennerich Message-ID: <20070927214141.GB15654@ci0.org> References: <20070927171822.0bdec7d9@sol.hackerzberg.local> <20070927170339.GA11021@ci0.org> <20070927224133.5fc9b24f@sol.hackerzberg.local> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20070927224133.5fc9b24f@sol.hackerzberg.local> User-Agent: Mutt/1.4.1i Cc: freebsd-arm@freebsd.org Subject: 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: Thu, 27 Sep 2007 20:58:59 -0000 On Thu, Sep 27, 2007 at 10:41:33PM +0200, Marius Nuennerich wrote: > On Thu, 27 Sep 2007 19:03:39 +0200 > Olivier Houchard wrote: > > > On Thu, Sep 27, 2007 at 05:18:22PM +0200, Marius Nuennerich wrote: > > > Hi all, > > > > > > > Hi Marius, > > > > > I'm still trying to boot FreeBSD on the neo1973. So far I managed to > > > put bytes over the serial console so I can see where I am. At the > > > moment the (virtual) machine crashes in locore.S (1.16) line 170: > > > ldr pc, .Lvirt_done > > > > > > qemu: fatal: Trying to execute code outside RAM or ROM at 0xc0008??? > > > > > > Which I don't understand because the section should be mapped by the > > > MMU to 0x30008??? at that time. > > > > > > In line 137 the sequence in the comment is described as > > > /* # of sections, PA|attr, VA */ > > > but in line 185 the order is > > > n_sec, VA, PA|attr > > > > > > Is the comment wrong? > > > > > > > No the comment is right, 0xc0000000 should be mapped. > > Did you define STARTUP_PAGETABLE_ADDR ? It's not marked as such, but it is > > mandatory now. > > Yes, in the kernel config there are these lines: > makeoptions KERNPHYSADDR=0x30008000 > makeoptions KERNVIRTADDR=0xc0000000 > options KERNPHYSADDR=0x30008000 > options KERNVIRTADDR=0xc0000000 > options PHYSADDR=0x30000000 > options STARTUP_PAGETABLE_ADDR=0x30800000 > > It's from Andrew Turners config file which he posted on > http://wiki.openmoko.org/wiki/FreeBSD > in the tarball. > Hmmm, I really see no reason why the PA <=> PA mapping would work, but not the VA <=> PA one. I'll try to setup qemu. Can it provide useful informations about its internal state, ie CPU registers, TLB, etc ? Regards, Olivier From owner-freebsd-arm@FreeBSD.ORG Thu Sep 27 21:13:26 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 7698016A41A for ; Thu, 27 Sep 2007 21:13:26 +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 C857E13C4AA for ; Thu, 27 Sep 2007 21:13:25 +0000 (UTC) (envelope-from marius.nuennerich@gmx.de) Received: (qmail invoked by alias); 27 Sep 2007 21:13:24 -0000 Received: from f049170050.adsl.alicedsl.de (EHLO sol.hackerzberg.local) [78.49.170.50] by mail.gmx.net (mp054) with SMTP; 27 Sep 2007 23:13:24 +0200 X-Authenticated: #5707313 X-Provags-ID: V01U2FsdGVkX1+rWyQuY9CrH+6TDSXNdxXZPH1iEJ4w1BI3dBmpkZ q5UuKd1Re5ld1l Date: Thu, 27 Sep 2007 23:13:31 +0200 From: Marius Nuennerich To: freebsd-arm@freebsd.org Message-ID: <20070927231331.5d22bf4a@sol.hackerzberg.local> In-Reply-To: <20070927214141.GB15654@ci0.org> References: <20070927171822.0bdec7d9@sol.hackerzberg.local> <20070927170339.GA11021@ci0.org> <20070927224133.5fc9b24f@sol.hackerzberg.local> <20070927214141.GB15654@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: 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: Thu, 27 Sep 2007 21:13:26 -0000 On Thu, 27 Sep 2007 23:41:41 +0200 Olivier Houchard wrote: > On Thu, Sep 27, 2007 at 10:41:33PM +0200, Marius Nuennerich wrote: > > On Thu, 27 Sep 2007 19:03:39 +0200 > > Olivier Houchard wrote: > > > > > On Thu, Sep 27, 2007 at 05:18:22PM +0200, Marius Nuennerich wrote: > > > > Hi all, > > > > > > > > > > Hi Marius, > > > > > > > I'm still trying to boot FreeBSD on the neo1973. So far I managed to > > > > put bytes over the serial console so I can see where I am. At the > > > > moment the (virtual) machine crashes in locore.S (1.16) line 170: > > > > ldr pc, .Lvirt_done > > > > > > > > qemu: fatal: Trying to execute code outside RAM or ROM at 0xc0008??? > > > > > > > > Which I don't understand because the section should be mapped by the > > > > MMU to 0x30008??? at that time. > > > > > > > > In line 137 the sequence in the comment is described as > > > > /* # of sections, PA|attr, VA */ > > > > but in line 185 the order is > > > > n_sec, VA, PA|attr > > > > > > > > Is the comment wrong? > > > > > > > > > > No the comment is right, 0xc0000000 should be mapped. > > > Did you define STARTUP_PAGETABLE_ADDR ? It's not marked as such, but it is > > > mandatory now. > > > > Yes, in the kernel config there are these lines: > > makeoptions KERNPHYSADDR=0x30008000 > > makeoptions KERNVIRTADDR=0xc0000000 > > options KERNPHYSADDR=0x30008000 > > options KERNVIRTADDR=0xc0000000 > > options PHYSADDR=0x30000000 > > options STARTUP_PAGETABLE_ADDR=0x30800000 > > > > It's from Andrew Turners config file which he posted on > > http://wiki.openmoko.org/wiki/FreeBSD > > in the tarball. > > > > Hmmm, I really see no reason why the PA <=> PA mapping would work, but not > the VA <=> PA one. > I'll try to setup qemu. Can it provide useful informations about its > internal state, ie CPU registers, TLB, etc ? Yes, it looks like this: qemu: fatal: Trying to execute code outside RAM or ROM at 0xc0008030 R00=30800000 R01=c01afdb8 R02=c0000070 R03=00000000 R04=3000824c R05=3000808c R06=00000002 R07=30008050 R08=33f17fdc R09=00000000 R10=00000041 R11=50000020 R12=33f14934 R13=c019b140 R14=33f8b9e8 R15=c0008030 PSR=60000153 -ZC- A svc32 s00=00000000( 0) s01=00000000( 0) d00=0000000000000000( 0) s02=00000000( 0) s03=00000000( 0) d01=0000000000000000( 0) s04=00000000( 0) s05=00000000( 0) d02=0000000000000000( 0) s06=00000000( 0) s07=00000000( 0) d03=0000000000000000( 0) s08=00000000( 0) s09=00000000( 0) d04=0000000000000000( 0) s10=00000000( 0) s11=00000000( 0) d05=0000000000000000( 0) s12=00000000( 0) s13=00000000( 0) d06=0000000000000000( 0) s14=00000000( 0) s15=00000000( 0) d07=0000000000000000( 0) s16=00000000( 0) s17=00000000( 0) d08=0000000000000000( 0) s18=00000000( 0) s19=00000000( 0) d09=0000000000000000( 0) s20=00000000( 0) s21=00000000( 0) d10=0000000000000000( 0) s22=00000000( 0) s23=00000000( 0) d11=0000000000000000( 0) s24=00000000( 0) s25=00000000( 0) d12=0000000000000000( 0) s26=00000000( 0) s27=00000000( 0) d13=0000000000000000( 0) s28=00000000( 0) s29=00000000( 0) d14=0000000000000000( 0) s30=00000000( 0) s31=00000000( 0) d15=0000000000000000( 0) FPSCR: 00000000 Can someone explain to me what the sxx= and dxx= value mean? Regards, Marius From owner-freebsd-arm@FreeBSD.ORG Thu Sep 27 21:27:45 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 E7CE816A417 for ; Thu, 27 Sep 2007 21:27:45 +0000 (UTC) (envelope-from mlfbsd@dong.ci0.org) Received: from dong.ci0.org (dong.ci0.org [IPv6:2001:7a8:2066:1::1]) by mx1.freebsd.org (Postfix) with ESMTP id E7DDB13C457 for ; Thu, 27 Sep 2007 21:27:44 +0000 (UTC) (envelope-from mlfbsd@dong.ci0.org) Received: from dong.ci0.org (localhost.ci0.org [127.0.0.1]) by dong.ci0.org (8.13.8/8.13.8) with ESMTP id l8RMASB5016649; Fri, 28 Sep 2007 00:10:28 +0200 (CEST) (envelope-from mlfbsd@dong.ci0.org) Received: (from mlfbsd@localhost) by dong.ci0.org (8.14.1/8.13.8/Submit) id l8RMARiF016648; Fri, 28 Sep 2007 00:10:27 +0200 (CEST) (envelope-from mlfbsd) Date: Fri, 28 Sep 2007 00:10:27 +0200 From: Olivier Houchard To: Marius Nuennerich Message-ID: <20070927221027.GA16476@ci0.org> References: <20070927171822.0bdec7d9@sol.hackerzberg.local> <20070927170339.GA11021@ci0.org> <20070927224133.5fc9b24f@sol.hackerzberg.local> <20070927214141.GB15654@ci0.org> <20070927231331.5d22bf4a@sol.hackerzberg.local> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20070927231331.5d22bf4a@sol.hackerzberg.local> User-Agent: Mutt/1.4.1i Cc: freebsd-arm@freebsd.org Subject: 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: Thu, 27 Sep 2007 21:27:46 -0000 On Thu, Sep 27, 2007 at 11:13:31PM +0200, Marius Nuennerich wrote: > On Thu, 27 Sep 2007 23:41:41 +0200 > Olivier Houchard wrote: > > > On Thu, Sep 27, 2007 at 10:41:33PM +0200, Marius Nuennerich wrote: > > > On Thu, 27 Sep 2007 19:03:39 +0200 > > > Olivier Houchard wrote: > > > > > > > On Thu, Sep 27, 2007 at 05:18:22PM +0200, Marius Nuennerich wrote: > > > > > Hi all, > > > > > > > > > > > > > Hi Marius, > > > > > > > > > I'm still trying to boot FreeBSD on the neo1973. So far I managed to > > > > > put bytes over the serial console so I can see where I am. At the > > > > > moment the (virtual) machine crashes in locore.S (1.16) line 170: > > > > > ldr pc, .Lvirt_done > > > > > > > > > > qemu: fatal: Trying to execute code outside RAM or ROM at 0xc0008??? > > > > > > > > > > Which I don't understand because the section should be mapped by the > > > > > MMU to 0x30008??? at that time. > > > > > > > > > > In line 137 the sequence in the comment is described as > > > > > /* # of sections, PA|attr, VA */ > > > > > but in line 185 the order is > > > > > n_sec, VA, PA|attr > > > > > > > > > > Is the comment wrong? > > > > > > > > > > > > > No the comment is right, 0xc0000000 should be mapped. > > > > Did you define STARTUP_PAGETABLE_ADDR ? It's not marked as such, but it is > > > > mandatory now. > > > > > > Yes, in the kernel config there are these lines: > > > makeoptions KERNPHYSADDR=0x30008000 > > > makeoptions KERNVIRTADDR=0xc0000000 > > > options KERNPHYSADDR=0x30008000 > > > options KERNVIRTADDR=0xc0000000 > > > options PHYSADDR=0x30000000 > > > options STARTUP_PAGETABLE_ADDR=0x30800000 > > > > > > It's from Andrew Turners config file which he posted on > > > http://wiki.openmoko.org/wiki/FreeBSD > > > in the tarball. > > > > > > > Hmmm, I really see no reason why the PA <=> PA mapping would work, but not > > the VA <=> PA one. > > I'll try to setup qemu. Can it provide useful informations about its > > internal state, ie CPU registers, TLB, etc ? > > Yes, it looks like this: > qemu: fatal: Trying to execute code outside RAM or ROM at 0xc0008030 > > R00=30800000 R01=c01afdb8 R02=c0000070 R03=00000000 > R04=3000824c R05=3000808c R06=00000002 R07=30008050 > R08=33f17fdc R09=00000000 R10=00000041 R11=50000020 > R12=33f14934 R13=c019b140 R14=33f8b9e8 R15=c0008030 > PSR=60000153 -ZC- A svc32 There's something I seriously miss. At this point, r2 should be 0 : ldmia r1, {r1, r2, sp} /* Set initial stack and */ sub r2, r2, r1 /* get zero init data */ mov r3, #0 .L1: str r3, [r1], #0x0004 /* get zero init data */ subs r2, r2, #4 bgt .L1 ldr pc, .Lvirt_done And not 0xc0000070 What are the values of _edata and _end ? If you've been able to do all those stores, the mapping should work anyway, I'm really confused. > s00=00000000( 0) s01=00000000( 0) > d00=0000000000000000( 0) s02=00000000( 0) > s03=00000000( 0) d01=0000000000000000( 0) > s04=00000000( 0) s05=00000000( 0) > d02=0000000000000000( 0) s06=00000000( 0) > s07=00000000( 0) d03=0000000000000000( 0) > s08=00000000( 0) s09=00000000( 0) > d04=0000000000000000( 0) s10=00000000( 0) > s11=00000000( 0) d05=0000000000000000( 0) > s12=00000000( 0) s13=00000000( 0) > d06=0000000000000000( 0) s14=00000000( 0) > s15=00000000( 0) d07=0000000000000000( 0) > s16=00000000( 0) s17=00000000( 0) > d08=0000000000000000( 0) s18=00000000( 0) > s19=00000000( 0) d09=0000000000000000( 0) > s20=00000000( 0) s21=00000000( 0) > d10=0000000000000000( 0) s22=00000000( 0) > s23=00000000( 0) d11=0000000000000000( 0) > s24=00000000( 0) s25=00000000( 0) > d12=0000000000000000( 0) s26=00000000( 0) > s27=00000000( 0) d13=0000000000000000( 0) > s28=00000000( 0) s29=00000000( 0) > d14=0000000000000000( 0) s30=00000000( 0) > s31=00000000( 0) d15=0000000000000000( 0) > FPSCR: 00000000 > > Can someone explain to me what the sxx= and dxx= value mean? > No clue, sorry. Regards, Olivier From owner-freebsd-arm@FreeBSD.ORG Thu Sep 27 21:40:30 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 9C5CD16A41B for ; Thu, 27 Sep 2007 21:40:30 +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 EC7F113C46E for ; Thu, 27 Sep 2007 21:40:29 +0000 (UTC) (envelope-from marius.nuennerich@gmx.de) Received: (qmail invoked by alias); 27 Sep 2007 21:40:29 -0000 Received: from f049170050.adsl.alicedsl.de (EHLO sol.hackerzberg.local) [78.49.170.50] by mail.gmx.net (mp033) with SMTP; 27 Sep 2007 23:40:29 +0200 X-Authenticated: #5707313 X-Provags-ID: V01U2FsdGVkX1/O8axqUKnOvR1zFmqn4yH4ABwAb+OEHLYed2WUUJ zUuYj0ToYq1yBy Date: Thu, 27 Sep 2007 23:40:36 +0200 From: Marius Nuennerich To: freebsd-arm@freebsd.org Message-ID: <20070927234036.58401eb2@sol.hackerzberg.local> In-Reply-To: <20070927221027.GA16476@ci0.org> References: <20070927171822.0bdec7d9@sol.hackerzberg.local> <20070927170339.GA11021@ci0.org> <20070927224133.5fc9b24f@sol.hackerzberg.local> <20070927214141.GB15654@ci0.org> <20070927231331.5d22bf4a@sol.hackerzberg.local> <20070927221027.GA16476@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: 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: Thu, 27 Sep 2007 21:40:30 -0000 On Fri, 28 Sep 2007 00:10:27 +0200 Olivier Houchard wrote: > On Thu, Sep 27, 2007 at 11:13:31PM +0200, Marius Nuennerich wrote: > > On Thu, 27 Sep 2007 23:41:41 +0200 > > Olivier Houchard wrote: > > > > > On Thu, Sep 27, 2007 at 10:41:33PM +0200, Marius Nuennerich wrote: > > > > On Thu, 27 Sep 2007 19:03:39 +0200 > > > > Olivier Houchard wrote: > > > > > > > > > On Thu, Sep 27, 2007 at 05:18:22PM +0200, Marius Nuennerich wrote: > > > > > > Hi all, > > > > > > > > > > > > > > > > Hi Marius, > > > > > > > > > > > I'm still trying to boot FreeBSD on the neo1973. So far I managed to > > > > > > put bytes over the serial console so I can see where I am. At the > > > > > > moment the (virtual) machine crashes in locore.S (1.16) line 170: > > > > > > ldr pc, .Lvirt_done > > > > > > > > > > > > qemu: fatal: Trying to execute code outside RAM or ROM at 0xc0008??? > > > > > > > > > > > > Which I don't understand because the section should be mapped by the > > > > > > MMU to 0x30008??? at that time. > > > > > > > > > > > > In line 137 the sequence in the comment is described as > > > > > > /* # of sections, PA|attr, VA */ > > > > > > but in line 185 the order is > > > > > > n_sec, VA, PA|attr > > > > > > > > > > > > Is the comment wrong? > > > > > > > > > > > > > > > > No the comment is right, 0xc0000000 should be mapped. > > > > > Did you define STARTUP_PAGETABLE_ADDR ? It's not marked as such, but it is > > > > > mandatory now. > > > > > > > > Yes, in the kernel config there are these lines: > > > > makeoptions KERNPHYSADDR=0x30008000 > > > > makeoptions KERNVIRTADDR=0xc0000000 > > > > options KERNPHYSADDR=0x30008000 > > > > options KERNVIRTADDR=0xc0000000 > > > > options PHYSADDR=0x30000000 > > > > options STARTUP_PAGETABLE_ADDR=0x30800000 > > > > > > > > It's from Andrew Turners config file which he posted on > > > > http://wiki.openmoko.org/wiki/FreeBSD > > > > in the tarball. > > > > > > > > > > Hmmm, I really see no reason why the PA <=> PA mapping would work, but not > > > the VA <=> PA one. > > > I'll try to setup qemu. Can it provide useful informations about its > > > internal state, ie CPU registers, TLB, etc ? > > > > Yes, it looks like this: > > qemu: fatal: Trying to execute code outside RAM or ROM at 0xc0008030 > > > > R00=30800000 R01=c01afdb8 R02=c0000070 R03=00000000 > > R04=3000824c R05=3000808c R06=00000002 R07=30008050 > > R08=33f17fdc R09=00000000 R10=00000041 R11=50000020 > > R12=33f14934 R13=c019b140 R14=33f8b9e8 R15=c0008030 > > PSR=60000153 -ZC- A svc32 > > There's something I seriously miss. At this point, r2 should be 0 : > ldmia r1, {r1, r2, sp} /* Set initial stack and */ > sub r2, r2, r1 /* get zero init data */ > mov r3, #0 > .L1: > str r3, [r1], #0x0004 /* get zero init data */ > subs r2, r2, #4 > bgt .L1 > ldr pc, .Lvirt_done > > And not 0xc0000070 > What are the values of _edata and _end ? I don't know. How can I find out or where are they defined? > If you've been able to do all those stores, the mapping should work anyway, Yes, I had a char output over serial line in the .L1 loop and an output right after the loop. I saw both. > I'm really confused. > > > s00=00000000( 0) s01=00000000( 0) > > d00=0000000000000000( 0) s02=00000000( 0) > > s03=00000000( 0) d01=0000000000000000( 0) > > s04=00000000( 0) s05=00000000( 0) > > d02=0000000000000000( 0) s06=00000000( 0) > > s07=00000000( 0) d03=0000000000000000( 0) > > s08=00000000( 0) s09=00000000( 0) > > d04=0000000000000000( 0) s10=00000000( 0) > > s11=00000000( 0) d05=0000000000000000( 0) > > s12=00000000( 0) s13=00000000( 0) > > d06=0000000000000000( 0) s14=00000000( 0) > > s15=00000000( 0) d07=0000000000000000( 0) > > s16=00000000( 0) s17=00000000( 0) > > d08=0000000000000000( 0) s18=00000000( 0) > > s19=00000000( 0) d09=0000000000000000( 0) > > s20=00000000( 0) s21=00000000( 0) > > d10=0000000000000000( 0) s22=00000000( 0) > > s23=00000000( 0) d11=0000000000000000( 0) > > s24=00000000( 0) s25=00000000( 0) > > d12=0000000000000000( 0) s26=00000000( 0) > > s27=00000000( 0) d13=0000000000000000( 0) > > s28=00000000( 0) s29=00000000( 0) > > d14=0000000000000000( 0) s30=00000000( 0) > > s31=00000000( 0) d15=0000000000000000( 0) > > FPSCR: 00000000 > > > > Can someone explain to me what the sxx= and dxx= value mean? > > > > No clue, sorry. > > Regards, > > Olivier > _______________________________________________ > freebsd-arm@freebsd.org mailing list > http://lists.freebsd.org/mailman/listinfo/freebsd-arm > To unsubscribe, send any mail to "freebsd-arm-unsubscribe@freebsd.org" From owner-freebsd-arm@FreeBSD.ORG Thu Sep 27 21:46:28 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 B07D516A41A for ; Thu, 27 Sep 2007 21:46:28 +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 B72BD13C461 for ; Thu, 27 Sep 2007 21:46:27 +0000 (UTC) (envelope-from marius.nuennerich@gmx.de) Received: (qmail invoked by alias); 27 Sep 2007 21:46:26 -0000 Received: from f049170050.adsl.alicedsl.de (EHLO sol.hackerzberg.local) [78.49.170.50] by mail.gmx.net (mp047) with SMTP; 27 Sep 2007 23:46:26 +0200 X-Authenticated: #5707313 X-Provags-ID: V01U2FsdGVkX18m+W8DudEm7XCMUQLV6uxsijF3yW/Ntcy5AUXOEq +KzqzEzmYMUnft Date: Thu, 27 Sep 2007 23:46:33 +0200 From: Marius Nuennerich To: freebsd-arm@freebsd.org Message-ID: <20070927234633.50c1789d@sol.hackerzberg.local> In-Reply-To: <20070927221027.GA16476@ci0.org> References: <20070927171822.0bdec7d9@sol.hackerzberg.local> <20070927170339.GA11021@ci0.org> <20070927224133.5fc9b24f@sol.hackerzberg.local> <20070927214141.GB15654@ci0.org> <20070927231331.5d22bf4a@sol.hackerzberg.local> <20070927221027.GA16476@ci0.org> X-Mailer: Claws Mail 2.9.1 (GTK+ 2.10.12; i386-portbld-freebsd6.1) Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="MP_yNwvVYRlL_INXBJL=K=zM_g" X-Y-GMX-Trusted: 0 Subject: 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: Thu, 27 Sep 2007 21:46:28 -0000 --MP_yNwvVYRlL_INXBJL=K=zM_g Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Content-Disposition: inline On Fri, 28 Sep 2007 00:10:27 +0200 Olivier Houchard wrote: > On Thu, Sep 27, 2007 at 11:13:31PM +0200, Marius Nuennerich wrote: > > On Thu, 27 Sep 2007 23:41:41 +0200 > > Olivier Houchard wrote: > > > > > On Thu, Sep 27, 2007 at 10:41:33PM +0200, Marius Nuennerich wrote: > > > > On Thu, 27 Sep 2007 19:03:39 +0200 > > > > Olivier Houchard wrote: > > > > > > > > > On Thu, Sep 27, 2007 at 05:18:22PM +0200, Marius Nuennerich wrote: > > > > > > Hi all, > > > > > > > > > > > > > > > > Hi Marius, > > > > > > > > > > > I'm still trying to boot FreeBSD on the neo1973. So far I managed to > > > > > > put bytes over the serial console so I can see where I am. At the > > > > > > moment the (virtual) machine crashes in locore.S (1.16) line 170: > > > > > > ldr pc, .Lvirt_done > > > > > > > > > > > > qemu: fatal: Trying to execute code outside RAM or ROM at 0xc0008??? > > > > > > > > > > > > Which I don't understand because the section should be mapped by the > > > > > > MMU to 0x30008??? at that time. > > > > > > > > > > > > In line 137 the sequence in the comment is described as > > > > > > /* # of sections, PA|attr, VA */ > > > > > > but in line 185 the order is > > > > > > n_sec, VA, PA|attr > > > > > > > > > > > > Is the comment wrong? > > > > > > > > > > > > > > > > No the comment is right, 0xc0000000 should be mapped. > > > > > Did you define STARTUP_PAGETABLE_ADDR ? It's not marked as such, but it is > > > > > mandatory now. > > > > > > > > Yes, in the kernel config there are these lines: > > > > makeoptions KERNPHYSADDR=0x30008000 > > > > makeoptions KERNVIRTADDR=0xc0000000 > > > > options KERNPHYSADDR=0x30008000 > > > > options KERNVIRTADDR=0xc0000000 > > > > options PHYSADDR=0x30000000 > > > > options STARTUP_PAGETABLE_ADDR=0x30800000 > > > > > > > > It's from Andrew Turners config file which he posted on > > > > http://wiki.openmoko.org/wiki/FreeBSD > > > > in the tarball. > > > > > > > > > > Hmmm, I really see no reason why the PA <=> PA mapping would work, but not > > > the VA <=> PA one. > > > I'll try to setup qemu. Can it provide useful informations about its > > > internal state, ie CPU registers, TLB, etc ? > > > > Yes, it looks like this: > > qemu: fatal: Trying to execute code outside RAM or ROM at 0xc0008030 > > > > R00=30800000 R01=c01afdb8 R02=c0000070 R03=00000000 > > R04=3000824c R05=3000808c R06=00000002 R07=30008050 > > R08=33f17fdc R09=00000000 R10=00000041 R11=50000020 > > R12=33f14934 R13=c019b140 R14=33f8b9e8 R15=c0008030 > > PSR=60000153 -ZC- A svc32 > > There's something I seriously miss. At this point, r2 should be 0 : > ldmia r1, {r1, r2, sp} /* Set initial stack and */ > sub r2, r2, r1 /* get zero init data */ > mov r3, #0 > .L1: > str r3, [r1], #0x0004 /* get zero init data */ > subs r2, r2, #4 > bgt .L1 > ldr pc, .Lvirt_done > > And not 0xc0000070 > What are the values of _edata and _end ? > If you've been able to do all those stores, the mapping should work anyway, > I'm really confused. I'm sorry, I just realized that it doesn't crash right there. My debug ouput on serial line is ACDFFFGabcdeHIfA which indicates that it does jump but to an address before line 110. I attach my modified locore.S hopefully it won't get scrubbed. --MP_yNwvVYRlL_INXBJL=K=zM_g Content-Type: text/plain; name=locore.S.txt Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename=locore.S.txt /* $NetBSD: locore.S,v 1.14 2003/04/20 16:21:40 thorpej Exp $ */ /*- * Copyright (C) 1994-1997 Mark Brinicombe * Copyright (C) 1994 Brini * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * 3. All advertising materials mentioning features or use of this software * must display the following acknowledgement: * This product includes software developed by Brini. * 4. The name of Brini may not be used to endorse or promote products * derived from this software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY BRINI ``AS IS'' AND ANY EXPRESS OR * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. * IN NO EVENT SHALL BRINI BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; * OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * */ #include "assym.s" #include #include #include #include __FBSDID("$FreeBSD: src/sys/arm/arm/locore.S,v 1.16 2007/02/26 02:03:48 cognet Exp $"); /* What size should this really be ? It is only used by initarm() */ #define INIT_ARM_STACK_SIZE 2048 /* * This is for kvm_mkdb, and should be the address of the beginning * of the kernel text segment (not necessarily the same as kernbase). */ #define CPWAIT_BRANCH \ sub pc, pc, #4 #define CPWAIT(tmp) \ mrc p15, 0, tmp, c2, c0, 0 /* arbitrary read of CP15 */ ;\ mov tmp, tmp /* wait for it to complete */ ;\ CPWAIT_BRANCH /* branch to next insn */ #define PRINT(char) \ mov r11, #0x50000000 ;\ add r11, r11, #32 ;\ mov r10, ##char ;\ strb r10, [r11] .text .align 0 .globl kernbase .set kernbase,KERNBASE .globl physaddr .set physaddr,PHYSADDR ENTRY_NP(btext) ASENTRY_NP(_start) #if defined (FLASHADDR) && defined(LOADERRAMADDR) /* Check if we're running from flash. */ ldr r7, =FLASHADDR /* * If we're running with MMU disabled, test against the * physical address instead. */ mrc p15, 0, r2, c1, c0, 0 ands r2, r2, #CPU_CONTROL_MMU_ENABLE ldreq r8, =PHYSADDR ldrne r8, =LOADERRAMADDR cmp r7, r8 bls flash_lower cmp r7, pc bhi from_ram b do_copy flash_lower: cmp r8, pc bls from_ram do_copy: ldr r9, =KERNBASE adr r1, _start ldr r0, Lreal_start ldr r2, Lend sub r2, r2, r0 sub r0, r0, r9 add r0, r0, r8 mov r4, r0 bl memcpy ldr r0, Lram_offset add pc, r4, r0 Lram_offset: .word from_ram-_C_LABEL(_start) from_ram: nop #endif adr r7, Lunmapped bic r7, r7, #0xff000000 orr r7, r7, #PHYSADDR PRINT(#'A') disable_mmu: /* Disable MMU for a while */ mrc p15, 0, r2, c1, c0, 0 bic r2, r2, #(CPU_CONTROL_MMU_ENABLE | CPU_CONTROL_DC_ENABLE |\ CPU_CONTROL_WBUF_ENABLE) bic r2, r2, #(CPU_CONTROL_IC_ENABLE) bic r2, r2, #(CPU_CONTROL_BPRD_ENABLE) mcr p15, 0, r2, c1, c0, 0 nop nop nop mov pc, r7 PRINT(#'B') Lunmapped: PRINT(#'C') #ifdef STARTUP_PAGETABLE_ADDR PRINT(#'D') /* build page table from scratch */ ldr r0, Lstartup_pagetable adr r4, mmu_init_table b 3f PRINT(#'E') 2: str r3, [r0, r2] add r2, r2, #4 add r3, r3, #(L1_S_SIZE) adds r1, r1, #-1 bhi 2b PRINT(#'F') 3: ldmia r4!, {r1,r2,r3} /* # of sections, PA|attr, VA */ cmp r1, #0 adrne r5, 2b bicne r5, r5, #0xff000000 orrne r5, r5, #PHYSADDR movne pc, r5 PRINT(#'G') mcr p15, 0, r0, c2, c0, 0 /* Set TTB */ PRINT(#'a') mcr p15, 0, r0, c8, c7, 0 /* Flush TLB */ PRINT(#'b') /* Set the Domain Access register. Very important! */ mov r0, #((DOMAIN_CLIENT << (PMAP_DOMAIN_KERNEL*2)) | DOMAIN_CLIENT) mcr p15, 0, r0, c3, c0, 0 PRINT(#'c') /* Enable MMU */ mrc p15, 0, r0, c1, c0, 0 PRINT(#'d') orr r0, r0, #CPU_CONTROL_MMU_ENABLE mcr p15, 0, r0, c1, c0, 0 PRINT(#'e') nop nop nop CPWAIT(r0) PRINT(#'H') #endif mmu_done: nop adr r1, .Lstart ldmia r1, {r1, r2, sp} /* Set initial stack and */ sub r2, r2, r1 /* get zero init data */ mov r3, #0 PRINT(#'I') .L1: str r3, [r1], #0x0004 /* get zero init data */ subs r2, r2, #4 bgt .L1 PRINT(#'f') ldr pc, .Lvirt_done PRINT(#'J') virt_done: PRINT(#'K') mov fp, #0 /* trace back starts here */ bl _C_LABEL(initarm) /* Off we go */ PRINT(#'L') /* init arm will return the new stack pointer. */ mov sp, r0 bl _C_LABEL(mi_startup) /* call mi_startup()! */ PRINT(#'M') adr r0, .Lmainreturned b _C_LABEL(panic) /* NOTEACHED */ #ifdef STARTUP_PAGETABLE_ADDR #define MMU_INIT(va,pa,n_sec,attr) \ .word n_sec ; \ .word 4*((va)>>L1_S_SHIFT) ; \ .word (pa)|(attr) ; Lvirtaddr: .word KERNVIRTADDR Lphysaddr: .word KERNPHYSADDR Lreal_start: .word _start Lend: .word _edata Lstartup_pagetable: .word STARTUP_PAGETABLE_ADDR mmu_init_table: /* fill all table VA==PA */ /* map SDRAM VA==PA, WT cacheable */ MMU_INIT(PHYSADDR, PHYSADDR , 64, L1_TYPE_S|L1_S_C|L1_S_AP(AP_KRW)) /* map VA 0xc0000000..0xc3ffffff to PA */ MMU_INIT(KERNBASE, PHYSADDR, 64, L1_TYPE_S|L1_S_C|L1_S_AP(AP_KRW)) /* map UART */ MMU_INIT(0x50000000, 0x50000000, 1, L1_TYPE_S|L1_S_AP(AP_KRW)) .word 0 /* end of table */ #endif .Lstart: .word _edata .word _end .word svcstk + INIT_ARM_STACK_SIZE #if defined(FLASHADDR) && defined(LOADERRAMADDR) .L_arm_memcpy: .word _C_LABEL(_arm_memcpy) #endif .Lvirt_done: .word virt_done .Lmainreturned: .asciz "main() returned" .align 0 .bss svcstk: .space INIT_ARM_STACK_SIZE .text .align 0 #ifndef OFW /* OFW based systems will used OF_boot() */ .Lcpufuncs: .word _C_LABEL(cpufuncs) ENTRY_NP(cpu_halt) mrs r2, cpsr bic r2, r2, #(PSR_MODE) orr r2, r2, #(PSR_SVC32_MODE) orr r2, r2, #(I32_bit | F32_bit) msr cpsr_all, r2 ldr r4, .Lcpu_reset_address ldr r4, [r4] ldr r0, .Lcpufuncs mov lr, pc ldr pc, [r0, #CF_IDCACHE_WBINV_ALL] /* * Load the cpu_reset_needs_v4_MMU_disable flag to determine if it's * necessary. */ ldr r1, .Lcpu_reset_needs_v4_MMU_disable ldr r1, [r1] cmp r1, #0 mov r2, #0 /* * MMU & IDC off, 32 bit program & data space * Hurl ourselves into the ROM */ mov r0, #(CPU_CONTROL_32BP_ENABLE | CPU_CONTROL_32BD_ENABLE) mcr 15, 0, r0, c1, c0, 0 mcrne 15, 0, r2, c8, c7, 0 /* nail I+D TLB on ARMv4 and greater */ mov pc, r4 /* * _cpu_reset_address contains the address to branch to, to complete * the cpu reset after turning the MMU off * This variable is provided by the hardware specific code */ .Lcpu_reset_address: .word _C_LABEL(cpu_reset_address) /* * cpu_reset_needs_v4_MMU_disable contains a flag that signals if the * v4 MMU disable instruction needs executing... it is an illegal instruction * on f.e. ARM6/7 that locks up the computer in an endless illegal * instruction / data-abort / reset loop. */ .Lcpu_reset_needs_v4_MMU_disable: .word _C_LABEL(cpu_reset_needs_v4_MMU_disable) #endif /* OFW */ #ifdef IPKDB /* * Execute(inst, psr, args, sp) * * Execute INSTruction with PSR and ARGS[0] - ARGS[3] making * available stack at SP for next undefined instruction trap. * * Move the instruction onto the stack and jump to it. */ ENTRY_NP(Execute) mov ip, sp stmfd sp!, {r2, r4-r7, fp, ip, lr, pc} sub fp, ip, #4 mov ip, r3 ldr r7, .Lreturn stmfd sp!, {r0, r7} adr r7, #.LExec mov r5, r1 mrs r4, cpsr ldmia r2, {r0-r3} mov r6, sp mov sp, ip msr cpsr_all, r5 mov pc, r6 .LExec: mrs r5, cpsr /* XXX Cannot switch thus easily back from user mode */ msr cpsr_all, r4 add sp, r6, #8 ldmfd sp!, {r6} stmia r6, {r0-r3} mov r0, r5 ldmdb fp, {r4-r7, fp, sp, pc} .Lreturn: mov pc, r7 #endif /* * setjump + longjmp */ ENTRY(setjmp) stmia r0, {r4-r14} mov r0, #0x00000000 RET ENTRY(longjmp) ldmia r0, {r4-r14} mov r0, #0x00000001 RET .data .global _C_LABEL(esym) _C_LABEL(esym): .word _C_LABEL(end) ENTRY_NP(abort) b _C_LABEL(abort) ENTRY_NP(sigcode) mov r0, sp swi SYS_sigreturn /* Well if that failed we better exit quick ! */ swi SYS_exit b . - 8 .align 0 .global _C_LABEL(esigcode) _C_LABEL(esigcode): .data .global szsigcode szsigcode: .long esigcode-sigcode /* End of locore.S */ --MP_yNwvVYRlL_INXBJL=K=zM_g-- From owner-freebsd-arm@FreeBSD.ORG Thu Sep 27 22:43:15 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 3C0DB16A566 for ; Thu, 27 Sep 2007 22:43:15 +0000 (UTC) (envelope-from mlfbsd@dong.ci0.org) Received: from dong.ci0.org (dong.ci0.org [IPv6:2001:7a8:2066:1::1]) by mx1.freebsd.org (Postfix) with ESMTP id 22F8813C45B for ; Thu, 27 Sep 2007 22:43:13 +0000 (UTC) (envelope-from mlfbsd@dong.ci0.org) Received: from dong.ci0.org (localhost.ci0.org [127.0.0.1]) by dong.ci0.org (8.13.8/8.13.8) with ESMTP id l8RNPral017728; Fri, 28 Sep 2007 01:25:54 +0200 (CEST) (envelope-from mlfbsd@dong.ci0.org) Received: (from mlfbsd@localhost) by dong.ci0.org (8.14.1/8.13.8/Submit) id l8RNPrsc017727; Fri, 28 Sep 2007 01:25:53 +0200 (CEST) (envelope-from mlfbsd) Date: Fri, 28 Sep 2007 01:25:53 +0200 From: Olivier Houchard To: Marius Nuennerich Message-ID: <20070927232553.GA17068@ci0.org> References: <20070927171822.0bdec7d9@sol.hackerzberg.local> <20070927170339.GA11021@ci0.org> <20070927224133.5fc9b24f@sol.hackerzberg.local> <20070927214141.GB15654@ci0.org> <20070927231331.5d22bf4a@sol.hackerzberg.local> <20070927221027.GA16476@ci0.org> <20070927234633.50c1789d@sol.hackerzberg.local> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20070927234633.50c1789d@sol.hackerzberg.local> User-Agent: Mutt/1.4.1i Cc: freebsd-arm@freebsd.org Subject: 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: Thu, 27 Sep 2007 22:43:15 -0000 On Thu, Sep 27, 2007 at 11:46:33PM +0200, Marius Nuennerich wrote: > On Fri, 28 Sep 2007 00:10:27 +0200 > Olivier Houchard wrote: > > > On Thu, Sep 27, 2007 at 11:13:31PM +0200, Marius Nuennerich wrote: > > > On Thu, 27 Sep 2007 23:41:41 +0200 > > > Olivier Houchard wrote: > > > > > > > On Thu, Sep 27, 2007 at 10:41:33PM +0200, Marius Nuennerich wrote: > > > > > On Thu, 27 Sep 2007 19:03:39 +0200 > > > > > Olivier Houchard wrote: > > > > > > > > > > > On Thu, Sep 27, 2007 at 05:18:22PM +0200, Marius Nuennerich wrote: > > > > > > > Hi all, > > > > > > > > > > > > > > > > > > > Hi Marius, > > > > > > > > > > > > > I'm still trying to boot FreeBSD on the neo1973. So far I managed to > > > > > > > put bytes over the serial console so I can see where I am. At the > > > > > > > moment the (virtual) machine crashes in locore.S (1.16) line 170: > > > > > > > ldr pc, .Lvirt_done > > > > > > > > > > > > > > qemu: fatal: Trying to execute code outside RAM or ROM at 0xc0008??? > > > > > > > > > > > > > > Which I don't understand because the section should be mapped by the > > > > > > > MMU to 0x30008??? at that time. > > > > > > > > > > > > > > In line 137 the sequence in the comment is described as > > > > > > > /* # of sections, PA|attr, VA */ > > > > > > > but in line 185 the order is > > > > > > > n_sec, VA, PA|attr > > > > > > > > > > > > > > Is the comment wrong? > > > > > > > > > > > > > > > > > > > No the comment is right, 0xc0000000 should be mapped. > > > > > > Did you define STARTUP_PAGETABLE_ADDR ? It's not marked as such, but it is > > > > > > mandatory now. > > > > > > > > > > Yes, in the kernel config there are these lines: > > > > > makeoptions KERNPHYSADDR=0x30008000 > > > > > makeoptions KERNVIRTADDR=0xc0000000 > > > > > options KERNPHYSADDR=0x30008000 > > > > > options KERNVIRTADDR=0xc0000000 > > > > > options PHYSADDR=0x30000000 > > > > > options STARTUP_PAGETABLE_ADDR=0x30800000 > > > > > > > > > > It's from Andrew Turners config file which he posted on > > > > > http://wiki.openmoko.org/wiki/FreeBSD > > > > > in the tarball. > > > > > > > > > > > > > Hmmm, I really see no reason why the PA <=> PA mapping would work, but not > > > > the VA <=> PA one. > > > > I'll try to setup qemu. Can it provide useful informations about its > > > > internal state, ie CPU registers, TLB, etc ? > > > > > > Yes, it looks like this: > > > qemu: fatal: Trying to execute code outside RAM or ROM at 0xc0008030 > > > > > > R00=30800000 R01=c01afdb8 R02=c0000070 R03=00000000 > > > R04=3000824c R05=3000808c R06=00000002 R07=30008050 > > > R08=33f17fdc R09=00000000 R10=00000041 R11=50000020 > > > R12=33f14934 R13=c019b140 R14=33f8b9e8 R15=c0008030 > > > PSR=60000153 -ZC- A svc32 > > > > There's something I seriously miss. At this point, r2 should be 0 : > > ldmia r1, {r1, r2, sp} /* Set initial stack and */ > > sub r2, r2, r1 /* get zero init data */ > > mov r3, #0 > > .L1: > > str r3, [r1], #0x0004 /* get zero init data */ > > subs r2, r2, #4 > > bgt .L1 > > ldr pc, .Lvirt_done > > > > And not 0xc0000070 > > What are the values of _edata and _end ? > > If you've been able to do all those stores, the mapping should work anyway, > > I'm really confused. > > I'm sorry, I just realized that it doesn't crash right there. My debug > ouput on serial line is ACDFFFGabcdeHIfA which indicates that it > does jump but to an address before line 110. I attach my modified > locore.S hopefully it won't get scrubbed. Ah no wonder it explodes then, it goes back from the start, disables the MMU, and can't figure out where 0xc0000000 is. Now the big question is why it jumps there. I'd guess qemu can do single-stepping. Could you try to see which value it loads into pc ? Regards, Olivier From owner-freebsd-arm@FreeBSD.ORG Thu Sep 27 23:17:35 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 3535216A41A for ; Thu, 27 Sep 2007 23:17:35 +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 8D87513C459 for ; Thu, 27 Sep 2007 23:17:34 +0000 (UTC) (envelope-from marius.nuennerich@gmx.de) Received: (qmail invoked by alias); 27 Sep 2007 23:17:32 -0000 Received: from f049170050.adsl.alicedsl.de (EHLO sol.hackerzberg.local) [78.49.170.50] by mail.gmx.net (mp044) with SMTP; 28 Sep 2007 01:17:32 +0200 X-Authenticated: #5707313 X-Provags-ID: V01U2FsdGVkX1/WTc9FWwLWaSd6l5gTCUIetd+mTp/GbjD99X5q6d Ij5z6y5wTkG44K Date: Fri, 28 Sep 2007 01:17:40 +0200 From: Marius Nuennerich To: freebsd-arm@freebsd.org Message-ID: <20070928011740.01026dcd@sol.hackerzberg.local> In-Reply-To: <20070927232553.GA17068@ci0.org> References: <20070927171822.0bdec7d9@sol.hackerzberg.local> <20070927170339.GA11021@ci0.org> <20070927224133.5fc9b24f@sol.hackerzberg.local> <20070927214141.GB15654@ci0.org> <20070927231331.5d22bf4a@sol.hackerzberg.local> <20070927221027.GA16476@ci0.org> <20070927234633.50c1789d@sol.hackerzberg.local> <20070927232553.GA17068@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: 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: Thu, 27 Sep 2007 23:17:35 -0000 On Fri, 28 Sep 2007 01:25:53 +0200 Olivier Houchard wrote: > On Thu, Sep 27, 2007 at 11:46:33PM +0200, Marius Nuennerich wrote: > > On Fri, 28 Sep 2007 00:10:27 +0200 > > Olivier Houchard wrote: > > > > > On Thu, Sep 27, 2007 at 11:13:31PM +0200, Marius Nuennerich wrote: > > > > On Thu, 27 Sep 2007 23:41:41 +0200 > > > > Olivier Houchard wrote: > > > > > > > > > On Thu, Sep 27, 2007 at 10:41:33PM +0200, Marius Nuennerich wrote: > > > > > > On Thu, 27 Sep 2007 19:03:39 +0200 > > > > > > Olivier Houchard wrote: > > > > > > > > > > > > > On Thu, Sep 27, 2007 at 05:18:22PM +0200, Marius Nuennerich wrote: > > > > > > > > Hi all, > > > > > > > > > > > > > > > > > > > > > > Hi Marius, > > > > > > > > > > > > > > > I'm still trying to boot FreeBSD on the neo1973. So far I managed to > > > > > > > > put bytes over the serial console so I can see where I am. At the > > > > > > > > moment the (virtual) machine crashes in locore.S (1.16) line 170: > > > > > > > > ldr pc, .Lvirt_done > > > > > > > > > > > > > > > > qemu: fatal: Trying to execute code outside RAM or ROM at 0xc0008??? > > > > > > > > > > > > > > > > Which I don't understand because the section should be mapped by the > > > > > > > > MMU to 0x30008??? at that time. > > > > > > > > > > > > > > > > In line 137 the sequence in the comment is described as > > > > > > > > /* # of sections, PA|attr, VA */ > > > > > > > > but in line 185 the order is > > > > > > > > n_sec, VA, PA|attr > > > > > > > > > > > > > > > > Is the comment wrong? > > > > > > > > > > > > > > > > > > > > > > No the comment is right, 0xc0000000 should be mapped. > > > > > > > Did you define STARTUP_PAGETABLE_ADDR ? It's not marked as such, but it is > > > > > > > mandatory now. > > > > > > > > > > > > Yes, in the kernel config there are these lines: > > > > > > makeoptions KERNPHYSADDR=0x30008000 > > > > > > makeoptions KERNVIRTADDR=0xc0000000 > > > > > > options KERNPHYSADDR=0x30008000 > > > > > > options KERNVIRTADDR=0xc0000000 > > > > > > options PHYSADDR=0x30000000 > > > > > > options STARTUP_PAGETABLE_ADDR=0x30800000 > > > > > > > > > > > > It's from Andrew Turners config file which he posted on > > > > > > http://wiki.openmoko.org/wiki/FreeBSD > > > > > > in the tarball. > > > > > > > > > > > > > > > > Hmmm, I really see no reason why the PA <=> PA mapping would work, but not > > > > > the VA <=> PA one. > > > > > I'll try to setup qemu. Can it provide useful informations about its > > > > > internal state, ie CPU registers, TLB, etc ? > > > > > > > > Yes, it looks like this: > > > > qemu: fatal: Trying to execute code outside RAM or ROM at 0xc0008030 > > > > > > > > R00=30800000 R01=c01afdb8 R02=c0000070 R03=00000000 > > > > R04=3000824c R05=3000808c R06=00000002 R07=30008050 > > > > R08=33f17fdc R09=00000000 R10=00000041 R11=50000020 > > > > R12=33f14934 R13=c019b140 R14=33f8b9e8 R15=c0008030 > > > > PSR=60000153 -ZC- A svc32 > > > > > > There's something I seriously miss. At this point, r2 should be 0 : > > > ldmia r1, {r1, r2, sp} /* Set initial stack and */ > > > sub r2, r2, r1 /* get zero init data */ > > > mov r3, #0 > > > .L1: > > > str r3, [r1], #0x0004 /* get zero init data */ > > > subs r2, r2, #4 > > > bgt .L1 > > > ldr pc, .Lvirt_done > > > > > > And not 0xc0000070 > > > What are the values of _edata and _end ? > > > If you've been able to do all those stores, the mapping should work anyway, > > > I'm really confused. > > > > I'm sorry, I just realized that it doesn't crash right there. My debug > > ouput on serial line is ACDFFFGabcdeHIfA which indicates that it > > does jump but to an address before line 110. I attach my modified > > locore.S hopefully it won't get scrubbed. > > Ah no wonder it explodes then, it goes back from the start, disables the MMU, > and can't figure out where 0xc0000000 is. > Now the big question is why it jumps there. > I'd guess qemu can do single-stepping. > Could you try to see which value it loads into pc ? Hmmm, I tried attaching gdb to qemu. I can set breakpoints and it breaks then, but I can't step single instructions, it shows the registers with those weird i386 names and it seems it can't read an arm kernel.symbols file :( "kernel.symbols": can't read symbols: File format not recognized. Anyone experience with this? From owner-freebsd-arm@FreeBSD.ORG Thu Sep 27 23:30:20 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 BB52B16A419 for ; Thu, 27 Sep 2007 23:30:20 +0000 (UTC) (envelope-from mlfbsd@dong.ci0.org) Received: from dong.ci0.org (dong.ci0.org [IPv6:2001:7a8:2066:1::1]) by mx1.freebsd.org (Postfix) with ESMTP id 921C113C455 for ; Thu, 27 Sep 2007 23:30:19 +0000 (UTC) (envelope-from mlfbsd@dong.ci0.org) Received: from dong.ci0.org (localhost.ci0.org [127.0.0.1]) by dong.ci0.org (8.13.8/8.13.8) with ESMTP id l8S0D3u9018391; Fri, 28 Sep 2007 02:13:04 +0200 (CEST) (envelope-from mlfbsd@dong.ci0.org) Received: (from mlfbsd@localhost) by dong.ci0.org (8.14.1/8.13.8/Submit) id l8S0D3f7018390; Fri, 28 Sep 2007 02:13:03 +0200 (CEST) (envelope-from mlfbsd) Date: Fri, 28 Sep 2007 02:13:03 +0200 From: Olivier Houchard To: Marius Nuennerich Message-ID: <20070928001303.GA18335@ci0.org> References: <20070927171822.0bdec7d9@sol.hackerzberg.local> <20070927170339.GA11021@ci0.org> <20070927224133.5fc9b24f@sol.hackerzberg.local> <20070927214141.GB15654@ci0.org> <20070927231331.5d22bf4a@sol.hackerzberg.local> <20070927221027.GA16476@ci0.org> <20070927234633.50c1789d@sol.hackerzberg.local> <20070927232553.GA17068@ci0.org> <20070928011740.01026dcd@sol.hackerzberg.local> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20070928011740.01026dcd@sol.hackerzberg.local> User-Agent: Mutt/1.4.1i Cc: freebsd-arm@freebsd.org Subject: 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: Thu, 27 Sep 2007 23:30:20 -0000 On Fri, Sep 28, 2007 at 01:17:40AM +0200, Marius Nuennerich wrote: > On Fri, 28 Sep 2007 01:25:53 +0200 > Olivier Houchard wrote: > > > On Thu, Sep 27, 2007 at 11:46:33PM +0200, Marius Nuennerich wrote: > > > On Fri, 28 Sep 2007 00:10:27 +0200 > > > Olivier Houchard wrote: > > > > > > > On Thu, Sep 27, 2007 at 11:13:31PM +0200, Marius Nuennerich wrote: > > > > > On Thu, 27 Sep 2007 23:41:41 +0200 > > > > > Olivier Houchard wrote: > > > > > > > > > > > On Thu, Sep 27, 2007 at 10:41:33PM +0200, Marius Nuennerich wrote: > > > > > > > On Thu, 27 Sep 2007 19:03:39 +0200 > > > > > > > Olivier Houchard wrote: > > > > > > > > > > > > > > > On Thu, Sep 27, 2007 at 05:18:22PM +0200, Marius Nuennerich wrote: > > > > > > > > > Hi all, > > > > > > > > > > > > > > > > > > > > > > > > > Hi Marius, > > > > > > > > > > > > > > > > > I'm still trying to boot FreeBSD on the neo1973. So far I managed to > > > > > > > > > put bytes over the serial console so I can see where I am. At the > > > > > > > > > moment the (virtual) machine crashes in locore.S (1.16) line 170: > > > > > > > > > ldr pc, .Lvirt_done > > > > > > > > > > > > > > > > > > qemu: fatal: Trying to execute code outside RAM or ROM at 0xc0008??? > > > > > > > > > > > > > > > > > > Which I don't understand because the section should be mapped by the > > > > > > > > > MMU to 0x30008??? at that time. > > > > > > > > > > > > > > > > > > In line 137 the sequence in the comment is described as > > > > > > > > > /* # of sections, PA|attr, VA */ > > > > > > > > > but in line 185 the order is > > > > > > > > > n_sec, VA, PA|attr > > > > > > > > > > > > > > > > > > Is the comment wrong? > > > > > > > > > > > > > > > > > > > > > > > > > No the comment is right, 0xc0000000 should be mapped. > > > > > > > > Did you define STARTUP_PAGETABLE_ADDR ? It's not marked as such, but it is > > > > > > > > mandatory now. > > > > > > > > > > > > > > Yes, in the kernel config there are these lines: > > > > > > > makeoptions KERNPHYSADDR=0x30008000 > > > > > > > makeoptions KERNVIRTADDR=0xc0000000 > > > > > > > options KERNPHYSADDR=0x30008000 > > > > > > > options KERNVIRTADDR=0xc0000000 > > > > > > > options PHYSADDR=0x30000000 > > > > > > > options STARTUP_PAGETABLE_ADDR=0x30800000 > > > > > > > > > > > > > > It's from Andrew Turners config file which he posted on > > > > > > > http://wiki.openmoko.org/wiki/FreeBSD > > > > > > > in the tarball. > > > > > > > > > > > > > > > > > > > Hmmm, I really see no reason why the PA <=> PA mapping would work, but not > > > > > > the VA <=> PA one. > > > > > > I'll try to setup qemu. Can it provide useful informations about its > > > > > > internal state, ie CPU registers, TLB, etc ? > > > > > > > > > > Yes, it looks like this: > > > > > qemu: fatal: Trying to execute code outside RAM or ROM at 0xc0008030 > > > > > > > > > > R00=30800000 R01=c01afdb8 R02=c0000070 R03=00000000 > > > > > R04=3000824c R05=3000808c R06=00000002 R07=30008050 > > > > > R08=33f17fdc R09=00000000 R10=00000041 R11=50000020 > > > > > R12=33f14934 R13=c019b140 R14=33f8b9e8 R15=c0008030 > > > > > PSR=60000153 -ZC- A svc32 > > > > > > > > There's something I seriously miss. At this point, r2 should be 0 : > > > > ldmia r1, {r1, r2, sp} /* Set initial stack and */ > > > > sub r2, r2, r1 /* get zero init data */ > > > > mov r3, #0 > > > > .L1: > > > > str r3, [r1], #0x0004 /* get zero init data */ > > > > subs r2, r2, #4 > > > > bgt .L1 > > > > ldr pc, .Lvirt_done > > > > > > > > And not 0xc0000070 > > > > What are the values of _edata and _end ? > > > > If you've been able to do all those stores, the mapping should work anyway, > > > > I'm really confused. > > > > > > I'm sorry, I just realized that it doesn't crash right there. My debug > > > ouput on serial line is ACDFFFGabcdeHIfA which indicates that it > > > does jump but to an address before line 110. I attach my modified > > > locore.S hopefully it won't get scrubbed. > > > > Ah no wonder it explodes then, it goes back from the start, disables the MMU, > > and can't figure out where 0xc0000000 is. > > Now the big question is why it jumps there. > > I'd guess qemu can do single-stepping. > > Could you try to see which value it loads into pc ? > > Hmmm, I tried attaching gdb to qemu. I can set breakpoints and it > breaks then, but I can't step single instructions, it shows the > registers with those weird i386 names and it seems it can't read an > arm kernel.symbols file :( > "kernel.symbols": can't read symbols: File format not recognized. > > Anyone experience with this? It's worth a try with a cross-gdb. To build it, you'll need a few libs from binutils, don't remember which, you can just build the whole thing with cd /usr/src/gnu/usr.bin/binutils && make TARGET_ARCH=arm depend all then cd /usr/src/gnu/usr.bin/gdb && make TARGET_ARCH=arm depend all It should pickup the binutils libs by itself, and you should end up with a cross-gdb in /usr/src/gnu/usr.bin/gdb/gdb Regards, Olivier From owner-freebsd-arm@FreeBSD.ORG Thu Sep 27 23:51:04 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 56D7C16A41A for ; Thu, 27 Sep 2007 23:51:04 +0000 (UTC) (envelope-from tinguely@casselton.net) Received: from casselton.net (casselton.net [63.165.140.2]) by mx1.freebsd.org (Postfix) with ESMTP id ECBE913C458 for ; Thu, 27 Sep 2007 23:51:03 +0000 (UTC) (envelope-from tinguely@casselton.net) Received: from casselton.net (localhost [127.0.0.1]) by casselton.net (8.13.8/8.13.8) with ESMTP id l8RNp0uJ066925; Thu, 27 Sep 2007 18:51:00 -0500 (CDT) (envelope-from tinguely@casselton.net) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=casselton.net; s=ccnMail; t=1190937060; bh=xhdhA1aE8yTThuDw4OEcVAlJOu+jsXLFl4hGhmw Hmjs=; h=Received:Date:From:Message-Id:To:Subject:In-Reply-To; b=b5 pTwvT4Sp88skUj7nWp1xlM5TZnZPRmgqYwzjak+jWgdywVb/CFBfHcNslojNa8i7er6 rHwaqcBr/42qCgId9Mg0fsS8xtxKTFH8vUtVuiI5rOHnMc/LLAUFtcFS9oS3zd0PB2+ rB5tBDdbqm0V45v+GKedfZQGVjOPo3b5ca4= Received: (from tinguely@localhost) by casselton.net (8.13.8/8.13.8/Submit) id l8RNp0pn066924; Thu, 27 Sep 2007 18:51:00 -0500 (CDT) (envelope-from tinguely) Date: Thu, 27 Sep 2007 18:51:00 -0500 (CDT) From: Mark Tinguely Message-Id: <200709272351.l8RNp0pn066924@casselton.net> To: freebsd-arm@freebsd.org, marius.nuennerich@gmx.de In-Reply-To: <20070928011740.01026dcd@sol.hackerzberg.local> Cc: Subject: 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: Thu, 27 Sep 2007 23:51:04 -0000 How about saving the jump address in another register also before the jump: ldr r10, .Lvirt_done ldr pc, .Lvirt_done --Mark Tinguely From owner-freebsd-arm@FreeBSD.ORG Fri Sep 28 09:30:40 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 D23A516A41B for ; Fri, 28 Sep 2007 09:30:40 +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 263E713C48D for ; Fri, 28 Sep 2007 09:30:39 +0000 (UTC) (envelope-from marius.nuennerich@gmx.de) Received: (qmail invoked by alias); 28 Sep 2007 09:30:38 -0000 Received: from f048043250.adsl.alicedsl.de (EHLO sol.hackerzberg.local) [78.48.43.250] by mail.gmx.net (mp031) with SMTP; 28 Sep 2007 11:30:38 +0200 X-Authenticated: #5707313 X-Provags-ID: V01U2FsdGVkX1+sjdRgNVOs/TEEdV+4GgIOJQYFxJLgJyDAgltwtn Mha1TqCy7UfcUG Date: Fri, 28 Sep 2007 11:30:44 +0200 From: Marius Nuennerich To: freebsd-arm@freebsd.org Message-ID: <20070928113044.4a2dcdac@sol.hackerzberg.local> In-Reply-To: <200709272351.l8RNp0pn066924@casselton.net> References: <20070928011740.01026dcd@sol.hackerzberg.local> <200709272351.l8RNp0pn066924@casselton.net> 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: 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 09:30:40 -0000 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? From owner-freebsd-arm@FreeBSD.ORG Fri Sep 28 09:40:47 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 0AE1A16A417 for ; Fri, 28 Sep 2007 09:40:47 +0000 (UTC) (envelope-from mlfbsd@dong.ci0.org) Received: from dong.ci0.org (dong.ci0.org [IPv6:2001:7a8:2066:1::1]) by mx1.freebsd.org (Postfix) with ESMTP id 376FC13C467 for ; Fri, 28 Sep 2007 09:40:45 +0000 (UTC) (envelope-from mlfbsd@dong.ci0.org) Received: from dong.ci0.org (localhost.ci0.org [127.0.0.1]) by dong.ci0.org (8.13.8/8.13.8) with ESMTP id l8SANXEQ023427; Fri, 28 Sep 2007 12:23:33 +0200 (CEST) (envelope-from mlfbsd@dong.ci0.org) Received: (from mlfbsd@localhost) by dong.ci0.org (8.14.1/8.13.8/Submit) id l8SANWOp023426; Fri, 28 Sep 2007 12:23:33 +0200 (CEST) (envelope-from mlfbsd) Date: Fri, 28 Sep 2007 12:23:32 +0200 From: Olivier Houchard To: Marius Nuennerich Message-ID: <20070928102332.GA23400@ci0.org> References: <20070928011740.01026dcd@sol.hackerzberg.local> <200709272351.l8RNp0pn066924@casselton.net> <20070928113044.4a2dcdac@sol.hackerzberg.local> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20070928113044.4a2dcdac@sol.hackerzberg.local> User-Agent: Mutt/1.4.1i Cc: freebsd-arm@freebsd.org Subject: 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 09:40:47 -0000 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. Regards, Olivier 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? From owner-freebsd-arm@FreeBSD.ORG Fri Sep 28 11:45:45 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 0EF1F16A419 for ; Fri, 28 Sep 2007 11:45:45 +0000 (UTC) (envelope-from mlfbsd@dong.ci0.org) Received: from dong.ci0.org (dong.ci0.org [IPv6:2001:7a8:2066:1::1]) by mx1.freebsd.org (Postfix) with ESMTP id 2316213C474 for ; Fri, 28 Sep 2007 11:45:43 +0000 (UTC) (envelope-from mlfbsd@dong.ci0.org) Received: from dong.ci0.org (localhost.ci0.org [127.0.0.1]) by dong.ci0.org (8.13.8/8.13.8) with ESMTP id l8SCSV5V024448; Fri, 28 Sep 2007 14:28:32 +0200 (CEST) (envelope-from mlfbsd@dong.ci0.org) Received: (from mlfbsd@localhost) by dong.ci0.org (8.14.1/8.13.8/Submit) id l8SCSVfU024447; Fri, 28 Sep 2007 14:28:31 +0200 (CEST) (envelope-from mlfbsd) Date: Fri, 28 Sep 2007 14:28:31 +0200 From: Olivier Houchard To: Marius Nuennerich Message-ID: <20070928122831.GA24359@ci0.org> References: <20070928011740.01026dcd@sol.hackerzberg.local> <200709272351.l8RNp0pn066924@casselton.net> <20070928113044.4a2dcdac@sol.hackerzberg.local> <20070928102332.GA23400@ci0.org> <20070928121720.22823a58@sol.hackerzberg.local> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20070928121720.22823a58@sol.hackerzberg.local> User-Agent: Mutt/1.4.1i Cc: freebsd-arm@freebsd.org Subject: Re: 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 11:45:45 -0000 On Fri, Sep 28, 2007 at 12:17:20PM +0200, Marius Nuennerich wrote: > 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? No there's not, and you're right it should be documented. KERNVIRTADDR is the virtual address at which the kernel is loaded (and linked). KERNPHYSADDR is the physical address at which the kernel is loaded. PHYSADDR is the physical address of the RAM. KERNBASE is the virtual address of the beginning of the KVA. STARTUP_PAGETABLE_ADDR is a physical address, suitable for the very early pagetable we build in locore.S. FLASHADDR is the address of the flash, virtual or physical depending on what the loader does. That, and LOADERRAMADDR (the address at which the loader maps the RAM if we're running with the MMU enabled, and the physical address if not), are used to detect if we're running from flash, and if so copying the kernel to memory. Regards, Olivier From owner-freebsd-arm@FreeBSD.ORG Fri Sep 28 12:58:55 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 435A716A468 for ; Fri, 28 Sep 2007 12:58:55 +0000 (UTC) (envelope-from tinguely@casselton.net) Received: from casselton.net (casselton.net [63.165.140.2]) by mx1.freebsd.org (Postfix) with ESMTP id 0268813C48A for ; Fri, 28 Sep 2007 12:58:54 +0000 (UTC) (envelope-from tinguely@casselton.net) Received: from casselton.net (localhost [127.0.0.1]) by casselton.net (8.13.8/8.13.8) with ESMTP id l8SCwpA4013427; Fri, 28 Sep 2007 07:58:51 -0500 (CDT) (envelope-from tinguely@casselton.net) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=casselton.net; s=ccnMail; t=1190984332; bh=2nc5z6geZ3H4bO1C3thxyt1ovbVqxVmyv/GwffA ZlQg=; h=Received:Date:From:Message-Id:To:Subject:Cc:In-Reply-To; b=Tr5nJCk/onzPBfy3UbphO2us7meBU78GkYErBJqRxhqe7ZgMXjN6qFSmRCMISdXDp 67ejgUHOggwZrweHcbjtWZM0qa89EcjXP/OBBe2bnedonjPecirfp6aMVOPhhv/kxJe z2TKCtzzN1Gw27cnxXdhILbggxeToDbjpi1NV8U= Received: (from tinguely@localhost) by casselton.net (8.13.8/8.13.8/Submit) id l8SCwpDA013426; Fri, 28 Sep 2007 07:58:51 -0500 (CDT) (envelope-from tinguely) Date: Fri, 28 Sep 2007 07:58:51 -0500 (CDT) From: Mark Tinguely Message-Id: <200709281258.l8SCwpDA013426@casselton.net> To: marius.nuennerich@gmx.de, mlfbsd@ci0.org In-Reply-To: <20070928102332.GA23400@ci0.org> Cc: freebsd-arm@freebsd.org Subject: 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 12:58:55 -0000 > > > 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. Wouldn't it be more appropriate to start the physical/virtual address on a L1 boundary (1 MB) rather than on a 32K boundary? I notice the style of the Xscale ports to put the physical address of of the startup L1 before the kernel, and the at91 ports to put this address after the kernel. --Mark Tinguely. From owner-freebsd-arm@FreeBSD.ORG Fri Sep 28 13:03:57 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 6217016A417 for ; Fri, 28 Sep 2007 13:03:57 +0000 (UTC) (envelope-from mlfbsd@dong.ci0.org) Received: from dong.ci0.org (dong.ci0.org [IPv6:2001:7a8:2066:1::1]) by mx1.freebsd.org (Postfix) with ESMTP id 7C0A413C448 for ; Fri, 28 Sep 2007 13:03:56 +0000 (UTC) (envelope-from mlfbsd@dong.ci0.org) Received: from dong.ci0.org (localhost.ci0.org [127.0.0.1]) by dong.ci0.org (8.13.8/8.13.8) with ESMTP id l8SDkOhw025339; Fri, 28 Sep 2007 15:46:24 +0200 (CEST) (envelope-from mlfbsd@dong.ci0.org) Received: (from mlfbsd@localhost) by dong.ci0.org (8.14.1/8.13.8/Submit) id l8SDkOHB025338; Fri, 28 Sep 2007 15:46:24 +0200 (CEST) (envelope-from mlfbsd) Date: Fri, 28 Sep 2007 15:46:23 +0200 From: Olivier Houchard To: Mark Tinguely Message-ID: <20070928134623.GA25279@ci0.org> References: <20070928102332.GA23400@ci0.org> <200709281258.l8SCwpDA013426@casselton.net> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <200709281258.l8SCwpDA013426@casselton.net> User-Agent: Mutt/1.4.1i Cc: freebsd-arm@freebsd.org, marius.nuennerich@gmx.de Subject: 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 13:03:57 -0000 On Fri, Sep 28, 2007 at 07:58:51AM -0500, 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. > > Wouldn't it be more appropriate to start the physical/virtual address > on a L1 boundary (1 MB) rather than on a 32K boundary? > Yes it would, but shouldn't matter much. > I notice the style of the Xscale ports to put the physical address of > of the startup L1 before the kernel, and the at91 ports to put this > address after the kernel. > It all depends on the bootloader really. RedBoot won't let you load the kernel at the beginning of the ram, so you have a bit of space between the start of the RAM and the kernel, while the bootloader used on the AT91 loads it directly at PHYSADDR. Anyway, this page table is used so shortly it's no big deal. Regards, Olivier From owner-freebsd-arm@FreeBSD.ORG Sat Sep 29 07:09: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 5FABD16A418 for ; Sat, 29 Sep 2007 07:09:16 +0000 (UTC) (envelope-from andrew@fubar.geek.nz) Received: from mta02.xtra.co.nz (mta02.xtra.co.nz [210.54.141.253]) by mx1.freebsd.org (Postfix) with ESMTP id F1C1613C46E for ; Sat, 29 Sep 2007 07:09:15 +0000 (UTC) (envelope-from andrew@fubar.geek.nz) Received: from fep05.xtra.co.nz ([172.23.12.51]) by mta02.xtra.co.nz with ESMTP id <20070929070911.TEEO16730.mta02.xtra.co.nz@fep05.xtra.co.nz> for ; Sat, 29 Sep 2007 19:09:11 +1200 Received: from serv.int.fubar.geek.nz ([122.57.23.245]) by fep05.xtra.co.nz with ESMTP id <20070929070911.LKWG9910.fep05.xtra.co.nz@serv.int.fubar.geek.nz> for ; Sat, 29 Sep 2007 19:09:11 +1200 Date: Sat, 29 Sep 2007 19:09:10 +1200 From: Andrew Turner To: freebsd-arm@freebsd.org Message-ID: <20070929190910.313773ed@hermies.int.fubar.geek.nz> X-Mailer: Claws Mail 3.0.1 (GTK+ 2.10.14; i386-portbld-freebsd6.2) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Subject: Updated Neo1973 snapshot 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: Sat, 29 Sep 2007 07:09:16 -0000 I've created an updated snapshot of the port of FreeBSD to the NEO1973. It's available from [1]. Note: It replaces sys/src/src/locore.S with a slightly modified version. I've updated the memory locations to use the correct values to let FreeBSD get into initarm. It will output some data before and after entering initarm to the serial console to let you know it is running. There is a problem with the calls to strlen and strcpy where they cause the emulator to execute from invalid memory locations (eg. 0x0). The line "preload_metadata = (void *)fake_preload;" also causes qemu to attempt to execute from a bad memory location (0x20). Does anyone have any ideas how to fix either of these? If you would like to get it running there are instructions at [2]. Andrew [1] http://fubar.geek.nz/files/freebsd/neo1973/neo1973-0.20070929.tar.bz2 [2] http://wiki.openmoko.org/wiki/FreeBSD -- Andrew Turner http://fubar.geek.nz/blog/ From owner-freebsd-arm@FreeBSD.ORG Sat Sep 29 09:28:27 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 65AFD16A419 for ; Sat, 29 Sep 2007 09:28:27 +0000 (UTC) (envelope-from xpahos@gmail.com) Received: from wa-out-1112.google.com (wa-out-1112.google.com [209.85.146.177]) by mx1.freebsd.org (Postfix) with ESMTP id 45E0513C457 for ; Sat, 29 Sep 2007 09:28:27 +0000 (UTC) (envelope-from xpahos@gmail.com) Received: by wa-out-1112.google.com with SMTP id k17so3922683waf for ; Sat, 29 Sep 2007 02:28:26 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=beta; h=domainkey-signature:received:received:message-id:date:from:to:subject:mime-version:content-type:content-transfer-encoding:content-disposition; bh=ajgwvC2KU/hscQ+t03UyAvGZ00EOau/Q/NlJ+x5H8pU=; b=J/mw7JqFU5IkgxZWnAWdONPfXQt6+FZNQmTlYLivkZKlPjqHGfKeZX57WlxPfOARyqUkGid0FRSuvPin4zNpr5GU568Vp2mCezF3ANFHuwuDRpLSYznaERzdO8521depcoGuuhXv1ddqIuSN9f9YXjDrw/HT2R5J/5RK3M+ubck= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=beta; h=received:message-id:date:from:to:subject:mime-version:content-type:content-transfer-encoding:content-disposition; b=Crz7FQdrbpXdBvSnx6M+tVYzHoDqNhimtzbAud6Nx3gil9zx4p4BRbkHTCcVKrX2T0NPUj9uuY9s2FggfzW7uMaxN2/7nTn6GAy0dSPURlLuMr2rwBJ9isP1D9xw6IaWYTCOsbs0Mit6k+9ApdPM3u5VQgjtLQfyzdkY940wtnI= Received: by 10.114.135.1 with SMTP id i1mr1037313wad.1191056476251; Sat, 29 Sep 2007 02:01:16 -0700 (PDT) Received: by 10.114.154.15 with HTTP; Sat, 29 Sep 2007 02:01:16 -0700 (PDT) Message-ID: <789c35740709290201l505c4c1ck7902377cb03e433a@mail.gmail.com> Date: Sat, 29 Sep 2007 13:01:16 +0400 From: "Gryanko Alexandr" To: freebsd-arm@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline Subject: u-boot loader and freebsd 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: Sat, 29 Sep 2007 09:28:27 -0000 hi, i found some information about booting on embedded systems with u-boot loader, but i can't boot freebsd on hp hw6515. Somebody can give me the information about booting freebsd on htc beetls or hp hw6515? From owner-freebsd-arm@FreeBSD.ORG Sat Sep 29 10:16:37 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 C90C716A417 for ; Sat, 29 Sep 2007 10:16:37 +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 299B613C46A for ; Sat, 29 Sep 2007 10:16:36 +0000 (UTC) (envelope-from marius.nuennerich@gmx.de) Received: (qmail invoked by alias); 29 Sep 2007 10:16:35 -0000 Received: from f049172154.adsl.alicedsl.de (EHLO sol.hackerzberg.local) [78.49.172.154] by mail.gmx.net (mp049) with SMTP; 29 Sep 2007 12:16:35 +0200 X-Authenticated: #5707313 X-Provags-ID: V01U2FsdGVkX18WdNMx/jsWjFJKrzSmjP1oMjxuEji9DYiDKvEbi/ UAdgzHdUTfMJnR Date: Sat, 29 Sep 2007 12:16:42 +0200 From: Marius Nuennerich To: freebsd-arm@freebsd.org Message-ID: <20070929121642.0837da8d@sol.hackerzberg.local> In-Reply-To: <20070929190910.313773ed@hermies.int.fubar.geek.nz> References: <20070929190910.313773ed@hermies.int.fubar.geek.nz> 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: Re: Updated Neo1973 snapshot 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: Sat, 29 Sep 2007 10:16:37 -0000 On Sat, 29 Sep 2007 19:09:10 +1200 Andrew Turner wrote: > I've created an updated snapshot of the port of FreeBSD to the NEO1973. > It's available from [1]. Note: It replaces sys/src/src/locore.S with a > slightly modified version. > > I've updated the memory locations to use the correct values to let > FreeBSD get into initarm. It will output some data before and after > entering initarm to the serial console to let you know it is running. Yay, it did work so far printing AB. I don't know why it doesn't work for me with the second method in the wiki. > There is a problem with the calls to strlen and strcpy where they cause > the emulator to execute from invalid memory locations (eg. 0x0). The > line "preload_metadata = (void *)fake_preload;" also causes qemu to > attempt to execute from a bad memory location (0x20). Does anyone have > any ideas how to fix either of these? > > If you would like to get it running there are instructions at [2]. > > Andrew > > [1] > http://fubar.geek.nz/files/freebsd/neo1973/neo1973-0.20070929.tar.bz2 > [2] http://wiki.openmoko.org/wiki/FreeBSD > -- > Andrew Turner > http://fubar.geek.nz/blog/ > _______________________________________________ > freebsd-arm@freebsd.org mailing list > http://lists.freebsd.org/mailman/listinfo/freebsd-arm > To unsubscribe, send any mail to "freebsd-arm-unsubscribe@freebsd.org" From owner-freebsd-arm@FreeBSD.ORG Sat Sep 29 11:00:36 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 E4C0516A417 for ; Sat, 29 Sep 2007 11:00:36 +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 4398113C4A6 for ; Sat, 29 Sep 2007 11:00:36 +0000 (UTC) (envelope-from marius.nuennerich@gmx.de) Received: (qmail invoked by alias); 29 Sep 2007 11:00:34 -0000 Received: from f049172154.adsl.alicedsl.de (EHLO sol.hackerzberg.local) [78.49.172.154] by mail.gmx.net (mp021) with SMTP; 29 Sep 2007 13:00:34 +0200 X-Authenticated: #5707313 X-Provags-ID: V01U2FsdGVkX19CTPxl2YlCHJINP9RR9pSXxCdkp2eyCLk5zO/oH4 JpP3bWsxg3ux9e Date: Sat, 29 Sep 2007 13:00:41 +0200 From: Marius Nuennerich To: freebsd-arm@freebsd.org Message-ID: <20070929130041.533250c7@sol.hackerzberg.local> In-Reply-To: <789c35740709290201l505c4c1ck7902377cb03e433a@mail.gmail.com> References: <789c35740709290201l505c4c1ck7902377cb03e433a@mail.gmail.com> 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: Re: u-boot loader and freebsd 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: Sat, 29 Sep 2007 11:00:37 -0000 On Sat, 29 Sep 2007 13:01:16 +0400 "Gryanko Alexandr" wrote: > hi, i found some information about booting on embedded systems with > u-boot loader, but i can't boot freebsd on hp hw6515. Somebody can > give me the information about booting freebsd on htc beetls or hp > hw6515? Maybe this can help you: http://wiki.openmoko.org/wiki/FreeBSD#Building_FreeBSD You need the mkimage tool which is in ports under devel/mkimage. I don't know what else but I don't think it will be as easy as just mkimage the kernel and loading it. cheers Marius