On 14 Feb 2003, Eric W. Biederman wrote:
So what I am looking at:
The current pci bus scan starts with a root pci bus device. And then finds the devices on that bus, and the recursively scans the sub busses.
I'm still not getting it.
For some chips, LinuxBIOS needs to call some chip-specific code for that device BEFORE the pci bus scan, or resource allocation gets done incorrectly. How can we structure the code so that the pre-pci init functions work in a reasonable way that most people can understand? The current superio stuff does this, and the information to drive it is contained in the superio file. If you have code that needs to be called before the PCI scan, you initalize the structure member to point to a function. Same for after PCI scan, same for right before hardwaremain() exits. You can look at the superio.c file for the given chip and see if this pre-pci-scan function exists and is called.
I like the self-contained nature of the superio.c files (I grabbed all those ideas from Plan 9). Does this seem desirable to people? If so, can we expand it to the south and north bridges so as to replace the current ad-hoc mechanisms?
If this mechanism is not desirable, how would it change? Would the .c files continue to be self-contained or would we start getting into more linker sets and other magic stuff (which, as you can tell, worries me as it does confuse people).
I would appreciate some feedback from the other committers and developers.
ron