new file mode 100644
@@ -0,0 +1,32 @@
+From: Oscar Belshaw <Oscar.Belshaw@arm.com>
+Date: Tue, 17 Nov 2026 15:00:00 +0000
+Subject: [PATCH] platform: corstone1000: enlarge protected storage assets
+
+The BBSR signed db/dbx updates store a 6776-byte signature database,
+which exceeds the 3500-byte protected storage asset limit. Match the
+SMM gateway limit of 8 KiB and allow crypto input/output vectors for
+encrypting and decrypting an entire asset, including framing overhead.
+Keep the existing isolation level and security partitions enabled.
+
+Upstream-Status: Pending
+Signed-off-by: Oscar Belshaw <Oscar.Belshaw@arm.com>
+---
+diff --git a/platform/ext/target/arm/corstone1000/config_tfm_target.h b/platform/ext/target/arm/corstone1000/config_tfm_target.h
+--- a/platform/ext/target/arm/corstone1000/config_tfm_target.h
++++ b/platform/ext/target/arm/corstone1000/config_tfm_target.h
+@@ -27,13 +27,13 @@
+ #define ITS_MAX_ASSET_SIZE 2048
+
+ /* The maximum asset size to be stored in the Protected Storage */
+-#define PS_MAX_ASSET_SIZE 3500
++#define PS_MAX_ASSET_SIZE 8192
+
+ /* 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 7200
++#define CRYPTO_IOVEC_BUFFER_SIZE (2 * PS_MAX_ASSET_SIZE + 256)
+
+ /* The Mailbox partition is used as an NS Agent so its stack size is used to
+ * determine the PSP and PSPLIM during the SFN backend initialization. It has to
@@ -49,6 +49,7 @@ SRC_URI:append:corstone1000 = " \
file://0012-plat-cs1k-Add-flash-erase-protection.patch \
file://0013-platform-corstone1000-Increase-FIP-partition-size.patch \
file://0014-platform-corstone1000-keep-CM-during-secure-debug.patch \
+ file://0015-platform-corstone1000-enlarge-protected-storage-assets.patch \
"
FILESEXTRAPATHS:prepend:corstone1000-mps3 := "${THISDIR}/files/corstone1000/psa-adac:"
@@ -101,6 +101,7 @@ SRC_URI:append = " \
file://0051-doc-bootefi-note-two-phase-runtime-variables-selftes.patch \
file://0052-efi_loader-align-FF-A-cache-maintenance-with-runtime.patch \
file://0053-corstone1000-a320-enable-bootefi-selftest.patch \
+ file://0054-configs-corstone1000-enlarge-MM-communication-buffer.patch \
"
uboot_configure_config:append() {
new file mode 100644
@@ -0,0 +1,42 @@
+From: Oscar Belshaw <Oscar.Belshaw@arm.com>
+Date: Tue, 17 Nov 2026 15:00:00 +0000
+Subject: [PATCH] configs: corstone1000: enlarge MM communication buffer
+
+The BBSR signed db/dbx updates contain 7982 bytes, before MM request
+headers. Reserve 16 KiB for the complete authenticated request and move
+the base down so the buffer still ends at 0x82000000. Keep this region
+in sync with the Trusted Services SMM gateway and libts.
+
+Upstream-Status: Pending
+Signed-off-by: Oscar Belshaw <Oscar.Belshaw@arm.com>
+---
+diff --git a/configs/corstone1000_defconfig b/configs/corstone1000_defconfig
+--- a/configs/corstone1000_defconfig
++++ b/configs/corstone1000_defconfig
+@@ -16,9 +16,9 @@
+ # CONFIG_EFI_DEBUG_SUPPORT is not set
+ CONFIG_EFI_SET_TIME=y
+ CONFIG_EFI_MM_COMM_TEE=y
+-CONFIG_FFA_SHARED_MM_BUF_SIZE=4096
++CONFIG_FFA_SHARED_MM_BUF_SIZE=16384
+ CONFIG_FFA_SHARED_MM_BUF_OFFSET=0
+-CONFIG_FFA_SHARED_MM_BUF_ADDR=0x81FFF000
++CONFIG_FFA_SHARED_MM_BUF_ADDR=0x81FFC000
+ CONFIG_EFI_RUNTIME_UPDATE_CAPSULE=y
+ CONFIG_EFI_CAPSULE_ON_DISK=y
+ CONFIG_EFI_CAPSULE_FIRMWARE_RAW=y
+diff --git a/configs/corstone1000-a320_defconfig b/configs/corstone1000-a320_defconfig
+--- a/configs/corstone1000-a320_defconfig
++++ b/configs/corstone1000-a320_defconfig
+@@ -16,9 +16,9 @@
+ # CONFIG_EFI_DEBUG_SUPPORT is not set
+ CONFIG_EFI_SET_TIME=y
+ CONFIG_EFI_MM_COMM_TEE=y
+-CONFIG_FFA_SHARED_MM_BUF_SIZE=4096
++CONFIG_FFA_SHARED_MM_BUF_SIZE=16384
+ CONFIG_FFA_SHARED_MM_BUF_OFFSET=0
+-CONFIG_FFA_SHARED_MM_BUF_ADDR=0x81FFF000
++CONFIG_FFA_SHARED_MM_BUF_ADDR=0x81FFC000
+ CONFIG_EFI_RUNTIME_UPDATE_CAPSULE=y
+ CONFIG_EFI_CAPSULE_ON_DISK=y
+ CONFIG_EFI_CAPSULE_FIRMWARE_RAW=y
@@ -1,7 +1,7 @@
require ts-arm-platforms.inc
-EXTRA_OECMAKE:append:corstone1000 = "-DMM_COMM_BUFFER_ADDRESS=0x81FFF000 \
- -DMM_COMM_BUFFER_SIZE=0x1000 \
+EXTRA_OECMAKE:append:corstone1000 = "-DMM_COMM_BUFFER_ADDRESS=0x81FFC000 \
+ -DMM_COMM_BUFFER_SIZE=0x4000 \
"
EXTRA_OECMAKE:append:fvp-base = " -DMM_COMM_BUFFER_ADDRESS=0x81000000 \
@@ -1,6 +1,11 @@
require ts-arm-platforms.inc
+# Keep the MM region in sync with U-Boot and libts. The stored database
+# excludes the authentication descriptor carried in the larger MM request.
EXTRA_OECMAKE:append:corstone1000 = " -DSMM_GATEWAY_MAX_UEFI_VARIABLES=60 \
+ -DUEFI_MAX_VARIABLE_SIZE=8192 \
+ -DMM_COMM_BUFFER_ADDRESS="0x00000000 0x81FFC000" \
+ -DMM_COMM_BUFFER_PAGE_COUNT=4 \
"
EXTRA_OECMAKE:append:fvp-base = " -DMM_COMM_BUFFER_ADDRESS="0x00000000 0x81000000" \
Increase the MM buffer to 16 KiB in both U-Boot defconfigs, SMM gateway and libts. Move its base to 0x81FFC000 to preserve the end address at 0x82000000. Use the existing UEFI_MAX_VARIABLE_SIZE CMake option to allow 8 KiB stored variables and match that limit in TF-M protected storage. Increase the crypto iovec buffer for a complete asset and framing. The new BBSR authenticated db/dbx updates introduced in acs 3.1.2 require storing a 6776-byte signature database, which exceeds CS1K's current protected-storage limit of 3500 bytes. Increased this to 8KiB to accommodate this change. Signed-off-by: Oscar Belshaw <Oscar.Belshaw@arm.com> --- ...000-enlarge-protected-storage-assets.patch | 32 ++++++++++++++ .../trusted-firmware-m-corstone1000.inc | 1 + .../u-boot/u-boot-corstone1000.inc | 1 + ...1000-enlarge-MM-communication-buffer.patch | 42 +++++++++++++++++++ .../trusted-services/libts_%.bbappend | 4 +- .../ts-sp-smm-gateway_%.bbappend | 5 +++ 6 files changed, 83 insertions(+), 2 deletions(-) create mode 100644 meta-arm-bsp/recipes-bsp/trusted-firmware-m/files/corstone1000/0015-platform-corstone1000-enlarge-protected-storage-assets.patch create mode 100644 meta-arm-bsp/recipes-bsp/u-boot/u-boot/corstone1000/0054-configs-corstone1000-enlarge-MM-communication-buffer.patch