From: Ahmad Fatoum <a.fatoum@pengutronix.de>
To: barebox@lists.infradead.org
Cc: Ahmad Fatoum <a.fatoum@pengutronix.de>
Subject: [PATCH 09/16] bootm: stash initial OS address/entry in image_data
Date: Thu, 12 Mar 2026 15:44:52 +0100 [thread overview]
Message-ID: <20260312144505.2159816-9-a.fatoum@pengutronix.de> (raw)
In-Reply-To: <20260312144505.2159816-1-a.fatoum@pengutronix.de>
Save the initial os_address and os_entry values that were passed to
bootm_boot() in new os_address_hint and os_entry_hint fields. These
preserve the originally requested values even if os_address/os_entry
are modified during the boot process.
Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de>
---
common/bootm.c | 4 ++--
include/bootm.h | 4 ++++
2 files changed, 6 insertions(+), 2 deletions(-)
diff --git a/common/bootm.c b/common/bootm.c
index 01d569dd37d4..25cbce6ccb3f 100644
--- a/common/bootm.c
+++ b/common/bootm.c
@@ -530,8 +530,8 @@ struct image_data *bootm_boot_prep(const struct bootm_data *bootm_data)
data->force = bootm_data->force;
data->dryrun = bootm_data->dryrun;
data->initrd_address = bootm_data->initrd_address;
- data->os_address = bootm_data->os_address;
- data->os_entry = bootm_data->os_entry;
+ data->os_address = data->os_address_hint = bootm_data->os_address;
+ data->os_entry = data->os_entry_hint = bootm_data->os_entry;
data->efi_boot = bootm_data->efi_boot;
ret = file_read_and_detect_boot_image_type(data->os_file, &data->os_header);
diff --git a/include/bootm.h b/include/bootm.h
index d3874a0e8ef2..570ac4d289f2 100644
--- a/include/bootm.h
+++ b/include/bootm.h
@@ -86,6 +86,10 @@ struct image_data {
/* entry point to the os. relative to the start of the image */
unsigned long os_entry;
+ /* initial os_address/os_entry supplied at entry to bootm_boot */
+ unsigned long os_address_hint;
+ unsigned long os_entry_hint;
+
/* if initrd is already loaded this resource will be !NULL */
struct resource *initrd_res;
--
2.47.3
next prev parent reply other threads:[~2026-03-12 14:46 UTC|newest]
Thread overview: 22+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-03-12 14:44 [PATCH 01/16] lib: add lazy loadable infrastructure for deferred boot component loading Ahmad Fatoum
2026-03-12 14:44 ` [PATCH 02/16] bootm: split preparatory step from handler invocation Ahmad Fatoum
2026-03-12 14:44 ` [PATCH 03/16] boot: add bootm_boot wrapper that takes struct bootentry Ahmad Fatoum
2026-03-12 14:44 ` [PATCH 04/16] bootchooser: pass along " Ahmad Fatoum
2026-03-12 14:44 ` [PATCH 05/16] bootm: switch plain file names case to loadable API Ahmad Fatoum
2026-03-12 14:44 ` [PATCH 06/16] uimage: add offset parameter to uimage_load Ahmad Fatoum
2026-03-12 14:44 ` [PATCH 07/16] bootm: uimage: switch to loadable API Ahmad Fatoum
2026-03-12 14:44 ` [PATCH 08/16] bootm: fit: switch to new " Ahmad Fatoum
2026-03-12 14:44 ` Ahmad Fatoum [this message]
2026-03-12 14:44 ` [PATCH 10/16] bootm: support multiple entries for bootm.initrd Ahmad Fatoum
2026-03-12 14:44 ` [PATCH 11/16] bootm: implement plain and FIT bootm.image override Ahmad Fatoum
2026-03-18 9:01 ` Sascha Hauer
2026-03-18 9:17 ` Ahmad Fatoum
2026-03-12 14:44 ` [PATCH 12/16] bootm: overrides: add support for overlays Ahmad Fatoum
2026-03-12 14:44 ` [PATCH 13/16] test: py: add test for initrd concatenation Ahmad Fatoum
2026-03-12 14:44 ` [PATCH 14/16] defaultenv: base: add new devboot script Ahmad Fatoum
2026-03-18 9:50 ` Sascha Hauer
2026-03-18 10:50 ` Ahmad Fatoum
2026-03-18 14:49 ` Sascha Hauer
2026-03-12 14:44 ` [PATCH 15/16] Documentation: user: devboot: add section on forwarding build dirs Ahmad Fatoum
2026-03-12 14:44 ` [PATCH 16/16] libfile: remove file_to_sdram Ahmad Fatoum
2026-03-18 10:06 ` [PATCH 01/16] lib: add lazy loadable infrastructure for deferred boot component loading Sascha Hauer
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=20260312144505.2159816-9-a.fatoum@pengutronix.de \
--to=a.fatoum@pengutronix.de \
--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