Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 28 Jun 2006 10:41:37 -0700
From:      Peter Grehan <grehan@freebsd.org>
To:        matt@genesi-usa.com
Cc:        freebsd-ppc@freebsd.org
Subject:   Re: FreeBSD 6.0 on Pegasos/ODW
Message-ID:  <44A2BF51.9090204@freebsd.org>
In-Reply-To: <008201c69a8c$039bf810$99dfdfdf@bakuhatsu.net>
References:  <008201c69a8c$039bf810$99dfdfdf@bakuhatsu.net>

next in thread | previous in thread | raw e-mail | index | archive | help
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.




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?44A2BF51.9090204>