Re: PCI Address Decoder

From: Tim Roberts (timr_at_probo.com)
Date: 04/17/05

  • Next message: Zeljko Vrba: "ANN: secure password generator v1.1"
    Date: Sat, 16 Apr 2005 22:14:13 -0700
    
    

    "UNM" <zhjing@unm.edu> wrote:
    >
    >I am developing a PCI device driver for Linux. The device is a DSP by
    >itself, which is connected to the PCI slot on the PC.
    >
    >I was told by the device manufacture that the 18, 19th bit of the ADDRESS
    >(in kernerl linear memory space) that goes to the PCI device will be
    >interpreted by a "DECODER" as control signal, e.g., if both are 1s, the DSP
    >will reset. So, in order to reset the DSP, I will have to write 0 to a
    >specific address where 31~20 bit represent the device base address, the 18,
    >19th bit represent config. command to the DSP and 0~16 bits represent data.
    >
    >Can anybody tell me what is exactly this PCI Address decoder?

    The address decoder is part of the DSP. Your driver will map the device's
    address space into linear address space. The top 12 bits will be provided
    by the page mapping hardware in the processor. The other bits are entirely
    under your control. Basically, you need a statement something like this

        *(unsigned long *)(baseAddr + 0xC0000) = 0;

    where baseAddr is the linear address you get back from the mapping.

    It's not unheard of for hardware designers who think they are very clever
    to pack data bits into the address lines. Personally, I think it is a
    stupid concept. How do you debug it? How can I READ the data I just
    wrote?

    >BTW, is that true in PCI bus that the data and address share the same
    >(physical) 32 bit bus?

    Yes. The address and data are time multiplexed on the same set of pins,
    either 32-bit or 64-bit.

    >Is address and data are transmitted at the same time?

    No. Address goes first, then data. In the case of burst writes, you get
    one address, then a whole bunch of data cycles.

    -- 
    - Tim Roberts, timr@probo.com
      Providenza & Boekelheide, Inc.
    

  • Next message: Zeljko Vrba: "ANN: secure password generator v1.1"

    Relevant Pages

    • Re: help please
      ... please help me where can i get free source code on PCI device driver ... It's fairly easy to write a VxWorks driver for a PCI device. ... I don't know of any free source code - do you have some specific ...
      (comp.os.vxworks)
    • Re: Install Driver Error (CM_PROB_FAILED_START)
      ... Maxim Shatskih, Windows DDK MVP ... I am write a PCI Device Driver, but got a problem, ... we total plug in the smae 30 PCI Device on the PCI bus, ...
      (microsoft.public.development.device.drivers)
    • Install Driver Error (CM_PROB_FAILED_START)
      ... I am write a PCI Device Driver, but got a problem, ... we total plug in the smae 30 PCI Device on the PCI bus, ...
      (microsoft.public.development.device.drivers)
    • Re: PCI hardware specification
      ... > to write a PCI device driver for any specific device but unfortunately ... > I donot have any device's hardware spefications. ... > PCI device, that will be great help to me. ...
      (comp.os.linux.development.system)