Driver Development Kit (DDK)

cancel
Showing results for 
Search instead for 
Did you mean: 

PCI Header Type incorrect on PCI-6221?

I'm trying to write a device driver for the PCI-6221 card under WindowsCE 6.0.  Since there is no existing driver (the CE drivers are for PCMCIA cards), I'm pretty much starting from scratch.  I've been reading the code for other operating systems, and looking at sample drivers and doing my best to create a simple driver.  So far, I've managed to find the board (yay!), but I'm having trouble mapping it to memory.  I've managed to narrow the problem down to the fact that the code that I'm using (which is actually Microsoft code) to enumerate the PCI bus and fill in the registry values is returning some weird values from the card.

 

The first problem I have observed is the VendorID is coming back off by a bit (pun fully intended).  Instead of 0x1093, I'm getting 0x1083.  However, the device ID is correct.  This really isn't a big deal, but I'm includeing it in hopes that it may provide insight into my problem.

 

The more major problem is that the board is returning an invalid Header Type.  The only valid types are 0 (for standard devices), 1 (for PCI-PCI bridges), and 2 (for cardbuses).  However, this board is returning a header type of 4.  This is bad because it is not a legal value and as such is screwing up the PCI enumeration function, which in turn means that my driver can't find the base adresses, since they aren't written to the registry.

 

Here's the configuration data that I'm seeing:

 

VendorID 0x1083

DeviceID 0x70af

Command 0xf000

Status 0xffff

RevisionID 0x00

ProgIf 0x00

SubClass 0x04 

BaseClass 0xff

CacheLineSize 0x00

LatencyTimer 0x00

HeaderType 0x04

BIST 0x10 

 

 

I'm hoping someone has some insight as to what's going on here. 

 

I should probably also describe the hardware setup.  This is a PCI-6221 board attached to a VIA EPIA-M700 board, running a Windows CE platform.

0 Kudos
Message 1 of 5
(7,710 Views)

Have you seen this post about M series devices? 

Regards,


h_baker
National Instruments
Applications Engineer
0 Kudos
Message 2 of 5
(7,694 Views)

h_baker - Yep, I've definitely been digging into the documentation over the last week or so.  

 

I've been using the E-Series RLP manual as a basic guide, and the source code provided for the M-series to try to get my driver working.   

0 Kudos
Message 3 of 5
(7,682 Views)

Good afternoon Matt,

 

Unfortunately RLP is not something we officially support so there is very little documentation available, as I am sure you are aware.  Maybe the community will have more to add from experience.

Regards,


h_baker
National Instruments
Applications Engineer
0 Kudos
Message 4 of 5
(7,665 Views)

As I dug into the problem, I observed that not only was the Header type wrong, but also that the Vendor ID was wrong, and changing over time!  (This should never happen since it's supposed to be a read-only register according to the PCI standard).  Anyway, I eventually unplugged the card itself and reseated it, and all of my problems went away.

 

Doh!

 

0 Kudos
Message 5 of 5
(7,662 Views)