[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20220107215504.GA406217@bhelgaas>
Date: Fri, 7 Jan 2022 15:55:04 -0600
From: Bjorn Helgaas <helgaas@...nel.org>
To: Pali Rohár <pali@...nel.org>
Cc: Thomas Petazzoni <thomas.petazzoni@...tlin.com>,
Lorenzo Pieralisi <lorenzo.pieralisi@....com>,
Rob Herring <robh@...nel.org>,
Krzysztof Wilczyński <kw@...ux.com>,
Bjorn Helgaas <bhelgaas@...gle.com>,
Marek Behún <kabel@...nel.org>,
linux-pci@...r.kernel.org, linux-arm-kernel@...ts.infradead.org,
linux-kernel@...r.kernel.org
Subject: Re: [PATCH 08/15] PCI: mvebu: Propagate errors when updating
PCI_IO_BASE and PCI_MEM_BASE registers
On Thu, Nov 25, 2021 at 01:45:58PM +0100, Pali Rohár wrote:
> Properly propagate failure from mvebu_pcie_add_windows() function back to
> the caller mvebu_pci_bridge_emul_base_conf_write() and correctly updates
> PCI_IO_BASE, PCI_MEM_BASE and PCI_IO_BASE_UPPER16 registers on error.
> On error set base value higher than limit value which indicates that
> address range is disabled.
Does the spec say that if software programs something invalid,
hardware should proactively set the base and limit registers to
disable the window?
I'm not sure I've seen hardware that does this, and it seems ... maybe
a little aggressive.
What happens if software writes the base and limit in the wrong order,
so the window is invalid after the first write but valid after the
second? That actually sounds like it could be a sensible strategy to
prevent a partially-configured window from being active.
Bjorn
Powered by blists - more mailing lists