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 562AA30E0D9 for ; Fri, 28 Nov 2025 10:52:10 +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=1764327132; cv=none; b=RRaq6pFLBCGi6AAI/R/cTohobvIX2i0gaboG5GsTnNWrbluIk/GSegMhapyJSJDIVYf3sPvYzdrsT8JA7xnVeLEbl1kTQ5pt3WY7yEOuookZloz0XHq5fZVbak+5pRxwxQHHFavyNkXctPpyrNzHGbr8lTtgvqARDTK+CiMk8xQ= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1764327132; c=relaxed/simple; bh=RPmxVLBfpCHVLHwRjkIdjCGzbN28a0PTPzEMX/3sFlw=; h=Message-ID:Date:MIME-Version:Subject:To:Cc:References:From: In-Reply-To:Content-Type; b=MkdA22fuWjwL8TNECtK8fos0LFTLv/v9W0DWYknfFtdt2/SJbShajBOK0p4qmNxxz614bsEtNhwFkwymWxGcKiSRJIcAVSpAhy+x0UpXzD/yVtw5EA/ip6IlYe5Bhv8M1/mgcxPEmpMFYnrjkpq/xQaCr1vLkYH7RZsdl9j3Q1E= 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=FvrxJgYP; dkim=pass (2048-bit key) header.d=oss.qualcomm.com header.i=@oss.qualcomm.com header.b=h+KXACsd; 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="FvrxJgYP"; dkim=pass (2048-bit key) header.d=oss.qualcomm.com header.i=@oss.qualcomm.com header.b="h+KXACsd" Received: from pps.filterd (m0279866.ppops.net [127.0.0.1]) by mx0a-0031df01.pphosted.com (8.18.1.11/8.18.1.11) with ESMTP id 5AS8NlAk3122964 for ; Fri, 28 Nov 2025 10:52:09 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= 86KnzvGu3GEj7n2OOgrtzoYiFDBvCiTUgmN8lQcrmNg=; b=FvrxJgYP2KlyfPNd f3zibxh/13UnLllrD+Bmo7nM5c5k61++HFTqbPydw+dH/BgpUVVUikcb06gxcQ0h jY98lEeR+LQudUpJ0F6bdtud8pMy9CNe9YtQLah7VhIpA4O9RjVPzSJVV5gW+iMr XPA2rIK/7pB/eTbg3spLupE+c6zBkZLp8t4siT0qjnoXZwLv6PWkh7z6IDvR4ynu bxB8BVSyyX0uElTvTHfhPRQSZYlbnw/TLZ/veZ+kbO+THy33AFYjrT6o8G1CbykH 2FYKpFaxTd5CljXEnWHMm2O7ZPnZezat84nrZvWn5nxWEFAso2i9aui9spz5Owgq OKAZQA== Received: from mail-qt1-f199.google.com (mail-qt1-f199.google.com [209.85.160.199]) by mx0a-0031df01.pphosted.com (PPS) with ESMTPS id 4aq58ugxmx-1 (version=TLSv1.3 cipher=TLS_AES_128_GCM_SHA256 bits=128 verify=NOT) for ; Fri, 28 Nov 2025 10:52:09 +0000 (GMT) Received: by mail-qt1-f199.google.com with SMTP id d75a77b69052e-4ee409f1880so2368501cf.1 for ; Fri, 28 Nov 2025 02:52:09 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oss.qualcomm.com; s=google; t=1764327128; x=1764931928; 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=86KnzvGu3GEj7n2OOgrtzoYiFDBvCiTUgmN8lQcrmNg=; b=h+KXACsdjDpXnzG52pEKzH4+be+WpVo46dIWTBr2nXcq3EJ3OorsQKXFoYYFr5Nqfh PDdcOGbEqKEos2k0DqzWJp6kVSbCgwrT1K7H4xVYZO88XbLLnsRAU6QwkANrqebaPjdH ymykGLXSrEkDxQyHPkLZovKB4SwOB/MpgdH6o8MeMGZLvlxnSHJaMIjYyagOTjP0t8sA aVLIu0adMBB2fuWnA02umto4SEftBYbuXWFfqaX5Fa6vafw283SPKq349SImxceYW/8A eFI7lPGSN2bL8FgTwxxZzq+TLH56zrzXNkduwy2aupxkz/VcekSDBe45H0dTz9bcIjhr nb2A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1764327128; x=1764931928; 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=86KnzvGu3GEj7n2OOgrtzoYiFDBvCiTUgmN8lQcrmNg=; b=szj9f493pE7CIVd7R/GjWqmLjW0f6H5XekqlKOkxr7nxc6nOVxDPr51r9gOIHEnxLX w4FLPqTemRXQiblTtZV/oK/oOU6kaRidRgMwZTXBIY9CHisVpXZBXEsdkNPjsBdrf4T+ YuRIdiiesU3wUyEVLA5wp3bXmGHlec96ltmqqYrT+xS3AlYaV0jJXtbD+Dl+t7k2PSc5 MoiaVlP0sEpShriHzRlmlwhF6zKXZhlQOGWzMPjGs6+Hh4Xm9VfU4jzh8uuvSMosDqOC L5YIrUq7zAG/mOal0oHykniNz/ZWWIoPrmLj30evrrxrnp6rLoxpI4CEi5XkSKTXPuLT GnMQ== X-Forwarded-Encrypted: i=1; AJvYcCVgXN1q6JF70S3UXJfqoUwZcfSRgJfj4Ukzjksj1ccbKO5KwL4n+KCeYGsb91+ymdx++yR73+WrxqODAFM=@vger.kernel.org X-Gm-Message-State: AOJu0YzziP2er8RZ/f5RAwXa14G+DfI4gtlmWggr3Ml4/NkcJCV5cJvO afc/3jqk9P3MAnURKO33VjoE1i05vxgTbZU8vj3SgcMFTio0WM8/Om75NSdEN3qUumsfCFv0Aue GX4R2POndGie+ODtvKaVCDRNBwObMovDfL0a/19s3mEtK9JjflSpGPK+s4ErHcHpVrSc= X-Gm-Gg: ASbGnctISamSfCm+HAjjQxrIpHYZdoXioR+5kLrefNbR70VfmpRNixRfk2Kx5CIsEGi noROMbZPaitNW6I8/XeM1HCYYCUKfANSVsofeR+FgEOnP/iLNhGxG24poyvVnQk+1/CWIOOfeF1 6B7rDi11sCNTQNtVpagsn3aqHJsIDHQ5v8zM/mSHrqeZefSV2DkISXE3aPLymEMWlr9bmVCHVZo PACWvYPczcwu9bSTL0WvC/7aNau1miWrXOwcEWvwdKwt1bAjSZBLRsh2q2D84iXD+pmX8hetjAF M8pLmhW2FZC49x97Dz+k4E+00Df5WecyYFuWC+yTXO1aKlD4gy/mJo5E3z/bZ706HfU5Dhxzrhp Qt+bKQBv1vDN1NIJVqr4iNdKlM0jNZXgsnom5kcahfL9gzcWr/2S5jYOkq3VR1Gm87vk= X-Received: by 2002:ac8:5882:0:b0:4ee:4214:3226 with SMTP id d75a77b69052e-4ee5890a538mr263138131cf.6.1764327128345; Fri, 28 Nov 2025 02:52:08 -0800 (PST) X-Google-Smtp-Source: AGHT+IE/MIO+8FIzsXep4B/K57A72tSDQlBayZ3YTQpTuQMWVPS7WSrr05XyaZaNVpxOe7smpAv5jg== X-Received: by 2002:ac8:5882:0:b0:4ee:4214:3226 with SMTP id d75a77b69052e-4ee5890a538mr263137811cf.6.1764327127865; Fri, 28 Nov 2025 02:52:07 -0800 (PST) Received: from [192.168.119.202] (078088045245.garwolin.vectranet.pl. [78.88.45.245]) by smtp.gmail.com with ESMTPSA id a640c23a62f3a-b76f51c68d0sm420699666b.28.2025.11.28.02.52.05 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Fri, 28 Nov 2025 02:52:07 -0800 (PST) Message-ID: <1f2c4e5b-2d7d-41cd-9772-374e3de46a50@oss.qualcomm.com> Date: Fri, 28 Nov 2025 11:52:04 +0100 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] arm64: dts: qcom: x1e: bus is 40-bits (fix 64GB models) To: Stephan Gerhold , Jonathan Marek Cc: linux-arm-msm@vger.kernel.org, Bjorn Andersson , Konrad Dybcio , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Sibi Sankar , Abel Vesa , Rajendra Nayak , "open list:OPEN FIRMWARE AND FLATTENED DEVICE TREE BINDINGS" , open list References: <20251127212943.24480-1-jonathan@marek.ca> Content-Language: en-US From: Konrad Dybcio In-Reply-To: Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-Proofpoint-GUID: WzP16d4wQa8hVUjanDU6xGdpB98cibUN X-Authority-Analysis: v=2.4 cv=UKvQ3Sfy c=1 sm=1 tr=0 ts=69297ed9 cx=c_pps a=WeENfcodrlLV9YRTxbY/uA==:117 a=FpWmc02/iXfjRdCD7H54yg==:17 a=IkcTkHD0fZMA:10 a=6UeiqGixMTsA:10 a=s4-Qcg_JpJYA:10 a=VkNPw1HP01LnGYTKEx00:22 a=RAbU-raeAAAA:8 a=5eqlAXZ72RyB-Na0XcUA:9 a=QEXdDO2ut3YA:10 a=kacYvNCVWA4VmyqE58fU:22 a=JiizpSU_mAIq9zsZDqn2:22 X-Proofpoint-Spam-Details-Enc: AW1haW4tMjUxMTI4MDA3OSBTYWx0ZWRfX8rlNUCOBxXZp IKJfhsoOhM/ucC7ZFaTBNsqDTy+OhQEyWkBquqWtBuPVdueSk8BdOTRq9FRKGyWxEii6T3rCUT+ ALAzuw9tUXdP44H0SbKkBqR98N+kGtiTagX2nYUQr7hXIv1GHKoxSz0q4KPbCrhIzteMhTm79kD OA5QBQX1MHR+1eyRILhK8ELhATlQgP4sBnyBx5fJMnPwbuiBsHaUlqFzXkCasTerDxnHPN3jjJG q1xRzVJwW3YyhRvqNhxnWB8so71tR6uATw9EOgDZvJ/ZKZmjFj6k5sWfl3HLyKUdNlpoYsurVEC C45IhUU9xCOhT29m6xUibijyIE3SRHdYHhEDXrs0MNPOnj94PIMMJp4vlyPQZiRYF32QXdVbeDv BQhnA7YUyzHWy6MQ7dtadg3+HTZhwQ== X-Proofpoint-ORIG-GUID: WzP16d4wQa8hVUjanDU6xGdpB98cibUN X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.293,Aquarius:18.0.1121,Hydra:6.1.9,FMLib:17.12.100.49 definitions=2025-11-28_03,2025-11-27_02,2025-10-01_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 bulkscore=0 phishscore=0 priorityscore=1501 impostorscore=0 suspectscore=0 lowpriorityscore=0 adultscore=0 clxscore=1015 spamscore=0 malwarescore=0 classifier=typeunknown authscore=0 authtc= authcc= route=outbound adjust=0 reason=mlx scancount=1 engine=8.22.0-2510240001 definitions=main-2511280079 On 11/28/25 11:26 AM, Stephan Gerhold wrote: > On Thu, Nov 27, 2025 at 04:29:42PM -0500, Jonathan Marek wrote: >> Unlike the phone SoCs this was copied from, x1e has a 40-bit physical bus. >> The upper address space is used to support more than 32GB of memory. >> >> This fixes issues when DMA buffers are allocated outside the 36-bit range. >> >> Fixes: af16b00578a7 ("arm64: dts: qcom: Add base X1E80100 dtsi and the QCP dts") >> Signed-off-by: Jonathan Marek >> --- >> arch/arm64/boot/dts/qcom/x1e80100.dtsi | 4 ++-- >> 1 file changed, 2 insertions(+), 2 deletions(-) >> >> diff --git a/arch/arm64/boot/dts/qcom/x1e80100.dtsi b/arch/arm64/boot/dts/qcom/x1e80100.dtsi >> index cff34d1c74b60..cd34ce5dfd63a 100644 >> --- a/arch/arm64/boot/dts/qcom/x1e80100.dtsi >> +++ b/arch/arm64/boot/dts/qcom/x1e80100.dtsi >> @@ -792,8 +792,8 @@ soc: soc@0 { >> >> #address-cells = <2>; >> #size-cells = <2>; >> - dma-ranges = <0 0 0 0 0x10 0>; >> - ranges = <0 0 0 0 0x10 0>; >> + dma-ranges = <0 0 0 0 0x100 0>; >> + ranges = <0 0 0 0 0x100 0>; >> > > Could you clarify which "issues" (crashes?) you are referring to? > > We need to distinguish two distinct use cases here, which are both > (somewhat) supported upstream: Running in EL1 with the Gunyah hypervisor > with the regular DTB and in EL2 with the x1-el2.dtbo applied. > > # EL2 with x1-el2.dtbo > > For EL2, I think the 40-bit dma-ranges should indeed work correctly, so > we could add your proposed change inside x1-el2.dtso. I'm not sure which > issues we are fixing with that though (besides correctness of the > hardware description). In EL2, all DMA devices should be behind an > IOMMU. In this case, the dma-ranges limit the size of the I/O virtual > addresses (DMA addresses) that are given to the devices. The IOMMU maps > the DMA buffers to arbitrary physical memory addresses (including > outside of the 36-bit range, dma-ranges limits only the DMA address). I've been carrying something similar in my working tree for quite some time too.. The USB4 PCIe controllers have BAR spaces in the >36b region, so this will be necessary anyway. As for the broken-firmware laptops, there's only so much we can do. A fix for this has been *long* released, but it's up to the OEMs to pull it in. I'm not fully sure, but I think certain subsystems still have the 36b address limitation (camera?), so it would be good to know whether that needs to be accounted for Konrad