[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PATCH v2 07/22] axis_dev88: convert to memory API (RAM onl
From: |
Avi Kivity |
Subject: |
[Qemu-devel] [PATCH v2 07/22] axis_dev88: convert to memory API (RAM only) |
Date: |
Wed, 24 Aug 2011 16:40:44 +0300 |
Signed-off-by: Avi Kivity <address@hidden>
---
hw/axis_dev88.c | 16 ++++++++--------
1 files changed, 8 insertions(+), 8 deletions(-)
diff --git a/hw/axis_dev88.c b/hw/axis_dev88.c
index 06200e2..73eb39d 100644
--- a/hw/axis_dev88.c
+++ b/hw/axis_dev88.c
@@ -31,6 +31,7 @@
#include "elf.h"
#include "cris-boot.h"
#include "blockdev.h"
+#include "exec-memory.h"
#define D(x)
#define DNAND(x)
@@ -259,8 +260,9 @@ void axisdev88_init (ram_addr_t ram_size,
int i;
int nand_regs;
int gpio_regs;
- ram_addr_t phys_ram;
- ram_addr_t phys_intmem;
+ MemoryRegion *address_space_mem = get_system_memory();
+ MemoryRegion *phys_ram = g_new(MemoryRegion, 1);
+ MemoryRegion *phys_intmem = g_new(MemoryRegion, 1);
/* init CPUs */
if (cpu_model == NULL) {
@@ -269,15 +271,13 @@ void axisdev88_init (ram_addr_t ram_size,
env = cpu_init(cpu_model);
/* allocate RAM */
- phys_ram = qemu_ram_alloc(NULL, "axisdev88.ram", ram_size);
- cpu_register_physical_memory(0x40000000, ram_size, phys_ram | IO_MEM_RAM);
+ memory_region_init_ram(phys_ram, NULL, "axisdev88.ram", ram_size);
+ memory_region_add_subregion(address_space_mem, 0x40000000, phys_ram);
/* The ETRAX-FS has 128Kb on chip ram, the docs refer to it as the
internal memory. */
- phys_intmem = qemu_ram_alloc(NULL, "axisdev88.chipram", INTMEM_SIZE);
- cpu_register_physical_memory(0x38000000, INTMEM_SIZE,
- phys_intmem | IO_MEM_RAM);
-
+ memory_region_init_ram(phys_intmem, NULL, "axisdev88.chipram",
INTMEM_SIZE);
+ memory_region_add_subregion(address_space_mem, 0x38000000, phys_intmem);
/* Attach a NAND flash to CS1. */
nand = drive_get(IF_MTD, 0, 0);
--
1.7.5.3
- [Qemu-devel] [PATCH v2 02/22] sysbus: add helpers to add and delete memory regions to the system bus, (continued)
- [Qemu-devel] [PATCH v2 02/22] sysbus: add helpers to add and delete memory regions to the system bus, Avi Kivity, 2011/08/24
- [Qemu-devel] [PATCH v2 08/22] sysbus: add sysbus_add_memory_overlap(), Avi Kivity, 2011/08/24
- [Qemu-devel] [PATCH v2 10/22] leon3: convert to memory API, Avi Kivity, 2011/08/24
- [Qemu-devel] [PATCH v2 22/22] milkymist: convert to memory API, Avi Kivity, 2011/08/24
- [Qemu-devel] [PATCH v2 20/22] milkymist-minimac2: convert to memory API, Avi Kivity, 2011/08/24
- [Qemu-devel] [PATCH v2 09/22] integratorcp: convert to memory API (RAM/flash only), Avi Kivity, 2011/08/24
- [Qemu-devel] [PATCH v2 03/22] pci_host: convert conf index and data ports to memory API, Avi Kivity, 2011/08/24
- [Qemu-devel] [PATCH v2 06/22] armv7m: convert to memory API, Avi Kivity, 2011/08/24
- [Qemu-devel] [PATCH v2 07/22] axis_dev88: convert to memory API (RAM only),
Avi Kivity <=
- [Qemu-devel] [PATCH v2 19/22] mcf5208: convert to memory API, Avi Kivity, 2011/08/24
- [Qemu-devel] [PATCH v2 11/22] cirrus: wrap memory update in a transaction, Avi Kivity, 2011/08/24
- [Qemu-devel] [PATCH v2 16/22] g364fb: convert to memory API, Avi Kivity, 2011/08/24
- [Qemu-devel] [PATCH v2 17/22] lm32_boards: convert to memory API, Avi Kivity, 2011/08/24
- [Qemu-devel] [PATCH v2 13/22] Makefile.hw: allow hw/ files to include glib headers, Avi Kivity, 2011/08/24
- [Qemu-devel] [PATCH v2 05/22] an5206: convert to memory API, Avi Kivity, 2011/08/24
- [Qemu-devel] [PATCH v2 04/22] ReadWriteHandler: remove, Avi Kivity, 2011/08/24
- [Qemu-devel] [PATCH v2 12/22] piix_pci: wrap memory update in a transaction, Avi Kivity, 2011/08/24
- [Qemu-devel] [PATCH v2 14/22] pflash_cfi01/pflash_cfi02: convert to memory API, Avi Kivity, 2011/08/24