[SLOF] [PATCH slof] fdt: Pass the resulting device tree to QEMU
Alexey Kardashevskiy
aik at ozlabs.ru
Tue Oct 3 15:33:16 AEDT 2017
On 03/10/17 02:12, Segher Boessenkool wrote:
> On Mon, Oct 02, 2017 at 10:09:52PM +1100, Alexey Kardashevskiy wrote:
>>> So maybe something like
>>>
>>> VALUE fdt-here \ instead of fdt-struct-cur
>>> : fdt-allot fdt-here + to fdt-here ;
>>
>> : fdt-allot ( len -- ) fdt-here + to fdt-here ;
>> may be?
>>
>> I am missing something here, the words below assume that fdt-alloc returns
>> something :-/
>>
>>> : fdt-c, fdt-here 1 fdt-allot c! ;
>>> : fdt-align fdt-here 4 #aligned fdt-here - ; \ or fill with zeroes?
>>> : fdt-str, ( str len -- ) fdt-here over fdt-allot swap move ;
>>> : fdt-ztr, ( str len -- ) fdt-str, 0 fdt-c, ;
>>> \ and now use fdt-str, fdt-align instead of false fdt-struct-add
>>> \ and just fdt-ztr, fdt-align for true fdt-struct-add
>
> I don't see it, but I haven't tested it either, just typed it :-)
>
> : fdt-str, ( str len -- )
> fdt-here over ( str len fhere len )
> fdt-allot ( str len fhere )
> swap ( str fhere len )
> move ( -- )
> ;
>
> Looks fine to me?
>
>>>> Thanks for the comment. Are you still going to do the full review or I can
>>>> respin? :)
>>>
>>> Sure, but it will be a while.
>>
>> I got a bit bored on a Labour Day (today, in ACT) and posted v2 :) Do you
>> want to me to post v3 with fdt-allot & friends first?
>
> If you think those suggestions help, then yes please.
I'd rather follow the style and who knows it better than you :)
v3 is coming soon.
>>> The properties are not a linked list, but a Forth wordlist. This is a)
>>> faster, because wordlists are optimised a bit, say ten times faster; and
>>> b) this allows use to run any code we want to get a property, not just
>>> lookups of static data. From property.fs:
>>>
>>> \ Words on the property list for a node are actually executable words,
>>> \ that return the address and length of the property's data. Special
>>> \ nodes like /options can have their properties use specialized code to
>>> \ dynamically generate their data; most nodes just use a 2CONSTANT.
>>
>> Hm. I wonder if it makes sense to rewrite fdt-properties using this.
>
> You might need to make a case-sensitive wordlist search then?
I have no idea, any example? I'll probably skip this bit this time though.
--
Alexey
More information about the SLOF
mailing list