[U-Boot] [PATCH 3/9] SPL: read and store arch property from U-Boot image

Philipp Tomsich philipp.tomsich at theobroma-systems.com
Thu Feb 21 11:50:25 UTC 2019



> On 21.02.2019, at 12:47, Alexander Graf <agraf at suse.de> wrote:
> 
> On 02/21/2019 02:30 AM, Andre Przywara wrote:
>> Read the specified "arch" value from a legacy or FIT U-Boot image and
>> store it in our SPL data structure.
>> This allows loaders to take the target architecture in account for
>> custom loading procedures.
>> Having the complete string -> arch mapping for FIT based images in the
>> SPL would be too big, so we leave it up to architectures (or boards) to
>> overwrite the weak function that does the actual translation, possibly
>> covering only the required subset there.
>> 
>> Signed-off-by: Andre Przywara <andre.przywara at arm.com>
> 
> Reviewed-by: Alexander Graf <agraf at suse.de>
> 
> I don't fully buy the argument that the generic mapping would be too big though. Realistically you should be able to get away with 1 or 2 branches per case, no? So that would be maybe 40 instructions?

The question I believe is not just code size (should be minimal) but the table
size for the mapping (assuming it’s a table).
Do we have any data on this to understand what order-of-magnitude this
“too big” is?

—Phil.




More information about the U-Boot mailing list