From owner-freebsd-arm@FreeBSD.ORG Sun Mar 3 13:10:01 2013 Return-Path: Delivered-To: freebsd-arm@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by hub.freebsd.org (Postfix) with ESMTP id B6B79B57 for ; Sun, 3 Mar 2013 13:10:01 +0000 (UTC) (envelope-from ian@FreeBSD.org) Received: from mho-01-ewr.mailhop.org (mho-03-ewr.mailhop.org [204.13.248.66]) by mx1.freebsd.org (Postfix) with ESMTP id 8AFC76E0 for ; Sun, 3 Mar 2013 13:10:01 +0000 (UTC) Received: from c-24-8-232-202.hsd1.co.comcast.net ([24.8.232.202] helo=damnhippie.dyndns.org) by mho-01-ewr.mailhop.org with esmtpsa (TLSv1:AES256-SHA:256) (Exim 4.72) (envelope-from ) id 1UC8fv-000Klh-JH; Sun, 03 Mar 2013 13:09:59 +0000 Received: from [172.22.42.240] (revolution.hippie.lan [172.22.42.240]) by damnhippie.dyndns.org (8.14.3/8.14.3) with ESMTP id r23D9ufE089805; Sun, 3 Mar 2013 06:09:56 -0700 (MST) (envelope-from ian@FreeBSD.org) X-Mail-Handler: Dyn Standard SMTP by Dyn X-Originating-IP: 24.8.232.202 X-Report-Abuse-To: abuse@dyndns.com (see http://www.dyndns.com/services/sendlabs/outbound_abuse.html for abuse reporting information) X-MHO-User: U2FsdGVkX18dsddSRvgF2d3cRAKhTUt3 Subject: Re: PHYSADDR From: Ian Lepore To: Tim Kientzle In-Reply-To: <1F9BEBCF-AB1C-4918-917A-921B5CC606FC@kientzle.com> References: <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> <1362273533.1195.199.camel@revolution.hippie.lan> <1F9BEBCF-AB1C-4918-917A-921B5CC606FC@kientzle.com> Content-Type: text/plain; charset="us-ascii" Date: Sun, 03 Mar 2013 06:09:55 -0700 Message-ID: <1362316195.1195.206.camel@revolution.hippie.lan> Mime-Version: 1.0 X-Mailer: Evolution 2.32.1 FreeBSD GNOME Team Port Content-Transfer-Encoding: 7bit Cc: freebsd-arm@FreeBSD.org X-BeenThere: freebsd-arm@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: Porting FreeBSD to the StrongARM Processor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 03 Mar 2013 13:10:01 -0000 On Sat, 2013-03-02 at 22:22 -0800, Tim Kientzle wrote: > 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 Yeah, I suspect so. I didn't look outside of locore to see what other changes could flow from computing physaddr. On a semi-related note, it occurs to me that we should choose a standard kernel load offset that's a multiple of 1MB, so that the code that builds the real page tables will be able to use section mappings for all but the last section of the loaded kernel. -- Ian