I have a simple PCI card that utilizes IO addresses. I send IO Writes and IO Read commands. Card works great in many PC's... all except some Dell machines.
It seems that when you do a IO read using a tool like TVicPort and read a 16bit or 32bit data, depending on what you read back, the Dell PC will give you bad data.
For example, I create a simple program to write sequential data and read data back after each write.
1 - Call Outpw(&H2F8, &H1)
2 - Call Outpw(&H2F8, &H2)
3 - Call Outpw(&H2F8, &H3)
4 - Call Outpw(&H2F8, &H4)
5 - Call Outpw(&H2F8, &H5)
6 - Call Outpw(&H2F8, &H6)
Between each writes, I do a IO Read. I find that the read back occurs liek this:
So you see, why is that some reads, come back 'FFFF' or erronous? IT just so happens that it is not Random!! It actually is reproducible, for example. If I write a hex 4 to that port, then I immediately do a IO read command to the PCI bus, I get back 'FFFF'. Completely reproducible.
This problem is reproducible and depending on what the data is, the Dell PC seems to "correct" my read data. I have made sure that no other devices is sharing the same IO address.
So could anyone telll me why Dell PC's do this?