Subject: linux emulation questions
To: None <port-i386@NetBSD.ORG>
From: None <Robert.Baron@ERNST.MACH.CS.CMU.EDU>
List: port-i386
Date: 09/26/1996 19:16:00
I am running some emulated linux code, in a 1.2'ish kernel from
August 5.

---------------------------------------------------------------------
1. Is there still no way to distinguish between svr4 elf and linux elf.
   If so, I'd like to suggest that the kernel issue a warning iff
   the kernel has both compat_svr4 and compat_linux on.

---------------------------------------------------------------------
2. In the following code, I'm getting a FPE exception at the arrow.  Is
   fp different between linux and netbsd?
     pushl   %ebp
     movl    %esp,%ebp
     movl    0x10(%ebp),%edx
     movl    $0x182d9368,0x2c(%edx)
     fldl    0x182d93b0
     faddl   0x182d93b8
     faddl   0x182d93c0		<<<<<<<<<<<*****npxintr()
     fstpl   0(%edx)
     fldl    0x182d93c8
     faddl   0x182d93d0
     faddl   0x182d93d8
     fstpl   0x8(%edx)
     faddl   0x182d93e8
     faddl   0x182d93f0
     fstpl   0x10(%edx)
     fldl    0x8(%edx)
     fldl    0x182d26d0
     fcomp   %st(1),%st
     fnstsw  %ax
     andb    $0x45,%ah
     jz      0x182a3bb0
---------------------------------------------------------------------
3. In linux there is a hack when you do a modify_ldt syscall with
   base & limit == 0.  This sets the ldt entry to 0.  netbsd does
   not recognize this "feature".
---------------------------------------------------------------------
4. Bad news: I had not run this kernel on a SCSI machine before.
   I just ran on a EISA machine with a 1742, the system was also
   config'ed to scan for a 1542.  Clearly, it thought it saw a
   very broken 1542.


[ preserving 120804 bytes of netbsd symbol table ]
Copyright (c) 1982, 1986, 1989, 1991, 1993
	The Regents of the University of California.  All rights reserved.

NetBSD 1.1 (SCSI) #0: Wed Sep 25 15:49:51 EDT 1996
    rvb@strauss.coda.cs.cmu.edu:/usr1/rvb/src/sys12B/arch/i386/compile/SCSI
CPU: Pentium (GenuineIntel 586-class CPU)
     Feature Mask 1bf<??,MCE,MSR,TSC,4MB,IOB,VV86,FPU>, CR4 0)
real mem  = 33161216
avail mem = 28647424
using 430 buffers containing 1761280 bytes of memory
mainbus0 (root)
pcmbus at mainbus0 not configured
isa0 at mainbus0
com0 at isa0 port 0x3f8-0x3ff irq 4: ns16550a, working fifo
com0: console
com1 at isa0 port 0x2f8-0x2ff irq 3: ns16550a, working fifo
lpt0 at isa0 port 0x378-0x37f irq 7
aha0 at isa0 port 0x330-0x333 irq 11 drq 5: model AHA-1542C, firmware A.H
aha0: unlocking mailbox interface
aha0: aha_cmd, cmd/data port empty 1
aha0: aha_cmd, cmd/data port empty 7
aha0: aha_cmd, cmd/data port full
aha0: async, no parity
aha0 targ 1: sync, offset 8, period 550nsec
aha0 targ 3: sync, offset 14, period 250nsec
aha0 targ 5: sync, offset 8, period 550nsec
aha0: aha_cmd, host not idle(0x2c)
scsibus0 at aha0
probe(aha0:0:0): timed outaha0: not taking commands!
Stopped at      _Debugger+0x4:  leave