Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 2 Mar 2013 22:22:10 -0800
From:      Tim Kientzle <tim@kientzle.com>
To:        Ian Lepore <ian@freebsd.org>
Cc:        freebsd-arm@freebsd.org
Subject:   Re: PHYSADDR
Message-ID:  <1F9BEBCF-AB1C-4918-917A-921B5CC606FC@kientzle.com>
In-Reply-To: <1362273533.1195.199.camel@revolution.hippie.lan>
References:  <E886046B-1612-425B-902B-72D4B0E93618@freebsd.org> <1362068453.1195.40.camel@revolution.hippie.lan> <674A08B3-6600-4B77-8511-9EF54E4B9B1F@FreeBSD.org> <8FEA3237-8ABF-4564-B672-4B4C0C6EF291@kientzle.com> <1362155632.1195.120.camel@revolution.hippie.lan> <5B622D1B-4EAE-4184-A194-DD14083A48B6@kientzle.com> <1362246634.1195.178.camel@revolution.hippie.lan> <AC642AAD-8D8C-429E-AE3B-A34241DA2517@kientzle.com> <1362273533.1195.199.camel@revolution.hippie.lan>

next in thread | previous in thread | raw e-mail | index | archive | help

On Mar 2, 2013, at 5:18 PM, Ian Lepore wrote:

> On Sat, 2013-03-02 at 10:10 -0800, Tim Kientzle wrote:
>> On Mar 2, 2013, at 9:50 AM, Ian Lepore wrote:
>> 
>>> [...]
>> 
>>> I'm not sure its safe to assume that (entry-pc & 0xfffff000) is the
>>> beginning of the kernel; it's true now but need not be so.  But that's
>>> no big deal, we can tweak the linker script to give us the offset of the
>>> _start symbol so it'll work no matter what.
>> 
>> Patches?  ;-)
> 
> This turned out to be a bit trickier than I first thought it would be,
> but it worked out.
> 
> This gets rids of any reference to PHYSADDR and similar constants in the
> main path through the code.  I didn't address the "running from flash"
> case or anything under #ifdef SMP, yet.  The only constant left is
> KERNBASE which is 0xC0000000 for all arm systems.
> 
> For now I've got #undef PHYSADDR at the top of the code; this is just
> for testing without having to remove it yet from anywhere else.

I see you computing kern_physaddr here.  I presume
we should be using that in machdep.c to initialize the
page tables instead of KERNPHYSADDR?

Tim





Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?1F9BEBCF-AB1C-4918-917A-921B5CC606FC>