summaryrefslogtreecommitdiff
path: root/meta-arm/meta-arm-bsp/recipes-security/trusted-services/corstone1000/0014-Configure-storage-size.patch
blob: 22b1da69066853a9a27c3de993cfb6f58b017682 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
From 229ec29154a4404426ad3083af68ca111a214e13 Mon Sep 17 00:00:00 2001
From: Gowtham Suresh Kumar <gowtham.sureshkumar@arm.com>
Date: Thu, 16 Dec 2021 21:31:40 +0000
Subject: [PATCH 14/20] Configure storage size

Upstream-Status: Pending
Signed-off-by: Rui Miguel Silva <rui.silva@linaro.org>
---
 .../service/smm_variable/backend/uefi_variable_store.c       | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/components/service/smm_variable/backend/uefi_variable_store.c b/components/service/smm_variable/backend/uefi_variable_store.c
index 611e2e225c6b..6c3b9ed81c25 100644
--- a/components/service/smm_variable/backend/uefi_variable_store.c
+++ b/components/service/smm_variable/backend/uefi_variable_store.c
@@ -88,6 +88,7 @@ static efi_status_t check_name_terminator(
  * may be overridden using uefi_variable_store_set_storage_limits()
  */
 #define DEFAULT_MAX_VARIABLE_SIZE			(2048)
+#define CONFIGURE_STORAGE_SIZE			    (50)
 
 efi_status_t uefi_variable_store_init(
 	struct uefi_variable_store *context,
@@ -101,13 +102,13 @@ efi_status_t uefi_variable_store_init(
 	/* Initialise persistent store defaults */
 	context->persistent_store.is_nv = true;
 	context->persistent_store.max_variable_size = DEFAULT_MAX_VARIABLE_SIZE;
-	context->persistent_store.total_capacity = DEFAULT_MAX_VARIABLE_SIZE * max_variables;
+	context->persistent_store.total_capacity = CONFIGURE_STORAGE_SIZE * max_variables;
 	context->persistent_store.storage_backend = persistent_store;
 
 	/* Initialise volatile store defaults */
 	context->volatile_store.is_nv = false;
 	context->volatile_store.max_variable_size = DEFAULT_MAX_VARIABLE_SIZE;
-	context->volatile_store.total_capacity = DEFAULT_MAX_VARIABLE_SIZE * max_variables;
+	context->volatile_store.total_capacity = CONFIGURE_STORAGE_SIZE * max_variables;
 	context->volatile_store.storage_backend = volatile_store;
 
 	context->owner_id = owner_id;
-- 
2.38.1