lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <astoz72ufcybla5mmueweeizsyn4p6xcprt63ld7hzrcyb7hid@ionwygzp4464>
Date: Mon, 15 Sep 2025 20:04:09 +0530
From: Manivannan Sadhasivam <mani@...nel.org>
To: Bjorn Helgaas <helgaas@...nel.org>
Cc: Jingoo Han <jingoohan1@...il.com>, 
	Lorenzo Pieralisi <lpieralisi@...nel.org>, Krzysztof Wilczyński <kwilczynski@...nel.org>, 
	Rob Herring <robh@...nel.org>, Bjorn Helgaas <bhelgaas@...gle.com>, 
	Krzysztof Kozlowski <krzk@...nel.org>, Alim Akhtar <alim.akhtar@...sung.com>, 
	Jonathan Chocron <jonnyc@...zon.com>, linux-pci@...r.kernel.org, linux-arm-kernel@...ts.infradead.org, 
	linux-samsung-soc@...r.kernel.org, linux-kernel@...r.kernel.org, linux-arm-msm@...r.kernel.org, 
	Krishna Chaitanya Chundru <krishna.chundru@....qualcomm.com>
Subject: Re: [PATCH v9 3/4] PCI: qcom: Prepare for the DWC ECAM enablement

On Fri, Sep 12, 2025 at 04:50:53PM GMT, Bjorn Helgaas wrote:
> On Tue, Sep 09, 2025 at 12:37:52PM +0530, Manivannan Sadhasivam wrote:
> > From: Krishna Chaitanya Chundru <krishna.chundru@....qualcomm.com>
> > 
> > To support the DWC ECAM mechanism, prepare the driver by performing below
> > configurations:
> > 
> >   1. Since the ELBI region will be covered by the ECAM 'config' space,
> >      override the 'elbi_base' with the address derived from 'dbi_base' and
> >      the offset from PARF_SLV_DBI_ELBI register.
> > 
> >   2. Block the transactions from the host bridge to devices other than Root
> >      Port on the root bus to return all F's. This is required when the 'CFG
> >      Shift Feature' of iATU is enabled.
> 
> FWIW, before I noticed your v9, I had updated the comments here to fix
> a few inconsistencies.  Here's the diff:
> 

I will incorporate this in next version.

- Mani

> diff --git a/drivers/pci/controller/dwc/pcie-qcom.c b/drivers/pci/controller/dwc/pcie-qcom.c
> index 7c2b2c8c61c2..962f0311a23a 100644
> --- a/drivers/pci/controller/dwc/pcie-qcom.c
> +++ b/drivers/pci/controller/dwc/pcie-qcom.c
> @@ -343,15 +343,15 @@ static void qcom_pci_config_ecam(struct dw_pcie_rp *pp)
>  	writel_relaxed(upper_32_bits(pci->dbi_phys_addr), pcie->parf + PARF_ECAM_BASE_HI);
>  
>  	/*
> -	 * The only device on root bus is a single Root Port. So if PCI core
> -	 * tries to access any devices other than Device/Function (0.0) in Bus
> -	 * 0, the TLP will go outside of the controller to the PCI bus. But with
> -	 * CFG Shift Feature (ECAM) enabled in iATU, there is no guarantee that
> -	 * the response is going to be all F's. Hence, to make sure that the
> +	 * The only device on the root bus is a single Root Port. If we try to
> +	 * access any devices other than Device/Function 00.0 on Bus 0, the TLP
> +	 * will go outside of the controller to the PCI bus. But with CFG Shift
> +	 * Feature (ECAM) enabled in iATU, there is no guarantee that the
> +	 * response is going to be all F's. Hence, to make sure that the
>  	 * requester gets all F's response for accesses other than the Root
> -	 * Port, configure iATU to 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).
> +	 * Port, configure iATU to 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).
>  	 */
>  	addr = pci->dbi_phys_addr + SZ_4K;
>  	writel_relaxed(lower_32_bits(addr), pcie->parf + PARF_BLOCK_SLV_AXI_WR_BASE);
> @@ -1385,7 +1385,7 @@ static int qcom_pcie_host_init(struct dw_pcie_rp *pp)
>  	if (pp->ecam_enabled) {
>  		/*
>  		 * Override ELBI when ECAM is enabled, as when ECAM
> -		 * is enabled ELBI moves along with the dbi config space.
> +		 * is enabled ELBI moves along with the DBI config space.
>  		 */
>  		offset = FIELD_GET(SLV_DBI_ELBI_ADDR_BASE, readl(pcie->parf + PARF_SLV_DBI_ELBI));
>  		pci->elbi_base = pci->dbi_base + offset;

-- 
மணிவண்ணன் சதாசிவம்

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ