1 /* 2 * QEMU i440FX North Bridge Emulation 3 * 4 * Copyright (c) 2006 Fabrice Bellard 5 * 6 * This work is licensed under the terms of the GNU GPL, version 2 or later. 7 * See the COPYING file in the top-level directory. 8 * 9 */ 10 11 #ifndef HW_PCI_I440FX_H 12 #define HW_PCI_I440FX_H 13 14 #include "hw/hw.h" 15 #include "hw/pci/pci_bus.h" 16 #include "hw/pci-host/pam.h" 17 #include "qom/object.h" 18 19 #define TYPE_I440FX_PCI_HOST_BRIDGE "i440FX-pcihost" 20 #define TYPE_I440FX_PCI_DEVICE "i440FX" 21 22 typedef struct PCII440FXState PCII440FXState; 23 DECLARE_INSTANCE_CHECKER(PCII440FXState, I440FX_PCI_DEVICE, 24 TYPE_I440FX_PCI_DEVICE) 25 26 struct PCII440FXState { 27 /*< private >*/ 28 PCIDevice parent_obj; 29 /*< public >*/ 30 31 MemoryRegion *system_memory; 32 MemoryRegion *pci_address_space; 33 MemoryRegion *ram_memory; 34 PAMMemoryRegion pam_regions[13]; 35 MemoryRegion smram_region; 36 MemoryRegion smram, low_smram; 37 }; 38 39 #define TYPE_IGD_PASSTHROUGH_I440FX_PCI_DEVICE "igd-passthrough-i440FX" 40 41 PCIBus *i440fx_init(const char *host_type, const char *pci_type, 42 PCII440FXState **pi440fx_state, 43 MemoryRegion *address_space_mem, 44 MemoryRegion *address_space_io, 45 ram_addr_t ram_size, 46 ram_addr_t below_4g_mem_size, 47 ram_addr_t above_4g_mem_size, 48 MemoryRegion *pci_memory, 49 MemoryRegion *ram_memory); 50 51 PCIBus *find_i440fx(void); 52 53 #endif 54