Re: [PARPORT] I/O ports and the parallel interface

From: Joe Lang (lang@fs1-nhdw.nws.noaa.gov)
Date: Wed Jan 29 2003 - 18:27:36 EST

  • Next message: Tim Waugh: "Re: [PARPORT] I/O ports and the parallel interface"

    On Wed, 29 Jan 2003, Tim Waugh wrote:

    > On Wed, Jan 29, 2003 at 08:56:16PM +0000, Joe Lang wrote:
    >
    > > Is there a way to query the kernel (or some other system resource)
    > > to determine the I/O ports used by a parallel port adaptor?
    > > You know, the base/data, the status, and the control I/O ports.
    > > I do understand that the status and control ports are offset from the base,
    > > so if I can get the base, that would be enough.
    >
    > The first question to ask it whether you need to know those numbers at
    > all. The kernel provides an interface for accessing those ports
    > without needing to know things like base addresses (the ppdev driver).

    Really?
    How does one use ppdev...like /dev/ports?
    What if there are 2 or more parallel adaptors?

    > Also, you can use a library like libieee1284 to get a nicer
    > programming interface to it.
    >
    > > If I look at the output from the dmesg command I see info like:
    > > parport0: PC-style at 0x378 [SPP,PS2]
    > > How does the parport driver determine the 0x378 value displayed above?
    >
    > The kernel figures this out by guessing, largely.
    Guessing?
    You are kidding...right?
    In the old days we would look at segment 0x40 (the bios data area)
    when a protected mode processor was in real mode to determine such information.

    How much other guessing is done in Linux?

    Joe

    -- To unsubscribe, send mail to: linux-parport-request@torque.net --
    -- with the single word "unsubscribe" in the body of the message. --



    This archive was generated by hypermail 2b29 : Wed Jan 29 2003 - 18:29:05 EST