Revision | 916f4484a0c9a73f137b1adb8f3a9bf2540e93fb (tree) |
---|---|
Time | 2022-02-02 19:02:26 |
Author | Yoshinori Sato <ysato@user...> |
Commiter | Yoshinori Sato |
hw/rx: rx-gdbsim DTB load address aligned of 16byte.
Linux kernel required alined address of DTB.
But missing align in dtb load function.
Fixed to load to the correct address.
v2 changes.
Use ROUND_DOWN macro.
Signed-off-by: Yoshinori Sato <ysato@users.sourceforge.jp>
@@ -142,7 +142,7 @@ static void rx_gdbsim_init(MachineState *machine) | ||
142 | 142 | exit(1); |
143 | 143 | } |
144 | 144 | /* DTB is located at the end of SDRAM space. */ |
145 | - dtb_offset = machine->ram_size - dtb_size; | |
145 | + dtb_offset = ROUND_DOWN(machine->ram_size - dtb_size, 16 - 1); | |
146 | 146 | rom_add_blob_fixed("dtb", dtb, dtb_size, |
147 | 147 | SDRAM_BASE + dtb_offset); |
148 | 148 | /* Set dtb address to R1 */ |