From: Florian B. <eup...@ar...> - 2007-08-19 21:50:38
|
On 8/17/07, Florian Boelstler <eup...@ar...> wrote: > The check for the availability of the register succeeds in > hwreg_present(), but reading it freezes the system (or may be by writing > to it -- it could be the case that the debug output is just too slow). > Disabling that code section allows the system to run further until > pmac_m2_init() is called from the "master" init_IRQ() call in > start_kernel(). > Then the system turns off, likewise a reset on the PB1400 (which was > observed at the same point yesterday). The actual problem lies in the NuBus slot probing code in drivers/nubus/nubus.c (which is way more down in the initialization process). The system turns off, when the first NuBus slot (i.e. #9) is probed. When the kernel is booted with nubus=off it shows the usual frame-buffer-based boot messages. Though fails later on, when the hardware is used (I guess). Funny enough it's also related to some calls around hwreg_present() again. It seems that hwreg_present() returns without error. It tries to access the NuBus slot address with interrupts disabled. The corresponding read operation on the register returns 0 (Is this is a proper result? E.g. on PCI I would otherwise expect 0xFFFFFFFF. NuBus-gurus, please come forward:). The same read operation is done again on return of hwreg_present() with interrupts enabled as part of the NuBus probing code. This seems to be the trigger of system shutdown on my PB1400. There is this function nubus_rom_addr(), which returns the address to probe. I haven't completely examined it yet. It could be the source of the problem, though it doesn't look that awkward in order for two compilers generating different code... On the other hand hwreg_present() sets up a bus error handler (exception handler?), which is supposed to be triggered when the NuBus access fails. A short delay loop is taken after the read access to wait for a bus error. If no bus error occurs in the meantime the register is supposed to exist and the error handler is disabled. It could be the case that the the delay is too short or the delay loop doesn't behave as expected. Cheers, Florian |