Skip to content
Commit d9f554b6 authored by This contributor prefers not to receive mails's avatar This contributor prefers not to receive mails Committed by Tom Rini
Browse files

pci: Add checks to prevent config space overflow



PCIe config space has address range 0-4095. So do not allow reading from
addresses outside of this range. Lot of U-Boot drivers do not expect that
passed value is not in this range. PCI DM read function is extended to
fill read value to all ones or zeros when it fails as U-Boot callers
ignores return value.

Calling U-Boot command 'pci display.b 0.0.0 0 0x2000' now stops printing
config space at the end (before 0x1000 address).

Signed-off-by: default avatarPali Rohár <pali@kernel.org>
Reviewed-by: default avatarStefan Roese <sr@denx.de>
parent aea087a6
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment