From patchwork Mon Dec 6 18:03:11 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ross Burton X-Patchwork-Id: 1048 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from aws-us-west-2-korg-lkml-1.web.codeaurora.org (localhost.localdomain [127.0.0.1]) by smtp.lore.kernel.org (Postfix) with ESMTP id 40B53C433F5 for ; Mon, 6 Dec 2021 18:03:19 +0000 (UTC) Received: from foss.arm.com (foss.arm.com [217.140.110.172]) by mx.groups.io with SMTP id smtpd.web11.55413.1638813798032504236 for ; Mon, 06 Dec 2021 10:03:18 -0800 Authentication-Results: mx.groups.io; dkim=missing; spf=pass (domain: arm.com, ip: 217.140.110.172, mailfrom: ross.burton@arm.com) Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.121.207.14]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id 7DE9A12FC for ; Mon, 6 Dec 2021 10:03:16 -0800 (PST) Received: from oss-tx204.lab.cambridge.arm.com (usa-sjc-imap-foss1.foss.arm.com [10.121.207.14]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id 26DA53F73B for ; Mon, 6 Dec 2021 10:03:16 -0800 (PST) From: Ross Burton To: meta-arm@lists.yoctoproject.org Subject: [PATCH 1/2] arm/scp-firmware: upgrade to 2.9 Date: Mon, 6 Dec 2021 18:03:11 +0000 Message-Id: <20211206180312.1712721-1-ross.burton@arm.com> X-Mailer: git-send-email 2.25.1 MIME-Version: 1.0 List-Id: X-Webhook-Received: from li982-79.members.linode.com [45.33.32.79] by aws-us-west-2-korg-lkml-1.web.codeaurora.org with HTTPS for ; Mon, 06 Dec 2021 18:03:19 -0000 X-Groupsio-URL: https://lists.yoctoproject.org/g/meta-arm/message/2550 Drop a patch which was backported and is now included in 2.9. Signed-off-by: Ross Burton --- ...and-length-volatile-for-mod_smt_memo.patch | 47 ------------------- ...irmware_2.8.0.bb => scp-firmware_2.9.0.bb} | 8 ++-- 2 files changed, 3 insertions(+), 52 deletions(-) delete mode 100644 meta-arm/recipes-bsp/scp-firmware/files/0001-smt-Make-status-and-length-volatile-for-mod_smt_memo.patch rename meta-arm/recipes-bsp/scp-firmware/{scp-firmware_2.8.0.bb => scp-firmware_2.9.0.bb} (90%) diff --git a/meta-arm/recipes-bsp/scp-firmware/files/0001-smt-Make-status-and-length-volatile-for-mod_smt_memo.patch b/meta-arm/recipes-bsp/scp-firmware/files/0001-smt-Make-status-and-length-volatile-for-mod_smt_memo.patch deleted file mode 100644 index a4b08ed8..00000000 --- a/meta-arm/recipes-bsp/scp-firmware/files/0001-smt-Make-status-and-length-volatile-for-mod_smt_memo.patch +++ /dev/null @@ -1,47 +0,0 @@ -From d13b4f81287ef957365c3fe68c3d8e17427cb364 Mon Sep 17 00:00:00 2001 -From: Nicola Mazzucato -Date: Wed, 12 May 2021 15:20:58 +0100 -Subject: [PATCH] smt: Make status and length volatile for mod_smt_memory - -There is an intermittent error on TF-A side when reading the mailbox. -The error is due to the mailbox message length not matching the expectation: - ASSERT: drivers/arm/css/scmi/scmi_pwr_dmn_proto.c:48 - -This is due to a race between SCP writing the data and TF-A reading them. - -Effectively, the compiler seems to perform some minor optimisations with the -local mod_smt_memory resulting in the expected writing sequence to be altered. -This is seen in smt_respond(). - -To remove such optimisations, force the length and status to be volatile. -With this patch the sequence of writing into smt is restored and the error -in TF-A disappears. - -Change-Id: I0127b9aa3cd1b54643ffdb2ca5ddce9fc9569bea -Signed-off-by: Nicola Mazzucato -Signed-off-by: Damodar Santhapuri -Upstream-Status: Backport ---- - module/smt/include/internal/smt.h | 4 ++-- - 1 file changed, 2 insertions(+), 2 deletions(-) - -diff --git a/module/smt/include/internal/smt.h b/module/smt/include/internal/smt.h -index 1a615a36..d9f3f423 100644 ---- a/module/smt/include/internal/smt.h -+++ b/module/smt/include/internal/smt.h -@@ -12,10 +12,10 @@ - - struct mod_smt_memory { - uint32_t reserved0; -- uint32_t status; -+ volatile uint32_t status; - uint64_t reserved1; - uint32_t flags; -- uint32_t length; /* message_header + payload */ -+ volatile uint32_t length; /* message_header + payload */ - uint32_t message_header; - uint32_t payload[]; - }; --- -2.17.1 - diff --git a/meta-arm/recipes-bsp/scp-firmware/scp-firmware_2.8.0.bb b/meta-arm/recipes-bsp/scp-firmware/scp-firmware_2.9.0.bb similarity index 90% rename from meta-arm/recipes-bsp/scp-firmware/scp-firmware_2.8.0.bb rename to meta-arm/recipes-bsp/scp-firmware/scp-firmware_2.9.0.bb index 40648aa4..89d4a34f 100644 --- a/meta-arm/recipes-bsp/scp-firmware/scp-firmware_2.8.0.bb +++ b/meta-arm/recipes-bsp/scp-firmware/scp-firmware_2.9.0.bb @@ -6,11 +6,9 @@ LICENSE = "BSD-3-Clause & Apache-2.0" LIC_FILES_CHKSUM = "file://license.md;beginline=5;md5=9db9e3d2fb8d9300a6c3d15101b19731 \ file://contrib/cmsis/git/LICENSE.txt;md5=e3fc50a88d0a364313df4b21ef20c29e" -SRC_URI = "\ - gitsm://github.com/ARM-software/SCP-firmware.git;protocol=https;branch=master \ - file://0001-smt-Make-status-and-length-volatile-for-mod_smt_memo.patch \ -" -SRCREV = "043de77f220a0b4b0ec3aa367bd515a9e9df2a29" +SRC_URI = "gitsm://github.com/ARM-software/SCP-firmware.git;protocol=https;branch=master" + +SRCREV = "77ffab90a9f6071850475087cc5d40610c621126" PROVIDES += "virtual/control-processor-firmware" From patchwork Mon Dec 6 18:03:12 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ross Burton X-Patchwork-Id: 1049 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from aws-us-west-2-korg-lkml-1.web.codeaurora.org (localhost.localdomain [127.0.0.1]) by smtp.lore.kernel.org (Postfix) with ESMTP id 42D6EC433FE for ; Mon, 6 Dec 2021 18:03:19 +0000 (UTC) Received: from foss.arm.com (foss.arm.com [217.140.110.172]) by mx.groups.io with SMTP id smtpd.web11.55412.1638813797868673075 for ; Mon, 06 Dec 2021 10:03:18 -0800 Authentication-Results: mx.groups.io; dkim=missing; spf=pass (domain: arm.com, ip: 217.140.110.172, mailfrom: ross.burton@arm.com) Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.121.207.14]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id 0F4A911FB for ; Mon, 6 Dec 2021 10:03:17 -0800 (PST) Received: from oss-tx204.lab.cambridge.arm.com (usa-sjc-imap-foss1.foss.arm.com [10.121.207.14]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id AF59A3F73B for ; Mon, 6 Dec 2021 10:03:16 -0800 (PST) From: Ross Burton To: meta-arm@lists.yoctoproject.org Subject: [PATCH 2/2] arm-bsp/scp-firmware: update for 2.9 Date: Mon, 6 Dec 2021 18:03:12 +0000 Message-Id: <20211206180312.1712721-2-ross.burton@arm.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20211206180312.1712721-1-ross.burton@arm.com> References: <20211206180312.1712721-1-ross.burton@arm.com> MIME-Version: 1.0 List-Id: X-Webhook-Received: from li982-79.members.linode.com [45.33.32.79] by aws-us-west-2-korg-lkml-1.web.codeaurora.org with HTTPS for ; Mon, 06 Dec 2021 18:03:19 -0000 X-Groupsio-URL: https://lists.yoctoproject.org/g/meta-arm/message/2549 Use a generic wildcard in the arm-bsp bbappend to avoid needing to rename in the future. Remove the N1SDP patch as this has now been merged upstream (c5e45a7). Remove TC? overrides which pinned it to an intermediate SHA. Signed-off-by: Ross Burton --- ...ng-coresight-debug-non-secure-access.patch | 38 ------------------- .../scp-firmware/scp-firmware-n1sdp.inc | 6 --- .../scp-firmware/scp-firmware-tc.inc | 10 ----- ..._2.8%.bbappend => scp-firmware_%.bbappend} | 0 4 files changed, 54 deletions(-) delete mode 100644 meta-arm-bsp/recipes-bsp/scp-firmware/files/n1sdp/enabling-coresight-debug-non-secure-access.patch rename meta-arm-bsp/recipes-bsp/scp-firmware/{scp-firmware_2.8%.bbappend => scp-firmware_%.bbappend} (100%) diff --git a/meta-arm-bsp/recipes-bsp/scp-firmware/files/n1sdp/enabling-coresight-debug-non-secure-access.patch b/meta-arm-bsp/recipes-bsp/scp-firmware/files/n1sdp/enabling-coresight-debug-non-secure-access.patch deleted file mode 100644 index 713f4a5e..00000000 --- a/meta-arm-bsp/recipes-bsp/scp-firmware/files/n1sdp/enabling-coresight-debug-non-secure-access.patch +++ /dev/null @@ -1,38 +0,0 @@ -[PATCH] n1sdp: Enabling CoreSight debug non-secure access - -Upstream-Status: Pending [Not submitted to upstream yet] - -Signed-off-by: Khasim Syed Mohammed - -From 194e6239737272c3fadb202deb8015cb6e8df6ec Mon Sep 17 00:00:00 2001 -From: Khasim Mohammed -Date: Thu, 22 Apr 2021 15:48:02 +0100 -Subject: [PATCH] n1sdp: Enabling CoreSight debug non-secure access - -This patch enables coresight to work with n1sdp c2c profile. - -Signed-off-by: Khasim Syed Mohammed ---- - product/n1sdp/module/n1sdp_system/src/mod_n1sdp_system.c | 6 ++++++ - 1 file changed, 6 insertions(+) - -diff --git a/product/n1sdp/module/n1sdp_system/src/mod_n1sdp_system.c b/product/n1sdp/module/n1sdp_system/src/mod_n1sdp_system.c -index 70e2ec3f..ff380ae2 100644 ---- a/product/n1sdp/module/n1sdp_system/src/mod_n1sdp_system.c -+++ b/product/n1sdp/module/n1sdp_system/src/mod_n1sdp_system.c -@@ -466,6 +466,12 @@ static int n1sdp_system_init_primary_core(void) - return status; - } - -+ else { -+ /* Enable non-secure CoreSight debug access */ -+ FWK_LOG_INFO("N1SDP SYSTEM] Enabling CoreSight debug non-secure access"); -+ *(volatile uint32_t *)(AP_SCP_SRAM_OFFSET + -+ NIC_400_SEC_0_CSAPBM_OFFSET) = 0xFFFFFFFF; -+ } - return FWK_SUCCESS; - } - --- -2.17.1 - diff --git a/meta-arm-bsp/recipes-bsp/scp-firmware/scp-firmware-n1sdp.inc b/meta-arm-bsp/recipes-bsp/scp-firmware/scp-firmware-n1sdp.inc index 506eeec2..1af68dde 100644 --- a/meta-arm-bsp/recipes-bsp/scp-firmware/scp-firmware-n1sdp.inc +++ b/meta-arm-bsp/recipes-bsp/scp-firmware/scp-firmware-n1sdp.inc @@ -3,12 +3,6 @@ SCP_PLATFORM = "n1sdp" SCP_LOG_LEVEL = "INFO" -FILESEXTRAPATHS:prepend := "${THISDIR}/files/:" - -SRC_URI:append = " \ - file://enabling-coresight-debug-non-secure-access.patch \ - " - COMPATIBLE_MACHINE:n1sdp = "n1sdp" DEPENDS += "fiptool-native" diff --git a/meta-arm-bsp/recipes-bsp/scp-firmware/scp-firmware-tc.inc b/meta-arm-bsp/recipes-bsp/scp-firmware/scp-firmware-tc.inc index 8751315a..cdf1bb6a 100644 --- a/meta-arm-bsp/recipes-bsp/scp-firmware/scp-firmware-tc.inc +++ b/meta-arm-bsp/recipes-bsp/scp-firmware/scp-firmware-tc.inc @@ -1,15 +1,5 @@ # TC0 specific SCP configuration -# Intermediate SHA with 2.8 baseline version -SRCREV = "26c858b46824a8d74a7593325a0124c163de65d6" - -PV = "2.8.0+git${SRCPV}" - -# This is incorporated into the SRCREV above -SRC_URI:remove = " \ - file://0001-smt-Make-status-and-length-volatile-for-mod_smt_memo.patch \ - " - COMPATIBLE_MACHINE = "(tc?)" SCP_PLATFORM:tc0 = "tc0" diff --git a/meta-arm-bsp/recipes-bsp/scp-firmware/scp-firmware_2.8%.bbappend b/meta-arm-bsp/recipes-bsp/scp-firmware/scp-firmware_%.bbappend similarity index 100% rename from meta-arm-bsp/recipes-bsp/scp-firmware/scp-firmware_2.8%.bbappend rename to meta-arm-bsp/recipes-bsp/scp-firmware/scp-firmware_%.bbappend