l4-hackers Digest, Vol 59, Issue 7

Valery V. Sedletski _valerius at mail.ru
Sun Mar 9 07:21:52 CET 2008


On Sat, 08 Mar 2008 12:00:01 +0100, l4-hackers-request at os.inf.tu-dresden.de wrote:

>
> Quite old but anyway. It would be interesting to know where 0x004019e0
> is in the vmlinux binary. So please look up the address with
> objdump -ld vmlinux
> and see what .c files and which line in there are mentioned around the
> address. Then please look it up in the source and show me the function
> where this happens. As 2.6.17 is quite old it probably won't match with
> the current source I use.
>

It is around:

mnt/data1/src/drops/build/include/x86/l4/util/util.h:84
  4019e0:       83 0a 00                orl    $0x0,(%edx)

So it is the function:

/** Touch data areas to force mapping read-write */
static inline void
l4_touch_rw(const void*addr, unsigned size)
{
  const char *bptr, *eptr;
      
  bptr = (const char*)(((unsigned)addr) & L4_PAGEMASK);
  eptr = (const char*)(((unsigned)addr+size-1) & L4_PAGEMASK);
  for(;bptr<=eptr;bptr+=L4_PAGESIZE){
    asm volatile("or	$0,%0 \n"
                 :
                 : "m" (*(const unsigned*)bptr)
                 );
  }
}

And instruction "orl" is inside "asm volatile" block.

So, this function touches an area (BSS in this case) to make mapping read-write. But
why this does not work?

>
> Adam
> -- 
> Adam                 adam at os.inf.tu-dresden.de
>  Lackorzynski         http://os.inf.tu-dresden.de/~adam/
>









More information about the l4-hackers mailing list