From owner-freebsd-arm@FreeBSD.ORG Tue Mar 31 23:50:17 2009 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 0AC97106566C for ; Tue, 31 Mar 2009 23:50:17 +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 9F3F98FC16 for ; Tue, 31 Mar 2009 23:50:16 +0000 (UTC) (envelope-from tinguely@casselton.net) Received: from casselton.net (localhost [127.0.0.1]) by casselton.net (8.14.3/8.14.3) with ESMTP id n2VNoBU0060974; Tue, 31 Mar 2009 18:50:11 -0500 (CDT) (envelope-from tinguely@casselton.net) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=casselton.net; s=ccnMail; t=1238543411; bh=+K9fJsL7ahZZBmc5yip8iBHdddGkljbdbyS8xGNQeTA=; h=Date:From:Message-Id:To:Subject:Cc:In-Reply-To; b=rpd7LE1TOb17Agkoqhp0GFtBREef4f+U/kpoVTg0exwUl5XLP2ziofrz+RBE5hXj5 HZyoF/JnUK/ah0bdRTbu5DAVJnUT//6g7MtbtMg8fhG86O7+XH9xsl3XkirZG+A1S+ mvXK+vHgYaUqfLz0Vq5y/7yq7PfVMH4HVSjkNyAE= Received: (from tinguely@localhost) by casselton.net (8.14.3/8.14.2/Submit) id n2VNoAwK060973; Tue, 31 Mar 2009 18:50:10 -0500 (CDT) (envelope-from tinguely) Date: Tue, 31 Mar 2009 18:50:10 -0500 (CDT) From: Mark Tinguely Message-Id: <200903312350.n2VNoAwK060973@casselton.net> To: gballet@gmail.com, mlfbsd@ci0.org In-Reply-To: <20090331230945.GA8584@ci0.org> X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.1.10 (casselton.net [127.0.0.1]); Tue, 31 Mar 2009 18:50:11 -0500 (CDT) Cc: freebsd-arm@freebsd.org Subject: Re: locore.S question 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: Tue, 31 Mar 2009 23:50:17 -0000 > On Wed, Mar 25, 2009 at 03:06:49PM +0100, Guillaume Ballet wrote: > > Hello list, > > I'm working on a FreeBSD port for the BeagleBoard. I'm starting the > > kernel with u-boot and wrote my own small loader for this purpose. > > That loader puts the kernel at 0x81000000 (physical address, since the > > MMU is disabled at this stage). > > Nice to hear you're working on that port :) > > > In locore.S, however, there is the following piece of code that is > > executed before the MMU is disabled: > > > > 112 adr r7, Lunmapped > > 113 bic r7, r7, #0xff000000 > > 114 orr r7, r7, #PHYSADDR > > > > (snip, disabling MMU) > > > > 129 mov pc, r7 > > > > Since PHYSADDR is set to 0x80000000 (physical start of RAM), then r7 > > is set to 0x80000000 + offset(Lunmapped) instead of 0x81000000 + > > offset(Lunmapped). Of course it crashes. > > > > Now, bypassing the problem is relatively easy, but still I was > > wondering why it is 0xff000000 instead of 0xf0000000 on line 113? I was wondering why the kernel is loaded 16MB into the physical memory? --Mark.