efi_loader: set CapsuleMax from CONFIG_EFI_CAPSULE_MAX
Adds CONFIG_EFI_CAPSULE_MAX to configure the max index value used in
EFI capsule reports. Prior to this change is the hard coded value was
65535 which would exceed available storage for variables. Now the
default value is 15 which should work fine with most systems.
Signed-off-by: Etienne Carriere <etienne.carriere@linaro.org>
diff --git a/lib/efi_loader/Kconfig b/lib/efi_loader/Kconfig
index c05a54d..c5835e6 100644
--- a/lib/efi_loader/Kconfig
+++ b/lib/efi_loader/Kconfig
@@ -226,6 +226,14 @@
Select this option if you want to enable capsule
authentication
+config EFI_CAPSULE_MAX
+ int "Max value for capsule index"
+ default 15
+ range 0 65535
+ help
+ Select the max capsule index value used for capsule report
+ variables. This value is used to create CapsuleMax variable.
+
config EFI_DEVICE_PATH_TO_TEXT
bool "Device path to text protocol"
default y