]> www.infradead.org Git - users/jedix/linux-maple.git/commitdiff
efi: Add EFI_SECURE_BOOT bit
authorJosh Boyer <jwboyer@fedoraproject.org>
Tue, 27 Aug 2013 17:33:03 +0000 (13:33 -0400)
committerSantosh Shilimkar <santosh.shilimkar@oracle.com>
Mon, 10 Aug 2015 16:24:06 +0000 (09:24 -0700)
Orabug: 21539498

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>
Signed-off-by: Guangyu Sun <guangyu.sun@oracle.com>
Signed-off-by: Santosh Shilimkar <santosh.shilimkar@oracle.com>
arch/x86/kernel/setup.c
include/linux/efi.h

index 673ba9c92bdbd1ca12ab862f14721c613ea9ab45..97838c712a96a319e73c29b46e3929afd07873e0 100644 (file)
@@ -1159,7 +1159,9 @@ void __init setup_arch(char **cmdline_p)
 
 #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
 
index d2ca9263c1ffd414507a9428cad7d35afbef059a..03eed462480c127402f08b31d130c1bf85cae6e7 100644 (file)
@@ -973,6 +973,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
 /*