summaryrefslogtreecommitdiff
path: root/common/console.c
diff options
context:
space:
mode:
authorPali Rohár <pali@kernel.org>2022-07-03 12:48:06 +0200
committerTom Rini <trini@konsulko.com>2022-08-26 14:59:21 -0400
commitd9f554b62440de542c482fecf9374e8da3ea3602 (patch)
tree7752efadcb1fe9b198d522a8ed27e452827f9af6 /common/console.c
parentaea087a665c447dfb89bf2113cad74ad53fa17a0 (diff)
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: Pali Rohár <pali@kernel.org> Reviewed-by: Stefan Roese <sr@denx.de>
Diffstat (limited to 'common/console.c')
0 files changed, 0 insertions, 0 deletions