new file mode 100644
@@ -0,0 +1,44 @@
+From 0d8394ee5c52e97e82ebe4641cf0d9ebcbe147ff Mon Sep 17 00:00:00 2001
+From: Rui Miguel Silva <rui.silva@linaro.org>
+Date: Tue, 6 Sep 2022 16:47:06 +0100
+Subject: [PATCH] Add atomic outline to fix build for opemamp
+
+Add memory model 5 atomic ouline support (_sync) to fix
+missing symbol when compiling with recent gcc (12.2).
+
+Signed-off-by: Rui Miguel Silva <rui.silva@linaro.org>
+
+Upstream-Status: Pending [Not submitted to upstream yet]
+Signed-off-by: Rui Miguel Silva <rui.silva@arm.com>
+---
+ deployments/se-proxy/opteesp/lse.S | 9 +++++++++
+ 1 file changed, 9 insertions(+)
+
+diff --git a/deployments/se-proxy/opteesp/lse.S b/deployments/se-proxy/opteesp/lse.S
+index 840683a6671a..8e466d65fc2b 100644
+--- a/deployments/se-proxy/opteesp/lse.S
++++ b/deployments/se-proxy/opteesp/lse.S
+@@ -5,6 +5,7 @@
+
+ .text
+ .globl __aarch64_cas4_acq_rel
++.globl __aarch64_cas4_sync
+
+ __aarch64_cas4_acq_rel:
+ mov w16, w0
+@@ -16,4 +17,12 @@ __aarch64_cas4_acq_rel:
+ cbnz w17, 0b
+ 1: ret
+
++__aarch64_cas4_sync:
++ mov w16, w0
++ ldxr w0, [x2]
++ cmp w0, w16
++0: bne 1f
+
++ stlxr w17, w1, [x2]
++ cbnz w17, 0b
++1: ret
+--
+2.37.3
+
@@ -60,6 +60,7 @@ SRC_URI:append = " \
file://0047-Fixes-in-AEAD-for-psa-arch-test-54-and-58.patch \
file://0003-corstone1000-port-crypto-config.patch;patchdir=../psa-arch-tests \
file://0048-Fix-UEFI-get_variable-with-small-buffer.patch \
+ file://0049-Add-atomic-outline-to-fix-build-for-opemamp.patch \
"
SRC_URI_MBEDTLS = "git://github.com/ARMmbed/mbedtls.git;protocol=https;branch=development;name=mbedtls;destsuffix=git/mbedtls"
With the latest gcc, there were some unresolved symbols on opemamp linkage, add the implementation of that symbol for the outline of atomics. Signed-off-by: Rui Miguel Silva <rui.silva@linaro.org> --- ...mic-outline-to-fix-build-for-opemamp.patch | 44 +++++++++++++++++++ .../trusted-services/ts-corstone1000.inc | 1 + 2 files changed, 45 insertions(+) create mode 100644 meta-arm-bsp/recipes-security/trusted-services/secure-partitions/corstone1000/0049-Add-atomic-outline-to-fix-build-for-opemamp.patch