mail archive of the barebox mailing list
 help / color / mirror / Atom feed
From: Ahmad Fatoum <a.fatoum@pengutronix.de>
To: Renaud Barbier <Renaud.Barbier@ametek.com>,
	Barebox List <barebox@lists.infradead.org>
Subject: Re: handoff data
Date: Tue, 22 Jul 2025 14:16:59 +0200	[thread overview]
Message-ID: <15ecd1db-7a4f-4ba4-9ddd-27e4391ceee9@pengutronix.de> (raw)
In-Reply-To: <DM5PR07MB35323F18EB9CB31A85BCEEF0EC5CA@DM5PR07MB3532.namprd07.prod.outlook.com>

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 |




  reply	other threads:[~2025-07-22 13:01 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-07-22 11:08 Renaud Barbier
2025-07-22 12:16 ` Ahmad Fatoum [this message]
2025-07-22 15:46   ` Renaud Barbier
2025-07-22 16:05     ` Ahmad Fatoum

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=15ecd1db-7a4f-4ba4-9ddd-27e4391ceee9@pengutronix.de \
    --to=a.fatoum@pengutronix.de \
    --cc=Renaud.Barbier@ametek.com \
    --cc=barebox@lists.infradead.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox