|
@@ -466,22 +466,17 @@ extern efi_status_t efi64_thunk(u32, ...);
|
|
#define efi_thunk(f, ...) \
|
|
#define efi_thunk(f, ...) \
|
|
({ \
|
|
({ \
|
|
efi_status_t __s; \
|
|
efi_status_t __s; \
|
|
- unsigned long flags; \
|
|
|
|
- u32 func; \
|
|
|
|
|
|
+ unsigned long __flags; \
|
|
|
|
+ u32 __func; \
|
|
\
|
|
\
|
|
- efi_sync_low_kernel_mappings(); \
|
|
|
|
- local_irq_save(flags); \
|
|
|
|
|
|
+ local_irq_save(__flags); \
|
|
|
|
+ arch_efi_call_virt_setup(); \
|
|
\
|
|
\
|
|
- efi_scratch.prev_cr3 = read_cr3(); \
|
|
|
|
- write_cr3((unsigned long)efi_scratch.efi_pgt); \
|
|
|
|
- __flush_tlb_all(); \
|
|
|
|
|
|
+ __func = runtime_service32(f); \
|
|
|
|
+ __s = efi64_thunk(__func, __VA_ARGS__); \
|
|
\
|
|
\
|
|
- func = runtime_service32(f); \
|
|
|
|
- __s = efi64_thunk(func, __VA_ARGS__); \
|
|
|
|
- \
|
|
|
|
- write_cr3(efi_scratch.prev_cr3); \
|
|
|
|
- __flush_tlb_all(); \
|
|
|
|
- local_irq_restore(flags); \
|
|
|
|
|
|
+ arch_efi_call_virt_teardown(); \
|
|
|
|
+ local_irq_restore(__flags); \
|
|
\
|
|
\
|
|
__s; \
|
|
__s; \
|
|
})
|
|
})
|