Re: VGA PCI IO port reservations

From: H. Peter Anvin (hpa@zytor.com)
Date: Fri Nov 17 2000 - 15:13:53 EST


Followup to: <200011171953.TAA01877@raistlin.arm.linux.org.uk>
By author: Russell King <rmk@arm.linux.org.uk>
In newsgroup: linux.dev.kernel
>
> Richard B. Johnson writes:
> > The code necessary to find the lowest unaliased address looks like
> > this:
>
> Any chance of providing something more readable? I may be able to read
> some x86 asm, but I don't have the time to try to decode that lot.
>

Ignore this code. It's bullshit -- you can't just go and poke random
boards -- even with IN's -- indiscriminately. As usual, Richard is
writing long lectures on subjects he is seriously mistaken about (and
probably will send me yet another email trying to browbeat me into not
calling him on all his errors.)

The standard algorithm, documented in many places, is the one I gave
before:

        (port >= 0x1000 && (port & 0x0300) == 0)

Allocating ports in any other ranges is unsafe.

        -hpa

-- 
<hpa@transmeta.com> at work, <hpa@zytor.com> in private!
"Unix gives you enough rope to shoot yourself in the foot."
http://www.zytor.com/~hpa/puzzle.txt
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
Please read the FAQ at http://www.tux.org/lkml/



This archive was generated by hypermail 2b29 : Thu Nov 23 2000 - 21:00:14 EST