From: Tom Rini <trini@konsulko.com>
To: Yong-Xuan Wang <yongxuan.wang@sifive.com>
Cc: u-boot@lists.denx.de, greentime.hu@sifive.com,
vincent.chen@sifive.com, Paul Walmsley <paul.walmsley@sifive.com>,
Green Wan <green.wan@sifive.com>
Subject: Re: [PATCH 1/1] board: sifive: unmatched: move kernel load address to 0x80200000
Date: Fri, 27 Oct 2023 12:43:07 -0400 [thread overview]
Message-ID: <20231027164307.GY496310@bill-the-cat> (raw)
In-Reply-To: <20231026032254.23043-1-yongxuan.wang@sifive.com>
[-- Attachment #1: Type: text/plain, Size: 1458 bytes --]
On Thu, Oct 26, 2023 at 03:22:52AM +0000, Yong-Xuan Wang wrote:
> U-boot initially loads the kernel image to the kernel_addr_r, and
> subsequently relocates it to memory address 0x80200000. Setting
> kernel_addr_r to 0x80200000 can eliminate one copy operation.
>
> Signed-off-by: Yong-Xuan Wang <yongxuan.wang@sifive.com>
> ---
> include/configs/sifive-unmatched.h | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/include/configs/sifive-unmatched.h b/include/configs/sifive-unmatched.h
> index 74150b7d4b..de8bfc1123 100644
> --- a/include/configs/sifive-unmatched.h
> +++ b/include/configs/sifive-unmatched.h
> @@ -36,7 +36,7 @@
> "name=system,size=-,bootable,type=${type_guid_gpt_system};"
>
> #define CFG_EXTRA_ENV_SETTINGS \
> - "kernel_addr_r=0x84000000\0" \
> + "kernel_addr_r=0x80200000\0" \
> "kernel_comp_addr_r=0x88000000\0" \
> "kernel_comp_size=0x4000000\0" \
> "fdt_addr_r=0x8c000000\0" \
This is I believe subtly wrong. If you want an execute in place kernel
image (and are using FIT images), this can be made to work. But if you
load your (Linux Kernel) Image to this address, the header will be at
0x80200000 and not the payload so you still end up moving it. Are you
sure this is (a) not still moving it and (b) it's OK to be executing the
header of the image like it's code (or is there some catch in the header
to lead to a jump over it, in that case) ?
--
Tom
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 659 bytes --]
next prev parent reply other threads:[~2023-10-27 16:43 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-10-26 3:22 [PATCH 1/1] board: sifive: unmatched: move kernel load address to 0x80200000 Yong-Xuan Wang
2023-10-27 16:43 ` Tom Rini [this message]
2023-10-31 7:56 ` Yong-Xuan Wang
2023-10-31 11:54 ` Tom Rini
2023-11-02 10:27 ` Yong-Xuan Wang
2023-11-02 13:27 ` Tom Rini
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=20231027164307.GY496310@bill-the-cat \
--to=trini@konsulko.com \
--cc=green.wan@sifive.com \
--cc=greentime.hu@sifive.com \
--cc=paul.walmsley@sifive.com \
--cc=u-boot@lists.denx.de \
--cc=vincent.chen@sifive.com \
--cc=yongxuan.wang@sifive.com \
/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