[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Xen-devel] [PATCH] x86/time: Don't use EFI's GetTime call by default
When EFI is used, don't use EFI's GetTime() to get the time, because it is broken on many platforms. From Linux commit 7efe665903d0 ("rtc: Disable EFI rtc for x86"): "Disable it explicitly for x86 so that we don't give users false hope that this driver will work - it won't, and your machine is likely to crash." Signed-off-by: Ross Lagerwall <ross.lagerwall@xxxxxxxxxx> --- xen/arch/x86/time.c | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/xen/arch/x86/time.c b/xen/arch/x86/time.c index 30d52c4..28895c2 100644 --- a/xen/arch/x86/time.c +++ b/xen/arch/x86/time.c @@ -679,20 +679,28 @@ static void __get_cmos_time(struct rtc_time *rtc) rtc->year += 100; } +/* EFI's GetTime() is frequently broken so don't use it by default. */ +#undef USE_EFI_GET_TIME + static unsigned long get_cmos_time(void) { - unsigned long res, flags; +#ifdef USE_EFI_GET_TIME + unsigned long res; +#endif + unsigned long flags; struct rtc_time rtc; unsigned int seconds = 60; static bool_t __read_mostly cmos_rtc_probe; boolean_param("cmos-rtc-probe", cmos_rtc_probe); +#ifdef USE_EFI_GET_TIME if ( efi_enabled ) { res = efi_get_time(); if ( res ) return res; } +#endif if ( likely(!(acpi_gbl_FADT.boot_flags & ACPI_FADT_NO_CMOS_RTC)) ) cmos_rtc_probe = 0; -- 2.4.3 _______________________________________________ Xen-devel mailing list Xen-devel@xxxxxxxxxxxxx http://lists.xen.org/xen-devel
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |