Re: Question about PCIbus.dll in Windows CE 6.0
- From: "Dean Ramsier" <ramsiernospam@xxxxxxxxxx>
- Date: Thu, 29 Mar 2007 14:53:50 -0400
I haven't done PCI in a while, so I can't say for sure. The bus driver will
check all templates to try to find a match, the UAM references are their
because there is a UAM template in your registry.
Some things to be aware of...
- You don't need the Bus/Device/Function entries. The point of the template
is that you don't know where on the bus this device might be located, it's
the PCI bus driver's responsibility to figure that out. The template just
tells the PCI bus driver what dll to load when it finds a device that
matches the ids in the template.
- I would leave off Subvendor ID and SubSystemID. I haven't seen those in
templates.
- Add "Class"=dword:06
--
Dean Ramsier - eMVP
BSQUARE Corporation
"Don" <Don@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote in message
news:480D499E-8A78-4639-BA89-79A924A077EE@xxxxxxxxxxxxxxxx
Hi Dean,
Thanks for the replies.
I have decided to follow the instructions for writing a proper driver. I
am
having problems getting my PCIDriver.dll to load. After reading the
documentation I added the following registry items:
[HKEY_LOCAL_MACHINE\Drivers\BuiltIn\PCI\Template\AXYZPCIDEVICE]
"Dll"="PCIDriver.dll"
"SubClass"=dword:80
"ProgIF"=dword:0
"VenderID"=dword:1895
"DeviceID"=dword:1
"RevisionID"=dword:1
"SubVenderID"=dword:1895
"SubSystemID"=dword:1
"BusNumber"=dword:0
"DeviceNumber"=dword:20
"FunctionNumber"=dword:0
"Irq"=dword:05
Is this all I need to add?
I did add some debug stuff to PCIBus.dll and did a Build and Sysgen. The
following is my debug output:
A Don's Debug = Drivers\BuiltIn\PCI
4294843120 PID:400002 TID:1150002 B Dons debug RegGetInfo entered.
4294843120 PID:400002 TID:1150002 C Dons debug After RegOpenKeyEx RegPath
=
Drivers\BuiltIn\PCI\Template\UAM3059.
4294843121 PID:400002 TID:1150002 Dons Debug Configure is true ValType = 0
Val = 0
4294843121 PID:400002 TID:1150002 D Dons debug After RegOpenKeyEx
4294843121 PID:400002 TID:1150002 E Dons debug After RegGetList
PCIBUS_MEMBASE_VALNAME Reg = -801056944.
4294843122 PID:400002 TID:1150002 F Dons debug After RegGetList
PCIBUS_MEMLEN_VALNAME -801056916.
4294843122 PID:400002 TID:1150002 G Dons debug After RegGetList
PCIBUS_IOBASE_VALNAME -801056888.
4294843122 PID:400002 TID:1150002 H Dons debug After RegGetList
PCIBUS_IOLEN_VALNAME -801056860.
4294843123 PID:400002 TID:1150002 I Dons debug After RegQueryValueEx
PCIBUS_CONFIGENTRY_VALNAME .
4294843123 PID:400002 TID:1150002 K Dons debug After RegQueryValueEx
DEVLOAD_DLLNAME_VALNAME uam3059.dll DllExists = 1 pInfo->ConfigEntry = 0.
4294843123 PID:400002 TID:1150002 M Dons debug After RegQueryValueEx
DEVLOAD_FLAGS_VALNAME pInfo->DevFlags = 0 Val = 0.
4294843124 PID:400002 TID:1150002 A Don's Debug = Drivers\BuiltIn\PCI
4294843124 PID:400002 TID:1150002 B Dons debug RegGetInfo entered.
4294843125 PID:400002 TID:1150002 C Dons debug After RegOpenKeyEx RegPath
=
Drivers\BuiltIn\PCI\Instance\KITL.
4294843125 PID:400002 TID:1150002 Dons Debug Configure is true ValType = 0
Val = 0
4294843125 PID:400002 TID:1150002 D Dons debug After RegOpenKeyEx
4294843126 PID:400002 TID:1150002 E Dons debug After RegGetList
PCIBUS_MEMBASE_VALNAME Reg = -801056944.
4294843127 PID:400002 TID:1150002 F Dons debug After RegGetList
PCIBUS_MEMLEN_VALNAME -801056916.
4294843127 PID:400002 TID:1150002 G Dons debug After RegGetList
PCIBUS_IOBASE_VALNAME -801056888.
4294843127 PID:400002 TID:1150002 H Dons debug After RegGetList
PCIBUS_IOLEN_VALNAME -801056860.
4294843157 PID:400002 TID:1150002 I Dons debug After RegQueryValueEx
PCIBUS_CONFIGENTRY_VALNAME .
4294843157 PID:400002 TID:1150002 K Dons debug After RegQueryValueEx
DEVLOAD_DLLNAME_VALNAME DllExists = 0 pInfo->ConfigEntry = 0.
4294843158 PID:400002 TID:1150002 M Dons debug After RegQueryValueEx
DEVLOAD_FLAGS_VALNAME pInfo->DevFlags = 4 Val = 4.
4294843158 PID:400002 TID:1150002 A Don's Debug = Drivers\BuiltIn\PCI
4294843159 PID:400002 TID:1150002 Warning: No Match template is found for
following PCI Device
4294843160 PID:400002 TID:1150002
-------------------------------------------------------------------------------
4294843188 PID:400002 TID:1150002 Bus/Device/Function Dons Debug B =
0/20/0,
Other Bridge
4294843251 PID:400002 TID:1150002 VendorID = 0x1895, DeviceID = 0x0001,
Command = 0x0007, Status = 0x0280
4294843298 PID:400002 TID:1150002 RevisionID = 0x01, ProgIf = 0x00,
SubClass = 0x80, BaseClass = 0x06
4294843299 PID:400002 TID:1150002 CacheLineSize = 0x08, LatencyTimer =
0x20, HeaderType = 0x00, BIST = 0x00
4294843299 PID:400002 TID:1150002 BaseAddresses:
4294843299 PID:400002 TID:1150002 0xDE00D000 0x0000E001 0x00000000
0x00000000 0x00000000 0x00000000
4294843300 PID:400002 TID:1150002 CIS = 0x00000000, SubVendorID =
0x1895,
SubSystemID = 0x0001
4294843300 PID:400002 TID:1150002 ROMBaseAddress = 0x00000000
4294843300 PID:400002 TID:1150002 InterruptLine = 0x05, InterruptPin =
0x01, MinGrant = 0x08, MaxLatency = 0x1A
Are you able to see what I am missing? Not sure why the PCIbus.dll is
looking at
Drivers\BuiltIn\PCI\Template\UAM3059 when is prints my device which has a
vender ID of 1896.
--
Don
"Dean Ramsier" wrote:
The PCI bus driver is included in the image as a module and fixed up to
run
in kernel space only because it is a driver. Your application can't load
the dll because it is not in a format that is loadable. You need to
remember this dll is actually a driver that is has already been loaded by
the OS. It's not meant a a library of functions that any app can load
and
access.
--
Dean Ramsier - eMVP
BSQUARE Corporation
"Don" <Don@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote in message
news:ED3539FF-0F57-4A95-8BC2-AF0C0B1453BB@xxxxxxxxxxxxxxxx
Hi Dean,
One more thing to add:
I also get the following error displayed in the Windows CE Debug window
when
I try and run my console app that calls Myfunc()
!!ERROR! Trying to load DLL 'pcibus.dll' Fixed-up kernel address into
user
app
!!ERROR! CANNOT SPECIFY 'K' FLAG BIB FILE
--
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
.
- Follow-Ups:
- References:
- Re: Question about PCIbus.dll in Windows CE 6.0
- From: Dean Ramsier
- Re: Question about PCIbus.dll in Windows CE 6.0
- From: Dean Ramsier
- Re: Question about PCIbus.dll in Windows CE 6.0
- From: Don
- Re: Question about PCIbus.dll in Windows CE 6.0
- Prev by Date: Re: Sharing folders in Windows CE 5.0
- Next by Date: Re: Sharing folders in Windows CE 5.0
- Previous by thread: Re: Question about PCIbus.dll in Windows CE 6.0
- Next by thread: Re: Question about PCIbus.dll in Windows CE 6.0
- Index(es):
Relevant Pages
|