RE: [Etherboot-developers] why does scan_bus() in pci.c ....?
Brought to you by:
marty_connor,
stefanhajnoczi
|
From: Eno C. <Eno...@Mi...> - 2001-02-19 15:33:03
|
I am corrected. The fault is mine. It derives from my project requirement to identify, not just the first, rather all the ethernet adapters on the bus. Thanks Eno -----Original Message----- From: Ken Yap [mailto:ke...@nl...] Sent: Saturday, February 17, 2001 2:38 AM To: eth...@li... Subject: Re: [Etherboot-developers] why does scan_bus() in pci.c ....? >4. clears the least significant two bits from the i/o space base address, >and >5. reads base address double word 1 into a cell called membase, and >6. reads the rom base address double word into a cell called romaddr, and >7. continues with some other stuff that isn't germane to this topic, and >8. CONTINUES WITH THE LOOP > >This last step confuses me. Am I missing something about how pci works? >Ought not the code break from the loop when it has detected the address data >it needs to access the device? Where do you see that it continues with the loop? The comment indicates that the test is to "take first one or if ROM address matches". So if a candidate has not been previously found, as indicated by pci_ioaddr == 0, it assigns information to the structure and then RETURNS from the function, thereby exiting all loops. In practice it seems that the ROM address is not what one expects it to be so the second condition is never true. But it does return after finding the first one. For your purposes you probably want it to continue enumerating all candidates. _______________________________________________ Etherboot-developers mailing list Eth...@li... http://lists.sourceforge.net/lists/listinfo/etherboot-developers |