qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [Qemu-devel] [PATCH] riscv: virt: Correct pci "bus-range" encoding
@ 2019-05-29  8:52 Bin Meng
  2019-05-30  3:13 ` Alistair Francis
  0 siblings, 1 reply; 7+ messages in thread
From: Bin Meng @ 2019-05-29  8:52 UTC (permalink / raw)
  To: qemu-riscv, qemu-devel, Alistair Francis, Palmer Dabbelt

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>
---

 hw/riscv/virt.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/hw/riscv/virt.c b/hw/riscv/virt.c
index fc4c6b3..d6132d9 100644
--- a/hw/riscv/virt.c
+++ b/hw/riscv/virt.c
@@ -299,7 +299,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,
-- 
2.7.4



^ permalink raw reply related	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2019-06-26  8:05 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2019-05-29  8:52 [Qemu-devel] [PATCH] riscv: virt: Correct pci "bus-range" encoding Bin Meng
2019-05-30  3:13 ` Alistair Francis
2019-05-30  3:36   ` Bin Meng
2019-06-06 12:55     ` Bin Meng
2019-06-06 18:43       ` Alistair Francis
2019-06-26  1:47         ` Bin Meng
2019-06-26  8:01           ` Palmer Dabbelt

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).