From: Brian Maly Date: Fri, 15 Apr 2016 16:26:13 +0000 (-0400) Subject: secureboot: enable secureboot if boot param is set X-Git-Tag: v4.1.12-92~143^2 X-Git-Url: https://www.infradead.org/git/?a=commitdiff_plain;h=471285f999579c6fe1949b4108c6f9c95244bc35;p=users%2Fjedix%2Flinux-maple.git secureboot: enable secureboot if boot param is set Orabug: 23511799 Enable secureboot if enabled via boot param. Signed-off-by: Brian Maly --- 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. */