Subject: Re: port-i386/13461: 1.5.1/1.5W does not work on FPU-less machines
To: Jun-ichiro itojun Hagino <itojun@iijlab.net>
From: Jaromír <jdolecek@netbsd.org>
List: port-i386
Date: 07/15/2001 20:14:56
Jun-ichiro itojun Hagino wrote:
> 	could someone (with more clue about MATH_EMULATION) please take
> 	a look at PR13461?  in short, NetBSD 1.5.1/1.5W does not work on 
> 	FPU-less i386 machines, while 1.5/1.5V does.

It seems it's not MATH_EMULATE specific issue at all. ping on my 386DX
doesn't work with -current, it's not able to even ping machine on other
side of cable; on ^C, it commonly waits very long in uvn_flush(), and gets
SIGSEGV eventually.
I've investigated a little and found out following commit probably
broke it - according to my tests, 2001/06/16 kernel works, but
2001/06/18 one doesn't (on 386DX; I've only updated arch/i386, rest
of syssrc/sys was left in state it's in -current).

"""
 Module Name:syssrc
 Committed By:sommerfeld
 Date: Sun Jun 17 21:01:39 UTC 2001

Modified Files:
 syssrc/sys/arch/i386/i386: compat_13_machdep.c db_interface.c
    db_trace.c genassym.cf ibcs2_machdep.c ibcs2_sigcode.s ipkdb_glue.c
    kgdb_machdep.c linux_sigcode.s locore.s machdep.c process_machdep.c
    svr4_machdep.c svr4_sigcode.s sys_machdep.c trap.c
 syssrc/sys/arch/i386/include: db_machdep.h frame.h pcb.h
 syssrc/sys/compat/linux/arch/i386: linux_machdep.c

Log Message:
Add %fs/%gs to trap frame and save/restore them on
trap/interrupt/syscall entry from userspace.

Remove special-case "by hand" validation of fs/gs register values as
well as special handling of them in various signal handling paths.

Now, like %ds and %es, they are validated by the hardware on return to
userland.

This paves the way for the use of %fs for per-cpu data on
multiprocessor systems, and fixes an otherwise difficult-to-fix
interaction between threads/clone(2) and USER_LDT.

Discussed in advance with Frank van der Linden."
"""

Jaromir
-- 
Jaromir Dolecek <jdolecek@NetBSD.org>      http://www.ics.muni.cz/~dolecek/
NetBSD - just plain best OS! -=*=- Got spare MCA cards or docs? Hand me them!