FreeBSD 6.0 on Pegasos/ODW
Peter Grehan
grehan at freebsd.org
Wed Jun 28 18:03:34 UTC 2006
Hi Matt,
> How does FreeBSD allocate it's memory from the point the kernel is
> loaded, through claim or just assuming it owns it all at that point?
It uses the OpenFirmware memory map to work out what's in use and
takes over all that's left. Since the loader uses ofw calls to allocate
memory, the kernel itself, and ofw, won't be touched since it should be
in the ofw memorymap.
So, I think the overwriting should only occur if ofw is allowing the
loader to claim memory used by the kernel.
At the loader prompt, issue a 'memmap' command: that should dump what
ofw returns as it's map. You could then load the kernel (but not boot)
and issue 'memmap' again to see what effect the kernel and env has on
the memory map.
> Having it put the kernel somewhere after the first 32MB would be
> a good test. Our load-base variable is set to 0x4000000 so the
> loader goes there. I will see if I can get you guys a decent copy
> of the memory map..
That could work. You will have to modify the linker script in
sys/conf/ldscript.powerpc to change the load address.
later,
Peter.
More information about the freebsd-ppc
mailing list