[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <e278784b-b0e7-9d4d-d7c3-accf8f335de1@oss.qualcomm.com>
Date: Mon, 17 Feb 2025 10:37:01 +0530
From: Krishna Chaitanya Chundru <krishna.chundru@....qualcomm.com>
To: Bjorn Helgaas <helgaas@...nel.org>
Cc: cros-qcom-dts-watchers@...omium.org,
Bjorn Andersson <andersson@...nel.org>,
Konrad Dybcio <konradybcio@...nel.org>, Rob Herring <robh@...nel.org>,
Krzysztof Kozlowski <krzk+dt@...nel.org>,
Conor Dooley
<conor+dt@...nel.org>,
Lorenzo Pieralisi <lpieralisi@...nel.org>,
Krzysztof WilczyĆski <kw@...ux.com>,
Manivannan Sadhasivam <manivannan.sadhasivam@...aro.org>,
Bjorn Helgaas <bhelgaas@...gle.com>, Jingoo Han <jingoohan1@...il.com>,
linux-arm-msm@...r.kernel.org, devicetree@...r.kernel.org,
linux-kernel@...r.kernel.org, linux-pci@...r.kernel.org,
quic_vbadigan@...cinc.com, quic_mrana@...cinc.com,
quic_vpernami@...cinc.com, mmareddy@...cinc.com
Subject: Re: [PATCH v4 4/4] PCI: qcom: Enable ECAM feature
On 2/11/2025 4:24 AM, Bjorn Helgaas wrote:
> On Fri, Feb 07, 2025 at 04:58:59AM +0530, Krishna Chaitanya Chundru wrote:
>> The ELBI registers falls after the DBI space, PARF_SLV_DBI_ELBI register
>> gives us the offset from which ELBI starts. so use this offset and cfg
>> win to map these regions instead of doing the ioremap again.
>
>> + /* Set the ECAM base */
>> + writel_relaxed(lower_32_bits(pci->dbi_phys_addr), pcie->parf + PARF_ECAM_BASE);
>> + writel_relaxed(upper_32_bits(pci->dbi_phys_addr), pcie->parf + PARF_ECAM_BASE_HI);
>> +
>> + /*
>> + * The only device on root bus is the Root Port. Any access other than that
>> + * should not go out of the link and should return all F's. Since the iATU
>> + * is configured for the buses which starts after root bus, block the transactions
>> + * starting from function 1 of the root bus to the end of the root bus (i.e from
>> + * dbi_base + 4kb to dbi_base + 1MB) from going outside the link.
>
> 99% of this file fits in 80 columns. Wrap comments to do the same.
>
> The text doesn't quite make sense because accesses to devices on the
> root bus *never* involve a link. Only Root Ports have links and the
> links all lead to buses other than the root bus.
Hi Bjorn,
As part of enumeration PCIe sw will look read the vendor id's and device
id's under PCIe bus0 to see if there is any multi root ports etc..like
bus0 device1, bus0 device2.
In the first 1MB only first 4kb is used as config space for root port,
remaining memory acts as PCIe memory i.e if we access this memory the
transactions will go outside the link which can trigger some unknown
error.
if there is read request for vendor id for bus0 device2 PCIe sw will
try to access after 4kb region which can cause unknown errors.
So we need to block these transaction from going through PCIe link.
I will update the comment description in the next patch.
- Krishna Chaitanya.
Powered by blists - more mailing lists