aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--arch/arm64/Kconfig1
-rw-r--r--arch/arm64/include/asm/efi.h21
-rw-r--r--arch/arm64/kernel/efi.c14
3 files changed, 23 insertions, 13 deletions
diff --git a/arch/arm64/Kconfig b/arch/arm64/Kconfig
index 7295419165e1..2cc14cef01bd 100644
--- a/arch/arm64/Kconfig
+++ b/arch/arm64/Kconfig
@@ -298,6 +298,7 @@ config EFI
298 select LIBFDT 298 select LIBFDT
299 select UCS2_STRING 299 select UCS2_STRING
300 select EFI_PARAMS_FROM_FDT 300 select EFI_PARAMS_FROM_FDT
301 select EFI_RUNTIME_WRAPPERS
301 default y 302 default y
302 help 303 help
303 This option provides support for runtime services provided 304 This option provides support for runtime services provided
diff --git a/arch/arm64/include/asm/efi.h b/arch/arm64/include/asm/efi.h
index 5a46c4e7f539..375ba342dca6 100644
--- a/arch/arm64/include/asm/efi.h
+++ b/arch/arm64/include/asm/efi.h
@@ -2,6 +2,7 @@
2#define _ASM_EFI_H 2#define _ASM_EFI_H
3 3
4#include <asm/io.h> 4#include <asm/io.h>
5#include <asm/neon.h>
5 6
6#ifdef CONFIG_EFI 7#ifdef CONFIG_EFI
7extern void efi_init(void); 8extern void efi_init(void);
@@ -11,4 +12,24 @@ extern void efi_idmap_init(void);
11#define efi_idmap_init() 12#define efi_idmap_init()
12#endif 13#endif
13 14
15#define efi_call_virt(f, ...) \
16({ \
17 efi_##f##_t *__f = efi.systab->runtime->f; \
18 efi_status_t __s; \
19 \
20 kernel_neon_begin(); \
21 __s = __f(__VA_ARGS__); \
22 kernel_neon_end(); \
23 __s; \
24})
25
26#define __efi_call_virt(f, ...) \
27({ \
28 efi_##f##_t *__f = efi.systab->runtime->f; \
29 \
30 kernel_neon_begin(); \
31 __f(__VA_ARGS__); \
32 kernel_neon_end(); \
33})
34
14#endif /* _ASM_EFI_H */ 35#endif /* _ASM_EFI_H */
diff --git a/arch/arm64/kernel/efi.c b/arch/arm64/kernel/efi.c
index 14db1f6e8d7f..56c3327bbf79 100644
--- a/arch/arm64/kernel/efi.c
+++ b/arch/arm64/kernel/efi.c
@@ -449,19 +449,7 @@ static int __init arm64_enter_virtual_mode(void)
449 449
450 /* Set up runtime services function pointers */ 450 /* Set up runtime services function pointers */
451 runtime = efi.systab->runtime; 451 runtime = efi.systab->runtime;
452 efi.get_time = runtime->get_time; 452 efi_native_runtime_setup();
453 efi.set_time = runtime->set_time;
454 efi.get_wakeup_time = runtime->get_wakeup_time;
455 efi.set_wakeup_time = runtime->set_wakeup_time;
456 efi.get_variable = runtime->get_variable;
457 efi.get_next_variable = runtime->get_next_variable;
458 efi.set_variable = runtime->set_variable;
459 efi.query_variable_info = runtime->query_variable_info;
460 efi.update_capsule = runtime->update_capsule;
461 efi.query_capsule_caps = runtime->query_capsule_caps;
462 efi.get_next_high_mono_count = runtime->get_next_high_mono_count;
463 efi.reset_system = runtime->reset_system;
464
465 set_bit(EFI_RUNTIME_SERVICES, &efi.flags); 453 set_bit(EFI_RUNTIME_SERVICES, &efi.flags);
466 454
467 return 0; 455 return 0;