PCI fundas - Embedded

This is a discussion on PCI fundas - Embedded ; Hi all, I want to know the PCI fundas 1. How the PCI Buses are enumerated while booting linux? 2. How it detects the Vendor ID,Device ID,etc., and make the device structure for various cards? 3. What Happens if two ...

+ Reply to Thread
Results 1 to 2 of 2

Thread: PCI fundas

  1. PCI fundas

    Hi all,

    I want to know the PCI fundas
    1. How the PCI Buses are enumerated while booting linux?
    2. How it detects the Vendor ID,Device ID,etc., and make the device
    structure for various cards?
    3. What Happens if two or more same cards which are having same DEVICE
    ID,VENDOR ID,and
    SUB-SYSTEM ID connected to the slots.I mean to say,
    Are they having same IRQs,same IRQ_FLAGS(SA_INTERRUPT/SA_SHIRQ)?
    4.In the prev case, Is kernel allocate any different adderss space for
    each (same kind of) cards ?
    Please reply me ASAP
    Thanks
    Rafi.


  2. Re: PCI fundas

    I'm not an expert, so maybe I'm wrong...

    > 1. How the PCI Buses are enumerated while booting linux?


    This is done by the BIOS before Linux is started. The configuration is
    stored in the CMOS RAM and if the configuration is changed by
    (un)plugging cards, interrupts, IO/Ranges and memory Ranges are
    redistributed.

    > 2. How it detects the Vendor ID,Device ID,etc., and make the device
    > structure for various cards?


    Linux uses an API to ask the BIOS.

    > 3. What Happens if two or more same cards which are having same DEVICE
    > ID,VENDOR ID,and
    > SUB-SYSTEM ID connected to the slots.I mean to say,
    > Are they having same IRQs,same IRQ_FLAGS(SA_INTERRUPT/SA_SHIRQ)?


    No IRQs memory and I/O ranges are distributed according to the request
    of the cards (they have a serial flash to that contains the requests
    (and DEVICE ID, VENDOR ID) ), separately for each card (addressed as
    bus-NR / Card NR).

    > 4.In the prev case, Is kernel allocate any different adderss space for
    > each (same kind of) cards ?


    The driver _should_ use the memory and I/O addresses assigned by the
    BIOS (though technically it _could_ use something else, but I doubt that
    this makes any sense).


    -Michael

+ Reply to Thread