On Sun, 14 Jan 2001, Brian Stephenson wrote:

> looking at the linuxbios.map file, I see ROMSTART=00080000

                                           ^^^^^^^^^^^^^^^^^^^
This means it is a DOC setup. So the code assumes that it was read in from
DoC Millenium and copied to 0x80000.

> I saw some code in crt0.S that copied data from 00088520 to 5000
> am I right in assuming the data is being copied from flash??

This is a bit weird, it used to be copying from flash, now it is copied
(unnecessarily, but we haven't bothered with it yet) from "linuxbios
whereever" to "BSS area". 5000 is start of bss, basically.

> this is where I am loosing things, with DoC linuxbios code is copied
> to 80000 from DoC, so linuxbios is in RAM, but with flash, linuxbios
> is run directly from NVRAM (flash) so what happens to the RAM at 80000
> if NVRAM is there, where does it go???

There's no nvram at 80000, so no problem. It's all ram.

If you look at ldscript.ld, you can see that there is a base value for
code, and for data, and for stack, and so on. crt0.S .text area is in one
place, and bss is in ram. crt0.S assume that code is read-only, so it has
to copy initial values for variable to ram.  For the flash caseh, you copy
from the code area (based at f0000) to ram (5000). The docipl kind of
works behind linuxbios's back, so linuxbios still assumes it has to copy
from the code space to ram, and so copies from an address based at 80000
to 5000.

You'll have to buy me a beer at usenix.

ron

Reply via email to