From: Yoshinori Sato <ysato@users.sourceforge.jp>
To: qemu-devel@nongnu.org, qemu-trivial@nongnu.org
Cc: "Philippe Mathieu-Daudé" <f4bug@amsat.org>,
"Yoshinori Sato" <ysato@users.sourceforge.jp>
Subject: [PATCH v3] hw/rx: rx-gdbsim DTB load address aligned of 16byte.
Date: Mon, 7 Feb 2022 22:27:58 +0900 [thread overview]
Message-ID: <20220207132758.84403-1-ysato@users.sourceforge.jp> (raw)
Linux kernel required alined address of DTB.
But missing align in dtb load function.
Fixed to load to the correct address.
v3 changes.
Fix round value.
v2 changes.
Use ROUND_DOWN macro.
Signed-off-by: Yoshinori Sato <ysato@users.sourceforge.jp>
Reviewed-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
---
hw/rx/rx-gdbsim.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/hw/rx/rx-gdbsim.c b/hw/rx/rx-gdbsim.c
index 75d1fec6ca..887083737b 100644
--- a/hw/rx/rx-gdbsim.c
+++ b/hw/rx/rx-gdbsim.c
@@ -142,7 +142,7 @@ static void rx_gdbsim_init(MachineState *machine)
exit(1);
}
/* DTB is located at the end of SDRAM space. */
- dtb_offset = machine->ram_size - dtb_size;
+ dtb_offset = ROUND_DOWN(machine->ram_size - dtb_size, 16);
rom_add_blob_fixed("dtb", dtb, dtb_size,
SDRAM_BASE + dtb_offset);
/* Set dtb address to R1 */
--
2.30.2
next reply other threads:[~2022-02-07 13:49 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-02-07 13:27 Yoshinori Sato [this message]
2022-04-21 17:07 ` [PATCH v3] hw/rx: rx-gdbsim DTB load address aligned of 16byte Richard Henderson
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=20220207132758.84403-1-ysato@users.sourceforge.jp \
--to=ysato@users.sourceforge.jp \
--cc=f4bug@amsat.org \
--cc=qemu-devel@nongnu.org \
--cc=qemu-trivial@nongnu.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;
as well as URLs for NNTP newsgroup(s).