From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([140.186.70.92]:51228) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RAN0k-00075w-ET for qemu-devel@nongnu.org; Sun, 02 Oct 2011 10:27:26 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1RAN0d-0008BL-7P for qemu-devel@nongnu.org; Sun, 02 Oct 2011 10:27:21 -0400 Received: from mx1.redhat.com ([209.132.183.28]:26409) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RAN0c-0008Af-IY for qemu-devel@nongnu.org; Sun, 02 Oct 2011 10:27:14 -0400 From: Avi Kivity Date: Sun, 2 Oct 2011 16:26:42 +0200 Message-Id: <1317565616-12997-12-git-send-email-avi@redhat.com> In-Reply-To: <1317565616-12997-1-git-send-email-avi@redhat.com> References: <1317565616-12997-1-git-send-email-avi@redhat.com> Subject: [Qemu-devel] [PATCH 11/25] ppc440: Pass in address_space_mem to ppc440ep_init List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org, Anthony Liguori From: Richard Henderson Signed-off-by: Richard Henderson Signed-off-by: Avi Kivity --- hw/ppc440.c | 11 +++++------ hw/ppc440.h | 6 +++--- hw/ppc440_bamboo.c | 5 ++++- 3 files changed, 12 insertions(+), 10 deletions(-) diff --git a/hw/ppc440.c b/hw/ppc440.c index 1d1376e..cd8a95d 100644 --- a/hw/ppc440.c +++ b/hw/ppc440.c @@ -20,7 +20,6 @@ #include "ppc405.h" #include "sysemu.h" #include "kvm.h" -#include "exec-memory.h" #define PPC440EP_PCI_CONFIG 0xeec00000 #define PPC440EP_PCI_INTACK 0xeed00000 @@ -35,9 +34,9 @@ 256<<20, 128<<20, 64<<20, 32<<20, 16<<20, 8<<20, 0 }; -CPUState *ppc440ep_init(ram_addr_t *ram_size, PCIBus **pcip, - const unsigned int pci_irq_nrs[4], int do_init, - const char *cpu_model) +CPUState *ppc440ep_init(MemoryRegion *address_space_mem, ram_addr_t *ram_size, + PCIBus **pcip, const unsigned int pci_irq_nrs[4], + int do_init, const char *cpu_model) { MemoryRegion *ram_memories = g_malloc(PPC440EP_SDRAM_NR_BANKS * sizeof(*ram_memories)); @@ -93,12 +92,12 @@ isa_mmio_init(PPC440EP_PCI_IO, PPC440EP_PCI_IOLEN); if (serial_hds[0] != NULL) { - serial_mm_init(get_system_memory(), 0xef600300, 0, pic[0], + serial_mm_init(address_space_mem, 0xef600300, 0, pic[0], PPC_SERIAL_MM_BAUDBASE, serial_hds[0], DEVICE_BIG_ENDIAN); } if (serial_hds[1] != NULL) { - serial_mm_init(get_system_memory(), 0xef600400, 0, pic[1], + serial_mm_init(address_space_mem, 0xef600400, 0, pic[1], PPC_SERIAL_MM_BAUDBASE, serial_hds[1], DEVICE_BIG_ENDIAN); } diff --git a/hw/ppc440.h b/hw/ppc440.h index a40f917..9c27c36 100644 --- a/hw/ppc440.h +++ b/hw/ppc440.h @@ -14,8 +14,8 @@ #include "hw.h" -CPUState *ppc440ep_init(ram_addr_t *ram_size, PCIBus **pcip, - const unsigned int pci_irq_nrs[4], int do_init, - const char *cpu_model); +CPUState *ppc440ep_init(MemoryRegion *address_space, ram_addr_t *ram_size, + PCIBus **pcip, const unsigned int pci_irq_nrs[4], + int do_init, const char *cpu_model); #endif diff --git a/hw/ppc440_bamboo.c b/hw/ppc440_bamboo.c index 1addb68..9228939 100644 --- a/hw/ppc440_bamboo.c +++ b/hw/ppc440_bamboo.c @@ -23,6 +23,7 @@ #include "device_tree.h" #include "loader.h" #include "elf.h" +#include "exec-memory.h" #define BINARY_DEVICE_TREE_FILE "bamboo.dtb" @@ -96,6 +97,7 @@ static void bamboo_init(ram_addr_t ram_size, const char *cpu_model) { unsigned int pci_irq_nrs[4] = { 28, 27, 26, 25 }; + MemoryRegion *address_space_mem = get_system_memory(); PCIBus *pcibus; CPUState *env; uint64_t elf_entry; @@ -107,7 +109,8 @@ static void bamboo_init(ram_addr_t ram_size, int i; /* Setup CPU. */ - env = ppc440ep_init(&ram_size, &pcibus, pci_irq_nrs, 1, cpu_model); + env = ppc440ep_init(address_space_mem, &ram_size, &pcibus, + pci_irq_nrs, 1, cpu_model); if (pcibus) { /* Register network interfaces. */ -- 1.7.6.3