aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--drivers/firmware/Kconfig9
-rw-r--r--drivers/firmware/efivars.c8
2 files changed, 16 insertions, 1 deletions
diff --git a/drivers/firmware/Kconfig b/drivers/firmware/Kconfig
index 898023d8e486..42c759a4d047 100644
--- a/drivers/firmware/Kconfig
+++ b/drivers/firmware/Kconfig
@@ -62,6 +62,15 @@ config EFI_VARS_PSTORE
62 will allow writing console messages, crash dumps, or anything 62 will allow writing console messages, crash dumps, or anything
63 else supported by pstore to EFI variables. 63 else supported by pstore to EFI variables.
64 64
65config EFI_VARS_PSTORE_DEFAULT_DISABLE
66 bool "Disable using efivars as a pstore backend by default"
67 depends on EFI_VARS_PSTORE
68 default n
69 help
70 Saying Y here will disable the use of efivars as a storage
71 backend for pstore by default. This setting can be overridden
72 using the efivars module's pstore_disable parameter.
73
65config EFI_PCDP 74config EFI_PCDP
66 bool "Console device selection via EFI PCDP or HCDP table" 75 bool "Console device selection via EFI PCDP or HCDP table"
67 depends on ACPI && EFI && IA64 76 depends on ACPI && EFI && IA64
diff --git a/drivers/firmware/efivars.c b/drivers/firmware/efivars.c
index 37b6f247399e..6607daf5a08d 100644
--- a/drivers/firmware/efivars.c
+++ b/drivers/firmware/efivars.c
@@ -103,6 +103,11 @@ MODULE_VERSION(EFIVARS_VERSION);
103 */ 103 */
104#define GUID_LEN 36 104#define GUID_LEN 36
105 105
106static bool efivars_pstore_disable =
107 IS_ENABLED(EFI_VARS_PSTORE_DEFAULT_DISABLE);
108
109module_param_named(pstore_disable, efivars_pstore_disable, bool, 0644);
110
106/* 111/*
107 * The maximum size of VariableName + Data = 1024 112 * The maximum size of VariableName + Data = 1024
108 * Therefore, it's reasonable to save that much 113 * Therefore, it's reasonable to save that much
@@ -2009,7 +2014,8 @@ int register_efivars(struct efivars *efivars,
2009 if (error) 2014 if (error)
2010 unregister_efivars(efivars); 2015 unregister_efivars(efivars);
2011 2016
2012 efivar_pstore_register(efivars); 2017 if (!efivars_pstore_disable)
2018 efivar_pstore_register(efivars);
2013 2019
2014 register_filesystem(&efivarfs_type); 2020 register_filesystem(&efivarfs_type);
2015 2021