[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PATCH v4 10/39] Integrate I/O memory regions into qemu
From: |
Avi Kivity |
Subject: |
[Qemu-devel] [PATCH v4 10/39] Integrate I/O memory regions into qemu |
Date: |
Mon, 8 Aug 2011 16:09:03 +0300 |
get_system_io() returns the root I/O memory region.
Reviewed-by: Richard Henderson <address@hidden>
Signed-off-by: Avi Kivity <address@hidden>
---
exec-memory.h | 5 +++++
exec.c | 10 ++++++++++
2 files changed, 15 insertions(+), 0 deletions(-)
diff --git a/exec-memory.h b/exec-memory.h
index c439aba..334219f 100644
--- a/exec-memory.h
+++ b/exec-memory.h
@@ -28,6 +28,11 @@
*/
MemoryRegion *get_system_memory(void);
+/* Get the root I/O port region. This interface should only be used
+ * temporarily until a proper bus interface is available.
+ */
+MemoryRegion *get_system_io(void);
+
/* Set the root memory region. This region is the system memory map. */
void set_system_memory_map(MemoryRegion *mr);
diff --git a/exec.c b/exec.c
index 719fff9..be7e4b2 100644
--- a/exec.c
+++ b/exec.c
@@ -113,6 +113,7 @@ static int in_migration;
RAMList ram_list = { .blocks = QLIST_HEAD_INITIALIZER(ram_list) };
static MemoryRegion *system_memory;
+static MemoryRegion *system_io;
#endif
@@ -3830,6 +3831,10 @@ static void memory_map_init(void)
system_memory = qemu_malloc(sizeof(*system_memory));
memory_region_init(system_memory, "system", INT64_MAX);
set_system_memory_map(system_memory);
+
+ system_io = qemu_malloc(sizeof(*system_io));
+ memory_region_init(system_io, "io", 65536);
+ set_system_io_map(system_io);
}
MemoryRegion *get_system_memory(void)
@@ -3837,6 +3842,11 @@ MemoryRegion *get_system_memory(void)
return system_memory;
}
+MemoryRegion *get_system_io(void)
+{
+ return system_io;
+}
+
#endif /* !defined(CONFIG_USER_ONLY) */
/* physical memory access (slow version, mainly for debug) */
--
1.7.5.3
- Re: [Qemu-devel] [PATCH v4 26/39] pcnet: convert to memory API, (continued)
[Qemu-devel] [PATCH v4 05/39] cirrus: simplify mmio BAR access functions, Avi Kivity, 2011/08/08
[Qemu-devel] [PATCH v4 12/39] pci: allow I/O BARs to be registered with pci_register_bar_region(), Avi Kivity, 2011/08/08
[Qemu-devel] [PATCH v4 02/39] pci: add API to get a BAR's mapped address, Avi Kivity, 2011/08/08
[Qemu-devel] [PATCH v4 35/39] pci: convert pci rom to memory API, Avi Kivity, 2011/08/08
[Qemu-devel] [PATCH v4 21/39] ahci: convert to memory API, Avi Kivity, 2011/08/08
[Qemu-devel] [PATCH v4 27/39] i6300esb: convert to memory API, Avi Kivity, 2011/08/08
[Qemu-devel] [PATCH v4 10/39] Integrate I/O memory regions into qemu,
Avi Kivity <=
[Qemu-devel] [PATCH v4 29/39] sun4u: convert to memory API, Avi Kivity, 2011/08/08
[Qemu-devel] [PATCH v4 34/39] pci: remove pci_register_bar_simple(), Avi Kivity, 2011/08/08
[Qemu-devel] [PATCH v4 13/39] rtl8139: convert to memory API, Avi Kivity, 2011/08/08
[Qemu-devel] [PATCH v4 30/39] ehci: convert to memory API, Avi Kivity, 2011/08/08
[Qemu-devel] [PATCH v4 09/39] cirrus: simplify linear framebuffer access functions, Avi Kivity, 2011/08/08
[Qemu-devel] [PATCH v4 19/39] ivshmem: convert to memory API, Avi Kivity, 2011/08/08
[Qemu-devel] [PATCH v4 15/39] e1000: convert to memory API, Avi Kivity, 2011/08/08
[Qemu-devel] [PATCH v4 23/39] lsi53c895a: convert to memory API, Avi Kivity, 2011/08/08