Re: Clarification on IO Operations

From: Tauno Voipio (tauno.voipio_at_iki.fi.NOSPAM.invalid)
Date: 12/29/04


Date: Wed, 29 Dec 2004 09:37:42 GMT

guruteck@gmail.com wrote:
> Thanx a lot
> But Still I am not completely clear and having these doubts
>
> How Processor recognizes different IO devices based on Port
> numbers??

It does not - the I/O devices identify their
own port number (address) ranges from the bus, and
they perform port accesses only when the correct
port numbers are on the bus address lines.

> Where these port addresses (corresponding to All IO devices) are
> stored???

Nowhere. See above.

In Linux, the kernel stores a list of port
ranges it knows of. Have a look at /proc/ioports.
The list is built by device drivers reporting
the address ranges they are prepared to handle.

> Can a port shared between 2 devices???

Generally - no.

There are schemes of port overlays or
buried registers, but they are very special cases.

> How a hardware manufacturer come to know which port is free and can
> be used???

The port number assignments are ultimately
in the hands of the person putting a system
together - nobody else knows what I/O devices
are in the whole system (= Processor + I/O devices).

This is why many devices include a means of
changing the address range where the porta are
located.

In PC world, the different extensions to the
basic ISA bus have attacked this port (and
memory) assignment problem. The PnP (Plug and Play)
specification was the first attempt to automate
the address resolution. The PCI bus methods of
address negotiation can be regarded as a better
solution to this same problem.

> Also plz specify any link which can clarify this.I am clobbered by
> means of different processor manuals

The processor manuals do not explain the system-
level solutions to the resource assignment problem.
It includes memory range assignment, I/O assignment
and interupt line assignment.

-- 
Tauno Voipio
tauno voipio (at) iki fi


Relevant Pages

  • usb_insert_transfer panic with if_zyd
    ... When I use my ZyXEL G-220 Wireless USB Stick with the if_zyd driver, ... <ACPI PCI bus> on pcib0 ... device problem, disabling port 1 ... <Ethernet over FireWire> on firewire0 ...
    (freebsd-current)
  • cd drive problems when trying to play an audio cd on 5.1
    ... acpi0: power button is handled as a fixed feature programming model. ... <ACPI PCI bus> on pcib0 ... <Parallel port bus> on ppc0 ... on ppbus0 ...
    (freebsd-questions)
  • kernel panic on 5.4-RELEASE-p6
    ... # Floating point support - do not disable. ... # PCI Ethernet NICs that use the common MII bus controller code. ... configured irq 4 not in bitmap of probed irqs 0 ... port may not be enabled ...
    (freebsd-stable)
  • ASUS A7N8X-X motherboard
    ... vendor = 'NVIDIA Corporation' ... class = memory ... pci0: <PCI bus> on pcib0 ... <Parallel port bus> on ppc0 ...
    (freebsd-current)
  • atapicam, cdrecord, and my gaping clue deficiency
    ... Pentium Pro MTRR support enabled ... pci0: <PCI bus> on pcib0 ... slot 8 INTA routed to irq 28 ... <Parallel port bus> on ppc0 ...
    (freebsd-questions)