From: "Philippe Mathieu-Daudé" <philmd@linaro.org>
To: qemu-devel@nongnu.org
Cc: "Marcel Apfelbaum" <marcel.apfelbaum@gmail.com>,
"Philippe Mathieu-Daudé" <philmd@linaro.org>,
"Hervé Poussineau" <hpoussin@reactos.org>,
"Artyom Tarasenko" <atar4qemu@gmail.com>,
"Michael S. Tsirkin" <mst@redhat.com>,
"Huacai Chen" <chenhuacai@kernel.org>,
qemu-ppc@nongnu.org,
"Mark Cave-Ayland" <mark.cave-ayland@ilande.co.uk>,
"Jiaxun Yang" <jiaxun.yang@flygoat.com>
Subject: [PATCH 4/4] hw/sparc64/ebus: Access memory regions via pci_address_space_io()
Date: Wed, 11 Oct 2023 20:59:54 +0200 [thread overview]
Message-ID: <20231011185954.10337-5-philmd@linaro.org> (raw)
In-Reply-To: <20231011185954.10337-1-philmd@linaro.org>
PCI functions are plugged on a PCI bus. They can only access
external memory regions via the bus.
Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
---
hw/sparc64/sun4u.c | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/hw/sparc64/sun4u.c b/hw/sparc64/sun4u.c
index d908a38f73..c871170378 100644
--- a/hw/sparc64/sun4u.c
+++ b/hw/sparc64/sun4u.c
@@ -360,11 +360,11 @@ static void ebus_realize(PCIDevice *pci_dev, Error **errp)
pci_dev->config[0x09] = 0x00; // programming i/f
pci_dev->config[0x0D] = 0x0a; // latency_timer
- memory_region_init_alias(&s->bar0, OBJECT(s), "bar0", get_system_io(),
- 0, 0x1000000);
+ memory_region_init_alias(&s->bar0, OBJECT(s), "bar0",
+ pci_address_space_io(pci_dev), 0, 0x1000000);
pci_register_bar(pci_dev, 0, PCI_BASE_ADDRESS_SPACE_MEMORY, &s->bar0);
- memory_region_init_alias(&s->bar1, OBJECT(s), "bar1", get_system_io(),
- 0, 0x8000);
+ memory_region_init_alias(&s->bar1, OBJECT(s), "bar1",
+ pci_address_space_io(pci_dev), 0, 0x8000);
pci_register_bar(pci_dev, 1, PCI_BASE_ADDRESS_SPACE_IO, &s->bar1);
}
--
2.41.0
next prev parent reply other threads:[~2023-10-11 19:01 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-10-11 18:59 [PATCH 0/4] hw/pci: Have functions acess memory regions via pci_address_space() Philippe Mathieu-Daudé
2023-10-11 18:59 ` [PATCH 1/4] hw/isa/i82378: Access " Philippe Mathieu-Daudé
2023-10-15 22:13 ` Bernhard Beschow
2023-10-11 18:59 ` [PATCH 2/4] hw/isa/lpc_ich9: Access memory regions via pci_address_space[_io]() Philippe Mathieu-Daudé
2023-10-16 10:27 ` Bernhard Beschow
2023-10-11 18:59 ` [PATCH 3/4] hw/pci-host/bonito: " Philippe Mathieu-Daudé
2023-10-15 22:19 ` Bernhard Beschow
2023-10-16 7:04 ` Philippe Mathieu-Daudé
2024-02-06 15:45 ` Philippe Mathieu-Daudé
2024-02-06 16:14 ` Bernhard Beschow
2023-10-11 18:59 ` Philippe Mathieu-Daudé [this message]
2023-10-13 18:29 ` [PATCH 4/4] hw/sparc64/ebus: Access memory regions via pci_address_space_io() Mark Cave-Ayland
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=20231011185954.10337-5-philmd@linaro.org \
--to=philmd@linaro.org \
--cc=atar4qemu@gmail.com \
--cc=chenhuacai@kernel.org \
--cc=hpoussin@reactos.org \
--cc=jiaxun.yang@flygoat.com \
--cc=marcel.apfelbaum@gmail.com \
--cc=mark.cave-ayland@ilande.co.uk \
--cc=mst@redhat.com \
--cc=qemu-devel@nongnu.org \
--cc=qemu-ppc@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).