qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Alexander Gordeev <agordeev@redhat.com>
To: qemu-devel@nongnu.org
Cc: Peter Maydell <peter.maydell@linaro.org>,
	Andrew Jones <drjones@redhat.com>,
	Alexander Gordeev <agordeev@redhat.com>
Subject: [Qemu-devel] [PATCH] hw/arm/virt: Fix address in PCIe device tree node's unit name
Date: Wed, 21 Oct 2015 22:43:49 +0200	[thread overview]
Message-ID: <1445460229-7100-1-git-send-email-agordeev@redhat.com> (raw)

PCIe device tree unit name is pcie@10000000 - which denotes
IO space base address. However, the corresponding node's
"reg" property points to PCI configuration space base address
0x3f000000.

Set the unit name to pcie@3f000000 which is not only correct,
but also conforms to Open Firmware (IEEE 1275).

CC: Peter Maydell <peter.maydell@linaro.org>
CC: Andrew Jones <drjones@redhat.com>

Signed-off-by: Alexander Gordeev <agordeev@redhat.com>
---
 hw/arm/virt.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/hw/arm/virt.c b/hw/arm/virt.c
index 5d38c47..567be08 100644
--- a/hw/arm/virt.c
+++ b/hw/arm/virt.c
@@ -740,7 +740,6 @@ static void create_pcie(const VirtBoardInfo *vbi, qemu_irq *pic,
     hwaddr size_pio = vbi->memmap[VIRT_PCIE_PIO].size;
     hwaddr base_ecam = vbi->memmap[VIRT_PCIE_ECAM].base;
     hwaddr size_ecam = vbi->memmap[VIRT_PCIE_ECAM].size;
-    hwaddr base = base_mmio;
     int nr_pcie_buses = size_ecam / PCIE_MMCFG_SIZE_MIN;
     int irq = vbi->irqmap[VIRT_PCIE];
     MemoryRegion *mmio_alias;
@@ -789,7 +788,7 @@ static void create_pcie(const VirtBoardInfo *vbi, qemu_irq *pic,
         sysbus_connect_irq(SYS_BUS_DEVICE(dev), i, pic[irq + i]);
     }
 
-    nodename = g_strdup_printf("/pcie@%" PRIx64, base);
+    nodename = g_strdup_printf("/pcie@%" PRIx64, base_ecam);
     qemu_fdt_add_subnode(vbi->fdt, nodename);
     qemu_fdt_setprop_string(vbi->fdt, nodename,
                             "compatible", "pci-host-ecam-generic");
-- 
1.8.3.1

             reply	other threads:[~2015-10-21 20:44 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-10-21 20:43 Alexander Gordeev [this message]
2015-10-21 21:26 ` [Qemu-devel] [PATCH] hw/arm/virt: Fix address in PCIe device tree node's unit name Peter Maydell
2015-10-21 22:01   ` Alexander Gordeev
2015-10-23 14:18     ` Peter Maydell
2015-10-23 15:26       ` Alexander Gordeev
2015-10-23 15:26         ` Peter Maydell

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1445460229-7100-1-git-send-email-agordeev@redhat.com \
    --to=agordeev@redhat.com \
    --cc=drjones@redhat.com \
    --cc=peter.maydell@linaro.org \
    --cc=qemu-devel@nongnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).