Thanks a lot.<br><br><div class="gmail_quote">2011/10/19 Tony Breeds <span dir="ltr"><<a href="mailto:tony@bakeyournoodle.com">tony@bakeyournoodle.com</a>></span><br><blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">
<div><div></div><div class="h5">On Tue, Oct 18, 2011 at 09:22:21PM +0800, Ryan Wang wrote:<br>
> Hi,<br>
><br>
> I do not really understand real-base/real-size and have some questions:<br>
>       1) Is "real-base + real-size" the memory seen by client OS, AIX or<br>
> Linux?<br>
>           Or it's just for the kernel image, e.g vmlinux for Linux?<br>
>       2) What about yaboot? Where is is loaded to in the memory?<br>
>           If yaboot uses "real-base + real-size", where is the kernel image<br>
> loaded?<br>
<br>
</div></div>real-base is the address that OpenFirmware (OF) is loaded at, and real-size<br>
is the ammount of menory that (OF) is using.  The memory seen by the<br>
boot loader varies.  If you're in real mode (for example on an IBM<br>
pSeries system) You only see the first LMB (typically 128 or 256MB)  If<br>
you're in virtual mode, then the boot loader sees all the memory in the<br>
system.<br>
<br>
The client OS (Linux or AIX) can interrogate the device-tree to<br>
determine the full system memory and then control the MMU to acces it.<br>
<br>
Another envirnoment var similar to real-base and real-size is load-base<br>
which is where images loded by OF will be placed until the ELF headers<br>
are processed.<br>
<br>
So on a pSeries system booting yaboot the memory layout will look<br>
something like<br>
<br>
load-base=16KB<br>
real-base=12MB<br>
real-size=16MB<br>
128MB of Real Mode Addressable memory (RMA)<br>
<br>
    0 ->  16KB  Interrupt vectors<br>
 16KB ->  14KB  yaboot ELF image<br>
  1MB ->   3MB  yaboot text and data<br>
 -------------  Small ammounts of memory claim()ed by yaboot, eg the<br>
                Malloc space<br>
 12MB ->  28MB  OF<br>
 28MB ->  40MB  vmlinux ELF image<br>
 64MB ->  96MB  vmlinux text and data<br>
 96MB -> 110MB  initrd<br>
<br>
Once the kernel is booted this all changes. but I hope that helps a<br>
little.  Netbooting makes this even tighter.<br>
<br>
Yours Tony<br>
</blockquote></div><br>