PCI: Device Response
Posted: Mon Oct 13, 2008 5:11 pm
So I am using the IO space to speak to my device but it doesn't respond. I try to send it a command to command register and it never clears or changes. Here is the things I have determined --
i. The PCI COnfig Register Command is set to 0x07 which means IO response is enabled.
ii. The values I write to the Device's registers are being written but not always.
Lets say that 9800 is the first port and 9807 is the last port of bar 0, so I am writing to the ports like this --
outb(0x9801, 0x3f); //write 0x3f to bar 0's bitfield 23:16
I am defining the ports like this, for clarity:
9800 = 31:24
9801 = 23:16
9802 = 15:8
9803 = 7:0
When I write a value to port 9801, nothing is written, it returns 0, but this is where the sectors per track register for my device should be, so i dont know what is happened. Does this look right to any of you guy becuase I tested in other OS and get the same thing --nothing but it should be write isnt it?
so my problem has been outlined, my questions is --
how to initialize pci device for response and when using IO space is it commonly done the way I am doing? pci experienced please respond!!!!!!!!
i. The PCI COnfig Register Command is set to 0x07 which means IO response is enabled.
ii. The values I write to the Device's registers are being written but not always.
Lets say that 9800 is the first port and 9807 is the last port of bar 0, so I am writing to the ports like this --
outb(0x9801, 0x3f); //write 0x3f to bar 0's bitfield 23:16
I am defining the ports like this, for clarity:
9800 = 31:24
9801 = 23:16
9802 = 15:8
9803 = 7:0
When I write a value to port 9801, nothing is written, it returns 0, but this is where the sectors per track register for my device should be, so i dont know what is happened. Does this look right to any of you guy becuase I tested in other OS and get the same thing --nothing but it should be write isnt it?
so my problem has been outlined, my questions is --
how to initialize pci device for response and when using IO space is it commonly done the way I am doing? pci experienced please respond!!!!!!!!