mirror of
https://git.yoctoproject.org/meta-arm
synced 2026-06-02 13:30:09 +00:00
arm-bsp/corstone1000: Remove inappropriate kernel delay patch
When booting, the tee driver from kernel side invokes a yielding call to OP-TEE, which gets stuck because OP-TEE never sends Done response: OPTEE_FFA_YIELDING_CALL_RETURN_DONE This issue was previously resolved by introducing an inappropriate patch to the kernel with 1 ms delay in ffa_msg_send_direct_req. Further investigation proved that OP-TEE doesn't get enough processing time and is constantly interrupted by the kernel requests. To remove this patch, TF-A logging level is lowered to default (40 in debug builds and 20 in release builds), which eliminates the time consumed previously by TF-A VERBOSE logs (giving OP-TEE more processing time). Signed-off-by: Mariam Elshakfy <mariam.elshakfy@arm.com> Signed-off-by: Jon Mason <jon.mason@arm.com>
This commit is contained in:
committed by
Jon Mason
parent
a703cdf09b
commit
eb49bb6ea2
@@ -24,6 +24,16 @@ TFA_SPMD_SPM_AT_SEL2 = "0"
|
|||||||
# BL2 loads BL32 (optee). So, optee needs to be built first:
|
# BL2 loads BL32 (optee). So, optee needs to be built first:
|
||||||
DEPENDS += "optee-os"
|
DEPENDS += "optee-os"
|
||||||
|
|
||||||
|
# Note: Regarding the build option: LOG_LEVEL.
|
||||||
|
# There seems to be an issue when setting it
|
||||||
|
# to 50 (LOG_LEVEL_VERBOSE), where the kernel
|
||||||
|
# tee driver sends yielding requests to OP-TEE
|
||||||
|
# at a faster pace than OP-TEE processes them,
|
||||||
|
# as the processing time is consumed by logging
|
||||||
|
# in TF-A. When this issue occurs, booting halts
|
||||||
|
# as soon as optee driver starts initialization.
|
||||||
|
# Therefore, it's not currently recommended to
|
||||||
|
# set LOG_LEVEL to 50 at all.
|
||||||
EXTRA_OEMAKE:append = " \
|
EXTRA_OEMAKE:append = " \
|
||||||
ARCH=aarch64 \
|
ARCH=aarch64 \
|
||||||
TARGET_PLATFORM=${TFA_TARGET_PLATFORM} \
|
TARGET_PLATFORM=${TFA_TARGET_PLATFORM} \
|
||||||
@@ -41,5 +51,4 @@ EXTRA_OEMAKE:append = " \
|
|||||||
ERRATA_A35_855472=1 \
|
ERRATA_A35_855472=1 \
|
||||||
ROT_KEY=plat/arm/board/common/rotpk/arm_rotprivk_rsa.pem \
|
ROT_KEY=plat/arm/board/common/rotpk/arm_rotprivk_rsa.pem \
|
||||||
BL32=${RECIPE_SYSROOT}/${nonarch_base_libdir}/firmware/tee-pager_v2.bin \
|
BL32=${RECIPE_SYSROOT}/${nonarch_base_libdir}/firmware/tee-pager_v2.bin \
|
||||||
LOG_LEVEL=50 \
|
|
||||||
"
|
"
|
||||||
|
|||||||
-37
@@ -1,37 +0,0 @@
|
|||||||
From 555ac46f6f5157741a6fd8f21f74beb1340ed941 Mon Sep 17 00:00:00 2001
|
|
||||||
From: Emekcan <emekcan.aras@arm.com>
|
|
||||||
Date: Thu, 13 Oct 2022 20:53:42 +0100
|
|
||||||
Subject: [PATCH] Adds workaround for cs1k specific bug
|
|
||||||
|
|
||||||
Adds a temporary workaround to solve a possible
|
|
||||||
race-conditioning issue in the tee driver
|
|
||||||
for corstone1000.
|
|
||||||
|
|
||||||
Upstream-Status: Inappropriate
|
|
||||||
Signed-off-by: Emekcan Aras <emekcan.aras@arm.com>
|
|
||||||
Signed-off-by: Rui Miguel Silva <rui.silva@linaro.org>
|
|
||||||
---
|
|
||||||
drivers/firmware/arm_ffa/driver.c | 3 ++-
|
|
||||||
1 file changed, 2 insertions(+), 1 deletion(-)
|
|
||||||
|
|
||||||
diff --git a/drivers/firmware/arm_ffa/driver.c b/drivers/firmware/arm_ffa/driver.c
|
|
||||||
index 2109cd178ff7..c15b3a83c720 100644
|
|
||||||
--- a/drivers/firmware/arm_ffa/driver.c
|
|
||||||
+++ b/drivers/firmware/arm_ffa/driver.c
|
|
||||||
@@ -32,6 +32,7 @@
|
|
||||||
#include <linux/scatterlist.h>
|
|
||||||
#include <linux/slab.h>
|
|
||||||
#include <linux/uuid.h>
|
|
||||||
+#include <linux/delay.h>
|
|
||||||
|
|
||||||
#include "common.h"
|
|
||||||
|
|
||||||
@@ -282,7 +283,7 @@ static int ffa_msg_send_direct_req(u16 src_id, u16 dst_id, bool mode_32bit,
|
|
||||||
{
|
|
||||||
u32 req_id, resp_id, src_dst_ids = PACK_TARGET_INFO(src_id, dst_id);
|
|
||||||
ffa_value_t ret;
|
|
||||||
-
|
|
||||||
+ msleep(1);
|
|
||||||
if (mode_32bit) {
|
|
||||||
req_id = FFA_MSG_SEND_DIRECT_REQ;
|
|
||||||
resp_id = FFA_MSG_SEND_DIRECT_RESP;
|
|
||||||
@@ -30,7 +30,6 @@ LINUX_KERNEL_TYPE:corstone1000 = "standard"
|
|||||||
KERNEL_EXTRA_ARGS:corstone1000 += "CONFIG_INITRAMFS_COMPRESSION_NONE=y"
|
KERNEL_EXTRA_ARGS:corstone1000 += "CONFIG_INITRAMFS_COMPRESSION_NONE=y"
|
||||||
SRC_URI:append:corstone1000 = " \
|
SRC_URI:append:corstone1000 = " \
|
||||||
file://defconfig \
|
file://defconfig \
|
||||||
file://0002-Adds-workaround-for-cs1k-specific-bug.patch \
|
|
||||||
"
|
"
|
||||||
|
|
||||||
SRC_URI:append:corstone1000 = " ${@bb.utils.contains('MACHINE_FEATURES', \
|
SRC_URI:append:corstone1000 = " ${@bb.utils.contains('MACHINE_FEATURES', \
|
||||||
|
|||||||
Reference in New Issue
Block a user