the memory overlapping problem when loading the two duplicate components

View: New views
3 Messages — Rating Filter:   Alert me  

the memory overlapping problem when loading the two duplicate components

by Guanghui, Cheng :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Hello:
        I try to run the same two duplicate components on top of Fiasco but there is
an error about memory overlapping problem.
        The problem is very simple which read the value of tsc looply like this:

int main(int argc, char ** argv)
{
        l4_uint64_t val;
        //rdtscll(val);
        l4_calibrate_tsc();
        val = l4_rdtsc();
        while(1)
        {
                printf("0x%0x:%0x\n", (unsigned long)((val>>32)&0xFFFFFFFF),
                                (unsigned long)(val&0xFFFFFFFF));
                //rdtscll(val);
                val = l4_rdtsc();
                l4_sleep(2);
        }
        l4_sleep_forever();
        return 0;
}
        In the menu.lst this modules was loaded twice like this:
module  /rdtsc
module  /rdtsc
        When booting the error messsage is like this:
#09: loading "/rdtsc"
     from [034c0000-034eff24] to [01000000-01003857][01004000-01009000]
     entry at 00065060 via trampoline page code
     symbols at [0eae2000-0eae3000] (4kB), lines at [0eade000-0eae2000] (16kB)
#0a: loading "/rdtsc"
     from [034f0000-0351ff24] to [01000000-01003857]
Roottask: cannot load binary because address at 01000000 not free
  loaded module:   [034f0000-0351ff24) /rdtsc
  overlaps with:   [01000000-01004000) #09 rdtsc

        Can i configure these two rdtsc with loading different address?
                                                                                        Cheng

_______________________________________________
l4-hackers mailing list
l4-hackers@...
http://os.inf.tu-dresden.de/mailman/listinfo/l4-hackers

Re: the memory overlapping problem when loading the two duplicate components

by Björn Döbel :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Hi Cheng,

> In the menu.lst this modules was loaded twice like this:
> module  /rdtsc
> module  /rdtsc

That's as expected. You statically try to put the rdtsc image into the
same physical memory area twice.

2 solutions: You can either compile the rdtsc app twice and use
different DEFAULT_RELOC settings, or use the loader to load the
application twice.

Bjoern
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.9 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iEYEARECAAYFAkqejFsACgkQP5ijxgQLUNnbDACggijzmGfONe+BlOjCnGUPJQ9J
UAoAniH4z4nW9UxVzr4eOOU9Kh+yqcT7
=8ahX
-----END PGP SIGNATURE-----

_______________________________________________
l4-hackers mailing list
l4-hackers@...
http://os.inf.tu-dresden.de/mailman/listinfo/l4-hackers

Re: the memory overlapping problem when loading the two duplicate components

by Guanghui, Cheng :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

On Wednesday 02 September 2009 11:16:47 pm Björn Döbel wrote:

> Hi Cheng,
>
> > In the menu.lst this modules was loaded twice like this:
> > module  /rdtsc
> > module  /rdtsc
>
> That's as expected. You statically try to put the rdtsc image into the
> same physical memory area twice.
>
> 2 solutions: You can either compile the rdtsc app twice and use
> different DEFAULT_RELOC settings, or use the loader to load the
> application twice.
        Thank you. I start to know what DEFAULT_RELOC is but before i ignore this
option all the time.
                                                Cheng



_______________________________________________
l4-hackers mailing list
l4-hackers@...
http://os.inf.tu-dresden.de/mailman/listinfo/l4-hackers