kernel address space & auto-tuning
Ian Lepore
ian at FreeBSD.org
Sat Feb 16 20:09:00 UTC 2013
On Sat, 2013-02-16 at 11:59 -0800, Tim Kientzle wrote:
> >>
> >>> ... It may be that the important
> >>> part of the change would come next: pick better arbitrary ending
> >>> addresses.
> >>
> >> Is the location of the register mapping something that the kernel
> >> chooses? Or is it something that is passed to the kernel at boot-time?
> >>
> >
> > As near as I can tell, it's a pretty much arbitrary choice on a per-SoC
> > basis, always hard-coded with a named constant of some sort in kernel
> > source code. 0xE0000000 seems to be a popular choice, with comments
> > about it being the address used to bootstrap the initial devmap. That
> > appears to be true for only one SoC. I think maybe there's been some
> > cut and paste propagation here.
>
> Related to another thread, it would be nice to find
> ways to get more of these per-SoC values out
> of hardcoded constants.
>
> In this case, the FDT should give the size and physical
> address of the register map. Can we use that to
> determine the virtual mapping dynamically at runtime?
>
> Tim
Conceptually, yeah, it'd just be something like 0xffffff00 - size, but
the fdt_immr_addr() routine that finds the PA and size and sets things
up based on them takes the desired VA as an argument. Maybe a special
value could request that it calculate a VA based on the size it finds in
the data.
-- Ian
More information about the freebsd-arm
mailing list