From: Michael S. <mi...@c6...> - 2004-01-25 15:41:12
|
Hi! tmbinc and me have been talking about how to implement interrupts on=20 the GameCube. The GameCube has an interrupt controller with 14 sources.=20= E=05ach source is a device, and each device can trigger one or more=20 different interrupts by only having one line to the interrupt=20 controller. This is quite similar to other architectures: Interrupt 8=20 in this case comes from the VI (Video Interface), and the VI has 4=20 different sources for interrupts. The original GameCube system software presents a linear system to the=20= user. It is aware of all possible interrupts sources at the second=20 level and presents them in a single list. The user must only register=20 for one specific VI interrupt, for example, and not for the common VI=20 interrupt and then check which one it was, using the VI registers.=20 GCLIb also implements this behavior. It is my understanding that it is common in Linux to only implement the=20= first level in the kernel interrupt handling code, i.e. 14 sources, and=20= that drivers must do the rest manually. This is done because the=20 generic kernel interrupt code cannot be aware of all different devices=20= in a system - on a normal computer you can change the configuration=20 easily and remove or add devices, like PCI cards. On the GameCube, the=20= number of different interrupts is fixed; there is no way to add a=20 device that can trigger another interrupt, so the generic interrupt=20 code would already handle all interrupts at the sources and pretend=20 that this two-level design didn't exist. There are pros for each side. Presenting two levels is more the Linux=20 way, while linearizing the interrupts is easier for driver developers=20 and has no real disadvantages. I tend to prefer the Linux way, tmbinc=20 seems to prefer the GameCube SDK way. What are your opinions? Michael= |