diff options
Diffstat (limited to 'arch/x86/platform/efi/efi_64.c')
-rw-r--r-- | arch/x86/platform/efi/efi_64.c | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/arch/x86/platform/efi/efi_64.c b/arch/x86/platform/efi/efi_64.c index ac3aa54e2654..ddb0174cf093 100644 --- a/arch/x86/platform/efi/efi_64.c +++ b/arch/x86/platform/efi/efi_64.c | |||
@@ -58,6 +58,21 @@ static void __init early_code_mapping_set_exec(int executable) | |||
58 | } | 58 | } |
59 | } | 59 | } |
60 | 60 | ||
61 | unsigned long efi_call_virt_prelog(void) | ||
62 | { | ||
63 | unsigned long saved; | ||
64 | |||
65 | saved = read_cr3(); | ||
66 | write_cr3(real_mode_header->trampoline_pgd); | ||
67 | |||
68 | return saved; | ||
69 | } | ||
70 | |||
71 | void efi_call_virt_epilog(unsigned long saved) | ||
72 | { | ||
73 | write_cr3(saved); | ||
74 | } | ||
75 | |||
61 | void __init efi_call_phys_prelog(void) | 76 | void __init efi_call_phys_prelog(void) |
62 | { | 77 | { |
63 | unsigned long vaddress; | 78 | unsigned long vaddress; |