From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mx0a-0031df01.pphosted.com (mx0a-0031df01.pphosted.com [205.220.168.131]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id B37FC3C5DB6 for ; Fri, 24 Apr 2026 12:17:11 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=205.220.168.131 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1777033034; cv=none; b=B3YYQg2VK9OBhdAfgHvCbRJNcEsW6xqNTQ3fMDIcl8LJ0+JBBIYDL/IiTXqiXQnp3cVY4j02/0hAtq+g/n7/5p+ylpx3GXsgzCcXnbFqfIcUaD0z7MW/CHj6gTarZHPZ2nywFf0Nnm02IpFwhH7MgNIZgZtn4LFwXjQW+aV+Z9Q= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1777033034; c=relaxed/simple; bh=pPuoFRQxJfAFFUeV5WPhraCPAwF1U+Vv1E+a3uywyL4=; h=Message-ID:Date:MIME-Version:Subject:To:Cc:References:From: In-Reply-To:Content-Type; b=aCl4V2Dz6BcEJUZulGQl/PynUyC+4fTMsSGZi7HdGP7k1CU6jBW7wchg91IuT1xED5ZBF/MZAdkF9lroNzf3Xrfau0ubsMiEaia3XJ4hKc/BQpGGw9FRzU3fHrOXF+HPY7vE9BlbGH1BusY9jjmhLGgo5WLin8K54y+uv0+p9h4= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=oss.qualcomm.com; spf=pass smtp.mailfrom=oss.qualcomm.com; dkim=pass (2048-bit key) header.d=qualcomm.com header.i=@qualcomm.com header.b=UOjw4hBc; dkim=pass (2048-bit key) header.d=oss.qualcomm.com header.i=@oss.qualcomm.com header.b=crYLlpWb; arc=none smtp.client-ip=205.220.168.131 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=oss.qualcomm.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=oss.qualcomm.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=qualcomm.com header.i=@qualcomm.com header.b="UOjw4hBc"; dkim=pass (2048-bit key) header.d=oss.qualcomm.com header.i=@oss.qualcomm.com header.b="crYLlpWb" Received: from pps.filterd (m0279865.ppops.net [127.0.0.1]) by mx0a-0031df01.pphosted.com (8.18.1.11/8.18.1.11) with ESMTP id 63O8BEdq2291588 for ; Fri, 24 Apr 2026 12:17:10 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=qualcomm.com; h= cc:content-transfer-encoding:content-type:date:from:in-reply-to :message-id:mime-version:references:subject:to; s=qcppdkim1; bh= ZzWcgJ/Dtl8c/5T8awq70D37ra01xcQo1QTV/P6feBk=; b=UOjw4hBcPoQ6FuiV PNOfrnC+gUlQe/TO9OlDKMNpqaKtlvwbdazOBbPqS6AXQhS7D/S8ca4dSV515zJ3 TYEBOI7cdm4Q4LcC5SXoM6OL/XBtMVu+OZjgW0X2hvxWkCgrUUMzJLEPtuTzz5ph zAdZTau9MeITlbH4h2t4HyY4a2OdHQHGHbrsTGmMprFYcLOuyte4NEGv63X2phr7 awCROwPDJln4aJ6jeQgQWSOO3jqX2zxQsLK3NPl86rvqqg+Ra/FqVJ+K+EHnMcIC iBANg3KahC8MLXKACxEKjvHpisOZbW1mS2Jg1RCdv6bYN05Bsul6ndBH/P6fBKu4 05dBBg== Received: from mail-qv1-f70.google.com (mail-qv1-f70.google.com [209.85.219.70]) by mx0a-0031df01.pphosted.com (PPS) with ESMTPS id 4dqxbpak68-1 (version=TLSv1.3 cipher=TLS_AES_128_GCM_SHA256 bits=128 verify=NOT) for ; Fri, 24 Apr 2026 12:17:10 +0000 (GMT) Received: by mail-qv1-f70.google.com with SMTP id 6a1803df08f44-8b047093195so14579046d6.3 for ; Fri, 24 Apr 2026 05:17:10 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oss.qualcomm.com; s=google; t=1777033030; x=1777637830; darn=vger.kernel.org; h=content-transfer-encoding:in-reply-to:from:content-language :references:cc:to:subject:user-agent:mime-version:date:message-id :from:to:cc:subject:date:message-id:reply-to; bh=ZzWcgJ/Dtl8c/5T8awq70D37ra01xcQo1QTV/P6feBk=; b=crYLlpWbjZWTiT99w92oHWBLByonn9NrMXOcgu3Zsm7N+ljk9O7v7OBKWTSUM31yLc KFam9qw/AzCmIwWzvnLDDW6TyC6T3Ob++ZYIzelPh760zQRARaw5aEWf+5RTljQSKByD gMZtVT+Q836f2gB4zV1QhWPHh1ojphq2pOdSD0akVBs+9pn+7sWPD0jh47DIQcL1FoHZ 3ZgN6uEfwi9hiiL8TxdIi/1ZSH1ng/IDWBZYgFz+MKHl1Z6Z5Jpamtcd/sErHbzJYcNf 992Xclh0zeYfDWZm8+fAPMvs5/YszXzej/KbyA41uC3Vx3u6x2HBaphstHMNF70lSCVs aKsQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1777033030; x=1777637830; h=content-transfer-encoding:in-reply-to:from:content-language :references:cc:to:subject:user-agent:mime-version:date:message-id :x-gm-gg:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=ZzWcgJ/Dtl8c/5T8awq70D37ra01xcQo1QTV/P6feBk=; b=qoDGOBTlnPMSuubtdNYoFZMV3nMVdIHAkfy5EXSnoL03Egd5C4/oalsqofEQFkwjAI 7bi+I8Xh7ilmKhxYvokSzUKOujcpwFZXGY1MVapkUfEmT7EeHIqK/j1vvB1uwpzjYt+4 FSOjujQWx9aQf3gMiCd1LgvZXsYSl56nz7IfuGa/vqG6RQqEFxkzoB+k7R71/a9gaHsw c2+Ijmh0qaoIqnWSoLBfj+8HuUgoxo3MOwXHKjQvqO54JD8MZBp8eLn38WOxTQZjqJ02 hR2Taw5LP+6FjPSkI3fI8OOG6C030jUv+CPXkFsrrlfIfd7l4+GqnbSphKLsOGXOFo0C dJmQ== X-Forwarded-Encrypted: i=1; AFNElJ+IGI2c11GuceRdGVN/j2ywrccNEfSxZjcsYh4/zGGobk4S4lHhOoOAbFeTehefLcibJwU7Ww/GvZPf6nA=@vger.kernel.org X-Gm-Message-State: AOJu0Yze1EG48Bi1BCsrCvhN/r8QubNcKoNtgsiDkXJRkw2qWi/z/Vpa zcmVShyX9/i9XqwoRHTQbwgnZxq6QAwfx23/YCbg8Ce7QPqYIAlq9xBOW/Qj6fQW15mlikrkOsm BfAvGYS3JZksZCaTCkb2hyguzISwGih1UsU6Ui7HXOzK8IQbn+T1sH4/sf1HHGKyIXzk= X-Gm-Gg: AeBDievV3H1a+HcQJR36d6c1acdyfe77vyTIFtfqxi4Axy35vRcbY2itKBzE2z8x5XR vqg6QweI0x5yvEfSXxHDyYYEzTRTEj3MPz76DdzqSosXCXb0YMcQix1vfxIbOx7ItDxTcn5BmRJ 9ycJRYqcq7L3qF20mTBuDH/z5Qo+L+3+MyZacaLI27PkL+xYr9l5lLtCC1ezKrB9+USJCnOMcBB lNY9nv+F+LSVsaCZ2tN6nYG6ybIZku61rrWrMG2w6T1/HxmFis7PAArMl3AUEcTl90Vysw//uc0 EeH445P+p5G8RNW8+dN+/jUdLFWqahZBEMHXKvNvtQC2TCGX5isYsU6vDuzZwf+kgMeC2r8xOYK lt0Fch7M17uNmdPsiv3Y3c+rHbmGJ/K1aT4XJXGmi+8TqMJ/hdtBzV5dolavpY5e/KRbBZggoSy shnusviDYVrsWcHg== X-Received: by 2002:a05:6214:2466:b0:8ac:8337:ca0e with SMTP id 6a1803df08f44-8b0281d5f4cmr340871406d6.6.1777033029584; Fri, 24 Apr 2026 05:17:09 -0700 (PDT) X-Received: by 2002:a05:6214:2466:b0:8ac:8337:ca0e with SMTP id 6a1803df08f44-8b0281d5f4cmr340871116d6.6.1777033029158; Fri, 24 Apr 2026 05:17:09 -0700 (PDT) Received: from [192.168.119.254] (078088045245.garwolin.vectranet.pl. [78.88.45.245]) by smtp.gmail.com with ESMTPSA id a640c23a62f3a-ba454d1b694sm784657366b.29.2026.04.24.05.17.06 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Fri, 24 Apr 2026 05:17:08 -0700 (PDT) Message-ID: <1397ecd5-89a6-4666-bfe9-014ff8553a97@oss.qualcomm.com> Date: Fri, 24 Apr 2026 14:17:05 +0200 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH v2 0/9] remoteproc: qcom_q6v5_wcss: add native ipq9574 support To: "Alex G." , andersson@kernel.org, krzk+dt@kernel.org, mturquette@baylibre.com, linux-remoteproc@vger.kernel.org Cc: mathieu.poirier@linaro.org, robh@kernel.org, conor+dt@kernel.org, konradybcio@kernel.org, sboyd@kernel.org, p.zabel@pengutronix.de, linux-arm-msm@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-clk@vger.kernel.org References: <20260109043352.3072933-1-mr.nuke.me@gmail.com> <4814455.tdWV9SEqCh@nukework.gtech> <577d547e-6311-49b3-9c74-84797b281447@oss.qualcomm.com> <27098742.6Emhk5qWAg@nukework.gtech> Content-Language: en-US From: Konrad Dybcio In-Reply-To: <27098742.6Emhk5qWAg@nukework.gtech> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-Proofpoint-GUID: ILU5LBFwLznNLBYBUaq1wSNjXdVAQkTu X-Proofpoint-Spam-Details-Enc: AW1haW4tMjYwNDI0MDExNyBTYWx0ZWRfXwJOTDK7DOONo nXHGcfWLmxnr0yCXUiVD74xwLnRL3bKQwf0A9wzm74ULN78Cd2HK3t/uC47O2O8fZF0AoqVmKOB VoyZeOrqhORIW7U/O2xFdkDfYuUBrUQ97Y/7jX6o3xDNynFbgp48O2kZdwG4W+7f8kb9u67rotl qzKoUhwtr2R788kMwk+BGYsATSKd5AGxjSjijcWWYetkH5y2XjEhSCdsxUN+8pMS/DoB6M5wD5Y VHuLzv2zNHg+N9vemVbyjjxfGiKd6hBzXINMlRraPI8zd8gc6XNodKNf3/BVKnr3pC+9mTHamve 89y7mufCIW04v2hSxfVT+vUMRVbJlmbff+PVaiwX9p9CQ02vhMQgtkIm2GPNCf52LtKeTur71Tf zWeWuQ5OmyEtuNquWaLpaPOKjP8jx7lqhuGyQyBhiQrKeF7yeLlRiwiXhCIMGKLN4luPtIBkees U5alNqYg2aFuxgatUgg== X-Proofpoint-ORIG-GUID: ILU5LBFwLznNLBYBUaq1wSNjXdVAQkTu X-Authority-Analysis: v=2.4 cv=X+li7mTe c=1 sm=1 tr=0 ts=69eb5f46 cx=c_pps a=oc9J++0uMp73DTRD5QyR2A==:117 a=FpWmc02/iXfjRdCD7H54yg==:17 a=IkcTkHD0fZMA:10 a=A5OVakUREuEA:10 a=s4-Qcg_JpJYA:10 a=VkNPw1HP01LnGYTKEx00:22 a=u7WPNUs3qKkmUXheDGA7:22 a=Um2Pa8k9VHT-vaBCBUpS:22 a=-XRhzjy3v26zEYFifkcA:9 a=QEXdDO2ut3YA:10 a=iYH6xdkBrDN1Jqds4HTS:22 X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.293,Aquarius:18.0.1143,Hydra:6.1.51,FMLib:17.12.100.49 definitions=2026-04-23_03,2026-04-21_02,2025-10-01_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 malwarescore=0 adultscore=0 bulkscore=0 priorityscore=1501 suspectscore=0 clxscore=1015 impostorscore=0 spamscore=0 phishscore=0 lowpriorityscore=0 classifier=typeunknown authscore=0 authtc= authcc= route=outbound adjust=0 reason=mlx scancount=1 engine=8.22.0-2604200000 definitions=main-2604240117 On 1/15/26 6:27 AM, Alex G. wrote: > On Wednesday, January 14, 2026 4:26:36 AM CST Konrad Dybcio wrote: >> On 1/14/26 4:54 AM, Alex G. wrote: >>> On Tuesday, January 13, 2026 8:28:11 AM CST Konrad Dybcio wrote: >>>> On 1/9/26 5:33 AM, Alexandru Gagniuc wrote: >>>>> Support loading remoteproc firmware on IPQ9574 with the qcom_q6v5_wcss >>>>> driver. This firmware is usually used to run ath11k firmware and enable >>>>> wifi with chips such as QCN5024. >>>>> >>>>> When submitting v1, I learned that the firmware can also be loaded by >>>>> the trustzone firmware. Since TZ is not shipped with the kernel, it >>>>> makes sense to have the option of a native init sequence, as not all >>>>> devices come with the latest TZ firmware. >>>>> >>>>> Qualcomm tries to assure us that the TZ firmware will always do the >>>>> right thing (TM), but I am not fully convinced >>>> >>>> Why else do you think it's there in the firmware? :( >>> >>> A more relevant question is, why do some contributors sincerely believe >>> that the TZ initialization of Q6 firmware is not a good idea for their >>> use case? >>> >>> To answer your question, I think the TZ initialization is an afterthought >>> of the SoC design. I think it was only after ther the design stage that >>> it was brought up that a remoteproc on AHB has out-of-band access to >>> system memory, which poses security concerns to some customers. I think >>> authentication was implemented in TZ to address that. I also think that >>> in order to prevent clock glitching from bypassing such verification, >>> they had to move the initialization sequence in TZ as well. >> >> I wouldn't exactly call it an afterthought.. Image authentication (as in, >> verifying the signature of the ELF) has always been part of TZ, because >> doing so in a user-modifiable context would be absolutely nonsensical >> >> qcom_scm_pas_auth_and_reset() which configures and powers up the rproc >> has been there for a really long time too (at least since the 2012 SoCs >> like MSM8974) and I would guesstimate it's been there for a reason - not >> all clocks can or should be accessible from the OS (from a SW standpoint >> it would be convenient to have a separate SECURE_CC block where all the >> clocks we shouldn't care about are moved, but the HW design makes more >> sense as-is, for the most part), plus there is additional access control >> hardware on the platform that must be configured from a secure context >> (by design) which I assume could be part of this sequence, based on >> the specifics of a given SoC > > What was the original use case for the Q6 remoteproc? I see today's use case > is as a conduit for ath11k firmware to control PCIe devices. Was that always > the case? I imagine a more modern design would treat the remoteproc as > untrusted by putting it under a bridge or IOMMU with more strict memory access > control, so that firmware couldn't access OS memory. There is an SMMU on this SoC. I don't know the original backstory, but if anything, the through-Q6 approach is probably *more* secure, since there's additional access control hardware inbetween Konrad