blob: ddf95034109798322638a46189638cf9ae76c3a1 [file] [log] [blame]
Brad Bishopbec4ebc2022-08-03 09:55:16 -04001From 3e472452bca64ed90071b61416460f1a69382293 Mon Sep 17 00:00:00 2001
2From: Gowtham Suresh Kumar <gowtham.sureshkumar@arm.com>
3Date: Thu, 16 Dec 2021 21:31:40 +0000
4Subject: [PATCH] Configure storage size
5
6Upstream-Status: Pending [Not submitted to upstream yet]
7Signed-off-by: Gowtham Suresh Kumar <gowtham.sureshkumar@arm.com>
8
9
10---
11 .../service/smm_variable/backend/uefi_variable_store.c | 5 +++--
12 1 file changed, 3 insertions(+), 2 deletions(-)
13
14diff --git a/components/service/smm_variable/backend/uefi_variable_store.c b/components/service/smm_variable/backend/uefi_variable_store.c
15index 0c371e94..b7cfff40 100644
16--- a/components/service/smm_variable/backend/uefi_variable_store.c
17+++ b/components/service/smm_variable/backend/uefi_variable_store.c
18@@ -87,6 +87,7 @@ static efi_status_t check_name_terminator(
19 * may be overridden using uefi_variable_store_set_storage_limits()
20 */
21 #define DEFAULT_MAX_VARIABLE_SIZE (2048)
22+#define CONFIGURE_STORAGE_SIZE (50)
23
24 efi_status_t uefi_variable_store_init(
25 struct uefi_variable_store *context,
26@@ -100,13 +101,13 @@ efi_status_t uefi_variable_store_init(
27 /* Initialise persistent store defaults */
28 context->persistent_store.is_nv = true;
29 context->persistent_store.max_variable_size = DEFAULT_MAX_VARIABLE_SIZE;
30- context->persistent_store.total_capacity = DEFAULT_MAX_VARIABLE_SIZE * max_variables;
31+ context->persistent_store.total_capacity = CONFIGURE_STORAGE_SIZE * max_variables;
32 context->persistent_store.storage_backend = persistent_store;
33
34 /* Initialise volatile store defaults */
35 context->volatile_store.is_nv = false;
36 context->volatile_store.max_variable_size = DEFAULT_MAX_VARIABLE_SIZE;
37- context->volatile_store.total_capacity = DEFAULT_MAX_VARIABLE_SIZE * max_variables;
38+ context->volatile_store.total_capacity = CONFIGURE_STORAGE_SIZE * max_variables;
39 context->volatile_store.storage_backend = volatile_store;
40
41 context->owner_id = owner_id;