Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 31 Mar 2009 18:50:10 -0500 (CDT)
From:      Mark Tinguely <tinguely@casselton.net>
To:        gballet@gmail.com, mlfbsd@ci0.org
Cc:        freebsd-arm@freebsd.org
Subject:   Re: locore.S question
Message-ID:  <200903312350.n2VNoAwK060973@casselton.net>
In-Reply-To: <20090331230945.GA8584@ci0.org>

next in thread | previous in thread | raw e-mail | index | archive | help
>  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.



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200903312350.n2VNoAwK060973>