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

dtoverlay: Reduce size of PCIE IB window in pcie-32-dma overlay #4870

Merged
merged 1 commit into from
Feb 3, 2022

Conversation

6by9
Copy link
Contributor

@6by9 6by9 commented Feb 3, 2022

The PCIE inbound window is rounded up to a power of 2, so the default
of 3GB rounds up to 4GB starting at 0. This prohibits the MSI vector
sitting at 0x0_fffffffc, and causes warnings from some subsystems
(eg ahci) of a 64bit address on a 32bit configuration.

Reduce the window down to 2GB to avoid this issue.

#4848

Signed-off-by: Dave Stevenson dave.stevenson@raspberrypi.com

@pelwell
Copy link
Contributor

pelwell commented Feb 3, 2022

LGTM. While you're in there, could you add a comment to fragment 0 saying that it prevents the firmware from rewriting the dma-ranges property?

The PCIE inbound window is rounded up to a power of 2, so the default
of 3GB rounds up to 4GB starting at 0. This prohibits the MSI vector
sitting at 0x0_fffffffc, and causes warnings from some subsystems
(eg ahci) of a 64bit address on a 32bit configuration.

Reduce the window down to 2GB to avoid this issue.

raspberrypi#4848

Signed-off-by: Dave Stevenson <dave.stevenson@raspberrypi.com>
@6by9
Copy link
Contributor Author

6by9 commented Feb 3, 2022

While you're in there, could you add a comment to fragment 0 saying that it prevents the firmware from rewriting the dma-ranges property?

Done.

@pelwell pelwell merged commit ee6a81c into raspberrypi:rpi-5.10.y Feb 3, 2022
@pelwell
Copy link
Contributor

pelwell commented Feb 3, 2022

Ta.

@6by9
Copy link
Contributor Author

6by9 commented Feb 3, 2022

Blast. That's thrown up a dtc warning that I hadn't noticed.

..../linux/arch/arm/boot/dts/overlays/pcie-32bit-dma-overlay.dts:26.4-27.27: Warning (dma_ranges_format): /fragment@1/__overlay__:dma-ranges: "dma-ranges" property has invalid length (28 bytes) (parent #address-cells == 2, child #address-cells == 2, #size-cells == 1)

@6by9
Copy link
Contributor Author

6by9 commented Feb 3, 2022

Adding

			#address-cells = <3>;
			#size-cells = <2>;

(copied from the pcie0 node) to the fragment clears the warnings, but is that the right answer?

@pelwell
Copy link
Contributor

pelwell commented Feb 3, 2022

Yes, that's the right answer because it's the only method I know of. It has the unfortunate side effect of overwriting properties that we shouldn't need to overwrite, but if the values didn't match the base dtb then the dma-ranges would be of the wrong format anyway (which is what the warning is about).

popcornmix added a commit to raspberrypi/firmware that referenced this pull request Feb 4, 2022
See: raspberrypi/linux#4867

kernel: Add Support for Geekworm MZP280 in vc4-dpi-panel-overlay
See: raspberrypi/linux#4868

kernel: dtoverlay: Reduce size of PCIE IB window in pcie-32-dma overlay
See: raspberrypi/linux#4870

kernel: ARM: dts: Permanently disable hdmi1 and ddc1 on CM4S
See: raspberrypi/linux#4869

kernel: dtoverlays: Correct field sizes in pcie-32bit-dma
See: raspberrypi/linux#4871
popcornmix added a commit to raspberrypi/rpi-firmware that referenced this pull request Feb 4, 2022
See: raspberrypi/linux#4867

kernel: Add Support for Geekworm MZP280 in vc4-dpi-panel-overlay
See: raspberrypi/linux#4868

kernel: dtoverlay: Reduce size of PCIE IB window in pcie-32-dma overlay
See: raspberrypi/linux#4870

kernel: ARM: dts: Permanently disable hdmi1 and ddc1 on CM4S
See: raspberrypi/linux#4869

kernel: dtoverlays: Correct field sizes in pcie-32bit-dma
See: raspberrypi/linux#4871
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