diff options
author | David Howells <dhowells@redhat.com> | 2017-02-06 06:22:45 -0500 |
---|---|---|
committer | Ingo Molnar <mingo@kernel.org> | 2017-02-07 04:42:10 -0500 |
commit | 9661b332041dab63ba2e5222b40a9f916c1368a9 (patch) | |
tree | 2fbd6d823c92e87d8600d6355e4762b28ba2f9d2 | |
parent | f3cf6f7434debcc65f397228c689641b07c1be35 (diff) |
efi: Print the secure boot status in x86 setup_arch()
Print the secure boot status in the x86 setup_arch() function, but otherwise do
nothing more for now. More functionality will be added later, but this at
least allows for testing.
Signed-off-by: David Howells <dhowells@redhat.com>
[ Use efi_enabled() instead of IS_ENABLED(CONFIG_EFI). ]
Signed-off-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
Cc: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Matt Fleming <matt@codeblueprint.co.uk>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: linux-efi@vger.kernel.org
Link: http://lkml.kernel.org/r/1486380166-31868-7-git-send-email-ard.biesheuvel@linaro.org
Signed-off-by: Ingo Molnar <mingo@kernel.org>
-rw-r--r-- | arch/x86/kernel/setup.c | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/arch/x86/kernel/setup.c b/arch/x86/kernel/setup.c index 4cfba947d774..69780edf0dde 100644 --- a/arch/x86/kernel/setup.c +++ b/arch/x86/kernel/setup.c | |||
@@ -1176,6 +1176,20 @@ void __init setup_arch(char **cmdline_p) | |||
1176 | /* Allocate bigger log buffer */ | 1176 | /* Allocate bigger log buffer */ |
1177 | setup_log_buf(1); | 1177 | setup_log_buf(1); |
1178 | 1178 | ||
1179 | if (efi_enabled(EFI_BOOT)) { | ||
1180 | switch (boot_params.secure_boot) { | ||
1181 | case efi_secureboot_mode_disabled: | ||
1182 | pr_info("Secure boot disabled\n"); | ||
1183 | break; | ||
1184 | case efi_secureboot_mode_enabled: | ||
1185 | pr_info("Secure boot enabled\n"); | ||
1186 | break; | ||
1187 | default: | ||
1188 | pr_info("Secure boot could not be determined\n"); | ||
1189 | break; | ||
1190 | } | ||
1191 | } | ||
1192 | |||
1179 | reserve_initrd(); | 1193 | reserve_initrd(); |
1180 | 1194 | ||
1181 | acpi_table_upgrade(); | 1195 | acpi_table_upgrade(); |