l4-hackers Digest, Vol 59, Issue 7

Adam Lackorzynski adam at os.inf.tu-dresden.de
Mon Mar 10 00:38:35 CET 2008


On Sun Mar 09, 2008 at 18:21:52 +1200, Valery V. Sedletski wrote:
> 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?

I have no idea, I've never seen this before. Is there the possibility to
update the source so that we can work on the same basis?



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