[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PULL 07/14] grackle: set device fw_name and address for co
From: |
David Gibson |
Subject: |
[Qemu-devel] [PULL 07/14] grackle: set device fw_name and address for correct fw path generation |
Date: |
Fri, 7 Sep 2018 17:31:48 +1000 |
From: Mark Cave-Ayland <address@hidden>
Signed-off-by: Mark Cave-Ayland <address@hidden>
Signed-off-by: David Gibson <address@hidden>
---
hw/pci-host/grackle.c | 17 +++++++++++++++++
hw/ppc/mac_oldworld.c | 1 +
2 files changed, 18 insertions(+)
diff --git a/hw/pci-host/grackle.c b/hw/pci-host/grackle.c
index 4810a4de79..5a151e93e9 100644
--- a/hw/pci-host/grackle.c
+++ b/hw/pci-host/grackle.c
@@ -37,6 +37,7 @@
typedef struct GrackleState {
PCIHostState parent_obj;
+ uint32_t ofw_addr;
HeathrowState *pic;
qemu_irq irqs[4];
MemoryRegion pci_mmio;
@@ -146,12 +147,28 @@ static const TypeInfo grackle_pci_info = {
},
};
+static char *grackle_ofw_unit_address(const SysBusDevice *dev)
+{
+ GrackleState *s = GRACKLE_PCI_HOST_BRIDGE(dev);
+
+ return g_strdup_printf("%x", s->ofw_addr);
+}
+
+static Property grackle_properties[] = {
+ DEFINE_PROP_UINT32("ofw-addr", GrackleState, ofw_addr, -1),
+ DEFINE_PROP_END_OF_LIST()
+};
+
static void grackle_class_init(ObjectClass *klass, void *data)
{
DeviceClass *dc = DEVICE_CLASS(klass);
+ SysBusDeviceClass *sbc = SYS_BUS_DEVICE_CLASS(klass);
dc->realize = grackle_realize;
+ dc->props = grackle_properties;
set_bit(DEVICE_CATEGORY_BRIDGE, dc->categories);
+ dc->fw_name = "pci";
+ sbc->explicit_ofw_unit_address = grackle_ofw_unit_address;
}
static const TypeInfo grackle_host_info = {
diff --git a/hw/ppc/mac_oldworld.c b/hw/ppc/mac_oldworld.c
index 80b5525775..c7b73e274f 100644
--- a/hw/ppc/mac_oldworld.c
+++ b/hw/ppc/mac_oldworld.c
@@ -254,6 +254,7 @@ static void ppc_heathrow_init(MachineState *machine)
/* Grackle PCI host bridge */
dev = qdev_create(NULL, TYPE_GRACKLE_PCI_HOST_BRIDGE);
+ qdev_prop_set_uint32(dev, "ofw-addr", 0x80000000);
object_property_set_link(OBJECT(dev), OBJECT(pic_dev), "pic",
&error_abort);
qdev_init_nofail(dev);
--
2.17.1
- [Qemu-devel] [PULL 14/14] target-ppc: Extend HWCAP2 bits for ISA 3.0, (continued)
- [Qemu-devel] [PULL 14/14] target-ppc: Extend HWCAP2 bits for ISA 3.0, David Gibson, 2018/09/07
- [Qemu-devel] [PULL 06/14] macio: add addr property to macio IDE object, David Gibson, 2018/09/07
- [Qemu-devel] [PULL 03/14] spapr_pci: fix potential NULL pointer dereference, David Gibson, 2018/09/07
- [Qemu-devel] [PULL 08/14] mac_oldworld: implement custom FWPathProvider, David Gibson, 2018/09/07
- [Qemu-devel] [PULL 04/14] macio: move MACIOIDEState type declarations to macio.h, David Gibson, 2018/09/07
- [Qemu-devel] [PULL 05/14] macio: add macio bus to help with fw path generation, David Gibson, 2018/09/07
- [Qemu-devel] [PULL 09/14] uninorth: add ofw-addr property to allow correct fw path generation, David Gibson, 2018/09/07
- [Qemu-devel] [PULL 11/14] spapr: Correct reference count on spapr-cpu-core, David Gibson, 2018/09/07
- [Qemu-devel] [PULL 13/14] target/ppc/kvm: set vcpu as online/offline, David Gibson, 2018/09/07
- [Qemu-devel] [PULL 12/14] Fix a deadlock case in the CPU hotplug flow, David Gibson, 2018/09/07
- [Qemu-devel] [PULL 07/14] grackle: set device fw_name and address for correct fw path generation,
David Gibson <=
- Re: [Qemu-devel] [PULL 00/14] ppc-for-3.1 queue 20180907, Peter Maydell, 2018/09/24