From mboxrd@z Thu Jan 1 00:00:00 1970 From: "H. Peter Anvin" Subject: Re: [PATCH 1/3] rtc-efi: register rtc-efi device when EFI enabled Date: Fri, 28 Dec 2012 15:44:45 -0800 Message-ID: <50DE2EED.9030608@zytor.com> References: <1356712001-12198-1-git-send-email-jlee@suse.com> <3fa7337e-6bbc-4462-9704-2d8ac20a9cf2@email.android.com> <50DE03D8.9030902@zytor.com> Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: Sender: linux-efi-owner-u79uwXL29TY76Z2rM5mHXA@public.gmane.org To: Matthew Garrett Cc: "Lee, Chun-Yi" , "matt.fleming-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org" , "linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org" , "linux-efi-u79uwXL29TY76Z2rM5mHXA@public.gmane.org" , "Lee, Chun-Yi" , Thomas Gleixner , Ingo Molnar , Jan Beulich , Len Brown , Arjan van de Ven List-Id: linux-efi@vger.kernel.org On 12/28/2012 12:49 PM, Matthew Garrett wrote: > On Fri, 2012-12-28 at 12:40 -0800, H. Peter Anvin wrote: > >>> I suspect that what we *should* do looks like: >>> >>> 1. If ACPI exports a Time and Alarm Device (ACPI000E) the use it; >>> 2. If ACPI exports an PC/AT device (PNP0B00/1/2) then use it(*); >>> 3. If we have an EFI RTC use it; >>> 4. Probe for a PC/AT RTC device. > > In terms of ordering, 3 should probably come before 2 - but that depends > on us actually fixing the issues that are preventing some of these calls > from working. As far as wallclock time goes, EFI is going to be > available to us before we've parsed the DSDT to determine whether > there's any ACPI devices, so we'll almost certainly end up having to use > it at at least some point during boot. Otherwise, agreed. > [Resending due to misconfigured tablet] 3 before 2 is exactly what is known to break on existing hardware (ASUS). If anything, we should move to using the EFI RTC as a very last resort, i.e. 3 after 4. Ideally we should match Win8 behavior, but that would require someone mocking up different ACPI and EFI functions in a simulator and see how Win8 prioritizes things. -hpa From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755131Ab2L1XpR (ORCPT ); Fri, 28 Dec 2012 18:45:17 -0500 Received: from terminus.zytor.com ([198.137.202.10]:39585 "EHLO mail.zytor.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754236Ab2L1XpP (ORCPT ); Fri, 28 Dec 2012 18:45:15 -0500 Message-ID: <50DE2EED.9030608@zytor.com> Date: Fri, 28 Dec 2012 15:44:45 -0800 From: "H. Peter Anvin" User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:17.0) Gecko/17.0 Thunderbird/17.0 MIME-Version: 1.0 To: Matthew Garrett CC: "Lee, Chun-Yi" , "matt.fleming@intel.com" , "linux-kernel@vger.kernel.org" , "linux-efi@vger.kernel.org" , "Lee, Chun-Yi" , Thomas Gleixner , Ingo Molnar , Jan Beulich , Len Brown , Arjan van de Ven Subject: Re: [PATCH 1/3] rtc-efi: register rtc-efi device when EFI enabled References: <1356712001-12198-1-git-send-email-jlee@suse.com> <3fa7337e-6bbc-4462-9704-2d8ac20a9cf2@email.android.com> <50DE03D8.9030902@zytor.com> In-Reply-To: X-Enigmail-Version: 1.4.6 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 12/28/2012 12:49 PM, Matthew Garrett wrote: > On Fri, 2012-12-28 at 12:40 -0800, H. Peter Anvin wrote: > >>> I suspect that what we *should* do looks like: >>> >>> 1. If ACPI exports a Time and Alarm Device (ACPI000E) the use it; >>> 2. If ACPI exports an PC/AT device (PNP0B00/1/2) then use it(*); >>> 3. If we have an EFI RTC use it; >>> 4. Probe for a PC/AT RTC device. > > In terms of ordering, 3 should probably come before 2 - but that depends > on us actually fixing the issues that are preventing some of these calls > from working. As far as wallclock time goes, EFI is going to be > available to us before we've parsed the DSDT to determine whether > there's any ACPI devices, so we'll almost certainly end up having to use > it at at least some point during boot. Otherwise, agreed. > [Resending due to misconfigured tablet] 3 before 2 is exactly what is known to break on existing hardware (ASUS). If anything, we should move to using the EFI RTC as a very last resort, i.e. 3 after 4. Ideally we should match Win8 behavior, but that would require someone mocking up different ACPI and EFI functions in a simulator and see how Win8 prioritizes things. -hpa