[Etherboot-developers] why does scan_bus() in pci.c ....?
Brought to you by:
marty_connor,
stefanhajnoczi
|
From: Eno C. <Eno...@Mi...> - 2001-02-16 16:33:04
|
Dear List Have been looking at the logic in scan_bus() in pci.c. When it finds an ethernet controller, it sets up a loop to read through the 6 base address double words The code in the loop ... 1. reads the indicated base address double word. word 0 first, word 1 second, etc 2. if the base address is zero, the code continues at step 1 3. is the base address refers to memory space (as opposed to i/o space), the code continues at step 1 Otherwise, the code continues, apparently on the assumption, it has what it needs. It 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? Eno Compton |