[Barrelfish-users] (no subject)

zhanqing Zhan(Qing) zhanqing.zhan at huawei.com
Wed Apr 3 05:19:29 CEST 2013


hi, everyone
   I have a problem about global string point and local string point in memory map.
My machine is x86_64 debian and the test code looks like:

char globalmsg[] = "hello, world";

void func()
{
   struct pmap *pmap = get_current_pmap();
   /* this lookup function can't find global string memory capref  */
   pmap->f.lookup(pmap, globalmsg, ..cap.. );

   char localmsg[] = "hello, world";
   /* this lookup function can find local string memory capref, it works */
   pmap->f.lookup(pmap, localmsg, ..cap..);
}

  How do I make the pmap lookup function get capref with globalmsg ?

the localmsg Vaddress is 0x511f20, is belong to stack segment;
the globalmsg Vaddress is 0x4b9008;
and we can see globalmsg in text segment and localmsg in text segment,

  [ 1] .text             PROGBITS         0000000000400120  00000120
       0000000000090922  0000000000000000  AX       0     0     16
  [ 9] .data             PROGBITS         00000000004b9000  000b9000
       000000000000d608  0000000000000000  WA       0     0     32

  So I think there are maybe two problem:
1, the data segment not do map;
2, the global string point Vaddress should add segment address;

the fs register is 0x17, the IDT context is:
ldt[0] 0x2cc40
ldt[1] 0x4b9020
ldt[2] 0x804f0020

  I add those idt address to globalmsg then do pmap lookup function, all the same not work.
Thanks for your any suggestion!

Best regards!
-------------- next part --------------
An HTML attachment was scrubbed...
URL: https://lists.inf.ethz.ch/pipermail/barrelfish-users/attachments/20130403/ec07d8a9/attachment-0001.html 


More information about the Barrelfish-users mailing list