From: Mattijs Korpershoek <mkorpershoek@baylibre.com>
To: Neil Armstrong <neil.armstrong@linaro.org>,
Tom Rini <trini@konsulko.com>
Cc: Guillaume La Roque <glaroque@baylibre.com>,
Caleb Connolly <caleb.connolly@linaro.org>,
u-boot-qcom@groups.io, u-boot@lists.denx.de,
Neil Armstrong <neil.armstrong@linaro.org>
Subject: Re: [PATCH v2 1/3] image: android: use ulong for kernel address
Date: Tue, 22 Oct 2024 11:15:52 +0200 [thread overview]
Message-ID: <87ed48wl9z.fsf@baylibre.com> (raw)
In-Reply-To: <20241017-topic-fastboot-fixes-mkbootimg-v2-1-c3927102d931@linaro.org>
Hi Neil,
Thank you for the patch.
On jeu., oct. 17, 2024 at 16:44, Neil Armstrong <neil.armstrong@linaro.org> wrote:
> When booting with platforms having > 4GiB of memory,
> the kernel physical address can be more than 32bits.
>
> Use ulong like all the other addresses, and fix the
> print to show the > 32bits address numbers.
>
> Signed-off-by: Neil Armstrong <neil.armstrong@linaro.org>
Reviewed-by: Mattijs Korpershoek <mkorpershoek@baylibre.com>
> ---
> boot/image-android.c | 4 ++--
> include/android_image.h | 2 +-
> 2 files changed, 3 insertions(+), 3 deletions(-)
>
> diff --git a/boot/image-android.c b/boot/image-android.c
> index e74dd498a305566e42aa235b45c22995e21ca64b..bb5f4f84487d40e0cf24dc3b57042993967e66d5 100644
> --- a/boot/image-android.c
> +++ b/boot/image-android.c
> @@ -256,7 +256,7 @@ int android_image_get_kernel(const void *hdr,
> ulong *os_data, ulong *os_len)
> {
> struct andr_image_data img_data = {0};
> - u32 kernel_addr;
> + ulong kernel_addr;
> const struct legacy_img_hdr *ihdr;
>
> if (!android_image_get_data(hdr, vendor_boot_img, &img_data))
> @@ -275,7 +275,7 @@ int android_image_get_kernel(const void *hdr,
> if (strlen(andr_tmp_str))
> printf("Android's image name: %s\n", andr_tmp_str);
>
> - printf("Kernel load addr 0x%08x size %u KiB\n",
> + printf("Kernel load addr 0x%08lx size %u KiB\n",
> kernel_addr, DIV_ROUND_UP(img_data.kernel_size, 1024));
>
> int len = 0;
> diff --git a/include/android_image.h b/include/android_image.h
> index d503c980b233bf31cd12a246ff1570544597a1c7..96820709b42830c7ce4cb753687da373936253a7 100644
> --- a/include/android_image.h
> +++ b/include/android_image.h
> @@ -348,7 +348,7 @@ struct andr_image_data {
> ulong bootconfig_addr; /* bootconfig image address */
> ulong bootconfig_size; /* bootconfig image size */
>
> - u32 kernel_addr; /* physical load addr */
> + ulong kernel_addr; /* physical load addr */
> ulong ramdisk_addr; /* physical load addr */
> ulong ramdisk_ptr; /* ramdisk address */
> ulong dtb_load_addr; /* physical load address for DTB image */
>
> --
> 2.34.1
next prev parent reply other threads:[~2024-10-22 9:16 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-10-17 14:44 [PATCH v2 0/3] image: android: misc fixes when using on Qualcomm platforms Neil Armstrong
2024-10-17 14:44 ` [PATCH v2 1/3] image: android: use ulong for kernel address Neil Armstrong
2024-10-22 9:15 ` Mattijs Korpershoek [this message]
2024-10-17 14:44 ` [PATCH v2 2/3] image: android: do not boot XIP when kernel is compressed Neil Armstrong
2024-10-22 9:18 ` Mattijs Korpershoek
2024-10-17 14:44 ` [PATCH v2 3/3] image: android: handle ramdisk default address Neil Armstrong
2024-10-22 9:20 ` Mattijs Korpershoek
2024-10-18 5:49 ` [PATCH v2 0/3] image: android: misc fixes when using on Qualcomm platforms Guillaume LA ROQUE
2024-10-24 7:48 ` Mattijs Korpershoek
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=87ed48wl9z.fsf@baylibre.com \
--to=mkorpershoek@baylibre.com \
--cc=caleb.connolly@linaro.org \
--cc=glaroque@baylibre.com \
--cc=neil.armstrong@linaro.org \
--cc=trini@konsulko.com \
--cc=u-boot-qcom@groups.io \
--cc=u-boot@lists.denx.de \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.