1
0
mirror of https://git.yoctoproject.org/meta-arm synced 2026-01-11 15:00:39 +00:00

arm-bsp/trusted-firmware-m: corstone1000: Permit FWU calls in RSE-COMMS

Add support to permit FWU calls in RSE-COMMS Trusted-Firmware-M for Corstone-1000
This change is required to allow the transmission of PSA FWU related
calls between Cortex A and Cortex M side on Corstone-1000.
For every PSA call from A side, the RSE-COMMS at M side validates, if the
call is allowed or not.

Signed-off-by: Harsimran Singh Tungal <harsimransingh.tungal@arm.com>
Signed-off-by: Jon Mason <jon.mason@arm.com>
This commit is contained in:
Harsimran Singh Tungal
2025-07-30 12:53:15 +01:00
committed by Jon Mason
parent 1e37608374
commit 3a2cc58deb
2 changed files with 61 additions and 0 deletions

View File

@@ -0,0 +1,60 @@
From 47593ccd1b2a2210c0860d1670005780836f120b Mon Sep 17 00:00:00 2001
From: Harsimran Singh Tungal <harsimransingh.tungal@arm.com>
Date: Mon, 18 Nov 2024 11:40:25 +0000
Subject: [PATCH] Platform: corstone1000: Permit FWU calls in RSE-COMMS
Allow FWU calls to be dispatched by the RSE-COMMS for Corstone-1000.
This change is required to allow the transmission of PSA FWU related
calls between Cortex A and Cortex M side on Corstone-1000.
For every PSA call from A side, the RSE-COMMS at M side validates, if the
call is allowed or not.
Upstream-Status: Backport [b1123e3bf99000dd45992c0638c8f9ae7dba2ed8]
Signed-off-by: Harsimran Singh Tungal <harsimransingh.tungal@arm.com>
---
.../corstone1000/rse_comms_permissions_hal.c | 22 +++++++++++++++++++
1 file changed, 22 insertions(+)
diff --git a/platform/ext/target/arm/corstone1000/rse_comms_permissions_hal.c b/platform/ext/target/arm/corstone1000/rse_comms_permissions_hal.c
index 59724bc94..58ade2026 100644
--- a/platform/ext/target/arm/corstone1000/rse_comms_permissions_hal.c
+++ b/platform/ext/target/arm/corstone1000/rse_comms_permissions_hal.c
@@ -33,6 +33,9 @@
#ifdef TFM_PARTITION_INTERNAL_TRUSTED_STORAGE
#include "tfm_its_defs.h"
#endif /* TFM_PARTITION_INTERNAL_TRUSTED_STORAGE */
+#ifdef TFM_PARTITION_FIRMWARE_UPDATE
+#include "tfm_fwu_defs.h"
+#endif /* TFM_PARTITION_FIRMWARE_UPDATE */
#define INVALID_REGION_COUNTER_MAX 128
#define INVALID_SERVICE_COUNTER_MAX 64
@@ -165,6 +168,25 @@ enum tfm_plat_err_t comms_permissions_service_check(psa_handle_t handle,
case TFM_DPE_SERVICE_HANDLE:
return TFM_PLAT_ERR_SUCCESS;
#endif /* TFM_PARTITION_DPE */
+
+#ifdef TFM_PARTITION_FIRMWARE_UPDATE
+ case TFM_FIRMWARE_UPDATE_SERVICE_HANDLE:
+ switch(type) {
+ case TFM_FWU_START:
+ case TFM_FWU_WRITE:
+ case TFM_FWU_FINISH:
+ case TFM_FWU_CANCEL:
+ case TFM_FWU_INSTALL:
+ case TFM_FWU_CLEAN:
+ case TFM_FWU_REJECT:
+ case TFM_FWU_REQUEST_REBOOT:
+ case TFM_FWU_ACCEPT:
+ case TFM_FWU_QUERY:
+ return TFM_PLAT_ERR_SUCCESS;
+ default:
+ goto out_err;
+ }
+#endif /* TFM_PARTITION_FIRMWARE_UPDATE */
default:
goto out_err;
}
--
2.25.1

View File

@@ -42,6 +42,7 @@ SRC_URI:append:corstone1000 = " \
file://0021-platform-corstone1000-add-unique-guid-for-mps3.patch \
file://0022-CC312-alignment-of-cc312-differences.patch \
file://0023-Platform-CS1000-Remove-duplicate-configuration-parameters.patch \
file://0024-Platform-corstone1000-Allow-FWU-calls-in-RSE-COMMS.patch \
"
FILESEXTRAPATHS:prepend:corstone1000-mps3 := "${THISDIR}/files/corstone1000/psa-adac:"