diff options
Diffstat (limited to 'arch/x86/kernel/setup.c')
| -rw-r--r-- | arch/x86/kernel/setup.c | 28 |
1 files changed, 14 insertions, 14 deletions
diff --git a/arch/x86/kernel/setup.c b/arch/x86/kernel/setup.c index 00f6c1472b85..8b24289cc10c 100644 --- a/arch/x86/kernel/setup.c +++ b/arch/x86/kernel/setup.c | |||
| @@ -807,15 +807,15 @@ void __init setup_arch(char **cmdline_p) | |||
| 807 | #ifdef CONFIG_EFI | 807 | #ifdef CONFIG_EFI |
| 808 | if (!strncmp((char *)&boot_params.efi_info.efi_loader_signature, | 808 | if (!strncmp((char *)&boot_params.efi_info.efi_loader_signature, |
| 809 | "EL32", 4)) { | 809 | "EL32", 4)) { |
| 810 | efi_enabled = 1; | 810 | set_bit(EFI_BOOT, &x86_efi_facility); |
| 811 | efi_64bit = false; | ||
| 812 | } else if (!strncmp((char *)&boot_params.efi_info.efi_loader_signature, | 811 | } else if (!strncmp((char *)&boot_params.efi_info.efi_loader_signature, |
| 813 | "EL64", 4)) { | 812 | "EL64", 4)) { |
| 814 | efi_enabled = 1; | 813 | set_bit(EFI_BOOT, &x86_efi_facility); |
| 815 | efi_64bit = true; | 814 | set_bit(EFI_64BIT, &x86_efi_facility); |
| 816 | } | 815 | } |
| 817 | if (efi_enabled && efi_memblock_x86_reserve_range()) | 816 | |
| 818 | efi_enabled = 0; | 817 | if (efi_enabled(EFI_BOOT)) |
| 818 | efi_memblock_x86_reserve_range(); | ||
| 819 | #endif | 819 | #endif |
| 820 | 820 | ||
| 821 | x86_init.oem.arch_setup(); | 821 | x86_init.oem.arch_setup(); |
| @@ -888,7 +888,7 @@ void __init setup_arch(char **cmdline_p) | |||
| 888 | 888 | ||
| 889 | finish_e820_parsing(); | 889 | finish_e820_parsing(); |
| 890 | 890 | ||
| 891 | if (efi_enabled) | 891 | if (efi_enabled(EFI_BOOT)) |
| 892 | efi_init(); | 892 | efi_init(); |
| 893 | 893 | ||
| 894 | dmi_scan_machine(); | 894 | dmi_scan_machine(); |
| @@ -971,7 +971,7 @@ void __init setup_arch(char **cmdline_p) | |||
| 971 | * The EFI specification says that boot service code won't be called | 971 | * The EFI specification says that boot service code won't be called |
| 972 | * after ExitBootServices(). This is, in fact, a lie. | 972 | * after ExitBootServices(). This is, in fact, a lie. |
| 973 | */ | 973 | */ |
| 974 | if (efi_enabled) | 974 | if (efi_enabled(EFI_MEMMAP)) |
| 975 | efi_reserve_boot_services(); | 975 | efi_reserve_boot_services(); |
| 976 | 976 | ||
| 977 | /* preallocate 4k for mptable mpc */ | 977 | /* preallocate 4k for mptable mpc */ |
| @@ -1114,7 +1114,7 @@ void __init setup_arch(char **cmdline_p) | |||
| 1114 | 1114 | ||
| 1115 | #ifdef CONFIG_VT | 1115 | #ifdef CONFIG_VT |
| 1116 | #if defined(CONFIG_VGA_CONSOLE) | 1116 | #if defined(CONFIG_VGA_CONSOLE) |
| 1117 | if (!efi_enabled || (efi_mem_type(0xa0000) != EFI_CONVENTIONAL_MEMORY)) | 1117 | if (!efi_enabled(EFI_BOOT) || (efi_mem_type(0xa0000) != EFI_CONVENTIONAL_MEMORY)) |
| 1118 | conswitchp = &vga_con; | 1118 | conswitchp = &vga_con; |
| 1119 | #elif defined(CONFIG_DUMMY_CONSOLE) | 1119 | #elif defined(CONFIG_DUMMY_CONSOLE) |
| 1120 | conswitchp = &dummy_con; | 1120 | conswitchp = &dummy_con; |
| @@ -1131,14 +1131,14 @@ void __init setup_arch(char **cmdline_p) | |||
| 1131 | register_refined_jiffies(CLOCK_TICK_RATE); | 1131 | register_refined_jiffies(CLOCK_TICK_RATE); |
| 1132 | 1132 | ||
| 1133 | #ifdef CONFIG_EFI | 1133 | #ifdef CONFIG_EFI |
| 1134 | /* Once setup is done above, disable efi_enabled on mismatched | 1134 | /* Once setup is done above, unmap the EFI memory map on |
| 1135 | * firmware/kernel archtectures since there is no support for | 1135 | * mismatched firmware/kernel archtectures since there is no |
| 1136 | * runtime services. | 1136 | * support for runtime services. |
| 1137 | */ | 1137 | */ |
| 1138 | if (efi_enabled && IS_ENABLED(CONFIG_X86_64) != efi_64bit) { | 1138 | if (efi_enabled(EFI_BOOT) && |
| 1139 | IS_ENABLED(CONFIG_X86_64) != efi_enabled(EFI_64BIT)) { | ||
| 1139 | pr_info("efi: Setup done, disabling due to 32/64-bit mismatch\n"); | 1140 | pr_info("efi: Setup done, disabling due to 32/64-bit mismatch\n"); |
| 1140 | efi_unmap_memmap(); | 1141 | efi_unmap_memmap(); |
| 1141 | efi_enabled = 0; | ||
| 1142 | } | 1142 | } |
| 1143 | #endif | 1143 | #endif |
| 1144 | } | 1144 | } |
