[PATCH 1/2] pci-phb: check for the 32-bit overflow

Thomas Huth thuth at redhat.com
Thu Apr 23 23:43:14 AEST 2015


Am Wed, 22 Apr 2015 16:27:19 +0530
schrieb Nikunj A Dadhania <nikunj at linux.vnet.ibm.com>:

> With the addition of 64-bit BARS and increase in the mmio address
> space, the code was hitting this limit. The memory of pci devices
> across the bridges were not accessible due to which the drivers
> failed.
> 
> Signed-off-by: Nikunj A Dadhania <nikunj at linux.vnet.ibm.com>
> ---
>  board-qemu/slof/pci-phb.fs | 3 ++-
>  1 file changed, 2 insertions(+), 1 deletion(-)
> 
> diff --git a/board-qemu/slof/pci-phb.fs b/board-qemu/slof/pci-phb.fs
> index 529772f..e307d95 100644
> --- a/board-qemu/slof/pci-phb.fs
> +++ b/board-qemu/slof/pci-phb.fs
> @@ -258,7 +258,8 @@ setup-puid
>              decode-64 2 / dup >r                \ Decode and calc size/2
>              pci-next-mem @ + dup pci-max-mem !  \ and calc max mem address

Could pci-max-mem overflow, too?

>              dup pci-next-mmio !                 \ which is the same as MMIO base
> -            r> + pci-max-mmio !                 \ calc max MMIO address
> +            r> + FFFFFFFF min pci-max-mmio !    \ calc max MMIO address and
> +                                                \ check the 32-bit boundary

 Thomas


More information about the Linuxppc-dev mailing list