From nobody Tue Oct 28 12:16:30 2025 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of gnu.org designates 208.118.235.17 as permitted sender) client-ip=208.118.235.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Authentication-Results: mx.zohomail.com; dkim=fail; spf=pass (zoho.com: domain of gnu.org designates 208.118.235.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org Return-Path: Received: from lists.gnu.org (lists.gnu.org [208.118.235.17]) by mx.zohomail.com with SMTPS id 1515380239246588.0160155273668; Sun, 7 Jan 2018 18:57:19 -0800 (PST) Received: from localhost ([::1]:59422 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1eYNck-0007g7-DC for importer@patchew.org; Sun, 07 Jan 2018 21:57:18 -0500 Received: from eggs.gnu.org ([2001:4830:134:3::10]:51712) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1eYNTG-0007Yj-3G for qemu-devel@nongnu.org; Sun, 07 Jan 2018 21:47:34 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1eYNTE-0003Bs-VM for qemu-devel@nongnu.org; Sun, 07 Jan 2018 21:47:30 -0500 Received: from mail-qk0-x241.google.com ([2607:f8b0:400d:c09::241]:46954) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1eYNTE-0003Bh-Pq for qemu-devel@nongnu.org; Sun, 07 Jan 2018 21:47:28 -0500 Received: by mail-qk0-x241.google.com with SMTP id l12so12196081qke.13 for ; Sun, 07 Jan 2018 18:47:28 -0800 (PST) Received: from x1.local ([138.117.48.219]) by smtp.gmail.com with ESMTPSA id d10sm7156245qkg.16.2018.01.07.18.47.24 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sun, 07 Jan 2018 18:47:27 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=Q0mJs1CiBgULiGXLtq3Ilxs8jSZUTUdrkdbGZi3wh04=; b=SUVBihjs338HqYhRgA/x+HMTyfN5UJ8zjFyMHX612hwIDg213xCQBLdxJl9NQSOGdj tX0XdP+j6Qjaig+3cEnWH1r9eW2RG5D5ZUs+3SqC4fQ5M8xGjnem7vyH/jFVlwidCL0j +E9OyIL04KM+qYDslRszkBM2X/V7GV7fLYbL4JquHXiTdGFZqoBjWx1Z4mSx2xtW0oKh XSjG7yWP19U7czvBvfKieJGmeEJCO+LCLte6q8to1Dx79cGCDa1g/QwKaHHAtqEWYD2V WwTh0H29z211jnVcD2lts+rFJYrbaCb/WYtD9QbeZczuplS7xhHTkDTEC1s+9OqlxCEE U0Dg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:from:to:cc:subject:date:message-id :in-reply-to:references:mime-version:content-transfer-encoding; bh=Q0mJs1CiBgULiGXLtq3Ilxs8jSZUTUdrkdbGZi3wh04=; b=mFLNB+Cnt31aornTc8YmRjcgdeHjdFst1Y56mMgZ2KIysiTHnX+2wyBfU/SwgaxBh/ 2gnMwrSNbjwlKPsPhiUG8VFUP+rsX8Aa21VgIYYu7iptCROaP2Olp+C0HzgCyxcv9lOT 8E4IVJtq5nPzF6WrBLnTVRuWzz7SY8Vhme+ZtmooFjqkpkpWKF7M7/p4ntkoC6IjUopf 52RbvB3dgc18WK9dlPLVTBVyphZGgBhhFrvFffa0Y53f8UZGrGtqSdU+yxz3N90ZaNJa SrOWZsiMBINmVGfaxQcZMwppNumie6EHW5h7c75G/nPkLKZtLXc1mdZR1SGTMdfjBJMV q17g== X-Gm-Message-State: AKwxytcypqH0l+nYrlxl/FcQp/ono5c/XMp582X5Pk+4udag4V3QzCux 1U/rnuW6GZQqTmXu4lQYg98= X-Google-Smtp-Source: ACJfBou0DOchj2cIZ3NeFClYFP0KTiqZryqGyZmZ2B/i4LOmpLrzJ1l7kJwCotaSt9yI9ODvpqpenA== X-Received: by 10.55.158.65 with SMTP id h62mr14580918qke.158.1515379648251; Sun, 07 Jan 2018 18:47:28 -0800 (PST) From: =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= To: Paolo Bonzini , "Michael S. Tsirkin" , =?UTF-8?q?Herv=C3=A9=20Poussineau?= , Aurelien Jarno , Eduardo Habkost , Marcel Apfelbaum Date: Sun, 7 Jan 2018 23:45:52 -0300 Message-Id: <20180108024558.17983-24-f4bug@amsat.org> X-Mailer: git-send-email 2.15.1 In-Reply-To: <20180108024558.17983-1-f4bug@amsat.org> References: <20180108024558.17983-1-f4bug@amsat.org> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2607:f8b0:400d:c09::241 Subject: [Qemu-devel] [PATCH 23/29] hw/i386: extract i440fx related declarations/definitions to i440fx.h X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Igor Mammedov , Richard Henderson , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , qemu-devel@nongnu.org Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) X-ZohoMail: RDKM_2 RSF_0 Z_629925259 SPT_0 Signed-off-by: Philippe Mathieu-Daud=C3=A9 --- 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; =20 -/* 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"), t= o deal + * in the Software without restriction, including without limitation the r= ights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or se= ll + * 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 OT= HER + * 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" =20 #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 =20 PC Chipset --=20 2.15.1