Subject: Re: Status of math_emulate
To: None <port-i386@netbsd.org>
From: Pierre Dubuc <pldubuc@yahoo.ca>
List: port-i386
Date: 02/25/2007 19:57:48
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Replying to message <6e9741c60702251346n517be221l4952a7822e907c9b@mail.gmai...

> 
> Only the 486SX was FPU-less.  Pierre, do you have an entry for the npx
> device in your kernel configuration?
>

I just booted a GENERIC kernel (which includes an npx device), and dmesg 
gives me the following:

NetBSD 3.1 (GENERIC) #0: Tue Oct 31 04:27:07 UTC 2006

builds@b0.netbsd.org:/home/builds/ab/netbsd-3-1-RELEASE/i386/200610302053Z-
obj/home/builds/ab/netbsd-3-1-RELEASE/src/sys/arch/i386/compile/GENERIC
total memory = 15616 KB
avail memory = 6820 KB
mainbus0 (root)
cpu0 at mainbus0: (uniprocessor)
cpu0: Intel 486DX (486-class)
isa0 at mainbus0
lpt0 at isa0 port 0x378-0x37b irq 7
com0 at isa0 port 0x3f8-0x3ff irq 4: ns8250 or ns16450, no fifo
com1 at isa0 port 0x2f8-0x2ff irq 3: ns8250 or ns16450, no fifo
pckbc0 at isa0 port 0x60-0x64
pckbd0 at pckbc0 (kbd slot)
pckbc0: using irq 1 for kbd slot
wskbd0 at pckbd0: console keyboard
wdc0 at isa0 port 0x1f0-0x1f7 irq 14
atabus0 at wdc0 channel 0
we1 at isa0 port 0x300-0x31f iomem 0xcc000-0xcdfff irq 10
we1: SMC8416T Ethernet (16-bit)
we1: Ethernet address 00:e0:29:16:74:09
vga0 at isa0 port 0x3b0-0x3df iomem 0xa0000-0xbffff
wsdisplay0 at vga0 kbdmux 1: console (80x25, vt100 emulation), using 
wskbd0
wsmux1: connecting to wsdisplay0
pcppi0 at isa0 port 0x61
midi0 at pcppi0: PC speaker
sysbeep0 at pcppi0
isapnp0 at isa0 port 0x279: ISA Plug 'n Play device support
fdc0 at isa0 port 0x3f0-0x3f7 irq 6 drq 2
isapnp0: no ISA Plug 'n Play devices found
fd0 at fdc0 drive 0: 1.44MB, 80 cyl, 2 head, 18 sec
Kernelized RAIDframe activated
wd0 at atabus0 drive 0: <NEC Corporation D3717>
wd0: drive supports 16-sector PIO transfers, chs addressing
wd0: 515 MB, 1048 cyl, 16 head, 63 sec, 512 bytes/sect x 1056384 sectors
wd0: drive supports PIO mode 3
boot device: wd0
root on wd0a dumps on wd0b
root file system type: ffs
wsdisplay0: screen 1 added (80x50, vt100 emulation)
wsdisplay0: screen 2 added (80x50, vt100 emulation)
wsdisplay0: screen 3 added (80x50, vt100 emulation)
wsdisplay0: screen 4 added (80x50, vt100 emulation)
wsdisplay0: screen 5 added (80x50, vt100 emulation)
wsdisplay0: screen 6 added (80x50, vt100 emulation)
wsdisplay0: screen 7 added (80x50, vt100 emulation)


The AMI BIOS setup screen does have an option for "Numeric Processor 
Test", which is enabled, and an option for "Weitek Processor", for which I 
tried both enabled and disabled. Booting a GENERIC kernel with either 
option gives me the same dmesg output, and a failure on the sqrt call 
(e.g. from a ping command).

The bottom line, it seems, is that although the kernel probe says I 
have a 486DX, the hardware is rather a 486SX, lacking an FPU, and 
therefore must rely on the MATH_EMULATE option in the kernel, which from 
what I saw is incomplete in its implementation.

- -- 
Pierre Dubuc
pldubuc@yahoo.ca
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.6 (NetBSD)

iEYEARECAAYFAkXiMJUACgkQaMA1iJ2qYmJi0gCgyU+w3uVuJNkaTY+JDyPfVvTo
F/QAn1SAZoGgXr2glmuZPd4IA4lj/6hC
=MppR
-----END PGP SIGNATURE-----