From e3d94988f14b3004606c247b39bda5ade119545f Mon Sep 17 00:00:00 2001
From: Harsimran Singh Tungal <harsimransingh.tungal@arm.com>
Date: Wed, 12 Mar 2025 13:10:47 +0000
Subject: [PATCH 2/2] Platform: Corstone1000: Increase buffer sizes

Increase PSA_MAX_ASSET_SIZE and CRYPTO_IOVEC_BUFFER_SIZE
to accommodate large size EFI variables set by new U-Boot version.

This change is required to pass ACS tests related to Set/Get
EFI variables. These ACS tests started failing after introducing new
version of U-Boot, Trusted-Services and Trusted-Firmware-M while
implementing PSA FWU support.

Upstream-Status: Backport [bd80dee733e792eadfd2115f4bfa6bad748e5ce5]
Signed-off-by: Harsimran Singh Tungal <harsimransingh.tungal@arm.com>
---
 platform/ext/target/arm/corstone1000/config_tfm_target.h | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/platform/ext/target/arm/corstone1000/config_tfm_target.h b/platform/ext/target/arm/corstone1000/config_tfm_target.h
index 0b410dfd4..a65305bd4 100644
--- a/platform/ext/target/arm/corstone1000/config_tfm_target.h
+++ b/platform/ext/target/arm/corstone1000/config_tfm_target.h
@@ -24,11 +24,11 @@
 #define ITS_MAX_ASSET_SIZE   2048
 
 /* The maximum asset size to be stored in the Protected Storage */
-#define PS_MAX_ASSET_SIZE   2592
+#define PS_MAX_ASSET_SIZE   3500
 
 /* This is needed to be able to process the EFI variables during PS writes. */
 #define CRYPTO_ENGINE_BUF_SIZE 0x5000
 
 /* This is also has to be increased to fit the EFI variables into the iovecs. */
-#define CRYPTO_IOVEC_BUFFER_SIZE    6000
+#define CRYPTO_IOVEC_BUFFER_SIZE    7200
 #endif /* __CONFIG_TFM_TARGET_H__ */
-- 
2.25.1

