* EFI runtime-services on x86_64
@ 2010-07-30 20:58 Bjorn Helgaas
2010-08-02 2:35 ` Feng Tang
0 siblings, 1 reply; 7+ messages in thread
From: Bjorn Helgaas @ 2010-07-30 20:58 UTC (permalink / raw)
To: Feng Tang; +Cc: Matthew Garrett, linux-kernel
Hello Feng,
Can you educate me about your commit 772be899bc, "86: Make EFI RTC
function depend on 32bit again"?
It adds "#ifdef CONFIG_X86_32" to avoid using efi_get_time() and
efi_set_rtc_mmss(), but there's no explanation of *why* those services
only work on 32-bit.
Is this an EFI spec limitation? Do the other EFI runtime services
work on 64-bit, since you didn't touch them? Or do we just not use
any of the others?
Is this something that can be fixed, so we *could* use efi_get_time()
on 64-bit if we did some work? What would need to be done?
Bjorn
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: EFI runtime-services on x86_64
2010-07-30 20:58 EFI runtime-services on x86_64 Bjorn Helgaas
@ 2010-08-02 2:35 ` Feng Tang
2010-08-02 2:42 ` Huang Ying
0 siblings, 1 reply; 7+ messages in thread
From: Feng Tang @ 2010-08-02 2:35 UTC (permalink / raw)
To: Bjorn Helgaas; +Cc: Matthew Garrett, linux-kernel@vger.kernel.org, ying.huang
Hi Bjorn,
On Sat, 31 Jul 2010 04:58:48 +0800
Bjorn Helgaas <bjorn.helgaas@hp.com> wrote:
> Hello Feng,
>
> Can you educate me about your commit 772be899bc, "86: Make EFI RTC
> function depend on 32bit again"?
>
> It adds "#ifdef CONFIG_X86_32" to avoid using efi_get_time() and
> efi_set_rtc_mmss(), but there's no explanation of *why* those services
> only work on 32-bit.
>
> Is this an EFI spec limitation? Do the other EFI runtime services
> work on 64-bit, since you didn't touch them? Or do we just not use
> any of the others?
>
Commit 772be899bc, "86: Make EFI RTC function depend on 32bit again" is
a regression fix for 7bd867d "x86: Move get/set_wallclock to x86_platform_ops".
These 2 commits just abstract the rtc service for legacy x86 PC/EFI/Virtualiation
kernel, and has no functional change to existing code.
I'm not familiar with EFI, but my understanding is current EFI code in
kernel only provides the get/set_time service for x86_32 platform.
Cc Ying who is more familiar with EFI than me.
Thanks,
Feng
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: EFI runtime-services on x86_64
2010-08-02 2:35 ` Feng Tang
@ 2010-08-02 2:42 ` Huang Ying
2010-08-03 21:45 ` Eric W. Biederman
0 siblings, 1 reply; 7+ messages in thread
From: Huang Ying @ 2010-08-02 2:42 UTC (permalink / raw)
To: Tang, Feng; +Cc: Bjorn Helgaas, Matthew Garrett, linux-kernel@vger.kernel.org
Hi, Bjorn,
On Mon, 2010-08-02 at 10:35 +0800, Tang, Feng wrote:
> Hi Bjorn,
>
> On Sat, 31 Jul 2010 04:58:48 +0800
> Bjorn Helgaas <bjorn.helgaas@hp.com> wrote:
>
> > Hello Feng,
> >
> > Can you educate me about your commit 772be899bc, "86: Make EFI RTC
> > function depend on 32bit again"?
> >
> > It adds "#ifdef CONFIG_X86_32" to avoid using efi_get_time() and
> > efi_set_rtc_mmss(), but there's no explanation of *why* those services
> > only work on 32-bit.
> >
> > Is this an EFI spec limitation? Do the other EFI runtime services
> > work on 64-bit, since you didn't touch them? Or do we just not use
> > any of the others?
> >
>
> Commit 772be899bc, "86: Make EFI RTC function depend on 32bit again" is
> a regression fix for 7bd867d "x86: Move get/set_wallclock to x86_platform_ops".
> These 2 commits just abstract the rtc service for legacy x86 PC/EFI/Virtualiation
> kernel, and has no functional change to existing code.
>
> I'm not familiar with EFI, but my understanding is current EFI code in
> kernel only provides the get/set_time service for x86_32 platform.
I think get/set_time service should have worked on x86_64 too. Just
lacks proper debugging/testing for recent kernels.
Best Regards,
Huang Ying
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: EFI runtime-services on x86_64
2010-08-02 2:42 ` Huang Ying
@ 2010-08-03 21:45 ` Eric W. Biederman
2010-08-03 21:53 ` Matthew Garrett
0 siblings, 1 reply; 7+ messages in thread
From: Eric W. Biederman @ 2010-08-03 21:45 UTC (permalink / raw)
To: Huang Ying
Cc: Tang, Feng, Bjorn Helgaas, Matthew Garrett,
linux-kernel@vger.kernel.org
Huang Ying <ying.huang@intel.com> writes:
> Hi, Bjorn,
>
> On Mon, 2010-08-02 at 10:35 +0800, Tang, Feng wrote:
>> Hi Bjorn,
>>
>> On Sat, 31 Jul 2010 04:58:48 +0800
>> Bjorn Helgaas <bjorn.helgaas@hp.com> wrote:
>>
>> > Hello Feng,
>> >
>> > Can you educate me about your commit 772be899bc, "86: Make EFI RTC
>> > function depend on 32bit again"?
>> >
>> > It adds "#ifdef CONFIG_X86_32" to avoid using efi_get_time() and
>> > efi_set_rtc_mmss(), but there's no explanation of *why* those services
>> > only work on 32-bit.
>> >
>> > Is this an EFI spec limitation? Do the other EFI runtime services
>> > work on 64-bit, since you didn't touch them? Or do we just not use
>> > any of the others?
>> >
>>
>> Commit 772be899bc, "86: Make EFI RTC function depend on 32bit again" is
>> a regression fix for 7bd867d "x86: Move get/set_wallclock to x86_platform_ops".
>> These 2 commits just abstract the rtc service for legacy x86 PC/EFI/Virtualiation
>> kernel, and has no functional change to existing code.
>>
>> I'm not familiar with EFI, but my understanding is current EFI code in
>> kernel only provides the get/set_time service for x86_32 platform.
>
> I think get/set_time service should have worked on x86_64 too. Just
> lacks proper debugging/testing for recent kernels.
Is there any reason we just don't rip those calls out?
If we don't need them and we lack proper debug/testing I don't see the point
of using the EFI calls and exposing ourselves to more potential BIOS breakage.
EFI runtime calls have the nasty fact that they don't work in general even
if EFI is present because you may have the wrong word size EFI running on
your machine. A 32bit EFI and a 64bit kernel or a 64bit EFI and a 32bit kernel.
Eric
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: EFI runtime-services on x86_64
2010-08-03 21:45 ` Eric W. Biederman
@ 2010-08-03 21:53 ` Matthew Garrett
2010-08-03 21:58 ` Eric W. Biederman
0 siblings, 1 reply; 7+ messages in thread
From: Matthew Garrett @ 2010-08-03 21:53 UTC (permalink / raw)
To: Eric W. Biederman
Cc: Huang Ying, Tang, Feng, Bjorn Helgaas,
linux-kernel@vger.kernel.org
On Tue, Aug 03, 2010 at 02:45:33PM -0700, Eric W. Biederman wrote:
> EFI runtime calls have the nasty fact that they don't work in general even
> if EFI is present because you may have the wrong word size EFI running on
> your machine. A 32bit EFI and a 64bit kernel or a 64bit EFI and a 32bit kernel.
You've already failed to boot in that case.
--
Matthew Garrett | mjg59@srcf.ucam.org
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: EFI runtime-services on x86_64
2010-08-03 21:53 ` Matthew Garrett
@ 2010-08-03 21:58 ` Eric W. Biederman
2010-08-03 22:15 ` Matthew Garrett
0 siblings, 1 reply; 7+ messages in thread
From: Eric W. Biederman @ 2010-08-03 21:58 UTC (permalink / raw)
To: Matthew Garrett
Cc: Huang Ying, Tang, Feng, Bjorn Helgaas,
linux-kernel@vger.kernel.org
Matthew Garrett <mjg59@srcf.ucam.org> writes:
> On Tue, Aug 03, 2010 at 02:45:33PM -0700, Eric W. Biederman wrote:
>
>> EFI runtime calls have the nasty fact that they don't work in general even
>> if EFI is present because you may have the wrong word size EFI running on
>> your machine. A 32bit EFI and a 64bit kernel or a 64bit EFI and a 32bit kernel.
>
> You've already failed to boot in that case.
Only if you have EFI runtime services enabled in your kernel. You can
skip the efi junk and the kernel runs just fine. Doing what we do on
every other platform which appears to be a combination of ACPI and
direct hardware access appears to be good enough, and that is a path
that actually gets tested regularly.
Eric
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: EFI runtime-services on x86_64
2010-08-03 21:58 ` Eric W. Biederman
@ 2010-08-03 22:15 ` Matthew Garrett
0 siblings, 0 replies; 7+ messages in thread
From: Matthew Garrett @ 2010-08-03 22:15 UTC (permalink / raw)
To: Eric W. Biederman
Cc: Huang Ying, Tang, Feng, Bjorn Helgaas,
linux-kernel@vger.kernel.org
On Tue, Aug 03, 2010 at 02:58:10PM -0700, Eric W. Biederman wrote:
> Only if you have EFI runtime services enabled in your kernel. You can
> skip the efi junk and the kernel runs just fine. Doing what we do on
> every other platform which appears to be a combination of ACPI and
> direct hardware access appears to be good enough, and that is a path
> that actually gets tested regularly.
I think wanting to set the nvram variables so that your bootloader works
is a pretty typical usecase...
--
Matthew Garrett | mjg59@srcf.ucam.org
^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2010-08-03 22:16 UTC | newest]
Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-07-30 20:58 EFI runtime-services on x86_64 Bjorn Helgaas
2010-08-02 2:35 ` Feng Tang
2010-08-02 2:42 ` Huang Ying
2010-08-03 21:45 ` Eric W. Biederman
2010-08-03 21:53 ` Matthew Garrett
2010-08-03 21:58 ` Eric W. Biederman
2010-08-03 22:15 ` Matthew Garrett
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox