a pci implemenation problem, thanks

I design a simple pci target, with only config read/write, NOT response to normal read/write operation, but I implemented the BAR0 ( base address register) (16M Bytes size), and I have implemented the command register. when I plug the card into pc and boot the windows up, I can see " find new device ...", but, the command register's content is "0000h" ( bus disabled) and the the value of BAR0 is "00000000h", why the windows doesnt allocate the memory space for my card? I have test the config read/write operation, all work, where is the problem? Must I implementation the normal read/write to make BAR0 get an address? Thanks!

Reply to
NoThisRAT
Loading thread data ...

disabled)

read/write

Hi,

I'm currently working on a PCI target. The BARx registers are assigned there values by the BIOS, not Windows. You might already know this, but the BARx registers are either for memory mapped space (mem read/write PCI commands) or i/o port space (i/o read/write PCI commands). The first bit of the BARx registers identifies which type of memory you want (e.g. you hardwire the first bit). First the BIOS tries to set the bits in the command register and if it can set bits 0 and 1 it will then try and set the relevant values in the BARx registers. If you're not supporting either of the I/O or memory read/write PCI commands, the BIOS will not bother writing values to the BARx registers.

Does the BIOS try and perform an I/O or memory read/write command, just to check the device is working correctly? I don't know the exact answer to that, but I can't see why it would.

I would advise implementing the read/write commands. You don't have to do anything with the data. All you need to do is assert FRAME and TRDY. Discard any data you receive and only ever send out 0xFFFFFFFF.

Hope that helps,

Reply to
Greg

The lower bits of the BAR are what tell the BIOS that it is active and should be used. You must set them properly.

No, the BIOS won't write there.

--
Ben Jackson

http://www.ben.com/
Reply to
Ben Jackson

I have implemented the read/write operation, but I still cant get the bar assignment:( there is some problem: I can see my card under windows (but bar0 not assigned), but I can not see the card by BIOS. ( from the table on the screen after POST before boot OS) what's the problem?? BTW: I dont implement the interrupt pin.

Reply to
NoThisRAT

Thanks Greg and Ben, I finally made it work. The problem is, I should remove the parallel download cable from the board before rebooting :P Thanks again!

Reply to
NoThisRAT

ElectronDepot website is not affiliated with any of the manufacturers or service providers discussed here. All logos and trade names are the property of their respective owners.