mirror of https://github.com/xemu-project/xemu.git
riscv: virt: Correct pci "bus-range" encoding
The largest pci bus number should be calculated from ECAM size, instead of its base address. Signed-off-by: Bin Meng <bmeng.cn@gmail.com> Reviewed-by: Alistair Francis <alistair.francis@wdc.com> Signed-off-by: Palmer Dabbelt <palmer@sifive.com>
This commit is contained in:
parent
db21e6f727
commit
5b7ae1cec9
|
@ -298,7 +298,7 @@ static void *create_fdt(RISCVVirtState *s, const struct MemmapEntry *memmap,
|
|||
qemu_fdt_setprop_string(fdt, nodename, "device_type", "pci");
|
||||
qemu_fdt_setprop_cell(fdt, nodename, "linux,pci-domain", 0);
|
||||
qemu_fdt_setprop_cells(fdt, nodename, "bus-range", 0,
|
||||
memmap[VIRT_PCIE_ECAM].base /
|
||||
memmap[VIRT_PCIE_ECAM].size /
|
||||
PCIE_MMCFG_SIZE_MIN - 1);
|
||||
qemu_fdt_setprop(fdt, nodename, "dma-coherent", NULL, 0);
|
||||
qemu_fdt_setprop_cells(fdt, nodename, "reg", 0, memmap[VIRT_PCIE_ECAM].base,
|
||||
|
|
Loading…
Reference in New Issue