mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: <cutaway@bellsouth.net>
To: <linux-kernel@vger.kernel.org>
Subject: NPX init bugs in x86 head.S ???
Date: Sat, 4 Jun 2005 05:01:02 -0400	[thread overview]
Message-ID: <000701c568e3$fb67dcc0$2800000a@pc365dualp2> (raw)

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


                 reply	other threads:[~2005-06-04  8:08 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='000701c568e3$fb67dcc0$2800000a@pc365dualp2' \
    --to=cutaway@bellsouth.net \
    --cc=linux-kernel@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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®