* NPX init bugs in x86 head.S ???
@ 2005-06-04 9:01 cutaway
0 siblings, 0 replies; only message in thread
From: cutaway @ 2005-06-04 9:01 UTC (permalink / raw)
To: linux-kernel
Below is the code snip that checks for a hardware NPX - which it does OK.
But, how can enabling a 287 ever work in a paged environment? A 287 NPX
only has internal registers capable of handling 16:16 segmented protected
mode addresses. Once paging is enabled and 16:32 addresses start getting
generated I should think everything falls apart. At a minimum, if nothing
else died first, any reported exception CS:IP's would certainly be bogus
having only 16 bits of IP coming back to the 386 from the NPX.
Am I missing something here?
Tony
------------------CUT-------------------
/*
* We depend on ET to be correct. This checks for 287/387.
*/
check_x87:
movb $0,X86_HARD_MATH
clts
fninit
fstsw %ax
cmpb $0,%al
je 1f
movl %cr0,%eax /* no coprocessor: have to set bits */
xorl $4,%eax /* set EM */
movl %eax,%cr0
ret
ALIGN
1: movb $1,X86_HARD_MATH
.byte 0xDB,0xE4 /* fsetpm for 287, ignored by 387 */
ret
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2005-06-04 8:08 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2005-06-04 9:01 NPX init bugs in x86 head.S ??? cutaway
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®