Re: [RFC] FDT fix for 64 bit platforms

看板FB_current作者時間14年前 (2011/10/15 14:32), 編輯推噓0(000)
留言0則, 0人參與, 最新討論串2/6 (看更多)
On Sat, Oct 15, 2011 at 2:01 AM, Nathan Whitehorn <nwhitehorn@freebsd.org> wrote: > On 10/14/11 14:10, Jayachandran C. wrote: >> >> I'm planning commit this -CURRENT if there an no objections. >> >> In the current implementation, phandle is used to store a pointer to >> the location inside the device tree. =A0Since phandle_t is u32, this >> will not work on 64 bit platforms. With this fix, the phandle is the >> offset from the start of device tree pointer 'fdtp', which will be 32 >> bit. >> >> Review or testing from device tree users will be welcome. >> >> JC. > > Why not use offsets into the FDT rather than full pointers? I believe hav= ing > phandles greater than 32 bits violates the FDT spec, and declaring that t= he > FDT can't itself be larger than 4 GB seems reasonable. I am actually using the offset from the beginning of FDT (fdtp) as phandle. I cannot use the usual fdt offset (after off_dt_struct) as phandle, because in that case offset of 0 is valid, but phandle 0 should not be valid. JC. _______________________________________________ freebsd-current@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-current To unsubscribe, send any mail to "freebsd-current-unsubscribe@freebsd.org"
文章代碼(AID): #1EcIZb-K (FB_current)
文章代碼(AID): #1EcIZb-K (FB_current)