[PATCH v2 11/18] pci: Range check address conversions

Bin Meng bmeng.cn at gmail.com
Wed Apr 13 16:02:58 CEST 2022


On Wed, Mar 30, 2022 at 12:59 AM Andrew Scull <ascull at google.com> wrote:
>
> When converting between PCI bus and physical addresses, include a length
> parameter that can be used to check that the entire range fits within
> one of the PCI regions. This prevents an address being returned that
> might be only partially valid for the range it is going to be used for.
>
> Where the range check is not wanted, passing a length of 0 will have the
> same behaviour as before this change.
>
> Signed-off-by: Andrew Scull <ascull at google.com>
> ---
>  drivers/pci/pci-uclass.c | 57 ++++++++++++++++++++++++----------------
>  include/pci.h            | 20 +++++++-------
>  2 files changed, 46 insertions(+), 31 deletions(-)
>

Reviewed-by: Bin Meng <bmeng.cn at gmail.com>


More information about the U-Boot mailing list