Re: Question about PCIbus.dll in Windows CE 6.0

Tech Tip: Click here to run a free scan for Windows Errors and optimize PC performance



The PCI bus driver does all the work of enumeration for you. It then stores
information in the registry. The OS provides helper functions that allow
you to easily retrieve that information. See DDKReg_GetPciInfo() in the
documentation. This mechanism allows the bus enumeration logic to be
contained in a single driver, where it belongs. Individual client drivers
don't have to enumerate the bus to find their devices.

The only registry information you need to add is the identifiers that allow
the PCI bus driver to identify your device and then load a client driver for
it. You seem to be wanting to skip writing a driver, and just access
directly from an application. This isn't going to work well in CE6. The
calls that allow physical memory addresses to be mapped into user space are
only valid in kernel mode. Therefore, you will need to move your device
access code into a driver, or into a kernel mode library. With CE6,
applications can no longer perform operations that are normally associated
with drivers.

The DDKReg_GetPciInfo() function is intended to be used by your driver so it
knows where the device has been located. Your driver then must expose a
stream interface that your application can use to interact with the device.

--
Dean Ramsier - eMVP
BSQUARE Corporation


"Don" <Don@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote in message
news:4DE1D435-3F1C-4C16-9544-0FC87E2C9FDC@xxxxxxxxxxxxxxxx
Hi Dean,

The following is a portion of the debug window that is being reported back
when I load my Window CE 6.0 image. I can tell that my PCI card has been
found by some software? PCIBus.dll I think. Its Vender ID is 0x1895. I
have
searched through source code in the VIA BSP directory under
C:\WINCE600\PLATFORM\VIACN. I can not find any of the text that is being
printed here. I am having a hard time figuring out from this info and the
documentation under PCI BUS Driver how much of the PCI driver work has
been
done by VIA and how much I still need to do as far as setting registry
values
etc. All I really want to do is grab the BaseAddresses translate them and
expose them to an application so I can read and write my PCI card. I
would
appriciate any comments you have so I can get on the right track.

-------------------------------------------------------------------------------
4294817539 PID:400002 TID:1150002 PCIBUS!PCICfgCheckBARs: WARNING: No
matching registry key was found for placed device 0/17/1.
4294817540 PID:400002 TID:1150002 PCIBUS!PCICfgCheckBARs:
Problems
can result if the device is being used while configuring PCIbus.
4294817542 PID:400002 TID:1150002 Warning: No Match template is found for
following PCI Device
4294817542 PID:400002 TID:1150002
-------------------------------------------------------------------------------
4294817542 PID:400002 TID:1150002 Bus/Device/Function = 0/20/0, Other
Bridge
4294817543 PID:400002 TID:1150002 VendorID = 0x1895, DeviceID = 0x0001,
Command = 0x0007, Status = 0x0280
4294817543 PID:400002 TID:1150002 RevisionID = 0x01, ProgIf = 0x00,
SubClass = 0x80, BaseClass = 0x06
4294817544 PID:400002 TID:1150002 CacheLineSize = 0x08, LatencyTimer =
0x20, HeaderType = 0x00, BIST = 0x00
4294817544 PID:400002 TID:1150002 BaseAddresses:
4294817545 PID:400002 TID:1150002 0xDE00D000 0x0000E001 0x00000000
0x00000000 0x00000000 0x00000000
4294817545 PID:400002 TID:1150002 CIS = 0x00000000, SubVendorID =
0x1895,
SubSystemID = 0x0001
4294817545 PID:400002 TID:1150002 ROMBaseAddress = 0x00000000
4294817546 PID:400002 TID:1150002 InterruptLine = 0x05, InterruptPin =
0x01, MinGrant = 0x08, MaxLatency = 0x1A
--
Don


"Dean Ramsier" wrote:

Yes, this is the PCIBus driver provided by MS. Note that it might not be
the one used by your device since your BSP could have a cloned/modified
version itself.

Don't make changes to this directory. If you want to modify it, clone
(copy) it to your BSP and make the changes there. To answer your
question,
just doing a sysgen would not be sufficient to get the changes. You
would
have to also build the directory, or do a Build and Sysgen. But don't do
that, it could cause you problems and is unnecessary.

CreatePCIBus is called by Enumerate, which is called by Init, which is
the
driver entry point. At least, that's the case in CE5, I don't have CE6
in
front of me.

--
Dean Ramsier - eMVP
BSQUARE Corporation


"Don" <Don@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote in message
news:A8C4B03C-57B3-47BC-A810-A7CDF6D182A6@xxxxxxxxxxxxxxxx
Hi,

I am trying to Write to a PCI card I have attached to my Mini-ITX M11
motherboard running Windows CE 6.0. I have been reading the
documentation.
In particular I have a question about the following statement

The PCI Bus driver is in %_WINCEROOT%\Public\Common\Oak\Drivers\PCIbus.
It
is responsible for enumerating the PCI bus and loading device drivers
for
all
PCI devices it finds and recognizes on the bus.

I am assuming that this is the source code for PCIbus.dll. Let me know
if
I
am wrong. If I make changes to the code in this directory would they
be
in
PCIbus.dll the next time I did a clean sysgen. If this is true. Then
what
calles the function
BOOL CreatePciBus(LPCTSTR lpActiveRegPath, LPCTSTR lpInstanceRegPath).
Not sure if I am on the righ track here. I would appreciate anyones
help.
--
Don





.



Relevant Pages

  • Re: Example PCI driver?
    ... I wasn't aware that the PCI bus driver sends it's enumeration info out the ... make sure the registry keys are defined correctly and then PCI bus driver ...
    (microsoft.public.windowsce.embedded)
  • Example PCI driver?
    ... Setup the Registry with the vendor/device ID information ... Get the virtual address information for the BARs from the PCI Bus driver ... I've found this documentation on the PCI Bus Driver: ...
    (microsoft.public.windowsce.embedded)
  • Re: Windows CE driver for Prism wireless card
    ... You should try to load a debug image on your device and check the ... Check that the driver DLL is loaded by the PCI bus driver (you should ... If the driver tries to load NDIS.DLL and it doesn't call your DLL, ...
    (microsoft.public.windowsce.platbuilder)
  • Re: How to get CmResourceTypeDevicePrivate resource??
    ... Would you please briefly explain why PCI bus driver inserts these private ... looked at this information as part of its resource list parsing. ... The resources will remain in the list, though, just in case some ...
    (microsoft.public.development.device.drivers)
  • Re: Power IOCTLs in CE
    ... dummy driver which implements the IOCTL_POWER_XXX handlers that can help ... But I don't believe the PCI bus driver does this. ... Do you have the full power manager ...
    (microsoft.public.windowsce.platbuilder)