Hi,
I am asking a lot of questions, so please bear with me.
When we call os_pci_read_reg, how are we getting the bl, cl registers filled with bus no and device no ?
Then we are reading register no 0x04 (what is it ?) and perform result AND 0xFFFFFFF0 to get base memory IO address. Then we initialize OS wide os_NetIOBaseMem pointer. It seems we are reading the MAC address and then populating OS wide os_NetMAC address byte by byte or if unsuccessful then reading it from EPROM. But how can we access it directly without first issuing any command (writing something to some pci register) ?
When we get the base memory IO os_NetIOBaseMem. Does this mean that starting from this address all the registers of the card are available mapped to increasing memory addresses ? If yes then how are you maintaining the boundary for them ?
When we read MAC from EPROM. We are writing some command bytes to some mapped memory addresses and then reading from them. Is this the way to talk in PCI communications ? And why are we not introducing any delays between writing command and reading response, is the device fast enough to respond when asked by a modern processor ?
I hope you won't mind me asking so many questions. Thanks.
Regards,
Saurabh Rawat