Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

overlays: Add pcie-32bit-dma overlay #4216

Merged
merged 1 commit into from
Mar 15, 2021

Conversation

vianpl
Copy link
Contributor

@vianpl vianpl commented Mar 15, 2021

In order to accommodate full PCI DMA access to memory on newer BCM2711
revisions, we're forced to map PCIe's view of physical memory with an
offset. This offset makes DMA addressing dependent on having 64bit
support on the PCI device's side. Which isn't always the case.

In order to mitigate this, introduce the pcie-32bit-dma overlay which
will forbid firmware from updating the default inbound memory window.
The default setting, albeit limited to accessing the lower 3GB of
memory, will allow for 32bit DMA addresses at the expense of having to
bounce buffers.

Link: #4197
Signed-off-by: Nicolas Saenz Julienne nsaenzjulienne@suse.de

Copy link
Contributor

@pelwell pelwell left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I have a few README niggles, otherwise it looks good.

arch/arm/boot/dts/overlays/README Show resolved Hide resolved
arch/arm/boot/dts/overlays/README Show resolved Hide resolved
arch/arm/boot/dts/overlays/README Outdated Show resolved Hide resolved
arch/arm/boot/dts/overlays/README Show resolved Hide resolved
@pelwell
Copy link
Contributor

pelwell commented Mar 15, 2021

Doh - and the name of the overlay is wrong in the README.

In order to accommodate full PCI DMA access to memory on newer BCM2711
revisions, we're forced to map PCIe's view of physical memory with an
offset. This offset makes DMA addressing dependent on having 64bit
support on the PCI device's side. Which isn't always the case.

In order to mitigate this, introduce the pcie-32bit-dma overlay which
will forbid firmware from updating the default inbound memory window.
The default setting, albeit limited to accessing the lower 3GB of
memory, will allow for 32bit DMA addresses at the expense of having to
bounce buffers.

Link: raspberrypi#4197
Signed-off-by: Nicolas Saenz Julienne <nsaenzjulienne@suse.de>
@vianpl
Copy link
Contributor Author

vianpl commented Mar 15, 2021

Fixed! It's amazing how I consistently get this sort of thing wrong...

@pelwell pelwell merged commit 2c51556 into raspberrypi:rpi-5.11.y Mar 15, 2021
@pelwell
Copy link
Contributor

pelwell commented Mar 15, 2021

Thanks - I'll back-port to 5.10.

popcornmix added a commit to raspberrypi/firmware that referenced this pull request Mar 23, 2021
kernel: Make rpi poe fan less noisy in cool environments
See: raspberrypi/linux#4222

kernel: overlays: Add pcie-32bit-dma overlay
See: raspberrypi/linux#4216

kernel: ARM: dts: bcm2711: Add aliases for additional SPIs

kernel: Revert i2c: bcm2835: Handle untimely DONE signal
See: Hexxeh/rpi-firmware#261
popcornmix added a commit to Hexxeh/rpi-firmware that referenced this pull request Mar 23, 2021
kernel: Make rpi poe fan less noisy in cool environments
See: raspberrypi/linux#4222

kernel: overlays: Add pcie-32bit-dma overlay
See: raspberrypi/linux#4216

kernel: ARM: dts: bcm2711: Add aliases for additional SPIs

kernel: Revert i2c: bcm2835: Handle untimely DONE signal
See: #261
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants