[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PATCH 23/29] hw/i386: extract i440fx related declarations/
From: |
Philippe Mathieu-Daudé |
Subject: |
[Qemu-devel] [PATCH 23/29] hw/i386: extract i440fx related declarations/definitions to i440fx.h |
Date: |
Sun, 7 Jan 2018 23:45:52 -0300 |
Signed-off-by: Philippe Mathieu-Daudé <address@hidden>
---
include/hw/i386/pc.h | 22 -------------------
include/hw/pci-host/i440fx.h | 51 ++++++++++++++++++++++++++++++++++++++++++++
hw/acpi/pcihp.c | 2 +-
hw/i386/pc_piix.c | 1 +
hw/pci-host/piix.c | 1 +
stubs/pci-host-piix.c | 3 ++-
MAINTAINERS | 1 +
7 files changed, 57 insertions(+), 24 deletions(-)
create mode 100644 include/hw/pci-host/i440fx.h
diff --git a/include/hw/i386/pc.h b/include/hw/i386/pc.h
index 768428db3b..b63fdbd9e2 100644
--- a/include/hw/i386/pc.h
+++ b/include/hw/i386/pc.h
@@ -239,28 +239,6 @@ int cmos_get_fd_drive_type(FloppyDriveType fd0);
/* hpet.c */
extern int no_hpet;
-/* piix_pci.c */
-struct PCII440FXState;
-typedef struct PCII440FXState PCII440FXState;
-
-#define TYPE_I440FX_PCI_HOST_BRIDGE "i440FX-pcihost"
-#define TYPE_I440FX_PCI_DEVICE "i440FX"
-
-#define TYPE_IGD_PASSTHROUGH_I440FX_PCI_DEVICE "igd-passthrough-i440FX"
-
-PCIBus *i440fx_init(const char *host_type, const char *pci_type,
- PCII440FXState **pi440fx_state, int *piix_devfn,
- ISABus **isa_bus, qemu_irq *pic,
- MemoryRegion *address_space_mem,
- MemoryRegion *address_space_io,
- ram_addr_t ram_size,
- ram_addr_t below_4g_mem_size,
- ram_addr_t above_4g_mem_size,
- MemoryRegion *pci_memory,
- MemoryRegion *ram_memory);
-
-PCIBus *find_i440fx(void);
-
/* pc_sysfw.c */
void pc_system_firmware_init(MemoryRegion *rom_memory,
bool isapc_ram_fw);
diff --git a/include/hw/pci-host/i440fx.h b/include/hw/pci-host/i440fx.h
new file mode 100644
index 0000000000..c796382d52
--- /dev/null
+++ b/include/hw/pci-host/i440fx.h
@@ -0,0 +1,51 @@
+/*
+ * QEMU i440FX North Bridge Emulation
+ *
+ * Copyright (c) 2006 Fabrice Bellard
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a copy
+ * of this software and associated documentation files (the "Software"), to
deal
+ * in the Software without restriction, including without limitation the rights
+ * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+ * copies of the Software, and to permit persons to whom the Software is
+ * furnished to do so, subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice shall be included in
+ * all copies or substantial portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
+ * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
FROM,
+ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+ * THE SOFTWARE.
+ */
+#ifndef HW_PCI_HOST_I440FX_H
+#define HW_PCI_HOST_I440FX_H
+
+#include "qemu-common.h"
+#include "hw/hw.h"
+
+struct PCII440FXState;
+typedef struct PCII440FXState PCII440FXState;
+
+#define TYPE_I440FX_PCI_HOST_BRIDGE "i440FX-pcihost"
+#define TYPE_I440FX_PCI_DEVICE "i440FX"
+
+#define TYPE_IGD_PASSTHROUGH_I440FX_PCI_DEVICE "igd-passthrough-i440FX"
+
+PCIBus *i440fx_init(const char *host_type, const char *pci_type,
+ PCII440FXState **pi440fx_state, int *piix_devfn,
+ ISABus **isa_bus, qemu_irq *pic,
+ MemoryRegion *address_space_mem,
+ MemoryRegion *address_space_io,
+ ram_addr_t ram_size,
+ ram_addr_t below_4g_mem_size,
+ ram_addr_t above_4g_mem_size,
+ MemoryRegion *pci_memory,
+ MemoryRegion *ram_memory);
+
+PCIBus *find_i440fx(void);
+
+#endif /* HW_PCI_HOST_I440FX_H */
diff --git a/hw/acpi/pcihp.c b/hw/acpi/pcihp.c
index 7da51c0569..51a65a34a1 100644
--- a/hw/acpi/pcihp.c
+++ b/hw/acpi/pcihp.c
@@ -28,8 +28,8 @@
#include "hw/acpi/pcihp.h"
#include "hw/hw.h"
-#include "hw/i386/pc.h"
#include "hw/pci/pci.h"
+#include "hw/pci-host/i440fx.h"
#include "hw/acpi/acpi.h"
#include "sysemu/sysemu.h"
#include "exec/ioport.h"
diff --git a/hw/i386/pc_piix.c b/hw/i386/pc_piix.c
index 89606c85db..326ca302dc 100644
--- a/hw/i386/pc_piix.c
+++ b/hw/i386/pc_piix.c
@@ -31,6 +31,7 @@
#include "hw/smbios/smbios.h"
#include "hw/pci/pci.h"
#include "hw/pci/pci_ids.h"
+#include "hw/pci-host/i440fx.h"
#include "hw/southbridge/i82371_piix.h"
#include "hw/usb.h"
#include "net/net.h"
diff --git a/hw/pci-host/piix.c b/hw/pci-host/piix.c
index 6e8cea8372..6f963b5a07 100644
--- a/hw/pci-host/piix.c
+++ b/hw/pci-host/piix.c
@@ -27,6 +27,7 @@
#include "hw/i386/pc.h"
#include "hw/pci/pci.h"
#include "hw/pci/pci_host.h"
+#include "hw/pci-host/i440fx.h"
#include "hw/southbridge/i82371_piix.h"
#include "hw/isa/isa.h"
#include "hw/sysbus.h"
diff --git a/stubs/pci-host-piix.c b/stubs/pci-host-piix.c
index 6ed81b1f21..93975adbfe 100644
--- a/stubs/pci-host-piix.c
+++ b/stubs/pci-host-piix.c
@@ -1,5 +1,6 @@
#include "qemu/osdep.h"
-#include "hw/i386/pc.h"
+#include "hw/pci-host/i440fx.h"
+
PCIBus *find_i440fx(void)
{
return NULL;
diff --git a/MAINTAINERS b/MAINTAINERS
index 968f32f93d..c3efcd2316 100644
--- a/MAINTAINERS
+++ b/MAINTAINERS
@@ -859,6 +859,7 @@ F: hw/i2c/smbus_ich9.c
F: hw/acpi/piix4.c
F: hw/acpi/ich9.c
F: include/hw/acpi/ich9.h
+F: include/hw/pci-host/i440fx.h
F: hw/misc/sga.c
PC Chipset
--
2.15.1
- [Qemu-devel] [PATCH 13/29] piix4: convert reset function to QOM, (continued)
- [Qemu-devel] [PATCH 13/29] piix4: convert reset function to QOM, Philippe Mathieu-Daudé, 2018/01/07
- [Qemu-devel] [PATCH 14/29] piix4: add Reset Control Register, Philippe Mathieu-Daudé, 2018/01/07
- [Qemu-devel] [PATCH 15/29] piix4: add a i8259 interrupt controller as specified in datasheet, Philippe Mathieu-Daudé, 2018/01/07
- [Qemu-devel] [RFC PATCH 16/29] Revert "irq: introduce qemu_irq_proxy()", Philippe Mathieu-Daudé, 2018/01/07
- [Qemu-devel] [PATCH 17/29] piix: move piix4 declaration into new southbridge/i82371_piix.h, Philippe Mathieu-Daudé, 2018/01/07
- [Qemu-devel] [PATCH 18/29] piix4: add a i8257 dma controller as specified in datasheet, Philippe Mathieu-Daudé, 2018/01/07
- [Qemu-devel] [PATCH 19/29] piix4: add a i8254 pit controller as specified in datasheet, Philippe Mathieu-Daudé, 2018/01/07
- [Qemu-devel] [PATCH 20/29] piix4: add a speaker as specified in datasheet, Philippe Mathieu-Daudé, 2018/01/07
- [Qemu-devel] [PATCH 21/29] piix: move southbridge related declarations/definitions to i82371_piix.h, Philippe Mathieu-Daudé, 2018/01/07
- [Qemu-devel] [PATCH 22/29] piix3: extract piix3_init() from i440fx_init(), Philippe Mathieu-Daudé, 2018/01/07
- [Qemu-devel] [PATCH 23/29] hw/i386: extract i440fx related declarations/definitions to i440fx.h,
Philippe Mathieu-Daudé <=
- [Qemu-devel] [PATCH 25/29] hw/i386: move piix from hw/pci-host to hw/southbridge, Philippe Mathieu-Daudé, 2018/01/07
- [Qemu-devel] [PATCH 24/29] hw/i386: extract i440fx code from piix.c into i440fx.c, Philippe Mathieu-Daudé, 2018/01/07
- [Qemu-devel] [PATCH 26/29] configs/mips-softmmu: use common CONFIG_PCI_PIIX instead of CONFIG_PIIX4, Philippe Mathieu-Daudé, 2018/01/07
- [Qemu-devel] [PATCH 27/29] piix3: convert reset function to QOM, Philippe Mathieu-Daudé, 2018/01/07
- [Qemu-devel] [PATCH 28/29] piix: merge common code from isa/piix4.c with southbridge piix3, Philippe Mathieu-Daudé, 2018/01/07
- [Qemu-devel] [NOTFORMERGE PATCH 29/29] piix4: add isa_superio_init, Philippe Mathieu-Daudé, 2018/01/07