From 4e0ada2b14d36468d133e26de71bd7a23ab218c6 Mon Sep 17 00:00:00 2001 From: Matt Borgerson Date: Fri, 1 May 2020 02:47:01 -0700 Subject: [PATCH] xbox: Get rid of piix3_init_functions Applying the following changes to the Xbox machine: - df45d38f7328219a709047ebf3b726d0f4ba4ee7 - 987aa99e3faba4d1b570656b70b1d3002918971c --- hw/xbox/xbox.c | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/hw/xbox/xbox.c b/hw/xbox/xbox.c index 52e5a202f5..f5cbbb45ba 100644 --- a/hw/xbox/xbox.c +++ b/hw/xbox/xbox.c @@ -28,7 +28,7 @@ #include "hw/usb.h" #include "net/net.h" #include "hw/boards.h" -#include "hw/ide.h" +#include "hw/ide/pci.h" #include "sysemu/sysemu.h" #include "sysemu/kvm.h" #include "kvm_i386.h" @@ -310,7 +310,7 @@ void xbox_init_common(MachineState *machine, GSIState *gsi_state; - DriveInfo *hd[MAX_IDE_BUS * MAX_IDE_DEVS]; + // DriveInfo *hd[MAX_IDE_BUS * MAX_IDE_DEVS]; // BusState *idebus[MAX_IDE_BUS]; ISADevice *rtc_state; ISADevice *pit = NULL; @@ -374,11 +374,10 @@ void xbox_init_common(MachineState *machine, pcspk_init(isa_bus, pit); - ide_drive_get(hd, ARRAY_SIZE(hd)); - // PCIDevice *ide_dev = pci_piix3_ide_init(pci_bus, hd, PCI_DEVFN(9, 0)); - pci_piix3_ide_init(pci_bus, hd, PCI_DEVFN(9, 0)); - // idebus[0] = qdev_get_child_bus(&ide_dev->qdev, "ide.0"); - // idebus[1] = qdev_get_child_bus(&ide_dev->qdev, "ide.1"); + PCIDevice *dev = pci_create_simple(pci_bus, PCI_DEVFN(9, 0), "piix3-ide"); + pci_ide_create_devs(dev); + // idebus[0] = qdev_get_child_bus(&dev->qdev, "ide.0"); + // idebus[1] = qdev_get_child_bus(&dev->qdev, "ide.1"); // xbox bios wants this bit pattern set to mark the data as valid uint8_t bits = 0x55;