Xavier Pegenaute xpegenaute@telepolis.es writes:
Hi,
i was trying to make a memory map in the eeprom but i have some questions when i saw linuxbios_c.map and linuxbios.map ...
We "compile" linuxbios_c with c_start.o and linuxbios.a until generate linuxbios_payload and linuxbios_c.map.
We "compile" crt0.S and we make the crt0.o.
After we "compile" crt0.o with linuxbios_payload generating linuxbios binary and linuxbios.map
If we see inside the map files, i can see that there are labels at the same position in the both map files for example:
linuxbios_c.map : 00004000 A _RAMBASE 00080000 A _ROMBASE
linuxbios.map: 00004000 A _RAMBASE 00080000 A _ROMBASE
At that point those are just hard coded symbols, that set of symbols lives nowhere.
How is it possible ? when in theory al linuxbios_c is in the payload of linuxbios?
Only when they are symbols that refer to actual code or data is it a problem. A constant address is not.
linuxbios.map: 000805a0 D _payload 00085e5d D _epayload
also i saw in some file (.ld) in the tree of freebios a picture of memory:
Memory map:
0x00000 (4*4096 bytes) : stack 0x04000 (4096 bytes) : private data 0x05000 : data space 0x90000 : kernel stack 0xf0000 (64 Kbyte) : EPROM
Is it right ?
No. At one point it was correct but the comment is now out of date.
i think that i'm confusing the memory in RAM and the memory in EPROM. But i don't know how build a correct idea.
Please also note the differences in the physical addresses and the virtual addresses that sometimes show up in the code.
Roughly the 64KB of the ROM lives at either: 0xf0000 - 0xfffff or 0xffff0000 - 0xfffffffff
And linuxbios_c lives in the first 640K I would have to look to be more precise.
Eric