]> asedeno.scripts.mit.edu Git - linux.git/blobdiff - drivers/firmware/efi/libstub/efi-stub-helper.c
efi/arm/arm64: Allow SetVirtualAddressMap() to be omitted
[linux.git] / drivers / firmware / efi / libstub / efi-stub-helper.c
index 8f2d000bec750418dba44db0674001c731892d58..e4610e72b78fa2808f4307c119a538ac944526fa 100644 (file)
@@ -31,6 +31,7 @@ static unsigned long __chunk_size = EFI_READ_CHUNK_SIZE;
 
 static int __section(.data) __nokaslr;
 static int __section(.data) __quiet;
+static int __section(.data) __novamap;
 
 int __pure nokaslr(void)
 {
@@ -40,6 +41,10 @@ int __pure is_quiet(void)
 {
        return __quiet;
 }
+int __pure novamap(void)
+{
+       return __novamap;
+}
 
 #define EFI_MMAP_NR_SLACK_SLOTS        8
 
@@ -479,6 +484,11 @@ efi_status_t efi_parse_options(char const *cmdline)
                        __chunk_size = -1UL;
                }
 
+               if (!strncmp(str, "novamap", 7)) {
+                       str += strlen("novamap");
+                       __novamap = 1;
+               }
+
                /* Group words together, delimited by "," */
                while (*str && *str != ' ' && *str != ',')
                        str++;