https://bugs.dragonflybsd.org/https://bugs.dragonflybsd.org/favicon.ico?16293952082014-03-07T10:50:04ZDragonFlyBSD bugtrackerDragonFlyBSD - Bug #2653: Timer DELAY hangs boot on Lenovo S10 Intel Atom N270 with acpi enabledhttps://bugs.dragonflybsd.org/issues/2653?journal_id=118872014-03-07T10:50:04Zswildner
<ul></ul><p>Does it make a difference when you put hw.tsc_cputimer_enable=0 in /boot/loader.conf?</p> DragonFlyBSD - Bug #2653: Timer DELAY hangs boot on Lenovo S10 Intel Atom N270 with acpi enabledhttps://bugs.dragonflybsd.org/issues/2653?journal_id=118882014-03-07T12:36:03Zsepherosa
<ul></ul><p>On Fri, Mar 7, 2014 at 6:50 PM, <<a class="email" href="mailto:bugtracker-admin@leaf.dragonflybsd.org">bugtracker-admin@leaf.dragonflybsd.org</a>> wrote:</p>
<blockquote>
<p>Issue <a class="issue tracker-1 status-5 priority-4 priority-default closed" title="Bug: Timer DELAY hangs boot on Lenovo S10 Intel Atom N270 with acpi enabled (Closed)" href="https://bugs.dragonflybsd.org/issues/2653">#2653</a> has been updated by swildner.</p>
<p>Does it make a difference when you put hw.tsc_cputimer_enable=0 in /boot/loader.conf?</p>
<p>----------------------------------------<br />Bug <a class="issue tracker-1 status-5 priority-4 priority-default closed" title="Bug: Timer DELAY hangs boot on Lenovo S10 Intel Atom N270 with acpi enabled (Closed)" href="https://bugs.dragonflybsd.org/issues/2653">#2653</a>: Timer DELAY hangs boot on Lenovo S10 Intel Atom N270 with acpi enabled<br /><a class="external" href="http://bugs.dragonflybsd.org/issues/2653#change-11887">http://bugs.dragonflybsd.org/issues/2653#change-11887</a></p>
<ul>
<li>Author: davshao</li>
<li>Status: New</li>
<li>Priority: Normal</li>
<li>Assignee:</li>
<li>Category:</li>
<li>Target version:<br />----------------------------------------<br />On a i386 Lenovo S10 netbook with Intel Atom N270 and acpi enabled, boot hangs after:</li>
</ul>
<p>acpi0.nexus0.root0<br />acpi0: <LENOVO CB-01> [tentative] on motherboard<br />ACPI: All ACPI Tables successfully acquired<br />ACPI FADT: SCI testing interrupt mode ...<br />ACPI FADT: SCI testing level/high<br />IOAPIC: irq 9, gsi 9 edge/high -> level/high</p>
<p>Brute force debugging with kprintf shows that commenting out the<br /><abbr title="100 * 1000">DELAY</abbr>;<br />in function acpi_sci_test() of file sys/platform/pc32/acpica/acpi_fadt.c</p>
<p>enables boot to at least progress to the end of function call<br />acpi_sci_config();<br />in function AcpiOsInstallInterruptHandler() in<br />file sys/dev/acpica/Osd/OsdInterrupt.c<br />(after which at some point booting hangs again).</p>
<p>I can only speculate this may have some relation to the thread<br />"Time keeping Issues with the low-resolution TSC timecounter" <br />on the FreeBSD current mailing list around June 2011. For example:</p>
<p><a class="external" href="http://lists.freebsd.org/pipermail/freebsd-current/2011-June/025319.html">http://lists.freebsd.org/pipermail/freebsd-current/2011-June/025319.html</a></p>
<p>"Somewhere from an Intel manual, I think I read TSC stops when DPSLP#<br />pin is asserted for Core/Core2/Atom processors and I guess that means<br />entering C3 stops TSC. :-("</p>
</blockquote>
<p>I don't think TSC is used as cputimer on N270 here. It's still i8254,<br />since ACPI timer and HPET is not yet probed. The cpu probably is<br />choked by high interrupt rate when SCI mode is being tested. As about<br />later hanging, it may be caused by BIOS triggered C1E which could<br />choke local APIC timer. Let's try following tunables (you probably<br />want all of them):</p>
<p>hw.lapic_timer_enable="0" <br />hw.acpi.sci.trigger="level" <br />hw.acpi.sci.polarity="low"</p>
<p>Best Regards,<br />sephe</p>
<p>-- <br />Tomorrow Will Never Die</p> DragonFlyBSD - Bug #2653: Timer DELAY hangs boot on Lenovo S10 Intel Atom N270 with acpi enabledhttps://bugs.dragonflybsd.org/issues/2653?journal_id=118912014-03-08T07:05:51Zdavshao
<ul></ul><p>The above suggestions did not work, but what did work was blasting away with kprintf's until I found enough DELAYs to replace with ... something. Fortunately there were only two further DELAYs blocking and now for the first time ever, the Lenovo S10 with i386 Intel Atom N270 boots with acpi enabled. Thanks for the feedback.</p>
<p>The two further places to replace DELAYs are</p>
<p>1) line 519 in function acpi_attach() in file sys/dev/acpica/acpi.c</p>
<p><abbr title="5000">DELAY</abbr>;<br />cputimer_intr_pmfixup();</p>
<p>2) line 454 in function pcireg_cfgopen() in file sys/bus/pci/i386/pci_cfgreg.c</p>
<p>outl(CONF1_ADDR_PORT, CONF1_ENABLE_CHK);<br /><abbr title="1">DELAY</abbr>;<br />mode1res = inl(CONF1_ADDR_PORT);</p>
<p>Now the question becomes, if <abbr title="">DELAY</abbr> doesn't work (I suspect for reasons related to Bug <a class="issue tracker-1 status-1 priority-4 priority-default" title="Bug: 189a0ff3761b47 ... ix: Implement MSI-X support locks up Lenovo S10 Intel Atom n270 (New)" href="https://bugs.dragonflybsd.org/issues/2652">#2652</a> that it is related to lwkt_switch()),<br />and something like tsleep() can't be used in acpi code, then what to use for delays?</p>
<p>Right now my embarrassing answer, and why I have not included a complete patch, is I am simply incrementing an integer some number of times after which I kprintf it, hoping this prevents the compiler from optimizing the operations away.</p>
<p>I am sure there must be a far better way, can someone suggest it?</p> DragonFlyBSD - Bug #2653: Timer DELAY hangs boot on Lenovo S10 Intel Atom N270 with acpi enabledhttps://bugs.dragonflybsd.org/issues/2653?journal_id=118922014-03-12T13:25:47Zsepherosa
<ul></ul><p>On Sat, Mar 8, 2014 at 3:05 PM, <<a class="email" href="mailto:bugtracker-admin@leaf.dragonflybsd.org">bugtracker-admin@leaf.dragonflybsd.org</a>> wrote:</p>
<blockquote>
<p>Issue <a class="issue tracker-1 status-5 priority-4 priority-default closed" title="Bug: Timer DELAY hangs boot on Lenovo S10 Intel Atom N270 with acpi enabled (Closed)" href="https://bugs.dragonflybsd.org/issues/2653">#2653</a> has been updated by davshao.</p>
<p>The above suggestions did not work, but what did work was blasting away with kprintf's until I found enough DELAYs to replace with ... something. Fortunately there were only two further DELAYs blocking and now for the first time ever, the Lenovo S10 with i386 Intel Atom N270 boots with acpi enabled. Thanks for the feedback.</p>
<p>The two further places to replace DELAYs are</p>
<p>1) line 519 in function acpi_attach() in file sys/dev/acpica/acpi.c</p>
<p><abbr title="5000">DELAY</abbr>;<br />cputimer_intr_pmfixup();</p>
<p>2) line 454 in function pcireg_cfgopen() in file sys/bus/pci/i386/pci_cfgreg.c</p>
<p>outl(CONF1_ADDR_PORT, CONF1_ENABLE_CHK);<br /><abbr title="1">DELAY</abbr>;<br />mode1res = inl(CONF1_ADDR_PORT);</p>
<p>Now the question becomes, if <abbr title="">DELAY</abbr> doesn't work (I suspect for reasons related to Bug <a class="issue tracker-1 status-1 priority-4 priority-default" title="Bug: 189a0ff3761b47 ... ix: Implement MSI-X support locks up Lenovo S10 Intel Atom n270 (New)" href="https://bugs.dragonflybsd.org/issues/2652">#2652</a> that it is related to lwkt_switch()),<br />and something like tsleep() can't be used in acpi code, then what to use for delays?</p>
<p>Right now my embarrassing answer, and why I have not included a complete patch, is I am simply incrementing an integer some number of times after which I kprintf it, hoping this prevents the compiler from optimizing the operations away.</p>
<p>I am sure there must be a far better way, can someone suggest it?</p>
</blockquote>
<p>Thank you for the information, that's quite helpful.</p>
<p>Look like i8254 is not working on your box if ACPI is enabled. Could<br />you help testing the following patch:<br /><a class="external" href="http://leaf.dragonflybsd.org/~sephe/tsc_delay.diff">http://leaf.dragonflybsd.org/~sephe/tsc_delay.diff</a></p>
<p>DELAY will switch to TSC, if systimer hangs.</p>
<blockquote>
<p>----------------------------------------<br />Bug <a class="issue tracker-1 status-5 priority-4 priority-default closed" title="Bug: Timer DELAY hangs boot on Lenovo S10 Intel Atom N270 with acpi enabled (Closed)" href="https://bugs.dragonflybsd.org/issues/2653">#2653</a>: Timer DELAY hangs boot on Lenovo S10 Intel Atom N270 with acpi enabled<br /><a class="external" href="http://bugs.dragonflybsd.org/issues/2653#change-11891">http://bugs.dragonflybsd.org/issues/2653#change-11891</a></p>
<ul>
<li>Author: davshao</li>
<li>Status: New</li>
<li>Priority: Normal</li>
<li>Assignee:</li>
<li>Category:</li>
<li>Target version:<br />----------------------------------------<br />On a i386 Lenovo S10 netbook with Intel Atom N270 and acpi enabled, boot hangs after:</li>
</ul>
<p>acpi0.nexus0.root0<br />acpi0: <LENOVO CB-01> [tentative] on motherboard<br />ACPI: All ACPI Tables successfully acquired<br />ACPI FADT: SCI testing interrupt mode ...<br />ACPI FADT: SCI testing level/high<br />IOAPIC: irq 9, gsi 9 edge/high -> level/high</p>
<p>Brute force debugging with kprintf shows that commenting out the<br /><abbr title="100 * 1000">DELAY</abbr>;<br />in function acpi_sci_test() of file sys/platform/pc32/acpica/acpi_fadt.c</p>
<p>enables boot to at least progress to the end of function call<br />acpi_sci_config();<br />in function AcpiOsInstallInterruptHandler() in<br />file sys/dev/acpica/Osd/OsdInterrupt.c<br />(after which at some point booting hangs again).</p>
<p>I can only speculate this may have some relation to the thread<br />"Time keeping Issues with the low-resolution TSC timecounter" <br />on the FreeBSD current mailing list around June 2011. For example:</p>
<p><a class="external" href="http://lists.freebsd.org/pipermail/freebsd-current/2011-June/025319.html">http://lists.freebsd.org/pipermail/freebsd-current/2011-June/025319.html</a></p>
<p>"Somewhere from an Intel manual, I think I read TSC stops when DPSLP#<br />pin is asserted for Core/Core2/Atom processors and I guess that means<br />entering C3 stops TSC. :-("</p>
<p>Attached is a dmesg from an acpi-disabled successful boot of the machine.</p>
<p>---Files--------------------------------<br />lenovo_s10_dmesg.txt (36.5 KB)</p>
<p>--<br />You have received this notification because you have either subscribed to it, or are involved in it.<br />To change your notification preferences, please click here: <a class="external" href="http://bugs.dragonflybsd.org/my/account">http://bugs.dragonflybsd.org/my/account</a></p>
</blockquote>
<p>-- <br />Tomorrow Will Never Die</p> DragonFlyBSD - Bug #2653: Timer DELAY hangs boot on Lenovo S10 Intel Atom N270 with acpi enabledhttps://bugs.dragonflybsd.org/issues/2653?journal_id=118982014-03-14T07:02:58Zdavshao
<ul></ul><p>Unfortunately, the tsc_delay.diff patch does not solve the problem, and booting once again hangs after:</p>
<p>hpt27xx: RocketRAID 27xx controller driver v1.0 (Mar 13 2014 22:47:26)</p>
<p>Previous explorations with kprintf seemed to show possibly related problems occurred at lwkt_switch().</p>
<p>On a happier note, using the working patch with master through</p>
<p>commit 7dadaa2286bb268725a0b6255ad1832de28f1a61<br />Date: Thu Mar 13 19:32:20 2014 +0100</p>
<pre><code>Gnargh, fix typo.</code></pre>
<p>the Lenovo S10 i386 Intel Atom N270 for the first time ever now shuts down correctly instead of hanging after the filesystem is synched.</p> DragonFlyBSD - Bug #2653: Timer DELAY hangs boot on Lenovo S10 Intel Atom N270 with acpi enabledhttps://bugs.dragonflybsd.org/issues/2653?journal_id=119012014-03-16T13:24:09Zsepherosa
<ul></ul><p>On Fri, Mar 14, 2014 at 3:02 PM,<br /><<a class="email" href="mailto:bugtracker-admin@leaf.dragonflybsd.org">bugtracker-admin@leaf.dragonflybsd.org</a>> wrote:</p>
<blockquote>
<p>Issue <a class="issue tracker-1 status-5 priority-4 priority-default closed" title="Bug: Timer DELAY hangs boot on Lenovo S10 Intel Atom N270 with acpi enabled (Closed)" href="https://bugs.dragonflybsd.org/issues/2653">#2653</a> has been updated by davshao.</p>
<p>Unfortunately, the tsc_delay.diff patch does not solve the problem, and booting once again hangs after:</p>
<p>hpt27xx: RocketRAID 27xx controller driver v1.0 (Mar 13 2014 22:47:26)</p>
<p>Previous explorations with kprintf seemed to show possibly related problems occurred at lwkt_switch().</p>
</blockquote>
<p>Do you mean the lwk_switch() in DELAY? I don't think the<br />lwkt_switch() in DELAY will be executed.</p>
<blockquote>
<p>On a happier note, using the working patch with master through</p>
</blockquote>
<p>What's the working patch? Could you post it?</p>
<p>Thanks,<br />sephe</p>
<blockquote>
<p>commit 7dadaa2286bb268725a0b6255ad1832de28f1a61<br />Date: Thu Mar 13 19:32:20 2014 +0100</p>
<p>Gnargh, fix typo.</p>
<p>the Lenovo S10 i386 Intel Atom N270 for the first time ever now shuts down correctly instead of hanging after the filesystem is synched.</p>
<p>----------------------------------------<br />Bug <a class="issue tracker-1 status-5 priority-4 priority-default closed" title="Bug: Timer DELAY hangs boot on Lenovo S10 Intel Atom N270 with acpi enabled (Closed)" href="https://bugs.dragonflybsd.org/issues/2653">#2653</a>: Timer DELAY hangs boot on Lenovo S10 Intel Atom N270 with acpi enabled<br /><a class="external" href="http://bugs.dragonflybsd.org/issues/2653#change-11898">http://bugs.dragonflybsd.org/issues/2653#change-11898</a></p>
<ul>
<li>Author: davshao</li>
<li>Status: New</li>
<li>Priority: Normal</li>
<li>Assignee:</li>
<li>Category:</li>
<li>Target version:<br />----------------------------------------<br />On a i386 Lenovo S10 netbook with Intel Atom N270 and acpi enabled, boot hangs after:</li>
</ul>
<p>acpi0.nexus0.root0<br />acpi0: <LENOVO CB-01> [tentative] on motherboard<br />ACPI: All ACPI Tables successfully acquired<br />ACPI FADT: SCI testing interrupt mode ...<br />ACPI FADT: SCI testing level/high<br />IOAPIC: irq 9, gsi 9 edge/high -> level/high</p>
<p>Brute force debugging with kprintf shows that commenting out the<br /><abbr title="100 * 1000">DELAY</abbr>;<br />in function acpi_sci_test() of file sys/platform/pc32/acpica/acpi_fadt.c</p>
<p>enables boot to at least progress to the end of function call<br />acpi_sci_config();<br />in function AcpiOsInstallInterruptHandler() in<br />file sys/dev/acpica/Osd/OsdInterrupt.c<br />(after which at some point booting hangs again).</p>
<p>I can only speculate this may have some relation to the thread<br />"Time keeping Issues with the low-resolution TSC timecounter" <br />on the FreeBSD current mailing list around June 2011. For example:</p>
<p><a class="external" href="http://lists.freebsd.org/pipermail/freebsd-current/2011-June/025319.html">http://lists.freebsd.org/pipermail/freebsd-current/2011-June/025319.html</a></p>
<p>"Somewhere from an Intel manual, I think I read TSC stops when DPSLP#<br />pin is asserted for Core/Core2/Atom processors and I guess that means<br />entering C3 stops TSC. :-("</p>
<p>Attached is a dmesg from an acpi-disabled successful boot of the machine.</p>
<p>---Files--------------------------------<br />lenovo_s10_dmesg.txt (36.5 KB)</p>
<p>--<br />You have received this notification because you have either subscribed to it, or are involved in it.<br />To change your notification preferences, please click here: <a class="external" href="http://bugs.dragonflybsd.org/my/account">http://bugs.dragonflybsd.org/my/account</a></p>
</blockquote>
<p>-- <br />Tomorrow Will Never Die</p> DragonFlyBSD - Bug #2653: Timer DELAY hangs boot on Lenovo S10 Intel Atom N270 with acpi enabledhttps://bugs.dragonflybsd.org/issues/2653?journal_id=119542014-05-14T08:56:00Zswildner
<ul></ul><p>Is this issue still happening to you? If not, can you close this ticket please?</p> DragonFlyBSD - Bug #2653: Timer DELAY hangs boot on Lenovo S10 Intel Atom N270 with acpi enabledhttps://bugs.dragonflybsd.org/issues/2653?journal_id=129072016-06-01T05:54:29Zswildner
<ul><li><strong>Status</strong> changed from <i>New</i> to <i>Closed</i></li></ul><p>No reaction from OP, so closing it, as I believe that this was tracked down and fixed by Matt.</p>