Re: COMPAT_IRIX, N32, mmap for /dev/zero.
"GIRISH V. GULAWANI" <[email protected]> Thu, 25 Jul 2002 05:24:42 -0700 (PDT)
| Newsgroups | gmane.os.netbsd.ports.mips |
|---|---|
| Message-ID | <[email protected]> |
Hi. Actually if I understand correct, the ktrace itself is made for the NetBSD which may not have any information about any emulated platforms like IRIX. As I understand there are differences between the NetBSD & IRIX the way the syscalls work. Anyways your tip was very helpful. Thanks. Firstly, I think there is parameter mismatch. I found out that the O32 binaries work propely & pass all the parameters correct to mmap(). But the N32 binaries don't pass correct parameters to mmap(). The trace dump shows /dev/zero is opened correctly & acquired the fd as 3. However its not passed to mmap(). Could anyone please help me in understanding why this would happen?? Secondly, whether we implement, mmap() for /dev/zero device??? Many thanks & best regards, Girish. --- "GIRISH V. GULAWANI" <[email protected]> wrote: > > hi. > i checked N32 binary with ktrace+kdump on the > command > "mipscheck". it shows the shutdown() call has failed > & > that it has returned error as invalid argument. now > what i don't understand is why /dev/zero would call > shutdown which is a socket call. > after enabling the DEBUG_SYSCALLS, it is confirmed > that rld_sbrk calls mmap() for /emul/irix/dev/zero & > since it isn't there, it calls for /dev/zero. this > mmap() infact has failed. perhaps because, it does > not > have handle on zero device. another problem here is, > the device number passed by irix_mmap() through > arguments to sys_mmap() is 0. i'd expect it to be > (2,12). and that is the reason the uvm_mmap() has > failed to see correctly mmmap() implementation for > zero device. instead it returns error, which happens > to match, had it been the zero device handle. > i'd like to know is how to get the device handle & > whether we can implement mmap() in the mem.c for the > zero device?? then how to?? > thanks. > girish. > > > --- "GIRISH V. GULAWANI" <[email protected]> wrote: > > > > yes i understand (37,0) is not the /dev/zero, > > instead > > its (2,12). infact i am using the latter one only. > > > i am having a standlone init, with couple of basic > > daemons. i am able to execute any O32 command > either > > compiled for NetBSD or IRIX. also a N32 command > like > > "sh" is also getting executed. > > i haven't done ktrace for these binaries. thanks > for > > suggestion. > > btw, i am running this on Malta board with 64MB > RAM. > > is this alright?? > > > > --- Jaromir Dolecek <[email protected]> wrote: > > > Device (37, 0) is pms0 under NetBSD/i386, it may > > not > > > be even > > > assigned under sgimips. Thus, the > > > /emul/irix/dev/zero device > > > you created was most definitely not okay; if you > > > really feel > > > you need it, it should be softlinked to NetBSD > > > /dev/zero. > > > > > > Are your process limits bumped high enough? What > > > does > > > ktrace of the binary reveal? > > > > > > GIRISH V. GULAWANI wrote: > > > > > > > > Hello, all. > > > > After adding COMPAT_IRIX option to the kernel > I > > am > > > > able to bring up the shell "sh" of IRIX 6.3, > > which > > > I > > > > suppose is N32 type. Some other commands > > basically > > > O32 > > > > are also okay. However commands like elfdump, > > > > mipscheck fail. The error message appears as > -- > > > > rld_sbrk: Can't map /dev/zero -- probably not > > > enough > > > > virtual memory. > > > > As I understand its trying to mmap the device > > > > /dev/zero but since mmap is not initialized & > > also > > > not > > > > implemented, the sbrk fails to map. Please > note > > > that I > > > > am just using lib & lib32. I am not emulating > > IRIX > > > > devices. If I add /emul/irix/dev/zero, device > > > number > > > > (37, 0), even the O32 binaries mentioned above > > do > > > not > > > > work. For example "uname -a" does not work in > > this > > > > case, while it works if I dont add emulation > > > device. > > > > Could anybody please help me in trying to > figure > > > out > > > > how to handle this situation?? > > > > Many thanks & regards, > > > > Girish. __________________________________________________ Do You Yahoo!? Yahoo! Health - Feel better, live better http://health.yahoo.com