aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDavid Howells <dhowells@redhat.com>2017-01-31 14:46:00 +0000
committerArd Biesheuvel <ard.biesheuvel@linaro.org>2017-02-03 16:46:11 +0000
commit38798757a42f0ef534152ff11364af3c61e2f36d (patch)
tree2b90282e4efd92171446c3ea1966bd6c6e48883c
parentb4235a62871d6705d79475439e93cdc236fea9a5 (diff)
downloadefi-38798757a42f0ef534152ff11364af3c61e2f36d.tar.gz
efi: Print the secure boot status in x86 setup_arch()
Print the secure boot status in the x86 setup_arch() 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> Cc: Matt Fleming <matt@codeblueprint.co.uk> [ardb: use efi_enabled() instead of IS_ENABLED(CONFIG_EFI)] Signed-off-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
-rw-r--r--arch/x86/kernel/setup.c14
1 files changed, 14 insertions, 0 deletions
diff --git a/arch/x86/kernel/setup.c b/arch/x86/kernel/setup.c
index 4cfba947d77429..69780edf0dde90 100644
--- a/arch/x86/kernel/setup.c
+++ b/arch/x86/kernel/setup.c
@@ -1176,6 +1176,20 @@ void __init setup_arch(char **cmdline_p)
/* Allocate bigger log buffer */
setup_log_buf(1);
+ if (efi_enabled(EFI_BOOT)) {
+ switch (boot_params.secure_boot) {
+ case efi_secureboot_mode_disabled:
+ pr_info("Secure boot disabled\n");
+ break;
+ case efi_secureboot_mode_enabled:
+ pr_info("Secure boot enabled\n");
+ break;
+ default:
+ pr_info("Secure boot could not be determined\n");
+ break;
+ }
+ }
+
reserve_initrd();
acpi_table_upgrade();