[DragonFlyBSD - Bug #2653] Timer DELAY hangs boot on Lenovo S10 Intel Atom N270 with acpi enabled

bugtracker-admin at leaf.dragonflybsd.org bugtracker-admin at leaf.dragonflybsd.org
Fri Mar 7 23:05:52 PST 2014

Issue #2653 has been updated by davshao.

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.

The two further places to replace DELAYs are

1) line 519 in function acpi_attach() in file sys/dev/acpica/acpi.c


2) line 454 in function pcireg_cfgopen() in file sys/bus/pci/i386/pci_cfgreg.c

mode1res = inl(CONF1_ADDR_PORT);

Now the question becomes, if DELAY() doesn't work (I suspect for reasons related to Bug #2652 that it is related to lwkt_switch()),
and something like tsleep() can't be used in acpi code, then what to use for delays?

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.

I am sure there must be a far better way, can someone suggest it?

Bug #2653: Timer DELAY hangs boot on Lenovo S10 Intel Atom N270 with acpi enabled

* Author: davshao
* Status: New
* Priority: Normal
* Assignee: 
* Category: 
* Target version: 
On a i386 Lenovo S10 netbook with Intel Atom N270 and acpi enabled, boot hangs after:

acpi0: <LENOVO CB-01> [tentative] on motherboard
ACPI: All ACPI Tables successfully acquired
ACPI FADT: SCI testing interrupt mode ...
ACPI FADT: SCI testing level/high
IOAPIC: irq 9, gsi 9 edge/high -> level/high

Brute force debugging with kprintf shows that commenting out the
DELAY(100 * 1000);
in function acpi_sci_test() of file sys/platform/pc32/acpica/acpi_fadt.c

enables boot to at least progress to the end of function call
in function AcpiOsInstallInterruptHandler() in
file sys/dev/acpica/Osd/OsdInterrupt.c
(after which at some point booting hangs again).

I can only speculate this may have some relation to the thread
"Time keeping Issues with the low-resolution TSC timecounter"
on the FreeBSD current mailing list around June 2011.  For example:


"Somewhere from an Intel manual, I think I read TSC stops when DPSLP# 
pin is asserted for Core/Core2/Atom processors and I guess that means 
entering C3 stops TSC. :-("

Attached is a dmesg from an acpi-disabled successful boot of the machine.

lenovo_s10_dmesg.txt (36.5 KB)

You have received this notification because you have either subscribed to it, or are involved in it.
To change your notification preferences, please click here: http://bugs.dragonflybsd.org/my/account

More information about the Bugs mailing list