Commit | Line | Data |
---|---|---|
f84d0275 MS |
1 | /* |
2 | * Extensible Firmware Interface | |
3 | * | |
4 | * Based on Extensible Firmware Interface Specification version 2.4 | |
5 | * | |
6 | * Copyright (C) 2013, 2014 Linaro Ltd. | |
7 | * | |
8 | * This program is free software; you can redistribute it and/or modify | |
9 | * it under the terms of the GNU General Public License version 2 as | |
10 | * published by the Free Software Foundation. | |
11 | * | |
12 | */ | |
13 | ||
d1ae8c00 | 14 | #include <linux/dmi.h> |
f84d0275 | 15 | #include <linux/efi.h> |
e5bc22a4 | 16 | #include <linux/init.h> |
f84d0275 | 17 | |
f84d0275 | 18 | #include <asm/efi.h> |
d1ae8c00 YL |
19 | |
20 | static int __init arm64_dmi_init(void) | |
21 | { | |
22 | /* | |
23 | * On arm64, DMI depends on UEFI, and dmi_scan_machine() needs to | |
24 | * be called early because dmi_id_init(), which is an arch_initcall | |
25 | * itself, depends on dmi_scan_machine() having been called already. | |
26 | */ | |
27 | dmi_scan_machine(); | |
b07bfaa3 AB |
28 | if (dmi_available) |
29 | dmi_set_dump_stack_arch_desc(); | |
d1ae8c00 YL |
30 | return 0; |
31 | } | |
32 | core_initcall(arm64_dmi_init); | |
f3cdfd23 | 33 | |
60c0d45a AB |
34 | /* |
35 | * UpdateCapsule() depends on the system being shutdown via | |
36 | * ResetSystem(). | |
37 | */ | |
38 | bool efi_poweroff_required(void) | |
39 | { | |
40 | return efi_enabled(EFI_RUNTIME_SERVICES); | |
41 | } |