lkml.org 
[lkml]   [2000]   [Nov]   [17]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
SubjectRe: VGA PCI IO port reservations
Date
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/

\
 
 \ /
  Last update: 2005-03-22 12:47    [W:0.102 / U:0.376 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site