lkml.org 
[lkml]   [2008]   [Jun]   [16]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
From
Date
Subject[PATCH 6/8] x86 boot: virtualize the efi runtime function callback addresses
From: Paul Jackson <pj@sgi.com>

EFI runtime service calls are provided by the EFI firmware
during boot to the kernel as physical addresses. They must
be mapped to virtual addresses when the running kernel
calls back down to these EFI service routines.

Signed-off-by: Paul Jackson <pj@sgi.com>

---
include/asm-x86/efi.h | 14 +++++++-------
1 file changed, 7 insertions(+), 7 deletions(-)

--- linux.orig/include/asm-x86/efi.h 2008-06-10 21:31:24.000000000 -0700
+++ linux/include/asm-x86/efi.h 2008-06-13 03:48:21.086399220 -0700
@@ -68,22 +68,22 @@ extern u64 efi_call6(void *fp, u64 arg1,
(u64)(a4), (u64)(a5), (u64)(a6))

#define efi_call_virt0(f) \
- efi_call0((void *)(efi.systab->runtime->f))
+ efi_call0((void *)__va(efi.systab->runtime->f))
#define efi_call_virt1(f, a1) \
- efi_call1((void *)(efi.systab->runtime->f), (u64)(a1))
+ efi_call1((void *)__va(efi.systab->runtime->f), (u64)(a1))
#define efi_call_virt2(f, a1, a2) \
- efi_call2((void *)(efi.systab->runtime->f), (u64)(a1), (u64)(a2))
+ efi_call2((void *)__va(efi.systab->runtime->f), (u64)(a1), (u64)(a2))
#define efi_call_virt3(f, a1, a2, a3) \
- efi_call3((void *)(efi.systab->runtime->f), (u64)(a1), (u64)(a2), \
+ efi_call3((void *)__va(efi.systab->runtime->f), (u64)(a1), (u64)(a2), \
(u64)(a3))
#define efi_call_virt4(f, a1, a2, a3, a4) \
- efi_call4((void *)(efi.systab->runtime->f), (u64)(a1), (u64)(a2), \
+ efi_call4((void *)__va(efi.systab->runtime->f), (u64)(a1), (u64)(a2), \
(u64)(a3), (u64)(a4))
#define efi_call_virt5(f, a1, a2, a3, a4, a5) \
- efi_call5((void *)(efi.systab->runtime->f), (u64)(a1), (u64)(a2), \
+ efi_call5((void *)__va(efi.systab->runtime->f), (u64)(a1), (u64)(a2), \
(u64)(a3), (u64)(a4), (u64)(a5))
#define efi_call_virt6(f, a1, a2, a3, a4, a5, a6) \
- efi_call6((void *)(efi.systab->runtime->f), (u64)(a1), (u64)(a2), \
+ efi_call6((void *)__va(efi.systab->runtime->f), (u64)(a1), (u64)(a2), \
(u64)(a3), (u64)(a4), (u64)(a5), (u64)(a6))

extern void *efi_ioremap(unsigned long addr, unsigned long size);
--
I won't rest till it's the best ...
Programmer, Linux Scalability
Paul Jackson <pj@sgi.com> 1.650.933.1373


\
 
 \ /
  Last update: 2008-06-16 08:35    [W:0.127 / U:0.416 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site