|
@@ -145,7 +145,8 @@ static void *create_fdt(RISCVVirtState *s, const struct MemmapEntry *memmap,
|
|
|
g_free(nodename);
|
|
|
|
|
|
qemu_fdt_add_subnode(fdt, "/cpus");
|
|
|
- qemu_fdt_setprop_cell(fdt, "/cpus", "timebase-frequency", 10000000);
|
|
|
+ qemu_fdt_setprop_cell(fdt, "/cpus", "timebase-frequency",
|
|
|
+ SIFIVE_CLINT_TIMEBASE_FREQ);
|
|
|
qemu_fdt_setprop_cell(fdt, "/cpus", "#size-cells", 0x0);
|
|
|
qemu_fdt_setprop_cell(fdt, "/cpus", "#address-cells", 0x1);
|
|
|
|
|
@@ -155,7 +156,8 @@ static void *create_fdt(RISCVVirtState *s, const struct MemmapEntry *memmap,
|
|
|
char *intc = g_strdup_printf("/cpus/cpu@%d/interrupt-controller", cpu);
|
|
|
char *isa = riscv_isa_string(&s->soc.harts[cpu]);
|
|
|
qemu_fdt_add_subnode(fdt, nodename);
|
|
|
- qemu_fdt_setprop_cell(fdt, nodename, "clock-frequency", 1000000000);
|
|
|
+ qemu_fdt_setprop_cell(fdt, nodename, "clock-frequency",
|
|
|
+ VIRT_CLOCK_FREQ);
|
|
|
qemu_fdt_setprop_string(fdt, nodename, "mmu-type", "riscv,sv48");
|
|
|
qemu_fdt_setprop_string(fdt, nodename, "riscv,isa", isa);
|
|
|
qemu_fdt_setprop_string(fdt, nodename, "compatible", "riscv");
|