]> xenbits.xensource.com Git - people/julieng/linux-arm.git/commitdiff
efi: Add EFI_SECURE_BOOT bit
authorJosh Boyer <jwboyer@fedoraproject.org>
Tue, 27 Aug 2013 17:33:03 +0000 (13:33 -0400)
committerJulien Grall <julien.grall@citrix.com>
Fri, 18 Sep 2015 15:29:29 +0000 (16:29 +0100)
UEFI machines can be booted in Secure Boot mode.  Add a EFI_SECURE_BOOT bit
for use with efi_enabled.

Signed-off-by: Josh Boyer <jwboyer@fedoraproject.org>
arch/x86/kernel/setup.c
include/linux/efi.h

index c2e4f52cad30dd69520b653ff66392e79d3ddd41..5def6b4143fa33b636b0eceeed9fd591f71e8155 100644 (file)
@@ -1162,7 +1162,9 @@ void __init setup_arch(char **cmdline_p)
 
 #ifdef CONFIG_EFI_SECURE_BOOT_SIG_ENFORCE
        if (boot_params.secure_boot) {
+               set_bit(EFI_SECURE_BOOT, &efi.flags);
                enforce_signed_modules();
+               pr_info("Secure boot enabled\n");
        }
 #endif
 
index 85ef051ac6fb43a64c38779c6bf754d2e492abcf..de3e45088d4aaddb2ca2ada7947b781cf7696f9b 100644 (file)
@@ -959,6 +959,7 @@ extern int __init efi_setup_pcdp_console(char *);
 #define EFI_PARAVIRT           6       /* Access is via a paravirt interface */
 #define EFI_ARCH_1             7       /* First arch-specific bit */
 #define EFI_DBG                        8       /* Print additional debug info at runtime */
+#define EFI_SECURE_BOOT                9       /* Are we in Secure Boot mode? */
 
 #ifdef CONFIG_EFI
 /*