diff options
author | Jan Beulich <jbeulich@novell.com> | 2011-06-28 09:20:49 +0100 |
---|---|---|
committer | Jan Beulich <jbeulich@novell.com> | 2011-06-28 09:20:49 +0100 |
commit | facac0af87ef3e533d3690d76acaeaaa41e1631c (patch) | |
tree | 5239fbcadbd5b1a1c695869b10707deb15770777 /xen/arch/x86/time.c | |
parent | bf6501a62e80ec1cf756290d4c3ec4991455f64e (diff) | |
download | xen-facac0af87ef3e533d3690d76acaeaaa41e1631c.tar.gz xen-facac0af87ef3e533d3690d76acaeaaa41e1631c.tar.bz2 xen-facac0af87ef3e533d3690d76acaeaaa41e1631c.zip |
x86-64: EFI runtime code
This allows Dom0 access to all suitable EFI runtime services. The
actual calls into EFI are done in "physical" mode, as entering virtual
mode has been determined to be incompatible with kexec (EFI's
SetVirtualAddressMap() can be called only once, and hence the
secondary kernel can't establish its mappings). ("Physical" mode here
being quoted because this is a mode with paging enabled [otherwise
64-bit mode wouldn't work] but all mappings being 1:1.)
Open issue (not preventing this from being committed imo):
Page (and perhaps other) faults occuring while calling runtime
functions in the context of a hypercall don't get handled correctly
(they don't even seem to reach do_page_fault()). I'm intending to
investigate this further.
Signed-off-by: Jan Beulich <jbeulich@novell.com>
Diffstat (limited to 'xen/arch/x86/time.c')
-rw-r--r-- | xen/arch/x86/time.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/xen/arch/x86/time.c b/xen/arch/x86/time.c index 282d3b7b59..26388205d4 100644 --- a/xen/arch/x86/time.c +++ b/xen/arch/x86/time.c @@ -21,6 +21,7 @@ #include <xen/smp.h> #include <xen/irq.h> #include <xen/softirq.h> +#include <xen/efi.h> #include <xen/cpuidle.h> #include <xen/symbols.h> #include <xen/keyhandler.h> @@ -759,6 +760,13 @@ static unsigned long get_cmos_time(void) unsigned long res, flags; int i; + if ( efi_enabled ) + { + res = efi_get_time(); + if ( res ) + return res; + } + spin_lock_irqsave(&rtc_lock, flags); /* read RTC exactly on falling edge of update flag */ |