* [PATCH 1/3] rtc-efi: register rtc-efi device when EFI enabled
@ 2012-12-28 16:26 ` Lee, Chun-Yi
0 siblings, 0 replies; 38+ messages in thread
From: Lee, Chun-Yi @ 2012-12-28 16:26 UTC (permalink / raw)
To: matt.fleming-ral2JQCrhuEAvxtiuMwx3w
Cc: linux-kernel-u79uwXL29TY76Z2rM5mHXA,
linux-efi-u79uwXL29TY76Z2rM5mHXA, Lee, Chun-Yi, H. Peter Anvin,
Matthew Garrett, Thomas Gleixner, Ingo Molnar, Jan Beulich
UEFI time services, GetTime(), SetTime(), GetWakeupTime(), SetWakeupTime() are also
supported by other non-IA64 architecutre with UEFI BIOS, e.g. x86.
This patch changed RTC_DRV_EFI configuration to depend on EFI but not just IA64. It
checks efi_enabled flag and efi-rtc driver should enabled.
Cc: Matt Fleming <matt.fleming-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org>
Cc: H. Peter Anvin <hpa-YMNOUZJC4hwAvxtiuMwx3w@public.gmane.org>
Cc: Matthew Garrett <matthew.garrett-05XSO3Yj/JvQT0dZR+AlfA@public.gmane.org>
Cc: Thomas Gleixner <tglx-hfZtesqFncYOwBW4kG4KsQ@public.gmane.org>
Cc: Ingo Molnar <mingo-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
Cc: Jan Beulich <JBeulich-IBi9RG/b67k@public.gmane.org>
Signed-off-by: Lee, Chun-Yi <jlee-IBi9RG/b67k@public.gmane.org>
---
arch/x86/platform/efi/efi.c | 20 ++++++++++++++++++++
drivers/rtc/Kconfig | 2 +-
2 files changed, 21 insertions(+), 1 deletions(-)
diff --git a/arch/x86/platform/efi/efi.c b/arch/x86/platform/efi/efi.c
index ad44391..f08d28b 100644
--- a/arch/x86/platform/efi/efi.c
+++ b/arch/x86/platform/efi/efi.c
@@ -41,6 +41,9 @@
#include <linux/io.h>
#include <linux/reboot.h>
#include <linux/bcd.h>
+#if (defined CONFIG_RTC_DRV_EFI || defined CONFIG_RTC_DRV_EFI_MODULE)
+#include <linux/platform_device.h>
+#endif
#include <asm/setup.h>
#include <asm/efi.h>
@@ -961,6 +964,23 @@ void __init efi_enter_virtual_mode(void)
kfree(new_memmap);
}
+#if (defined CONFIG_RTC_DRV_EFI || defined CONFIG_RTC_DRV_EFI_MODULE)
+static struct platform_device rtc_efi_dev = {
+ .name = "rtc-efi",
+ .id = -1,
+};
+
+static int __init rtc_init(void)
+{
+ if (efi_enabled && platform_device_register(&rtc_efi_dev) < 0)
+ pr_err("unable to register rtc-efi device...\n");
+
+ /* not necessarily an error */
+ return 0;
+}
+arch_initcall(rtc_init);
+#endif
+
/*
* Convenience functions to obtain memory types and attributes
*/
diff --git a/drivers/rtc/Kconfig b/drivers/rtc/Kconfig
index d0cea02..7796f0a 100644
--- a/drivers/rtc/Kconfig
+++ b/drivers/rtc/Kconfig
@@ -621,7 +621,7 @@ config RTC_DRV_DA9055
config RTC_DRV_EFI
tristate "EFI RTC"
- depends on IA64
+ depends on EFI
help
If you say yes here you will get support for the EFI
Real Time Clock.
--
1.6.4.2
^ permalink raw reply related [flat|nested] 38+ messages in thread* [PATCH 1/3] rtc-efi: register rtc-efi device when EFI enabled
@ 2012-12-28 16:26 ` Lee, Chun-Yi
0 siblings, 0 replies; 38+ messages in thread
From: Lee, Chun-Yi @ 2012-12-28 16:26 UTC (permalink / raw)
To: matt.fleming
Cc: linux-kernel, linux-efi, Lee, Chun-Yi, H. Peter Anvin,
Matthew Garrett, Thomas Gleixner, Ingo Molnar, Jan Beulich
UEFI time services, GetTime(), SetTime(), GetWakeupTime(), SetWakeupTime() are also
supported by other non-IA64 architecutre with UEFI BIOS, e.g. x86.
This patch changed RTC_DRV_EFI configuration to depend on EFI but not just IA64. It
checks efi_enabled flag and efi-rtc driver should enabled.
Cc: Matt Fleming <matt.fleming@intel.com>
Cc: H. Peter Anvin <hpa@zytor.com>
Cc: Matthew Garrett <matthew.garrett@nebula.com>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: Ingo Molnar <mingo@redhat.com>
Cc: Jan Beulich <JBeulich@suse.com>
Signed-off-by: Lee, Chun-Yi <jlee@suse.com>
---
arch/x86/platform/efi/efi.c | 20 ++++++++++++++++++++
drivers/rtc/Kconfig | 2 +-
2 files changed, 21 insertions(+), 1 deletions(-)
diff --git a/arch/x86/platform/efi/efi.c b/arch/x86/platform/efi/efi.c
index ad44391..f08d28b 100644
--- a/arch/x86/platform/efi/efi.c
+++ b/arch/x86/platform/efi/efi.c
@@ -41,6 +41,9 @@
#include <linux/io.h>
#include <linux/reboot.h>
#include <linux/bcd.h>
+#if (defined CONFIG_RTC_DRV_EFI || defined CONFIG_RTC_DRV_EFI_MODULE)
+#include <linux/platform_device.h>
+#endif
#include <asm/setup.h>
#include <asm/efi.h>
@@ -961,6 +964,23 @@ void __init efi_enter_virtual_mode(void)
kfree(new_memmap);
}
+#if (defined CONFIG_RTC_DRV_EFI || defined CONFIG_RTC_DRV_EFI_MODULE)
+static struct platform_device rtc_efi_dev = {
+ .name = "rtc-efi",
+ .id = -1,
+};
+
+static int __init rtc_init(void)
+{
+ if (efi_enabled && platform_device_register(&rtc_efi_dev) < 0)
+ pr_err("unable to register rtc-efi device...\n");
+
+ /* not necessarily an error */
+ return 0;
+}
+arch_initcall(rtc_init);
+#endif
+
/*
* Convenience functions to obtain memory types and attributes
*/
diff --git a/drivers/rtc/Kconfig b/drivers/rtc/Kconfig
index d0cea02..7796f0a 100644
--- a/drivers/rtc/Kconfig
+++ b/drivers/rtc/Kconfig
@@ -621,7 +621,7 @@ config RTC_DRV_DA9055
config RTC_DRV_EFI
tristate "EFI RTC"
- depends on IA64
+ depends on EFI
help
If you say yes here you will get support for the EFI
Real Time Clock.
--
1.6.4.2
^ permalink raw reply related [flat|nested] 38+ messages in thread[parent not found: <1356712001-12198-1-git-send-email-jlee-IBi9RG/b67k@public.gmane.org>]
* [PATCH 2/3] rtc-efi: add timezone to rtc_time that will used by rtc-efi
2012-12-28 16:26 ` Lee, Chun-Yi
@ 2012-12-28 16:26 ` Lee, Chun-Yi
-1 siblings, 0 replies; 38+ messages in thread
From: Lee, Chun-Yi @ 2012-12-28 16:26 UTC (permalink / raw)
To: matt.fleming-ral2JQCrhuEAvxtiuMwx3w
Cc: linux-kernel-u79uwXL29TY76Z2rM5mHXA,
linux-efi-u79uwXL29TY76Z2rM5mHXA, Lee, Chun-Yi, H. Peter Anvin,
Matthew Garrett, Thomas Gleixner, Ingo Molnar, Jan Beulich
Per UEFI 2.3.1 spec, we can use SetTime() to store the timezone value to BIOS and
get it back by GetTime(). It's good for installation system to gain the default
timezone setting from BIOS that was set by manufacturer.
This patch adds new field tm_timezone to rtc_time struct for expose the timezone
to userspace. And, patch also adds the check logic to rtc-efi when convert timezone.
The check logic of timezone only affect on x86 architecture and keep the original
EFI_UNSPECIFIED_TIMEZONE value on IA64.
Cc: Matt Fleming <matt.fleming-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org>
Cc: H. Peter Anvin <hpa-YMNOUZJC4hwAvxtiuMwx3w@public.gmane.org>
Cc: Matthew Garrett <matthew.garrett-05XSO3Yj/JvQT0dZR+AlfA@public.gmane.org>
Cc: Thomas Gleixner <tglx-hfZtesqFncYOwBW4kG4KsQ@public.gmane.org>
Cc: Ingo Molnar <mingo-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
Cc: Jan Beulich <JBeulich-IBi9RG/b67k@public.gmane.org>
Signed-off-by: Lee, Chun-Yi <jlee-IBi9RG/b67k@public.gmane.org>
---
drivers/rtc/rtc-efi.c | 20 +++++++++++++++++---
include/uapi/linux/rtc.h | 1 +
2 files changed, 18 insertions(+), 3 deletions(-)
diff --git a/drivers/rtc/rtc-efi.c b/drivers/rtc/rtc-efi.c
index c9f890b..4e74ec0 100644
--- a/drivers/rtc/rtc-efi.c
+++ b/drivers/rtc/rtc-efi.c
@@ -62,7 +62,7 @@ compute_wday(efi_time_t *eft)
return (ndays + 4) % 7;
}
-static void
+static int
convert_to_efi_time(struct rtc_time *wtime, efi_time_t *eft)
{
eft->year = wtime->tm_year + 1900;
@@ -73,7 +73,16 @@ convert_to_efi_time(struct rtc_time *wtime, efi_time_t *eft)
eft->second = wtime->tm_sec;
eft->nanosecond = 0;
eft->daylight = wtime->tm_isdst ? EFI_ISDST : 0;
+#ifdef CONFIG_X86
+ if (abs(wtime->tm_timezone) > 1440 &&
+ wtime->tm_timezone != EFI_UNSPECIFIED_TIMEZONE)
+ return -EINVAL;
+ eft->timezone = wtime->tm_timezone;
+#else
eft->timezone = EFI_UNSPECIFIED_TIMEZONE;
+#endif /* CONFIG_X86 */
+
+ return 0;
}
static void
@@ -86,6 +95,9 @@ convert_from_efi_time(efi_time_t *eft, struct rtc_time *wtime)
wtime->tm_mday = eft->day;
wtime->tm_mon = eft->month - 1;
wtime->tm_year = eft->year - 1900;
+#ifdef CONFIG_X86
+ wtime->tm_timezone = eft->timezone;
+#endif /* CONFIG_X86 */
/* day of the week [0-6], Sunday=0 */
wtime->tm_wday = compute_wday(eft);
@@ -130,7 +142,8 @@ static int efi_set_alarm(struct device *dev, struct rtc_wkalrm *wkalrm)
efi_time_t eft;
efi_status_t status;
- convert_to_efi_time(&wkalrm->time, &eft);
+ if (convert_to_efi_time(&wkalrm->time, &eft))
+ return -EINVAL;
/*
* XXX Fixme:
@@ -171,7 +184,8 @@ static int efi_set_time(struct device *dev, struct rtc_time *tm)
efi_status_t status;
efi_time_t eft;
- convert_to_efi_time(tm, &eft);
+ if (convert_to_efi_time(tm, &eft))
+ return -EINVAL;
status = efi.set_time(&eft);
diff --git a/include/uapi/linux/rtc.h b/include/uapi/linux/rtc.h
index f8c82e6..841725f 100644
--- a/include/uapi/linux/rtc.h
+++ b/include/uapi/linux/rtc.h
@@ -27,6 +27,7 @@ struct rtc_time {
int tm_wday;
int tm_yday;
int tm_isdst;
+ int tm_timezone;
};
/*
--
1.6.4.2
^ permalink raw reply related [flat|nested] 38+ messages in thread* [PATCH 2/3] rtc-efi: add timezone to rtc_time that will used by rtc-efi
@ 2012-12-28 16:26 ` Lee, Chun-Yi
0 siblings, 0 replies; 38+ messages in thread
From: Lee, Chun-Yi @ 2012-12-28 16:26 UTC (permalink / raw)
To: matt.fleming
Cc: linux-kernel, linux-efi, Lee, Chun-Yi, H. Peter Anvin,
Matthew Garrett, Thomas Gleixner, Ingo Molnar, Jan Beulich
Per UEFI 2.3.1 spec, we can use SetTime() to store the timezone value to BIOS and
get it back by GetTime(). It's good for installation system to gain the default
timezone setting from BIOS that was set by manufacturer.
This patch adds new field tm_timezone to rtc_time struct for expose the timezone
to userspace. And, patch also adds the check logic to rtc-efi when convert timezone.
The check logic of timezone only affect on x86 architecture and keep the original
EFI_UNSPECIFIED_TIMEZONE value on IA64.
Cc: Matt Fleming <matt.fleming@intel.com>
Cc: H. Peter Anvin <hpa@zytor.com>
Cc: Matthew Garrett <matthew.garrett@nebula.com>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: Ingo Molnar <mingo@redhat.com>
Cc: Jan Beulich <JBeulich@suse.com>
Signed-off-by: Lee, Chun-Yi <jlee@suse.com>
---
drivers/rtc/rtc-efi.c | 20 +++++++++++++++++---
include/uapi/linux/rtc.h | 1 +
2 files changed, 18 insertions(+), 3 deletions(-)
diff --git a/drivers/rtc/rtc-efi.c b/drivers/rtc/rtc-efi.c
index c9f890b..4e74ec0 100644
--- a/drivers/rtc/rtc-efi.c
+++ b/drivers/rtc/rtc-efi.c
@@ -62,7 +62,7 @@ compute_wday(efi_time_t *eft)
return (ndays + 4) % 7;
}
-static void
+static int
convert_to_efi_time(struct rtc_time *wtime, efi_time_t *eft)
{
eft->year = wtime->tm_year + 1900;
@@ -73,7 +73,16 @@ convert_to_efi_time(struct rtc_time *wtime, efi_time_t *eft)
eft->second = wtime->tm_sec;
eft->nanosecond = 0;
eft->daylight = wtime->tm_isdst ? EFI_ISDST : 0;
+#ifdef CONFIG_X86
+ if (abs(wtime->tm_timezone) > 1440 &&
+ wtime->tm_timezone != EFI_UNSPECIFIED_TIMEZONE)
+ return -EINVAL;
+ eft->timezone = wtime->tm_timezone;
+#else
eft->timezone = EFI_UNSPECIFIED_TIMEZONE;
+#endif /* CONFIG_X86 */
+
+ return 0;
}
static void
@@ -86,6 +95,9 @@ convert_from_efi_time(efi_time_t *eft, struct rtc_time *wtime)
wtime->tm_mday = eft->day;
wtime->tm_mon = eft->month - 1;
wtime->tm_year = eft->year - 1900;
+#ifdef CONFIG_X86
+ wtime->tm_timezone = eft->timezone;
+#endif /* CONFIG_X86 */
/* day of the week [0-6], Sunday=0 */
wtime->tm_wday = compute_wday(eft);
@@ -130,7 +142,8 @@ static int efi_set_alarm(struct device *dev, struct rtc_wkalrm *wkalrm)
efi_time_t eft;
efi_status_t status;
- convert_to_efi_time(&wkalrm->time, &eft);
+ if (convert_to_efi_time(&wkalrm->time, &eft))
+ return -EINVAL;
/*
* XXX Fixme:
@@ -171,7 +184,8 @@ static int efi_set_time(struct device *dev, struct rtc_time *tm)
efi_status_t status;
efi_time_t eft;
- convert_to_efi_time(tm, &eft);
+ if (convert_to_efi_time(tm, &eft))
+ return -EINVAL;
status = efi.set_time(&eft);
diff --git a/include/uapi/linux/rtc.h b/include/uapi/linux/rtc.h
index f8c82e6..841725f 100644
--- a/include/uapi/linux/rtc.h
+++ b/include/uapi/linux/rtc.h
@@ -27,6 +27,7 @@ struct rtc_time {
int tm_wday;
int tm_yday;
int tm_isdst;
+ int tm_timezone;
};
/*
--
1.6.4.2
^ permalink raw reply related [flat|nested] 38+ messages in thread
* [PATCH 3/3] rtc-efi: set uie_unsupported for indicate rtc-efi doesn't support UIE mode
2012-12-28 16:26 ` Lee, Chun-Yi
@ 2012-12-28 16:26 ` Lee, Chun-Yi
-1 siblings, 0 replies; 38+ messages in thread
From: Lee, Chun-Yi @ 2012-12-28 16:26 UTC (permalink / raw)
To: matt.fleming-ral2JQCrhuEAvxtiuMwx3w
Cc: linux-kernel-u79uwXL29TY76Z2rM5mHXA,
linux-efi-u79uwXL29TY76Z2rM5mHXA, Lee, Chun-Yi, H. Peter Anvin,
Matthew Garrett, Thomas Gleixner, Ingo Molnar, Jan Beulich
This patch set uie_unsupported flag when driver probed because current rtc-efi
driver doesn't support UIE mode. Otherwise RTC_UIE_ON ioctl doesn't return EINVAL
and it causes userspace think the RTC_UIE supported by rtc-efi.
Set uie_unsupported then We can enable CONFIG_RTC_INTF_DEV_UIE_EMUL to emulate
RTC_UIE on rtc-efi.
Cc: Matt Fleming <matt.fleming-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org>
Cc: H. Peter Anvin <hpa-YMNOUZJC4hwAvxtiuMwx3w@public.gmane.org>
Cc: Matthew Garrett <matthew.garrett-05XSO3Yj/JvQT0dZR+AlfA@public.gmane.org>
Cc: Thomas Gleixner <tglx-hfZtesqFncYOwBW4kG4KsQ@public.gmane.org>
Cc: Ingo Molnar <mingo-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
Cc: Jan Beulich <JBeulich-IBi9RG/b67k@public.gmane.org>
Signed-off-by: Lee, Chun-Yi <jlee-IBi9RG/b67k@public.gmane.org>
---
drivers/rtc/rtc-efi.c | 2 ++
1 files changed, 2 insertions(+), 0 deletions(-)
diff --git a/drivers/rtc/rtc-efi.c b/drivers/rtc/rtc-efi.c
index 4e74ec0..dad1687 100644
--- a/drivers/rtc/rtc-efi.c
+++ b/drivers/rtc/rtc-efi.c
@@ -208,6 +208,8 @@ static int __init efi_rtc_probe(struct platform_device *dev)
if (IS_ERR(rtc))
return PTR_ERR(rtc);
+ rtc->uie_unsupported = 1;
+
platform_set_drvdata(dev, rtc);
return 0;
--
1.6.4.2
^ permalink raw reply related [flat|nested] 38+ messages in thread
* [PATCH 3/3] rtc-efi: set uie_unsupported for indicate rtc-efi doesn't support UIE mode
@ 2012-12-28 16:26 ` Lee, Chun-Yi
0 siblings, 0 replies; 38+ messages in thread
From: Lee, Chun-Yi @ 2012-12-28 16:26 UTC (permalink / raw)
To: matt.fleming
Cc: linux-kernel, linux-efi, Lee, Chun-Yi, H. Peter Anvin,
Matthew Garrett, Thomas Gleixner, Ingo Molnar, Jan Beulich
This patch set uie_unsupported flag when driver probed because current rtc-efi
driver doesn't support UIE mode. Otherwise RTC_UIE_ON ioctl doesn't return EINVAL
and it causes userspace think the RTC_UIE supported by rtc-efi.
Set uie_unsupported then We can enable CONFIG_RTC_INTF_DEV_UIE_EMUL to emulate
RTC_UIE on rtc-efi.
Cc: Matt Fleming <matt.fleming@intel.com>
Cc: H. Peter Anvin <hpa@zytor.com>
Cc: Matthew Garrett <matthew.garrett@nebula.com>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: Ingo Molnar <mingo@redhat.com>
Cc: Jan Beulich <JBeulich@suse.com>
Signed-off-by: Lee, Chun-Yi <jlee@suse.com>
---
drivers/rtc/rtc-efi.c | 2 ++
1 files changed, 2 insertions(+), 0 deletions(-)
diff --git a/drivers/rtc/rtc-efi.c b/drivers/rtc/rtc-efi.c
index 4e74ec0..dad1687 100644
--- a/drivers/rtc/rtc-efi.c
+++ b/drivers/rtc/rtc-efi.c
@@ -208,6 +208,8 @@ static int __init efi_rtc_probe(struct platform_device *dev)
if (IS_ERR(rtc))
return PTR_ERR(rtc);
+ rtc->uie_unsupported = 1;
+
platform_set_drvdata(dev, rtc);
return 0;
--
1.6.4.2
^ permalink raw reply related [flat|nested] 38+ messages in thread
* Re: [PATCH 1/3] rtc-efi: register rtc-efi device when EFI enabled
2012-12-28 16:26 ` Lee, Chun-Yi
@ 2012-12-28 17:43 ` Matthew Garrett
-1 siblings, 0 replies; 38+ messages in thread
From: Matthew Garrett @ 2012-12-28 17:43 UTC (permalink / raw)
To: Lee, Chun-Yi
Cc: matt.fleming@intel.com, linux-kernel@vger.kernel.org,
linux-efi@vger.kernel.org, Lee, Chun-Yi, H. Peter Anvin,
Thomas Gleixner, Ingo Molnar, Jan Beulich
On Sat, 2012-12-29 at 00:26 +0800, Lee, Chun-Yi wrote:
> UEFI time services, GetTime(), SetTime(), GetWakeupTime(), SetWakeupTime() are also
> supported by other non-IA64 architecutre with UEFI BIOS, e.g. x86.
>
> This patch changed RTC_DRV_EFI configuration to depend on EFI but not just IA64. It
> checks efi_enabled flag and efi-rtc driver should enabled.
In theory, certainly - but do we still have machines that explode if the
get_time call is made? We may also want to think about disabling the
legacy access to the RTC if the EFI calls are present.
^ permalink raw reply [flat|nested] 38+ messages in thread
* Re: [PATCH 1/3] rtc-efi: register rtc-efi device when EFI enabled
@ 2012-12-28 17:43 ` Matthew Garrett
0 siblings, 0 replies; 38+ messages in thread
From: Matthew Garrett @ 2012-12-28 17:43 UTC (permalink / raw)
To: Lee, Chun-Yi
Cc: matt.fleming@intel.com, linux-kernel@vger.kernel.org,
linux-efi@vger.kernel.org, Lee, Chun-Yi, H. Peter Anvin,
Thomas Gleixner, Ingo Molnar, Jan Beulich
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: text/plain; charset="utf-8", Size: 718 bytes --]
On Sat, 2012-12-29 at 00:26 +0800, Lee, Chun-Yi wrote:
> UEFI time services, GetTime(), SetTime(), GetWakeupTime(), SetWakeupTime() are also
> supported by other non-IA64 architecutre with UEFI BIOS, e.g. x86.
>
> This patch changed RTC_DRV_EFI configuration to depend on EFI but not just IA64. It
> checks efi_enabled flag and efi-rtc driver should enabled.
In theory, certainly - but do we still have machines that explode if the
get_time call is made? We may also want to think about disabling the
legacy access to the RTC if the EFI calls are present.
ÿôèº{.nÇ+·®+%Ëÿ±éݶ\x17¥wÿº{.nÇ+·¥{±þG«éÿ{ayº\x1dÊÚë,j\a¢f£¢·hïêÿêçz_è®\x03(éÝ¢j"ú\x1a¶^[m§ÿÿ¾\a«þG«éÿ¢¸?¨èÚ&£ø§~á¶iOæ¬z·vØ^\x14\x04\x1a¶^[m§ÿÿÃ\fÿ¶ìÿ¢¸?I¥
^ permalink raw reply [flat|nested] 38+ messages in thread[parent not found: <E99CBA9F97C3D149AA6B19ED2E277C9B019215CC-kSjp6dTd0Hr1oIOzUjSfqB1/qY2kGW66nBOFsp37pqbUKgpGm//BTAC/G2K4zDHf@public.gmane.org>]
* Re: [PATCH 1/3] rtc-efi: register rtc-efi device when EFI enabled
2012-12-28 17:43 ` Matthew Garrett
@ 2012-12-28 19:07 ` H. Peter Anvin
-1 siblings, 0 replies; 38+ messages in thread
From: H. Peter Anvin @ 2012-12-28 19:07 UTC (permalink / raw)
To: Matthew Garrett, Lee, Chun-Yi
Cc: 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
We do have such machines, which is why this change has been reverted twice already. I believe we should stick to the priority scheme I proposed a few weeks ago.
Matthew Garrett <matthew.garrett-05XSO3Yj/JvQT0dZR+AlfA@public.gmane.org> wrote:
>On Sat, 2012-12-29 at 00:26 +0800, Lee, Chun-Yi wrote:
>> UEFI time services, GetTime(), SetTime(), GetWakeupTime(),
>SetWakeupTime() are also
>> supported by other non-IA64 architecutre with UEFI BIOS, e.g. x86.
>>
>> This patch changed RTC_DRV_EFI configuration to depend on EFI but not
>just IA64. It
>> checks efi_enabled flag and efi-rtc driver should enabled.
>
>In theory, certainly - but do we still have machines that explode if
>the
>get_time call is made? We may also want to think about disabling the
>legacy access to the RTC if the EFI calls are present.
--
Sent from my mobile phone. Please excuse brevity and lack of formatting.
^ permalink raw reply [flat|nested] 38+ messages in thread
* Re: [PATCH 1/3] rtc-efi: register rtc-efi device when EFI enabled
@ 2012-12-28 19:07 ` H. Peter Anvin
0 siblings, 0 replies; 38+ messages in thread
From: H. Peter Anvin @ 2012-12-28 19:07 UTC (permalink / raw)
To: Matthew Garrett, Lee, Chun-Yi
Cc: matt.fleming@intel.com, linux-kernel@vger.kernel.org,
linux-efi@vger.kernel.org, Lee, Chun-Yi, Thomas Gleixner,
Ingo Molnar, Jan Beulich
We do have such machines, which is why this change has been reverted twice already. I believe we should stick to the priority scheme I proposed a few weeks ago.
Matthew Garrett <matthew.garrett@nebula.com> wrote:
>On Sat, 2012-12-29 at 00:26 +0800, Lee, Chun-Yi wrote:
>> UEFI time services, GetTime(), SetTime(), GetWakeupTime(),
>SetWakeupTime() are also
>> supported by other non-IA64 architecutre with UEFI BIOS, e.g. x86.
>>
>> This patch changed RTC_DRV_EFI configuration to depend on EFI but not
>just IA64. It
>> checks efi_enabled flag and efi-rtc driver should enabled.
>
>In theory, certainly - but do we still have machines that explode if
>the
>get_time call is made? We may also want to think about disabling the
>legacy access to the RTC if the EFI calls are present.
--
Sent from my mobile phone. Please excuse brevity and lack of formatting.
^ permalink raw reply [flat|nested] 38+ messages in thread
* Re: [PATCH 1/3] rtc-efi: register rtc-efi device when EFI enabled
2012-12-28 19:07 ` H. Peter Anvin
@ 2012-12-28 19:17 ` Matthew Garrett
-1 siblings, 0 replies; 38+ messages in thread
From: Matthew Garrett @ 2012-12-28 19:17 UTC (permalink / raw)
To: H. Peter Anvin
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
On Fri, 2012-12-28 at 11:07 -0800, H. Peter Anvin wrote:
> We do have such machines, which is why this change has been reverted twice already. I believe we should stick to the priority scheme I proposed a few weeks ago.
I seem to have missed that discussion, and couldn't find it after a
brief search. Got a pointer?
^ permalink raw reply [flat|nested] 38+ messages in thread
* Re: [PATCH 1/3] rtc-efi: register rtc-efi device when EFI enabled
@ 2012-12-28 19:17 ` Matthew Garrett
0 siblings, 0 replies; 38+ messages in thread
From: Matthew Garrett @ 2012-12-28 19:17 UTC (permalink / raw)
To: H. Peter Anvin
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
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: text/plain; charset="utf-8", Size: 479 bytes --]
On Fri, 2012-12-28 at 11:07 -0800, H. Peter Anvin wrote:
> We do have such machines, which is why this change has been reverted twice already. I believe we should stick to the priority scheme I proposed a few weeks ago.
I seem to have missed that discussion, and couldn't find it after a
brief search. Got a pointer?
ÿôèº{.nÇ+·®+%Ëÿ±éݶ\x17¥wÿº{.nÇ+·¥{±þG«éÿ{ayº\x1dÊÚë,j\a¢f£¢·hïêÿêçz_è®\x03(éÝ¢j"ú\x1a¶^[m§ÿÿ¾\a«þG«éÿ¢¸?¨èÚ&£ø§~á¶iOæ¬z·vØ^\x14\x04\x1a¶^[m§ÿÿÃ\fÿ¶ìÿ¢¸?I¥
^ permalink raw reply [flat|nested] 38+ messages in thread[parent not found: <E99CBA9F97C3D149AA6B19ED2E277C9B019215FA-kSjp6dTd0Hr1oIOzUjSfqB1/qY2kGW66nBOFsp37pqbUKgpGm//BTAC/G2K4zDHf@public.gmane.org>]
* Re: [PATCH 1/3] rtc-efi: register rtc-efi device when EFI enabled
2012-12-28 19:17 ` Matthew Garrett
@ 2012-12-28 20:40 ` H. Peter Anvin
-1 siblings, 0 replies; 38+ messages in thread
From: H. Peter Anvin @ 2012-12-28 20:40 UTC (permalink / raw)
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
On 12/28/2012 11:17 AM, Matthew Garrett wrote:
> On Fri, 2012-12-28 at 11:07 -0800, H. Peter Anvin wrote:
>> We do have such machines, which is why this change has been reverted twice already. I believe we should stick to the priority scheme I proposed a few weeks ago.
>
> I seem to have missed that discussion, and couldn't find it after a
> brief search. Got a pointer?
>
Looks like it was a non-public distribution ... anyway, what I wrote was:
> 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.
>
> I'm unsure what the ordering of 1 & 2 should be. The ACPI device has
> the advantage that it contains time zone information, which is important
> for Windows interoperability, and at least optionally supports
> millisecond resolution; there is no way to even export "this is where
> you find time zone information" (since we're dealing with an RTC with
> embedded CMOS, there is storage available, it is just a matter of
> telling the OS how to find it) for the PNP0B0x devices.
>
> The TAD is also guaranteed to map 1:1 to the EFI RTC.
>
> -hpa
--
H. Peter Anvin, Intel Open Source Technology Center
I work for Intel. I don't speak on their behalf.
^ permalink raw reply [flat|nested] 38+ messages in thread
* Re: [PATCH 1/3] rtc-efi: register rtc-efi device when EFI enabled
@ 2012-12-28 20:40 ` H. Peter Anvin
0 siblings, 0 replies; 38+ messages in thread
From: H. Peter Anvin @ 2012-12-28 20:40 UTC (permalink / raw)
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
On 12/28/2012 11:17 AM, Matthew Garrett wrote:
> On Fri, 2012-12-28 at 11:07 -0800, H. Peter Anvin wrote:
>> We do have such machines, which is why this change has been reverted twice already. I believe we should stick to the priority scheme I proposed a few weeks ago.
>
> I seem to have missed that discussion, and couldn't find it after a
> brief search. Got a pointer?
>
Looks like it was a non-public distribution ... anyway, what I wrote was:
> 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.
>
> I'm unsure what the ordering of 1 & 2 should be. The ACPI device has
> the advantage that it contains time zone information, which is important
> for Windows interoperability, and at least optionally supports
> millisecond resolution; there is no way to even export "this is where
> you find time zone information" (since we're dealing with an RTC with
> embedded CMOS, there is storage available, it is just a matter of
> telling the OS how to find it) for the PNP0B0x devices.
>
> The TAD is also guaranteed to map 1:1 to the EFI RTC.
>
> -hpa
--
H. Peter Anvin, Intel Open Source Technology Center
I work for Intel. I don't speak on their behalf.
^ permalink raw reply [flat|nested] 38+ messages in thread
[parent not found: <50DE03D8.9030902-YMNOUZJC4hwAvxtiuMwx3w@public.gmane.org>]
* Re: [PATCH 1/3] rtc-efi: register rtc-efi device when EFI enabled
2012-12-28 20:40 ` H. Peter Anvin
@ 2012-12-28 20:49 ` Matthew Garrett
-1 siblings, 0 replies; 38+ messages in thread
From: Matthew Garrett @ 2012-12-28 20:49 UTC (permalink / raw)
To: H. Peter Anvin
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
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.
^ permalink raw reply [flat|nested] 38+ messages in thread
* Re: [PATCH 1/3] rtc-efi: register rtc-efi device when EFI enabled
@ 2012-12-28 20:49 ` Matthew Garrett
0 siblings, 0 replies; 38+ messages in thread
From: Matthew Garrett @ 2012-12-28 20:49 UTC (permalink / raw)
To: H. Peter Anvin
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
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: text/plain; charset="utf-8", Size: 894 bytes --]
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.
ÿôèº{.nÇ+·®+%Ëÿ±éݶ\x17¥wÿº{.nÇ+·¥{±þG«éÿ{ayº\x1dÊÚë,j\a¢f£¢·hïêÿêçz_è®\x03(éÝ¢j"ú\x1a¶^[m§ÿÿ¾\a«þG«éÿ¢¸?¨èÚ&£ø§~á¶iOæ¬z·vØ^\x14\x04\x1a¶^[m§ÿÿÃ\fÿ¶ìÿ¢¸?I¥
^ permalink raw reply [flat|nested] 38+ messages in thread[parent not found: <35da3df5-ecac-4b57-83a2-828326e5bfc3@email.android.com>]
[parent not found: <E99CBA9F97C3D149AA6B19ED2E277C9B01921638-kSjp6dTd0Hr1oIOzUjSfqB1/qY2kGW66nBOFsp37pqbUKgpGm//BTAC/G2K4zDHf@public.gmane.org>]
* Re: [PATCH 1/3] rtc-efi: register rtc-efi device when EFI enabled
2012-12-28 20:49 ` Matthew Garrett
@ 2012-12-28 23:44 ` H. Peter Anvin
-1 siblings, 0 replies; 38+ messages in thread
From: H. Peter Anvin @ 2012-12-28 23:44 UTC (permalink / raw)
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
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
^ permalink raw reply [flat|nested] 38+ messages in thread
* Re: [PATCH 1/3] rtc-efi: register rtc-efi device when EFI enabled
@ 2012-12-28 23:44 ` H. Peter Anvin
0 siblings, 0 replies; 38+ messages in thread
From: H. Peter Anvin @ 2012-12-28 23:44 UTC (permalink / raw)
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
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
^ permalink raw reply [flat|nested] 38+ messages in thread
[parent not found: <50DE2EED.9030608-YMNOUZJC4hwAvxtiuMwx3w@public.gmane.org>]
* Re: [PATCH 1/3] rtc-efi: register rtc-efi device when EFI enabled
2012-12-28 23:44 ` H. Peter Anvin
@ 2013-01-02 2:45 ` joeyli
-1 siblings, 0 replies; 38+ messages in thread
From: joeyli @ 2013-01-02 2:45 UTC (permalink / raw)
To: H. Peter Anvin
Cc: Matthew Garrett,
matt.fleming-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org,
linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
linux-efi-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
Thomas Gleixner, Ingo Molnar, Jan Beulich, Len Brown,
Arjan van de Ven
Hi hpa,
於 五,2012-12-28 於 15:44 -0800,H. Peter Anvin 提到:
> 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).
I didn't find the EFI RTC problem on Asus from google.
Could you please share what's the situation on ASUS hardware?
Thanks a lot!
Joey Lee
>
> 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
>
> --
> To unsubscribe from this list: send the line "unsubscribe linux-efi" in
> the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
> More majordomo info at http://vger.kernel.org/majordomo-info.html
>
^ permalink raw reply [flat|nested] 38+ messages in thread
* Re: [PATCH 1/3] rtc-efi: register rtc-efi device when EFI enabled
@ 2013-01-02 2:45 ` joeyli
0 siblings, 0 replies; 38+ messages in thread
From: joeyli @ 2013-01-02 2:45 UTC (permalink / raw)
To: H. Peter Anvin
Cc: Matthew Garrett, matt.fleming@intel.com,
linux-kernel@vger.kernel.org, linux-efi@vger.kernel.org,
Thomas Gleixner, Ingo Molnar, Jan Beulich, Len Brown,
Arjan van de Ven
Hi hpa,
於 五,2012-12-28 於 15:44 -0800,H. Peter Anvin 提到:
> 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).
I didn't find the EFI RTC problem on Asus from google.
Could you please share what's the situation on ASUS hardware?
Thanks a lot!
Joey Lee
>
> 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
>
> --
> To unsubscribe from this list: send the line "unsubscribe linux-efi" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at http://vger.kernel.org/majordomo-info.html
>
^ permalink raw reply [flat|nested] 38+ messages in thread
[parent not found: <1357094751.6113.253.camel-ONCj+Eqt86TasUa73XJKwA@public.gmane.org>]
* Re: [PATCH 1/3] rtc-efi: register rtc-efi device when EFI enabled
2013-01-02 2:45 ` joeyli
@ 2013-01-02 7:26 ` Matt Fleming
-1 siblings, 0 replies; 38+ messages in thread
From: Matt Fleming @ 2013-01-02 7:26 UTC (permalink / raw)
To: joeyli
Cc: H. Peter Anvin, Matthew Garrett,
linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
linux-efi-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
Thomas Gleixner, Ingo Molnar, Jan Beulich, Len Brown,
Arjan van de Ven
On Wed, 2013-01-02 at 10:45 +0800, joeyli wrote:
> I didn't find the EFI RTC problem on Asus from google.
> Could you please share what's the situation on ASUS hardware?
It's mentioned in the following commit (which has since been reverted in
Linus' tree),
commit 185034e72d591f9465e5e18f937ed642e7ea0070
Author: Matt Fleming <matt.fleming-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org>
Date: Fri Sep 7 18:28:04 2012 +0100
x86, efi: 1:1 pagetable mapping for virtual EFI calls
Some firmware still needs a 1:1 (virt->phys) mapping even after we've
called SetVirtualAddressMap(). So install the mapping alongside our
existing kernel mapping whenever we make EFI calls in virtual mode.
This bug was discovered on ASUS machines where the firmware
implementation of GetTime() accesses the RTC device via physical
addresses, even though that's bogus per the UEFI spec since we've
informed the firmware via SetVirtualAddressMap() that the boottime
memory map is no longer valid.
This bug seems to be present in a lot of consumer devices, so there's
not a lot we can do about this spec violation apart from workaround
it.
The bug was originally mentioned here,
https://lkml.org/lkml/2012/3/12/214
^ permalink raw reply [flat|nested] 38+ messages in thread* Re: [PATCH 1/3] rtc-efi: register rtc-efi device when EFI enabled
@ 2013-01-02 7:26 ` Matt Fleming
0 siblings, 0 replies; 38+ messages in thread
From: Matt Fleming @ 2013-01-02 7:26 UTC (permalink / raw)
To: joeyli
Cc: H. Peter Anvin, Matthew Garrett, linux-kernel@vger.kernel.org,
linux-efi@vger.kernel.org, Thomas Gleixner, Ingo Molnar,
Jan Beulich, Len Brown, Arjan van de Ven
On Wed, 2013-01-02 at 10:45 +0800, joeyli wrote:
> I didn't find the EFI RTC problem on Asus from google.
> Could you please share what's the situation on ASUS hardware?
It's mentioned in the following commit (which has since been reverted in
Linus' tree),
commit 185034e72d591f9465e5e18f937ed642e7ea0070
Author: Matt Fleming <matt.fleming@intel.com>
Date: Fri Sep 7 18:28:04 2012 +0100
x86, efi: 1:1 pagetable mapping for virtual EFI calls
Some firmware still needs a 1:1 (virt->phys) mapping even after we've
called SetVirtualAddressMap(). So install the mapping alongside our
existing kernel mapping whenever we make EFI calls in virtual mode.
This bug was discovered on ASUS machines where the firmware
implementation of GetTime() accesses the RTC device via physical
addresses, even though that's bogus per the UEFI spec since we've
informed the firmware via SetVirtualAddressMap() that the boottime
memory map is no longer valid.
This bug seems to be present in a lot of consumer devices, so there's
not a lot we can do about this spec violation apart from workaround
it.
The bug was originally mentioned here,
https://lkml.org/lkml/2012/3/12/214
^ permalink raw reply [flat|nested] 38+ messages in thread
* Re: [PATCH 1/3] rtc-efi: register rtc-efi device when EFI enabled
2012-12-28 17:43 ` Matthew Garrett
(?)
(?)
@ 2012-12-29 1:00 ` joeyli
[not found] ` <1356742803.6113.245.camel-ONCj+Eqt86TasUa73XJKwA@public.gmane.org>
-1 siblings, 1 reply; 38+ messages in thread
From: joeyli @ 2012-12-29 1:00 UTC (permalink / raw)
To: Matthew Garrett
Cc: matt.fleming@intel.com, linux-kernel@vger.kernel.org,
linux-efi@vger.kernel.org, H. Peter Anvin, Thomas Gleixner,
Ingo Molnar, Jan Beulich
於 五,2012-12-28 於 17:43 +0000,Matthew Garrett 提到:
> On Sat, 2012-12-29 at 00:26 +0800, Lee, Chun-Yi wrote:
> > UEFI time services, GetTime(), SetTime(), GetWakeupTime(), SetWakeupTime() are also
> > supported by other non-IA64 architecutre with UEFI BIOS, e.g. x86.
> >
> > This patch changed RTC_DRV_EFI configuration to depend on EFI but not just IA64. It
> > checks efi_enabled flag and efi-rtc driver should enabled.
>
> In theory, certainly - but do we still have machines that explode if the
> get_time call is made? We may also want to think about disabling the
> legacy access to the RTC if the EFI calls are present.
The legacy get_time access on my test machine is work fine, not thing
explode. :-)
Just we have a function want to expose the timezone information to
userspace and also store it.
Thanks a lot!
Joey Lee
^ permalink raw reply [flat|nested] 38+ messages in thread
end of thread, other threads:[~2013-01-09 6:28 UTC | newest]
Thread overview: 38+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-12-28 16:26 [PATCH 1/3] rtc-efi: register rtc-efi device when EFI enabled Lee, Chun-Yi
2012-12-28 16:26 ` Lee, Chun-Yi
[not found] ` <1356712001-12198-1-git-send-email-jlee-IBi9RG/b67k@public.gmane.org>
2012-12-28 16:26 ` [PATCH 2/3] rtc-efi: add timezone to rtc_time that will used by rtc-efi Lee, Chun-Yi
2012-12-28 16:26 ` Lee, Chun-Yi
2012-12-28 16:26 ` [PATCH 3/3] rtc-efi: set uie_unsupported for indicate rtc-efi doesn't support UIE mode Lee, Chun-Yi
2012-12-28 16:26 ` Lee, Chun-Yi
2012-12-28 17:43 ` [PATCH 1/3] rtc-efi: register rtc-efi device when EFI enabled Matthew Garrett
2012-12-28 17:43 ` Matthew Garrett
[not found] ` <E99CBA9F97C3D149AA6B19ED2E277C9B019215CC-kSjp6dTd0Hr1oIOzUjSfqB1/qY2kGW66nBOFsp37pqbUKgpGm//BTAC/G2K4zDHf@public.gmane.org>
2012-12-28 19:07 ` H. Peter Anvin
2012-12-28 19:07 ` H. Peter Anvin
2012-12-28 19:17 ` Matthew Garrett
2012-12-28 19:17 ` Matthew Garrett
[not found] ` <E99CBA9F97C3D149AA6B19ED2E277C9B019215FA-kSjp6dTd0Hr1oIOzUjSfqB1/qY2kGW66nBOFsp37pqbUKgpGm//BTAC/G2K4zDHf@public.gmane.org>
2012-12-28 20:40 ` H. Peter Anvin
2012-12-28 20:40 ` H. Peter Anvin
[not found] ` <50DE03D8.9030902-YMNOUZJC4hwAvxtiuMwx3w@public.gmane.org>
2012-12-28 20:49 ` Matthew Garrett
2012-12-28 20:49 ` Matthew Garrett
[not found] ` <35da3df5-ecac-4b57-83a2-828326e5bfc3@email.android.com>
[not found] ` <35da3df5-ecac-4b57-83a2-828326e5bfc3-2ueSQiBKiTY7tOexoI0I+QC/G2K4zDHf@public.gmane.org>
2012-12-28 23:39 ` Matthew Garrett
2012-12-28 23:39 ` Matthew Garrett
2012-12-29 0:42 ` H. Peter Anvin
[not found] ` <50DE3C8F.4000405-YMNOUZJC4hwAvxtiuMwx3w@public.gmane.org>
2012-12-29 4:37 ` Matthew Garrett
2012-12-29 4:37 ` Matthew Garrett
[not found] ` <E99CBA9F97C3D149AA6B19ED2E277C9B01921744-kSjp6dTd0Hr1oIOzUjSfqB1/qY2kGW66nBOFsp37pqbUKgpGm//BTAC/G2K4zDHf@public.gmane.org>
2012-12-29 5:19 ` H. Peter Anvin
2012-12-29 5:19 ` H. Peter Anvin
[not found] ` <ed3971f1-8464-4406-bae2-eff914c9c2fc-2ueSQiBKiTY7tOexoI0I+QC/G2K4zDHf@public.gmane.org>
2012-12-29 6:17 ` Matthew Garrett
2012-12-29 6:17 ` Matthew Garrett
[not found] ` <E99CBA9F97C3D149AA6B19ED2E277C9B01921638-kSjp6dTd0Hr1oIOzUjSfqB1/qY2kGW66nBOFsp37pqbUKgpGm//BTAC/G2K4zDHf@public.gmane.org>
2012-12-28 23:44 ` H. Peter Anvin
2012-12-28 23:44 ` H. Peter Anvin
[not found] ` <50DE2EED.9030608-YMNOUZJC4hwAvxtiuMwx3w@public.gmane.org>
2013-01-02 2:45 ` joeyli
2013-01-02 2:45 ` joeyli
[not found] ` <1357094751.6113.253.camel-ONCj+Eqt86TasUa73XJKwA@public.gmane.org>
2013-01-02 7:26 ` Matt Fleming
2013-01-02 7:26 ` Matt Fleming
2012-12-29 1:00 ` joeyli
[not found] ` <1356742803.6113.245.camel-ONCj+Eqt86TasUa73XJKwA@public.gmane.org>
2012-12-29 1:07 ` H. Peter Anvin
2012-12-29 1:07 ` H. Peter Anvin
[not found] ` <50DE4259.7090409-YMNOUZJC4hwAvxtiuMwx3w@public.gmane.org>
2013-01-09 6:23 ` joeyli
2013-01-09 6:23 ` joeyli
[not found] ` <1357712591.6113.389.camel-ONCj+Eqt86TasUa73XJKwA@public.gmane.org>
2013-01-09 6:27 ` H. Peter Anvin
2013-01-09 6:27 ` H. Peter Anvin
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.