Re: [PATCH 13/18] arm64: ioremap: use nGnRnE mappings on platforms that require it

2021-02-10 Thread Mark Kettenis
> From: Hector Martin > Date: Wed, 10 Feb 2021 21:24:15 +0900 Hi Hector, Since device tree bindings are widely used outside the Linux tree, here are some thoughts from a U-Boot and OpenBSD perspective. > Hi Will, I'm pulling you in at Marc's suggestion. Do you have an opinion > on what the bet

Re: [PATCH 13/18] arm64: ioremap: use nGnRnE mappings on platforms that require it

2021-02-10 Thread Hector Martin
Hi Will, I'm pulling you in at Marc's suggestion. Do you have an opinion on what the better solution to this problem is? The executive summary is that Apple SoCs require nGnRnE memory mappings for MMIO, except for PCI space which uses nGnRE. ARM64 currently uses nGnRE everywhere. Solutions dis

Re: [PATCH 13/18] arm64: ioremap: use nGnRnE mappings on platforms that require it

2021-02-09 Thread Hector Martin
On 09/02/2021 18.15, Arnd Bergmann wrote: Right, these are the same ranges that I found in the adt and that Mark listed in his code snippet, so it seems we all see the same partitioning of the address space. I also see them reflected in the /defaults/pmap-io-ranges property in ADT, which seems to

Re: [PATCH 13/18] arm64: ioremap: use nGnRnE mappings on platforms that require it

2021-02-09 Thread Mark Kettenis
> From: Arnd Bergmann > Date: Tue, 9 Feb 2021 10:15:31 +0100 > > On Tue, Feb 9, 2021 at 1:25 AM Hector Martin wrote: > > On 09/02/2021 08.20, Mark Kettenis wrote: > > I probed writing to i<<28 for i = [0..255], using nGnRE. This reveals > > that nGnRE writes are allowed (i.e. either succeed or e

Re: [PATCH 13/18] arm64: ioremap: use nGnRnE mappings on platforms that require it

2021-02-08 Thread Hector Martin
On 09/02/2021 08.20, Mark Kettenis wrote: It is only PCI mmio space that needs to be nGnRE. The PCI host controller register space itself needs nGnRnE just like all other integrated peripherals (or at least it works that way). This is correct. Actually, as I just discovered, nGnRE writes to MM

Re: [PATCH 13/18] arm64: ioremap: use nGnRnE mappings on platforms that require it

2021-02-08 Thread Mark Kettenis
> From: Arnd Bergmann > Date: Mon, 8 Feb 2021 23:57:20 +0100 > > On Thu, Feb 4, 2021 at 9:39 PM Hector Martin wrote: > > > (3) Do it at a lower level, in ioremap() itself. This requires that > > ioremap() somehow discriminates based on address range to pick what > > kind of mapping to m

[PATCH 13/18] arm64: ioremap: use nGnRnE mappings on platforms that require it

2021-02-04 Thread Hector Martin
This follows from the fixmap patch, but relates to the general case. This is a hack, and incomplete. Read on for discussion. The problem: on Apple ARM platforms, SoC MMIO needs to use nGnRnE mappings: writes using nGnRE are blackholed. This seems to be by design, and there doesn't seem to be any f