|
| From: | Philippe Mathieu-Daudé |
| Subject: | Re: [PATCH] hw/rx: rx-gdbsim: DTB load address fix. |
| Date: | Mon, 31 Jan 2022 14:41:07 +0100 |
| User-agent: | Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:91.0) Gecko/20100101 Thunderbird/91.5.0 |
Cc'ing qemu-trivial@ On 31/1/22 10:42, Yoshinori Sato wrote:
Linux kernel required alined address of DTB.
But missing align in dtb load function.
Fixed to load to the correct address.
Signed-off-by: Yoshinori Sato <ysato@users.sourceforge.jp>
---
hw/rx/rx-gdbsim.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/hw/rx/rx-gdbsim.c b/hw/rx/rx-gdbsim.c
index 75d1fec6ca..f70472aeaf 100644
--- a/hw/rx/rx-gdbsim.c
+++ b/hw/rx/rx-gdbsim.c
@@ -143,6 +143,7 @@ static void rx_gdbsim_init(MachineState *machine)
}
/* DTB is located at the end of SDRAM space. */
dtb_offset = machine->ram_size - dtb_size;
+ dtb_offset &= ~0x0f;
Alternatively (more explicit):
dtb_offset = ROUND_DOWN(machine->ram_size - dtb_size, 16);
For any option:
Reviewed-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
| [Prev in Thread] | Current Thread | [Next in Thread] |