The processor's I/O address space is separate and distinct from
the physical-memory address space. The I/O address space consists
of 2^16 (64K) individually addressable 8-bit I/O ports, numbered 0
through 0xffff. I/O port addresses 0xf8 through 0xff are reserved.
Do not assign I/O ports to these addresses.
So Intel says 0xf8-0xff should be kept alone. The linux kernel appears
to to put a fpu in the range.
%cat /proc/ioports
(...)
00f0-00ff : fpu
(...)
Why does linux does that? Do they feel it's no problem to rearrange
things if Intel changes things around? Can you explain how things
usually work for a kernel developer when reading Intel's manual and
seeing such advice?
Why does the fpu need an io port? I would think that once I execute a
floating point instruction, the cpu would hand the task to the fpu and
that would be transparent to the kernel.
I have a very modest background in the subject. Thank you.
As usual -- understand the problem (it can be a hardware, software or
documentation problem or a combination of them), see if it can
actually be there, if those statements are applicable. Figure out if
anything needs to be done about it, and if there's something, do it.
> Why does the fpu need an io port? I would think that once I execute a
> floating point instruction, the cpu would hand the task to the fpu and
> that would be transparent to the kernel.
>
> I have a very modest background in the subject. Thank you.
Quote from http://wiretap.area.com/Gopher/Library/Techdoc/Cpu/coproc.txt:
-----------8<-----------
The 80287
---------
The 80287 coprocessor-CPU interface is totally different from the 8087
design. Since the 80286 implements memory protection via an MMU based
on
segmentation, it would have been much too expensive to duplicate the
whole
memory protection logic on the coprocessor, which an interface
solution
similar to the 8087 would have required. Instead, in an 80286/80287
system,
the CPU fetches and stores all opcodes and operands for the
coprocessor.
Information is then passed through the CPU ports F8h-FFh. (As these
ports are
accessible under program control, care must be taken in user programs
not to
accidentally perform write operations to them, as this could corrupt
data in
the math coprocessor.)
-----------8<-----------
And the same was true for 80387 FPUs.
But I don't think any of the above is relevant nowadays since the x87
functionality is implemented in the same CPU chip now.
Alex