[U-Boot] fdt performance
Albert ARIBAUD
albert.u.boot at aribaud.net
Thu Oct 17 11:48:47 CEST 2013
Hi Aaron,
On Wed, 16 Oct 2013 23:24:04 -0700, Aaron Williams
<Aaron.Williams at caviumnetworks.com> wrote:
> Hi all,
>
> In our bootloader based off of 2013.07 we make extensive use of the flat
> device tree. In profiling our bootloader in our simulator I found that
> the function eating up the most time is fdt_next_tag. Looking at it,
> especially fdt_offset_ptr, it looks like there is a lot of room for
> improvement especially in the skip name section.
>
> Some of the checks in fdt_offset_ptr also look useless, such as if
> ((offset + len) < offset) which will always be false, or
> if (p + len < p)
>
> len is always positive.
I guess these tests are to catch corruption cases where the pointer
plus length wrap around the address space. Granted, this is far from
perfect protection, but still, it makes some sense.
In any case, if you found places where the code can be optimized, feel
free to directly post a patch!
(you can still put notes and comments below the '---' line)
> -Aaron
Amicalement,
--
Albert.
More information about the U-Boot
mailing list