[SLOF] [PATCH] pci: Generate a 64-bit range property if necessary

Alexey Kardashevskiy aik at ozlabs.ru
Fri Apr 28 15:13:04 AEST 2017


On Fri, 28 Apr 2017 05:45:07 +0200
Thomas Huth <thuth at redhat.com> wrote:

> If the memory range exceeds the 32-bit boundary, we should generate
> a 64-bit range property entry instead of a 32-bit entry.
> 
> Signed-off-by: Thomas Huth <thuth at redhat.com>
> ---
>  slof/fs/pci-properties.fs | 5 +++--
>  1 file changed, 3 insertions(+), 2 deletions(-)
> 
> diff --git a/slof/fs/pci-properties.fs b/slof/fs/pci-properties.fs
> index d446473..3d14181 100644
> --- a/slof/fs/pci-properties.fs
> +++ b/slof/fs/pci-properties.fs
> @@ -411,8 +411,9 @@
>          4 pick 28 + rtas-config-l@      \ fetch upper Basebits  ( addr paddr plen limit.31:0 base.31:0 base.63:32 )
>          20 lshift or swap               \ and calc Base         ( addr paddr plen base.63:0 limit.31:0 )
>          4 pick 2C + rtas-config-l@      \ fetch upper Limitbits ( addr paddr plen base.63:0 limit.31:0 limit.63:32 )
> -        20 lshift or                    \ and calc Limit        ( addr paddr plen base.63:0 limit.63:0 )
> -        42000000 pci-bridge-gen-range   \ and generate it       ( addr paddr plen )
> +        dup -rot 20 lshift or swap      \ and calc Limit        ( addr paddr plen base.63:0 limit.63:0 limit.63:32 )
> +        IF 43000000 ELSE 42000000 THEN  \ 64-bit or 32-bit?     ( addr paddr plen base.63:0 limit.63:0 type )
> +        pci-bridge-gen-range            \ and generate it       ( addr paddr plen )
>  ;
>  
>  \ generate an io space to the ranges property

This is for pci-bridge-gen-mem-range, should not we create both 32bit
_and_ 64bit windows, as we do already for PHB (I think we should)?


--
Alexey


More information about the SLOF mailing list