On 08/11/2014 10:23 AM, Mark Cave-Ayland wrote: > It seems that a recent commit to OpenBIOS to increase the L11 timer > frequency from 10Hz to 100Hz (see > http://git.qemu.org/?p=openbios.git;a=commit;h=aad027388a5f0044781a95b184572ff0c38bbe37) > caused HelenOS boot to become extremely unreliable - it would tend to > hang most times at "Booting the kernel" instead of switching to the > splash screen and continuing to boot. > > With a bit of detective work, Artyom managed to trace it back to this > particular commit which simply increases the timer frequency from 10Hz > to 100Hz to match the OBP timer frequency. I'm wondering if maybe this > is because HelenOS gets confused if the L11 timer softint happens to be > asserted when booting the kernel which is considerably more likely with > an increase in timer frequency? > > I've just posted a patch to the OpenBIOS list to revert the frequency > increase at > http://www.openfirmware.info/pipermail/openbios/2014-August/008496.html > at the expense of the timer resolution but I thought it may be useful to > raise this here just in case it's caused by a bug somewhere in the > interrupt handling as none of Linux/FreeBSD/Solaris seem to have this > problem.
Using the binaries from Mark, I was unable to reproduce this issue with the latest mainline, and I was equally unable to reproduce it with the released sparc64 image of HelenOS 0.5.0. However, I was able to reproduce it with a 3.5-year old image of HelenOS 0.4.3. *Mark*, can you please verify that the issue is no longer reproducible for you with the following image?: http://www.helenos.org/releases/HelenOS-0.5.0-sparc64-ultra.iso I also noticed that relatively shortly after the release of 0.4.3, there was the following commit, which would explain why 0.5.0 behaves differently: revno: 1046 committer: Jakub Jermar <[email protected]> branch nick: HelenOS.mainline timestamp: Sat 2011-06-18 17:03:06 +0200 message: sparc64: Clear any pending TICK interrupts in tick_init(). diff: === modified file 'kernel/arch/sparc64/src/drivers/tick.c' --- kernel/arch/sparc64/src/drivers/tick.c 2010-06-16 16:30:27 +0000 +++ kernel/arch/sparc64/src/drivers/tick.c 2011-06-18 15:03:06 +0000 @@ -43,13 +43,12 @@ #include <arch.h> #include <debug.h> -#define TICK_RESTART_TIME 50 /* Worst case estimate. */ - /** Initialize tick and stick interrupt. */ void tick_init(void) { /* initialize TICK interrupt */ tick_compare_reg_t compare; + softint_reg_t clear; interrupt_register(14, "tick_int", tick_interrupt); compare.int_dis = false; @@ -58,10 +57,13 @@ CPU->arch.next_tick_cmpr = compare.tick_cmpr; tick_compare_write(compare.value); + clear.value = 0; + clear.tick_int = 1; + clear_softint_write(clear.value); + #if defined (US3) || defined (SUN4V) /* disable STICK interrupts and clear any pending ones */ tick_compare_reg_t stick_compare; - softint_reg_t clear; stick_compare.value = stick_compare_read(); stick_compare.int_dis = true; Best, Jakub _______________________________________________ HelenOS-devel mailing list [email protected] http://lists.modry.cz/listinfo/helenos-devel
