diff mbox series

arm-bsp: trusted-services: fix openamp build

Message ID 20220906164538.1503942-1-rui.silva@linaro.org
State New
Headers show
Series arm-bsp: trusted-services: fix openamp build | expand

Commit Message

Rui Miguel Silva Sept. 6, 2022, 4:45 p.m. UTC
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

Comments

Jon Mason Sept. 7, 2022, 3:14 a.m. UTC | #1
On Tue, 6 Sep 2022 17:45:38 +0100, Rui Miguel Silva wrote:
> With the latest gcc, there were some unresolved symbols on
> opemamp linkage, add the implementation of that symbol for the
> outline of atomics.

Applied, thanks!

[1/1] arm-bsp: trusted-services: fix openamp build
      commit: c039d1601f7b643fd6ffc9054d7c22f58362b40b

Best regards,
diff mbox series

Patch

diff --git a/meta-arm-bsp/recipes-security/trusted-services/secure-partitions/corstone1000/0049-Add-atomic-outline-to-fix-build-for-opemamp.patch b/meta-arm-bsp/recipes-security/trusted-services/secure-partitions/corstone1000/0049-Add-atomic-outline-to-fix-build-for-opemamp.patch
new file mode 100644
index 000000000000..649b967818d8
--- /dev/null
+++ b/meta-arm-bsp/recipes-security/trusted-services/secure-partitions/corstone1000/0049-Add-atomic-outline-to-fix-build-for-opemamp.patch
@@ -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
+
diff --git a/meta-arm-bsp/recipes-security/trusted-services/ts-corstone1000.inc b/meta-arm-bsp/recipes-security/trusted-services/ts-corstone1000.inc
index b04863fcfaa5..9d1c3272687e 100644
--- a/meta-arm-bsp/recipes-security/trusted-services/ts-corstone1000.inc
+++ b/meta-arm-bsp/recipes-security/trusted-services/ts-corstone1000.inc
@@ -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"