Re: PQOAL PCI BusID vs Bus Number Problem

Tech-Archive recommends: Repair Windows Errors & Optimize Windows Performance

From: Karel Danihelka [MSFT] (KarelD_at_online.microsoft.com)
Date: 01/07/05

  • Next message: Zhongwei Wang at AppliedData: "Re: Can not write to SD card"
    Date: Fri, 7 Jan 2005 13:01:31 -0800
    
    

    1) Original intention is add support for system with multiple PCI buses
    (SG2_VR5500 BSP is example). Unfortunately name is easily to be confused
    with bus number (which identify bus on particular PCI hardware).

    2) There are to ways how to differentiate.

    2a) For original CEDDK HalGetBusDataByOffset/HalSetBusDataByOffset we used
    fact that BusNumber is ULONG variable. As long as PCI bus number is only
    byte value we use upper 24 bits as BusId (see code in
    common\src\common\io\ioctl.c). There is new registry value for PCI bus which
    allows you to specify this BusId. At end IOCTL_HAL_DDK_CALL with
    IOCTL_HAL_SETBUSDATA/IOCTL_HAL_GETBUSDATA codes are called.

    2b) There are new codes in IOCTL_HAL_DDK_CALL
    (IOCTL_OAL_READBUSDATA/IOCTL_OAL_WRITEBUSDATA) which can be used for less
    cryptic CEDDK functions. They are used in OAL implementation (see
    common\src\common\ceddk\ddk_bus). But as long as we implement same CEDDK
    HalGetBusDataByOffset/HalSetBusDataByOffset there isn't difference for
    device driver. But there is chance to extend CEDDK library in future or on
    platform bases.

    Let me know if you have another question.

    -- 
    Karel Danihelka
    ---
    Windows CE CoreOS
    This posting is provided "AS IS" with no warranties, and confers no rights.
    ---
    "Dean Ramsier" <ramsiernospam@nospam.com> wrote in message 
    news:Od3%236NP9EHA.3124@TK2MSFTNGP11.phx.gbl...
    > The OALxxx PCI routines (e.g. OALPCICfgWrite) all take a BusID parameter, 
    > in
    > addition to the regular PCI location address.  There is no documentation 
    > on
    > the parameters, but the bus ID appears to be intended for additional PCI
    > interfaces, while the bus portion of the PCI address defines secondary 
    > buses
    > behind a PCI bridge.  In most cases, the BusID parameter would be zero,
    > unless there were multiple host bridges in the system.
    >
    > However, the CEDDK functions (HalGetBusData etc) don't have a BusId
    > parameter, this is apparently something new that was defined with the 
    > PQOAL.
    > The CEDDK maps calls to the HalXXX  functions to IOCTL_HAL_DDK_CALL, and
    > from there on to the OAL functions.  However, the BusID parameter needs to
    > be set, so the PQOAL fills in this parameter with the PCI bus number.
    > Unfortunately, the OAL sees calls for secondary buses as calls for buses 
    > on
    > another interface.  Obviously, the cpu dependent code can ignore the BusID
    > parameter and just use the PCI device location for any system that has 
    > only
    > one host interface.
    >
    > Questions:
    > - What is the purpose of the BusID parameter in the PQOAL routines, and 
    > how
    > is it different from the bus portion of the address?
    > - If there are multiple interfaces (multiple host buses) how are they
    > supposed to be differentiated in calls to the CEDDK configuration 
    > routines?
    >
    > Any other thoughts on this?
    >
    > -- 
    > Dean Ramsier - eMVP
    >
    > 
    

  • Next message: Zhongwei Wang at AppliedData: "Re: Can not write to SD card"

    Relevant Pages

    • Re: howto determine network device unit number? device.hints?
      ... Could it be how your BIOS and hardware set up the PCI IDSEL lines at boot? ... Based on the data you've provided about the issue to date, my best guess is that something in the above is different on your system (which is why I mentioned IDSEL lines -- the mechanism PCI uses to actually assign bus numbers electrically). ... Normally the behaviour of FreeBSD's bus probes is well known -- nexus is walked for child buses, then these buses are plumbed into NEWBUS, e.g. cpu0...cpuN on nexus itself, PCI buses, and PCI subordinate buses in that order. ...
      (freebsd-net)
    • Re: howto determine network device unit number? device.hints?
      ... Could it be how your BIOS and hardware set up the PCI IDSEL lines at boot? ... Based on the data you've provided about the issue to date, my best guess is that something in the above is different on your system (which is why I mentioned IDSEL lines -- the mechanism PCI uses to actually assign bus numbers electrically). ... Normally the behaviour of FreeBSD's bus probes is well known -- nexus is walked for child buses, then these buses are plumbed into NEWBUS, e.g. cpu0...cpuN on nexus itself, PCI buses, and PCI subordinate buses in that order. ...
      (freebsd-questions)
    • Re: PQOAL PCI BusID vs Bus Number Problem
      ... bus ID, and the lower 8 bits are the bus number. ... The stock PCI bus driver doesn't handle multiple PCI interfaces, ... > The OALxxx PCI routines all take a BusID parameter, ... the CEDDK functions don't have a BusId ...
      (microsoft.public.windowsce.platbuilder)
    • Device Drivers For Different IO Bus architectures
      ... I am trying to find out some details about writing device drivers. ... If a device is capable of talking to different IO buses like PCI / ... ISA / PCI express etc. ... Bus as required and if the interface to the layer2 / firm ware is kept ...
      (comp.arch.embedded)
    • Kernel error "kernel BUG at drivers/gpu/drm/i915/i915_gem.c:2136!"
      ... Jul 6 20:03:32 plynn54 kernel: last sysfs file: ... Jul 6 20:04:52 plynn54 nm-dispatcher.action: Disconnected from the system bus, ... Allocating PCI resources starting at d4000000 ... usbcore: registered new interface driver usbfs usbcore: registered new interface driver hub usbcore: registered new device driver usb ...
      (Linux-Kernel)