hw/riscv: Move the dtb load bits outside of create_fdt()

Move the dtb load bits outside of create_fdt(), and put it explicitly
in sifive_u_machine_init() and virt_machine_init(). With such change
create_fdt() does exactly what its function name tells us.

Suggested-by: Daniel Henrique Barboza <dbarboza@ventanamicro.com>
Signed-off-by: Bin Meng <bmeng@tinylab.org>
Reviewed-by: Daniel Henrique Barboza <dbarboza@ventanamicro.com>
Message-ID: <20230228074522.1845007-2-bmeng@tinylab.org>
Signed-off-by: Palmer Dabbelt <palmer@rivosinc.com>
This commit is contained in:
Bin Meng 2023-02-28 15:45:22 +08:00 committed by Palmer Dabbelt
parent d43d54ca2b
commit fc9ec3625f
No known key found for this signature in database
GPG key ID: 2E1319F35FBB1889
3 changed files with 30 additions and 31 deletions

View file

@ -68,6 +68,7 @@ typedef struct SiFiveUState {
/*< public >*/
SiFiveUSoCState soc;
int fdt_size;
bool start_in_flash;
uint32_t msel;