handoff data

Ahmad Fatoum a.fatoum at pengutronix.de
Tue Jul 22 05:16:59 PDT 2025


Hello Renaud,

On 7/22/25 13:08, Renaud Barbier wrote:
> On our LS1046A based board (v2022.03) we used to pass the results of memory tests in the PBL  through the OCRAM to the barebox load.
> I see there is handoff data support.
> 
> In my board lowlevel.c code, I have added the call:
> 
> handoff_add_arm_machine(0x12345678);

You should define a new handoff type for your custom info, e.g.:

#define HANDOFF_DATA_MEMTEST   HANDOFF_DATA_BOARD(0)

instead of overloading the (legacy) ARM machine id for something else.

> And then try to read it back from device_initcall:
> 
>  machine = handoff_data_get_entry(HANDOFF_DATA_ARM_MACHINE, &hsize);
> printf("machine = %ld, %p\n", hsize, machine);
> 
> However, both the machine pointer and size are set to 0.
> 
> Am I missing something in the process?

Handoff data is used for DT as well, so if you get to a functional
barebox, handoff is working...

As a sanity check, what happens if you move your handoff_add_arm_machine
behind handoff_data_add_dt() in barebox_pbl_start?

If that works, but your handoff_add_arm_machine in lowlevel.c doesn't,
can you share your code?

Cheers,
Ahmad

> 
> Cheers,
> Renaud
>  
> 

-- 
Pengutronix e.K.                  |                             |
Steuerwalder Str. 21              | http://www.pengutronix.de/  |
31137 Hildesheim, Germany         | Phone: +49-5121-206917-0    |
Amtsgericht Hildesheim, HRA 2686  | Fax:   +49-5121-206917-5555 |




More information about the barebox mailing list