DEFAULT_RELOC and roottask
valitov79 at mail.ru
Tue Mar 17 11:56:42 CET 2009
I try to run l4con examples with grub script given in
./l4/pkg/l4con/doc/menu.lst (slightly modified/updated). The menu.lst starts
con_demo1, con_demo2 and con_demo3.
Boot process gives me this error:
#0d: loading "/boot/test/con_demo1"
from [026ce000-0277262c] to [00800000-008250b5][00826000-0083d000]
entry at 00068370 via trampoline page code
symbols at [3a30e000-3a313000] (20kB), lines at [3a2fd000-3a30e000]
#0e: loading "/boot/test/con_demo2"
from [02773000-02804e08] to [00800000-00815d11]
Roottask: cannot load binary because address at 00800000 not free
loaded module: [02773000-02804e08) /boot/test/con_demo2
overlaps with: [00800000-00826000) #0d con_demo1
I found that Makefile specifies DEFAULT_RELOC_x86 variable as:
DEFAULT_RELOC_x86 = 0x00800000
As a result -Ttext=0x800000 option is added to 'ld' invocation options.
I thought that is the root of problem and commented variable, but It didn't
help. Build system started to use default DEFAULT_RELOC value 0x01000000
from ./l4/mk/binary.inc and roottask gives the same error with new
1. I thought that DEFAULT_RELOC specifies virtual address not a physical
one. Am I right?
2. If answer to my first question is 'yes'. Why in this case roottask
relocates a code? It is strange as roottask operates with physical memory
3. When am I supposed to specify DEFAULT_RELOC variable? In which situation?
4. Why do we need the relocation performed by root task at all? Why can't we
just use appropriate mapping to addresses where GRUB loaded ELF modules?
Each server starts in its own virtual address space, so I think it's
possible. Why was it done that way? What is the problem with described
approach (without relocation)?
5. I've been playing around with L4Env,L4Linux and stuff for a while but
have never faced with mentioned problem. Are there anything special about
the way how con_demo1,2,3 are built? I mean Root task relocates another
modules to the next free 4K aligned address but con_demo1,2,3 modules to
some exact address. Why does it happened?
6. There is ./l4/pkg/l4con/examples/Makeconf file with link addresses
specification. But according to "Building Infrastructure for DROPS (BID)
Specification" only Makeconf.local file is included into generated Makefile
from project directories. Why is it where?
View this message in context: http://www.nabble.com/DEFAULT_RELOC-and-roottask-tp22556702p22556702.html
Sent from the L4 mailing list archive at Nabble.com.
More information about the l4-hackers