From: Alexander Stein <alexander.stein@ew.tq-group.com>
To: Rob Herring <robh+dt@kernel.org>,
Krzysztof Kozlowski <krzysztof.kozlowski+dt@linaro.org>,
Olof Johansson <olof@lixom.net>, Shawn Guo <shawnguo@kernel.org>,
Li Yang <leoyang.li@nxp.com>,
Russell King <linux@armlinux.org.uk>, Marek Vasut <marex@denx.de>,
Marcel Ziswiler <marcel.ziswiler@toradex.com>,
Arnd Bergmann <arnd@arndb.de>
Cc: soc@kernel.org, devicetree@vger.kernel.org,
linux-arm-kernel@lists.infradead.org
Subject: Re: [PATCH 9/9] [DNI] ARM: multi_v7_defconfig: Enable CONFIG_ARM_LPAE for multi_v7_config
Date: Tue, 24 Jan 2023 11:30:23 +0100 [thread overview]
Message-ID: <4775166.GXAFRqVoOG@steina-w> (raw)
In-Reply-To: <7ab893a2-2b4f-47c3-be42-684c3d8ceb5f@app.fastmail.com>
Hi Arnd,
Am Freitag, 20. Januar 2023, 15:00:35 CET schrieb Arnd Bergmann:
> On Fri, Jan 20, 2023, at 13:43, Alexander Stein wrote:
> > Am Donnerstag, 19. Januar 2023, 17:07:30 CET schrieb Arnd Bergmann:
> >> On Thu, Jan 19, 2023, at 16:27, Alexander Stein wrote:
> >>
> >> In particular, it seems that the memory map of the PCI address
> >> spaces is configurable, but only within that area you listed.
> >> I see that section "28.4.2 PEX register descriptions" does list
> >> a 64-bit prefetchable address space in addition to the 32-bit
> >> non-prefetchable memory space, but the 64-bit space is not
> >> listed in the DT. It would be a good idea to configure that
> >> as well in order for devices to work that need a larger BAR,
> >> such as a GPU, but it wouldn't help with fitting the PCIe
> >> into non-LPAE 32-bit CPU address space.
> >
> > I'm not sure if I can follow you here. Do you have some keywords of what's
> > missing there?
>
> Prefetchable_Memory_Base_Register, section 28.4.2.20 in the
> document you pointed me to.
>
> PCIe addressing is usually split up into I/O space (kilobytes of
> registers), non-prefetchable memory space (megabytes of registers
> and memory and prefetchable 64-bit memory space (gigabytes of
> device memory).
>
> The prefetchable space is indicated by bit '30' of the first
> word in the ranges property, so if that is configured, you
> would see a third line there starting with 0xc2000000 or
> 0x42000000. Without this, PCIe cards that have prefetchable
> BARs fall back to the non-prefetchable one, which may be
> too small or less efficient. This is usually only relevant
> for framebuffers on a GPU, but there are probably other
> devices as well.
Thanks for the explanation, although I'm still lacking deeper knowledge how to
configure PCIe properly.
I tried adding the following line in the 'ranges' property:
> <0xc2000000 0x0 0x20000000 0x40 0x20000000 0x0 0x20000000>, /* prefetchable
memory */
which was taken from the old example in Documentation/devicetree/bindings/pci/
layerscape-pci.txt, removed in Commit a3b18f5f1d42e ("dt-bindings: pci:
layerscape-pci: define AER/PME interrupts", 2022-03-11).
But I couldn't detect any difference, maybe it's just due to my PCIe devices I
have available.
> >> In the datasheet I also see that the chip theoretically
> >> supports 8GB of DDR4, which would definitely put it beyond
> >> the highmem limit, even with the 4G:4G memory split. Do you
> >> know if there are ls1021a devices with more than 4GB of
> >> installed memory?
> >
> > Where did you find those 8GB? Section 16.2 mentions it supports up to 4
> > banks/ chip-selects which I would assume is much more. Also the memory
> > map has a DRAM region 2 for memory region 2-32GB. But yes this exceeds
> > 32bit addressing. I'm not aware of ls1021 devices with more than 4GB
> > memory. Our modules only support up to 2GB.
>
> I think I misread this, as section 2.2 mentions you can have
> four chip-selects that are limited to either 2GB or 8GB each,
> for a theoretical maximum of 26GB. As long as the practical
> limit is 4GB or less, I think we're fine here. Linus Walleij
> has is working on a prototype for changing the memory
> management code to handle up to 4GB of contiguous RAM without
> highmem, which will become relevant in the future as we get
> rid of highmem support. On this chip, the first 4GB of
> installed memory are not contiguous in the physical address
> space, so this will need another set of patches on top.
>
> As long as you only use the first chip-select with 2GB
> of installed memory, very little will change for you.
>
> It might be worthwhile to check if your system works
> correctly with ARM_LPAE=y, VMSPLIT_2G=y and HIGHMEM=n,
> which should be the best configuration for your system
> anyway and will keep working after highmem gets removed.
Thanks for that hint. Having this setting the board seems to still run like it
should.
Best regards,
Alexander
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
next prev parent reply other threads:[~2023-01-24 10:31 UTC|newest]
Thread overview: 30+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-01-19 14:42 [PATCH 0/9] TQMLS1021A support Alexander Stein
2023-01-19 14:42 ` [PATCH 1/9] dt-bindings: arm: fsl: add TQ-Systems LS1021A board Alexander Stein
2023-01-19 16:59 ` Krzysztof Kozlowski
2023-01-20 8:58 ` Alexander Stein
2023-01-20 9:07 ` Krzysztof Kozlowski
2023-01-19 14:42 ` [PATCH 2/9] ARM: dts: ls1021a: add TQ-Systems MBLS102xA device tree Alexander Stein
2023-01-19 17:03 ` Krzysztof Kozlowski
2023-01-20 10:08 ` Alexander Stein
2023-01-20 10:21 ` Krzysztof Kozlowski
2023-01-19 14:42 ` [PATCH 3/9] ARM: dts: ls1021a: add TQMLS1021A flash partition layout Alexander Stein
2023-01-19 14:42 ` [PATCH 4/9] ARM: dts: ls1021a: add TQMLS1021A/MBLS102xA LVDS TM070JVHG33 overlay Alexander Stein
2023-01-19 14:42 ` [PATCH 5/9] ARM: dts: ls1021a: add TQMLS1021A/MBLS102xA HDMI overlay Alexander Stein
2023-01-19 14:42 ` [PATCH 6/9] ARM: dts: ls1021a: add TQMLS1021A/MBLS102xA LVDS CDTECH DC44 overlay Alexander Stein
2023-01-19 14:42 ` [PATCH 7/9] ARM: dts: ls1021a: add TQMLS1021A/MBLS102xA LVDS CDTECH FC21 overlay Alexander Stein
2023-01-19 14:42 ` [PATCH 8/9] ARM: multi_v7_defconfig: Add options to support TQMLS102xA series Alexander Stein
2023-01-19 17:04 ` Krzysztof Kozlowski
2023-01-20 11:12 ` Alexander Stein
2023-01-20 11:35 ` Krzysztof Kozlowski
2023-01-20 14:57 ` Russell King (Oracle)
2023-01-21 20:27 ` Krzysztof Kozlowski
2023-01-21 22:33 ` Russell King (Oracle)
2023-01-19 14:42 ` [PATCH 9/9] [DNI] ARM: multi_v7_defconfig: Enable CONFIG_ARM_LPAE for multi_v7_config Alexander Stein
2023-01-19 15:09 ` Arnd Bergmann
2023-01-19 15:27 ` Alexander Stein
2023-01-19 16:07 ` Arnd Bergmann
2023-01-20 12:43 ` Alexander Stein
2023-01-20 14:00 ` Arnd Bergmann
2023-01-24 10:30 ` Alexander Stein [this message]
2023-01-24 11:37 ` Arnd Bergmann
2023-01-19 16:00 ` Russell King (Oracle)
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=4775166.GXAFRqVoOG@steina-w \
--to=alexander.stein@ew.tq-group.com \
--cc=arnd@arndb.de \
--cc=devicetree@vger.kernel.org \
--cc=krzysztof.kozlowski+dt@linaro.org \
--cc=leoyang.li@nxp.com \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux@armlinux.org.uk \
--cc=marcel.ziswiler@toradex.com \
--cc=marex@denx.de \
--cc=olof@lixom.net \
--cc=robh+dt@kernel.org \
--cc=shawnguo@kernel.org \
--cc=soc@kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox