From owner-freebsd-arm@FreeBSD.ORG Sat Feb 22 00:06:32 2014 Return-Path: Delivered-To: freebsd-arm@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 5F367A1D for ; Sat, 22 Feb 2014 00:06:32 +0000 (UTC) Received: from mho-02-ewr.mailhop.org (mho-02-ewr.mailhop.org [204.13.248.72]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 2680B1C2B for ; Sat, 22 Feb 2014 00:06:31 +0000 (UTC) Received: from c-24-8-230-52.hsd1.co.comcast.net ([24.8.230.52] helo=damnhippie.dyndns.org) by mho-02-ewr.mailhop.org with esmtpsa (TLSv1:AES256-SHA:256) (Exim 4.72) (envelope-from ) id 1WH06r-0008lm-1q; Sat, 22 Feb 2014 00:06:25 +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 s1M06MCn033485; Fri, 21 Feb 2014 17:06:22 -0700 (MST) (envelope-from ian@FreeBSD.org) X-Mail-Handler: Dyn Standard SMTP by Dyn X-Originating-IP: 24.8.230.52 X-Report-Abuse-To: abuse@dyndns.com (see http://www.dyndns.com/services/sendlabs/outbound_abuse.html for abuse reporting information) X-MHO-User: U2FsdGVkX19CyIOOCIVIndjn6Phgm8tA Subject: RE: About FreeBSD support one more mini-pc From: Ian Lepore To: =?ISO-8859-1?Q?Wei=DF=2C_J=FCrgen?= In-Reply-To: References: <210081392741053@web22h.yandex.ru> <1392835264.1145.33.camel@revolution.hippie.lan> <1392842988.1145.50.camel@revolution.hippie.lan> <1392851578.1145.55.camel@revolution.hippie.lan> <1392869044.1145.58.camel@revolution.hippie.lan> <38db362d34174f70a07c0b9ea39a54c4@e15be-03.zdv.Uni-Mainz.DE> <1392925514.1145.68.camel@revolution.hippie.lan> <1393010425.1145.143.camel@revolution.hippie.lan> Content-Type: text/plain; charset="ISO-8859-1" Date: Fri, 21 Feb 2014 17:06:22 -0700 Message-ID: <1393027582.1149.6.camel@revolution.hippie.lan> Mime-Version: 1.0 X-Mailer: Evolution 2.32.1 FreeBSD GNOME Team Port Content-Transfer-Encoding: quoted-printable X-MIME-Autoconverted: from 8bit to quoted-printable by damnhippie.dyndns.org id s1M06MCn033485 Cc: "'freebsd-arm@freebsd.org'" , 'Warner Losh' X-BeenThere: freebsd-arm@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: "Porting FreeBSD to ARM processors." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 22 Feb 2014 00:06:32 -0000 On Fri, 2014-02-21 at 23:39 +0000, Wei=DF, J=FCrgen wrote: > >=20 > > The problem is that until the MMU is turned on we can't access normal > > data, bss, or even call a named function. You can only run position- > > independant code, and that doesn't mean PLT and GOT stuff, it means y= ou > > can only get the address of something as an offset from the current P= C. > > The FDT code isn't amenable to running like that. > >=20 > > However, I think the suggestion offered by Juergen is a good one: if > > the MMU is on at entry, then our locore.S code needs to treat it as a > > mapping (set ttb) change and do the cache maintenance sequences you > > would do for that, as opposed to the sequences required to turn it on > > for the first time. Hopefully that's all that's needed and the L2 ca= che > > isn't involved in the problem. I'm going to give that a try this > > weekend. > >=20 >=20 > After some reseach, I at least understand, why I can boot FreeBSD with > ubldr without any problems. I thought that the temperatures in my livin= g > room cannot be responsible for this. >=20 The temperature problem had nothing to do with ubldr. That problem first showed last summer and affected all cortex-a9 chips because of a code generation bug in the assembler (they called it a feature, but I say it was a bug). > I use mkimage to generate an uImage from ubldr. And the bootm command=20 > of u-boot, when booting an uImage disables and flushes all the L1 cache= s ......=20 So the type of file being loaded affects u-boot's behavior. It's like they're just making it up as they go. :) I think we may be close to where we can switch to having a single generic IMX6 kernel config and let the fdt data be handled by u-boot and ubldr. I'll play with that this evening and see how it goes. Oh, something I never mentioned... the freebsd arm kernel can now be loaded at any 1MB boundary in physical ram, it doesn't have to be the KERNPHYSADDR address it was compiled for. For now, ubldr still only knows how to load it at the address it was loaded for, but from u-boot you should be able to load it at any address and launch it with "go addr +100" (except I don't think u-boot actually lets you do inline expressions like that). -- Ian