This patch add following facilities to acpi_hpet timer driver. 1) Periodic timer facility This driver provides periodic timer facility for userland applications to use for appication specific process scheduling. 2) Global time stamp for SMP machines. This driver provides a common time-base on N-Way MP system via mmap system call. It is not affected by clock freq. drifts. The following issues remain in the range that I notice: (a) HPET timer facility can not share the interrupt with other devices: This constraint comes from design of HPET timer device, ISR register in HPET does not reports ISR state when the HPET interrupts are configured as edge interrupt. So we can not determine whether the interrupt should be handled by HPET driver or not. If we configure HPET timer interrupts as level interrupt when driver initialization phase, it may be able to determine the owner of interrupts. (b) Timer0 is not available: Due to issue (a), HPET timer interrupts are routed with legacy routing way which is mentioned in HPET/ICH-N manuals. In this way, timer0's interrupt is routed to IRQ2. However, as far as I see, bus_setup_interrupt can not setup the interrupt handler of IRQ2. To solve this problem, we can use I/O APIC routing in stead of legacy routing. But this solution raises issue(a). So, I can not figure out how to solve this issue. Fix: This is not a bug. How-To-Repeat: Attached test programs(they are included in hpet-tp.tar.bz2.uu) can be used to test this driver.
Responsible Changed From-To: freebsd-bugs->freebsd-acpi Over to maintainer(s).
Hi, I haven't read the whole patch yet. To me line 164 (of the first patch file) seems bogus. It tries to do the right thing (read-modify-write) but actually does not. HPET_OFFSET_ENABLE is the offset in the hpet datastructure. Should be like this: val = bus_read_4(sc->mem_res, HPET_OFFSET_ENABLE); bus_write_4(sc->mem_res, HPET_OFFSET_ENABLE, val | 1); And 1 should better HPET_ENABLE_ENABLE. Line 133 of the same patch does not even try to do a read-modify-write. However the documentation is clear that it should. This all applies to the driver in -current (1.8) as well. regards Marius
This PR can be closed.
jhb 2008-01-16 18:47:07 UTC FreeBSD src repository Modified files: sys/dev/acpica acpi_hpet.c Added files: sys/dev/acpica acpi_hpet.h Log: Add a header containing constants for the various HPET registers and their fields and update the code to match. The PR served more as an inspiration than providing the actual diffs. MFC after: 1 week PR: kern/112544 Revision Changes Path 1.14 +19 -23 src/sys/dev/acpica/acpi_hpet.c 1.1 +65 -0 src/sys/dev/acpica/acpi_hpet.h (new) _______________________________________________ cvs-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/cvs-all To unsubscribe, send any mail to "cvs-all-unsubscribe@freebsd.org"
State Changed From-To: open->patched Was committed to -HEAD a couple of weeks ago.
State Changed From-To: patched->open Change state back to open as per jhb's request.
State Changed From-To: open->feedback To jhb: there seems to have been a commit, then an MFC to RELENG_6 via 1.1.4.1 on Jan 23 2008. Is there some reason this one needs to remain open?
Responsible Changed From-To: freebsd-acpi->jhb
----- Forwarded message from John Baldwin <jhb@freebsd.org> ----- The HPET contains multiple bits. One is a general count down timer that we use for timekeeping. In addition it contains a variable number of comparator registers each of which can be used to generate interrupts at varying frequencies (or one-shot interrupts, etc.). The current in-kernel HPET support only handles the count down timer. We do not have any support for the comparators. The code in the PR does include support for the comparators. However, it's aim is to export them for use by userland drivers. FreeBSD will probably end up using the HPET comparators to back deadline-style clock interrupts in place of the RTC or lapic timer at some point in which case certain pieces of this code may be useful. The commit I made just extracted a few of the changes in the original patch, it did not contain all of the changes in the patch. It is probably best to mark this as suspended and leave it as freebsd-acpi@ for now as I'm not currently planning on doing the deadline clock stuff. -- John Baldwin ----- End forwarded message -----
State Changed From-To: feedback->suspended See note from jhb in Audit-Trail.
Responsible Changed From-To: jhb->freebsd-acpi
We still do not provide a userland interface to HPET. But do we really want to? What kind of applications would use it and why existing userland timer facilities are not adequate for them? In any case, HPET and event timer code has been substantially re-organized in head, so the patch would have to be rebased if the submitter still want that kind of functionality. Thanks for helping FreeBSD! -- Andriy Gapon
batch change: For bugs that match the following - Status Is In progress AND - Untouched since 2018-01-01. AND - Affects Base System OR Documentation DO: Reset to open status. Note: I did a quick pass but if you are getting this email it might be worthwhile to double check to see if this bug ought to be closed.
HPET driver has been substantially changed. We've got userland timecounters for things like gettimeofday. HPET has long been supported as a kernel event timer.