diff mbox series

[1/2] bootstage: Fix unstash of records from SPL

Message ID 20240803124149.2916030-2-jonas@kwiboo.se
State Accepted
Commit e83ced1a24095de66e526bd6c10f0f24584baaee
Delegated to: Tom Rini
Headers show
Series bootstage: Fix unstash and sorting of records | expand

Commit Message

Jonas Karlman Aug. 3, 2024, 12:41 p.m. UTC
The commit b81e31a1e6c5 ("bootstash: Do not provide a default address
for all") changed a bootstage unstash call to bootstage stash, this
has resulted in bootstage records stashed in SPL no longer get unstaged
in U-Boot proper. Fix this by changing back to a unstage call.

Fixes: b81e31a1e6c5 ("bootstash: Do not provide a default address for all")
Signed-off-by: Jonas Karlman <jonas@kwiboo.se>
---
 common/board_f.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Tom Rini Aug. 3, 2024, 2:16 p.m. UTC | #1
On Sat, Aug 03, 2024 at 12:41:44PM +0000, Jonas Karlman wrote:

> The commit b81e31a1e6c5 ("bootstash: Do not provide a default address
> for all") changed a bootstage unstash call to bootstage stash, this
> has resulted in bootstage records stashed in SPL no longer get unstaged
> in U-Boot proper. Fix this by changing back to a unstage call.
> 
> Fixes: b81e31a1e6c5 ("bootstash: Do not provide a default address for all")
> Signed-off-by: Jonas Karlman <jonas@kwiboo.se>

Whoops, thanks!

Reviewed-by: Tom Rini <trini@konsulko.com>
Simon Glass Aug. 6, 2024, 9:50 p.m. UTC | #2
On Sat, 3 Aug 2024 at 08:16, Tom Rini <trini@konsulko.com> wrote:
>
> On Sat, Aug 03, 2024 at 12:41:44PM +0000, Jonas Karlman wrote:
>
> > The commit b81e31a1e6c5 ("bootstash: Do not provide a default address
> > for all") changed a bootstage unstash call to bootstage stash, this
> > has resulted in bootstage records stashed in SPL no longer get unstaged
> > in U-Boot proper. Fix this by changing back to a unstage call.
> >
> > Fixes: b81e31a1e6c5 ("bootstash: Do not provide a default address for all")
> > Signed-off-by: Jonas Karlman <jonas@kwiboo.se>
>
> Whoops, thanks!
>
> Reviewed-by: Tom Rini <trini@konsulko.com>

Reviewed-by: Simon Glass <sjg@chromium.org>

Thanks.

How about a test for sandbox_spl to check this? I see that
CONFIG_SPL_BOOTSTAGE is not enabled there.

There is a vaguely similar test in test/py/tests/test_handoff.py

Regards,
SImon
Tom Rini Aug. 28, 2024, 6:26 p.m. UTC | #3
On Sat, 03 Aug 2024 12:41:44 +0000, Jonas Karlman wrote:

> The commit b81e31a1e6c5 ("bootstash: Do not provide a default address
> for all") changed a bootstage unstash call to bootstage stash, this
> has resulted in bootstage records stashed in SPL no longer get unstaged
> in U-Boot proper. Fix this by changing back to a unstage call.
> 
> 

Applied to u-boot/next, thanks!
Jonas Karlman Aug. 28, 2024, 6:32 p.m. UTC | #4
Hi Tom,

On 2024-08-28 20:26, Tom Rini wrote:
> On Sat, 03 Aug 2024 12:41:44 +0000, Jonas Karlman wrote:
> 
>> The commit b81e31a1e6c5 ("bootstash: Do not provide a default address
>> for all") changed a bootstage unstash call to bootstage stash, this
>> has resulted in bootstage records stashed in SPL no longer get unstaged
>> in U-Boot proper. Fix this by changing back to a unstage call.
>>
>>
> 
> Applied to u-boot/next, thanks!
> 

I expected this patch to go to master as it fixes a regression
introduced in v2024.10-rc1.

Regards,
Jonas
Tom Rini Aug. 28, 2024, 6:56 p.m. UTC | #5
On Wed, Aug 28, 2024 at 08:32:36PM +0200, Jonas Karlman wrote:

> Hi Tom,
> 
> On 2024-08-28 20:26, Tom Rini wrote:
> > On Sat, 03 Aug 2024 12:41:44 +0000, Jonas Karlman wrote:
> > 
> >> The commit b81e31a1e6c5 ("bootstash: Do not provide a default address
> >> for all") changed a bootstage unstash call to bootstage stash, this
> >> has resulted in bootstage records stashed in SPL no longer get unstaged
> >> in U-Boot proper. Fix this by changing back to a unstage call.
> >>
> >>
> > 
> > Applied to u-boot/next, thanks!
> > 
> 
> I expected this patch to go to master as it fixes a regression
> introduced in v2024.10-rc1.

OK, good point. I'll push it to master when I have other stuff as well,
I've cherry-picked it now.
diff mbox series

Patch

diff --git a/common/board_f.c b/common/board_f.c
index 21a8944e2b0f..0b017ee12a7c 100644
--- a/common/board_f.c
+++ b/common/board_f.c
@@ -804,7 +804,7 @@  static int initf_bootstage(void)
 	if (ret)
 		return ret;
 	if (from_spl) {
-		ret = bootstage_stash_default();
+		ret = bootstage_unstash_default();
 		if (ret && ret != -ENOENT) {
 			debug("Failed to unstash bootstage: err=%d\n", ret);
 			return ret;