1
0
mirror of https://git.yoctoproject.org/meta-arm synced 2026-06-05 02:20:30 +00:00

arm-bsp: trusted-services: fix openamp build

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>
Signed-off-by: Jon Mason <jon.mason@arm.com>
This commit is contained in:
Rui Miguel Silva
2022-09-06 17:45:38 +01:00
committed by Jon Mason
parent 1f7e8b6de9
commit c039d1601f
2 changed files with 45 additions and 0 deletions
@@ -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"