mirror of
https://github.com/mii443/qemu.git
synced 2025-09-02 15:19:24 +00:00
hw/pci-host/ppc440_pcix: Do not expose a bridge device on PCI bus
Real 460EX SoC apparently does not expose a bridge device and having
it appear on PCI bus confuses an AmigaOS file system driver that uses
this to detect which machine it is running on.
Cc: qemu-stable@nongnu.org
Signed-off-by: BALATON Zoltan <balaton@eik.bme.hu>
Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Message-ID: <20240411192443.B4D644E6026@zero.eik.bme.hu>
Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
(cherry picked from commit 6e4aceba20
)
Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
This commit is contained in:
committed by
Michael Tokarev
parent
dd784cb65d
commit
1a78b89bcf
@ -53,7 +53,7 @@ OBJECT_DECLARE_SIMPLE_TYPE(PPC440PCIXState, PPC440_PCIX_HOST)
|
|||||||
struct PPC440PCIXState {
|
struct PPC440PCIXState {
|
||||||
PCIHostState parent_obj;
|
PCIHostState parent_obj;
|
||||||
|
|
||||||
PCIDevice *dev;
|
uint8_t config[PCI_CONFIG_SPACE_SIZE];
|
||||||
struct PLBOutMap pom[PPC440_PCIX_NR_POMS];
|
struct PLBOutMap pom[PPC440_PCIX_NR_POMS];
|
||||||
struct PLBInMap pim[PPC440_PCIX_NR_PIMS];
|
struct PLBInMap pim[PPC440_PCIX_NR_PIMS];
|
||||||
uint32_t sts;
|
uint32_t sts;
|
||||||
@ -172,7 +172,7 @@ static void ppc440_pcix_reg_write4(void *opaque, hwaddr addr,
|
|||||||
trace_ppc440_pcix_reg_write(addr, val, size);
|
trace_ppc440_pcix_reg_write(addr, val, size);
|
||||||
switch (addr) {
|
switch (addr) {
|
||||||
case PCI_VENDOR_ID ... PCI_MAX_LAT:
|
case PCI_VENDOR_ID ... PCI_MAX_LAT:
|
||||||
stl_le_p(s->dev->config + addr, val);
|
stl_le_p(s->config + addr, val);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case PCIX0_POM0LAL:
|
case PCIX0_POM0LAL:
|
||||||
@ -303,7 +303,7 @@ static uint64_t ppc440_pcix_reg_read4(void *opaque, hwaddr addr,
|
|||||||
|
|
||||||
switch (addr) {
|
switch (addr) {
|
||||||
case PCI_VENDOR_ID ... PCI_MAX_LAT:
|
case PCI_VENDOR_ID ... PCI_MAX_LAT:
|
||||||
val = ldl_le_p(s->dev->config + addr);
|
val = ldl_le_p(s->config + addr);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case PCIX0_POM0LAL:
|
case PCIX0_POM0LAL:
|
||||||
@ -499,10 +499,7 @@ static void ppc440_pcix_realize(DeviceState *dev, Error **errp)
|
|||||||
memory_region_init(&s->iomem, OBJECT(dev), "pci-io", 64 * KiB);
|
memory_region_init(&s->iomem, OBJECT(dev), "pci-io", 64 * KiB);
|
||||||
h->bus = pci_register_root_bus(dev, NULL, ppc440_pcix_set_irq,
|
h->bus = pci_register_root_bus(dev, NULL, ppc440_pcix_set_irq,
|
||||||
ppc440_pcix_map_irq, &s->irq, &s->busmem, &s->iomem,
|
ppc440_pcix_map_irq, &s->irq, &s->busmem, &s->iomem,
|
||||||
PCI_DEVFN(0, 0), 1, TYPE_PCI_BUS);
|
PCI_DEVFN(1, 0), 1, TYPE_PCI_BUS);
|
||||||
|
|
||||||
s->dev = pci_create_simple(h->bus, PCI_DEVFN(0, 0),
|
|
||||||
TYPE_PPC4xx_HOST_BRIDGE);
|
|
||||||
|
|
||||||
memory_region_init(&s->bm, OBJECT(s), "bm-ppc440-pcix", UINT64_MAX);
|
memory_region_init(&s->bm, OBJECT(s), "bm-ppc440-pcix", UINT64_MAX);
|
||||||
memory_region_add_subregion(&s->bm, 0x0, &s->busmem);
|
memory_region_add_subregion(&s->bm, 0x0, &s->busmem);
|
||||||
|
Reference in New Issue
Block a user