[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [RFC v3 13/56] pc: move global memory map out of pc_init1()
From: |
Avi Kivity |
Subject: |
[Qemu-devel] [RFC v3 13/56] pc: move global memory map out of pc_init1() and into its callers |
Date: |
Sun, 10 Jul 2011 21:14:26 +0300 |
Signed-off-by: Avi Kivity <address@hidden>
---
hw/pc_piix.c | 15 ++++++++-------
1 files changed, 8 insertions(+), 7 deletions(-)
diff --git a/hw/pc_piix.c b/hw/pc_piix.c
index d83854c..f2d0476 100644
--- a/hw/pc_piix.c
+++ b/hw/pc_piix.c
@@ -68,7 +68,8 @@ static void ioapic_init(IsaIrqState *isa_irq_state)
}
/* PC hardware initialisation */
-static void pc_init1(ram_addr_t ram_size,
+static void pc_init1(MemoryRegion *system_memory,
+ ram_addr_t ram_size,
const char *boot_device,
const char *kernel_filename,
const char *kernel_cmdline,
@@ -91,9 +92,6 @@ static void pc_init1(ram_addr_t ram_size,
DriveInfo *hd[MAX_IDE_BUS * MAX_IDE_DEVS];
BusState *idebus[MAX_IDE_BUS];
ISADevice *rtc_state;
- MemoryRegion *system_memory;
-
- system_memory = get_system_memory();
pc_cpus_init(cpu_model);
@@ -214,7 +212,8 @@ static void pc_init_pci(ram_addr_t ram_size,
const char *initrd_filename,
const char *cpu_model)
{
- pc_init1(ram_size, boot_device,
+ pc_init1(get_system_memory(),
+ ram_size, boot_device,
kernel_filename, kernel_cmdline,
initrd_filename, cpu_model, 1, 1);
}
@@ -226,7 +225,8 @@ static void pc_init_pci_no_kvmclock(ram_addr_t ram_size,
const char *initrd_filename,
const char *cpu_model)
{
- pc_init1(ram_size, boot_device,
+ pc_init1(get_system_memory(),
+ ram_size, boot_device,
kernel_filename, kernel_cmdline,
initrd_filename, cpu_model, 1, 0);
}
@@ -240,7 +240,8 @@ static void pc_init_isa(ram_addr_t ram_size,
{
if (cpu_model == NULL)
cpu_model = "486";
- pc_init1(ram_size, boot_device,
+ pc_init1(get_system_memory(),
+ ram_size, boot_device,
kernel_filename, kernel_cmdline,
initrd_filename, cpu_model, 0, 1);
}
--
1.7.5.3
- [Qemu-devel] [RFC v3 05/56] memory: abstract address space operations, (continued)
- [Qemu-devel] [RFC v3 05/56] memory: abstract address space operations, Avi Kivity, 2011/07/10
- [Qemu-devel] [RFC v3 27/56] exec.c: fix initialization of system I/O memory region, Avi Kivity, 2011/07/10
- [Qemu-devel] [RFC v3 01/56] Hierarchical memory region API, Avi Kivity, 2011/07/10
- [Qemu-devel] [RFC v3 36/56] memory: add ioeventfd support, Avi Kivity, 2011/07/10
- [Qemu-devel] [RFC v3 39/56] ahci: convert to memory API, Avi Kivity, 2011/07/10
- [Qemu-devel] [RFC v3 29/56] pci: allow I/O BARs to be registered with pci_register_bar_region(), Avi Kivity, 2011/07/10
- [Qemu-devel] [RFC v3 43/56] ne2000: convert to memory API, Avi Kivity, 2011/07/10
- [Qemu-devel] [RFC v3 52/56] pci: remove pci_register_bar_simple(), Avi Kivity, 2011/07/10
- [Qemu-devel] [RFC v3 50/56] xen-platform: convert to memory API, Avi Kivity, 2011/07/10
- [Qemu-devel] [RFC v3 26/56] Integrate I/O memory regions into qemu, Avi Kivity, 2011/07/10
- [Qemu-devel] [RFC v3 13/56] pc: move global memory map out of pc_init1() and into its callers,
Avi Kivity <=
- [Qemu-devel] [RFC v3 15/56] pci: add MemoryRegion based BAR management API, Avi Kivity, 2011/07/10
- [Qemu-devel] [RFC v3 28/56] pci: pass I/O address space to new PCI bus, Avi Kivity, 2011/07/10
- [Qemu-devel] [RFC v3 09/56] exec.c: initialize memory map, Avi Kivity, 2011/07/10
- [Qemu-devel] [RFC v3 37/56] ivshmem: convert to memory API, Avi Kivity, 2011/07/10
- [Qemu-devel] [RFC v3 38/56] virtio-pci: convert to memory API, Avi Kivity, 2011/07/10
- [Qemu-devel] [RFC v3 20/56] vga: convert vga and its derivatives to the memory API, Avi Kivity, 2011/07/10
- [Qemu-devel] [RFC v3 40/56] intel-hda: convert to memory API, Avi Kivity, 2011/07/10
- [Qemu-devel] [RFC v3 30/56] rtl8139: convert to memory API, Avi Kivity, 2011/07/10