linux-mips
[Top] [All Lists]

Re: [Q: Linux/SGI] IRIX executable memory map.

To: wje@fir.engr.sgi.com
Subject: Re: [Q: Linux/SGI] IRIX executable memory map.
From: Miguel de Icaza <miguel@nuclecu.unam.mx>
Date: Fri, 5 Sep 1997 18:47:53 -0500
Cc: linux@fir.engr.sgi.com
In-reply-to: <199709052251.PAA20078@fir.engr.sgi.com> (wje@fir.engr.sgi.com)
Sender: owner-linux@cthulhu.engr.sgi.com
>      0x20000 (not 0x200000) is automatically mapped in a process
> by the kernel when referenced.  See <sys/prctl.h> on IRIX for
> the definitions.  

Ok, thanks for the pointer.  btw, the code seems to indicate that the
address is indeed 0x200000 (it does a lui $reg,0x20).  Oops.  Hold
on.  The sys/prctl agrees with me, it is 0x200000.

That structure looks very promising, I will go and fill it.

> Most of the fields you can probably ignore, but you should set
> t_pid, t_rpid, and t_prid (where the latter is the value of the
> $prid COP0 register).  Set t_pid and t_rpid to the pid of the
> process.  (They cannot really be different in IRIX.)

Ok.  There is another bit that looks promising: the t_cpu field, which
is supposed to have the cpu number where the process is executing.
Does IRIX update this on every context switch? 

>      Simply automatically create the page in the page fault handler
> when it is first referenced.  Treat as if it were an mmap() of /dev/zero
> for 1 page.

Ok.  The code that I used last night to work around this was to map
a /dev/zero page at sys_irix_elfexec time, I think I will just poke
the right values there.

best wishes and thanks for this pointer!
Miguel.

<Prev in Thread] Current Thread [Next in Thread>