[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <1318330333-4617-1-git-send-email-matt@console-pimps.org>
Date: Tue, 11 Oct 2011 11:52:13 +0100
From: Matt Fleming <matt@...sole-pimps.org>
To: linux-kernel@...r.kernel.org
Cc: Matthew Garrett <mjg@...hat.com>,
Thomas Gleixner <tglx@...utronix.de>,
Ingo Molnar <mingo@...e.hu>, "H. Peter Anvin" <hpa@...or.com>,
x86@...nel.org, Zhang Rui <rui.zhang@...el.com>
Subject: [PATCH] x86, efi: Convert efi_phys_get_time() args to physical addresses
From: Maurice Ma <maurice.ma@...el.com>
Because callers of efi_phys_get_time() pass virtual stack addresses as
arguments, we need to find their corresponding physical addresses and
when calling GetTime() in physical mode.
Without this patch the following line is printed on boot,
"Oops: efitime: can't read time!"
Cc: Matthew Garrett <mjg@...hat.com>
Cc: Thomas Gleixner <tglx@...utronix.de>
Cc: Ingo Molnar <mingo@...e.hu>
Cc: "H. Peter Anvin" <hpa@...or.com>
Cc: x86@...nel.org
Cc: Zhang Rui <rui.zhang@...el.com>
Signed-off-by: Maurice Ma <maurice.ma@...el.com>
Signed-off-by: Matt Fleming <matt.fleming@...el.com>
---
arch/x86/platform/efi/efi.c | 3 ++-
1 files changed, 2 insertions(+), 1 deletions(-)
diff --git a/arch/x86/platform/efi/efi.c b/arch/x86/platform/efi/efi.c
index 3ae4128..d182bba 100644
--- a/arch/x86/platform/efi/efi.c
+++ b/arch/x86/platform/efi/efi.c
@@ -237,7 +237,8 @@ static efi_status_t __init phys_efi_get_time(efi_time_t *tm,
spin_lock_irqsave(&rtc_lock, flags);
efi_call_phys_prelog();
- status = efi_call_phys2(efi_phys.get_time, tm, tc);
+ status = efi_call_phys2(efi_phys.get_time, virt_to_phys(tm),
+ virt_to_phys(tc));
efi_call_phys_epilog();
spin_unlock_irqrestore(&rtc_lock, flags);
return status;
--
1.7.4.4
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists