From 471285f999579c6fe1949b4108c6f9c95244bc35 Mon Sep 17 00:00:00 2001 From: Brian Maly Date: Fri, 15 Apr 2016 12:26:13 -0400 Subject: [PATCH] secureboot: enable secureboot if boot param is set Orabug: 23511799 Enable secureboot if enabled via boot param. Signed-off-by: Brian Maly --- arch/x86/kernel/setup.c | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/arch/x86/kernel/setup.c b/arch/x86/kernel/setup.c index 7cea402a45d3..97838c712a96 100644 --- a/arch/x86/kernel/setup.c +++ b/arch/x86/kernel/setup.c @@ -1157,6 +1157,14 @@ void __init setup_arch(char **cmdline_p) io_delay_init(); +#ifdef CONFIG_EFI_SECURE_BOOT_SECURELEVEL + if (boot_params.secure_boot) { + set_bit(EFI_SECURE_BOOT, &efi.flags); + set_securelevel(1); + pr_info("Secure boot enabled\n"); + } +#endif + /* * Parse the ACPI tables for possible boot-time SMP configuration. */ -- 2.50.1