Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 26 May 2020 09:14:23 -0600
From:      Ian Lepore <ian@freebsd.org>
To:        Andriy Gapon <avg@FreeBSD.org>, FreeBSD Current <current@FreeBSD.org>
Subject:   Re: efirtc + atrtc at the same time
Message-ID:  <615114ebc4d37a753f02403981ea23e60a6dbe08.camel@freebsd.org>
In-Reply-To: <021d8df4-a4f8-620d-73b6-b6103d0bf7f1@FreeBSD.org>
References:  <021d8df4-a4f8-620d-73b6-b6103d0bf7f1@FreeBSD.org>

next in thread | previous in thread | raw e-mail | index | archive | help
On Mon, 2020-05-25 at 11:37 +0300, Andriy Gapon wrote:
> I see that on my laptop both efirtc and atrtc get attached.
> The latter is via an ACPI attachment:
> efirtc0: <EFI Realtime Clock>
> efirtc0: registered as a time-of-day clock, resolution 1.000000s
> atrtc0: <AT realtime clock> port 0x70-0x71 on acpi0
> atrtc0: registered as a time-of-day clock, resolution 1.000000s
> 
> I am not sure if this is a problem by itself, but it certainly seems redundant
> to have two drivers controlling the same(?) hardware via different platform
> mechanisms.
> Maybe there is a nice way to automatically disable (or "neutralize") one of the
> drivers?
> 

I thought I had done something long ago to prevent atrtc and efirtc
from both attaching, but apparently not.  I intended to, I even
mentioned it in https://reviews.freebsd.org/D14399 but it looks like I
never followed up and did the work.

> Also, there is another issue related to atrtc.
> When I have both drivers attached, and also when I have only atrtc attached
> (efi.rt.disabled=1), system clock jumps 10 minutes forward after each suspend /
> resume cycle (S0 -> S3 -> S0).  That does not happen for reboot and shutdown
> cycles.  I haven't investigated this deeper, but it is a curious problem.
> 

I've looked at the code for messing with the clock around
suspend/resume and never felt like it was doing the right thing (or
even anything useful).  But I've never owned a freebsd machine that
could successfully resume from suspend, so I've never been able to
experiment with it.

-- Ian





Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?615114ebc4d37a753f02403981ea23e60a6dbe08.camel>