[SLOF] [PATCH slof] pci: Fix assigned-addresses for 64bit nonprefetchable BAR
Thomas Huth
thuth at redhat.com
Fri Apr 28 16:46:59 AEST 2017
On 28.04.2017 08:34, Alexey Kardashevskiy wrote:
> On 28/04/17 16:33, Thomas Huth wrote:
>> On 28.04.2017 08:04, Alexey Kardashevskiy wrote:
>>> 975b31f80aff "pci: Put non-prefetchable 64bit BARs into 32bit MMIO window"
>>> moved 64bit non-prefetchable BARs into 32bit non-prefetchable window
>>> of a bridge. However the resource would still be advertised as 64bit
>>> in the "assigned-addresses" property so fix the resource type.
>>>
>>> Signed-off-by: Alexey Kardashevskiy <aik at ozlabs.ru>
>>> ---
>>> slof/fs/pci-properties.fs | 2 +-
>>> 1 file changed, 1 insertion(+), 1 deletion(-)
>>>
>>> diff --git a/slof/fs/pci-properties.fs b/slof/fs/pci-properties.fs
>>> index 8594e5d..d446473 100644
>>> --- a/slof/fs/pci-properties.fs
>>> +++ b/slof/fs/pci-properties.fs
>>> @@ -257,7 +257,7 @@
>>> >r dup rtas-config-l@ \ | save size and fetch lower 32 bits ( paddr plen baddr val.lo R: size)
>>> over 4 + rtas-config-l@ \ | fetch upper 32 bits ( paddr plen baddr val.lo val.hi R: size)
>>> 20 lshift + -10 and >r \ | calc 64 bit value and save it ( paddr plen baddr R: size val )
>>> - 83000000 or encode-int+ \ | Encode config addr ( paddr plen R: size val )
>>> + 82000000 or encode-int+ \ | Encode config addr ( paddr plen R: size val )
>>> r> encode-64+ \ | Encode assigned addr ( paddr plen R: size )
>>> r> encode-64+ \ | Encode size ( paddr plen )
>>> ELSE \ ELSE
>>>
>>
>> I'd still prefer to have a comment in the source code here, too, but anyway:
>>
>> Reviewed-by: Thomas Huth <thuth at redhat.com>
>>
>
> Propose the text and the place, I'll put it in.
diff --git a/slof/fs/pci-properties.fs b/slof/fs/pci-properties.fs
--- a/slof/fs/pci-properties.fs
+++ b/slof/fs/pci-properties.fs
@@ -250,7 +250,9 @@
\ ***************************************************************************************
\ Generating the assigned-addresses property
\ ***************************************************************************************
-\ generate assigned-addresses property for 64Bit MEM-BAR and return BAR-reg-size
+\ generate assigned-addresses property for non-prefetchable 64Bit MEM-BAR and
+\ return BAR-reg-size. Note: We use "32-bit" as space code here, since these
+\ BARs are allocate from the 32-bit MMIO window (see assign-mmio64-bar)
: gen-mem64-bar-prop ( prop-addr prop-len bar-addr -- prop-addr prop-len 8 )
dup pci-bar-size-mem64 \ fetch BAR Size ( paddr plen baddr bsize )
dup IF \ IF Size > 0
More information about the SLOF
mailing list