Revision ae0a5466 hw/pc_piix.c

b/hw/pc_piix.c
22 22
 * THE SOFTWARE.
23 23
 */
24 24

  
25
#include <glib.h>
26

  
25 27
#include "hw.h"
26 28
#include "pc.h"
27 29
#include "apic.h"
......
93 95
    DriveInfo *hd[MAX_IDE_BUS * MAX_IDE_DEVS];
94 96
    BusState *idebus[MAX_IDE_BUS];
95 97
    ISADevice *rtc_state;
98
    MemoryRegion *ram_memory;
99
    MemoryRegion *pci_memory;
96 100

  
97 101
    pc_cpus_init(cpu_model);
98 102

  
......
108 112
        below_4g_mem_size = ram_size;
109 113
    }
110 114

  
115
    pci_memory = g_new(MemoryRegion, 1);
116
    memory_region_init(pci_memory, "pci", INT64_MAX);
117

  
111 118
    /* allocate ram and load rom/bios */
112 119
    if (!xen_enabled()) {
113 120
        pc_memory_init(system_memory,
114 121
                       kernel_filename, kernel_cmdline, initrd_filename,
115
                       below_4g_mem_size, above_4g_mem_size);
122
                       below_4g_mem_size, above_4g_mem_size,
123
                       pci_memory, &ram_memory);
116 124
    }
117 125

  
118 126
    if (!xen_enabled()) {
......
130 138

  
131 139
    if (pci_enabled) {
132 140
        pci_bus = i440fx_init(&i440fx_state, &piix3_devfn, isa_irq,
133
                              system_memory, system_io, ram_size);
141
                              system_memory, system_io, ram_size,
142
                              below_4g_mem_size,
143
                              0x100000000ULL - below_4g_mem_size,
144
                              0x100000000ULL + above_4g_mem_size,
145
                              (sizeof(target_phys_addr_t) == 4
146
                               ? 0
147
                               : ((uint64_t)1 << 62)),
148
                              pci_memory, ram_memory);
134 149
    } else {
135 150
        pci_bus = NULL;
136 151
        i440fx_state = NULL;
......
202 217
        smbus_eeprom_init(smbus, 8, NULL, 0);
203 218
    }
204 219

  
205
    if (i440fx_state) {
206
        i440fx_init_memory_mappings(i440fx_state);
207
    }
208

  
209 220
    if (pci_enabled) {
210 221
        pc_pci_device_init(pci_bus);
211 222
    }

Also available in: Unified diff