About FreeBSD support one more mini-pc

Ian Lepore ian at FreeBSD.org
Sat Feb 22 00:06:32 UTC 2014


On Fri, 2014-02-21 at 23:39 +0000, Weiß, Jürgen wrote:
> > 
> > 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 you
> > can only get the address of something as an offset from the current PC.
> > The FDT code isn't amenable to running like that.
> > 
> > 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 cache
> > isn't involved in the problem.  I'm going to give that a try this
> > weekend.
> > 
> 
> After some reseach, I at least understand, why I can boot FreeBSD with
> ubldr without any problems. I thought that the temperatures in my living
> room cannot be responsible for this.
> 

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 
> of u-boot, when booting an uImage disables and flushes all the L1 caches ...... 

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






More information about the freebsd-arm mailing list