OSDN Git Service

hw/rx: rx-gdbsim DTB load address aligned of 16byte.
authorYoshinori Sato <ysato@users.sourceforge.jp>
Mon, 7 Feb 2022 13:27:58 +0000 (22:27 +0900)
committerRichard Henderson <richard.henderson@linaro.org>
Thu, 21 Apr 2022 17:06:42 +0000 (10:06 -0700)
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>
Reviewed-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
Message-Id: <20220207132758.84403-1-ysato@users.sourceforge.jp>
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
hw/rx/rx-gdbsim.c

index 64f897e..be147b4 100644 (file)
@@ -141,7 +141,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 */