ebiederman@lnxi.com (Eric W. Biederman) writes:
For random reasons I have been reading through the Open Firmware specifications. One in particular caught my attention the interrupt mapping specification. I really liked the basic structure, although I don't think the details themselves will map cleanly to LinuxBIOS.
The basic structure was:
Each device has it's interrupt. Each device has an interrupt parent. If not specified explicitly the interrupt parent is simply up the device tree but that was not required. An interrupt parent can have an interrupt mapping table that maps interrupts maps device#/interrupt pairs to ids consumed by devices up the interrupt tree. The interrupt mapping table can have a mask to reduce the size of the mapping table needed.
It is a very clean structure and it maps well to the LinuxBIOS device tree. There are few interesting complications that we need to handle like ACPI mode versus legacy PIC mode but those details should not be too difficult.
Thinking about this a little more open firmware defines one single root for it's interrupt tree, even if it must be purely virtual.
A simple extension of that idea is to have one root for each interrupt processing mode. And each node should be able to define multiple interrupt parents. That should be sufficient to handle the LinuxBIOS case.
That leaves a lot of details to handle but it should work.
Eric