mirror of https://github.com/xemu-project/xemu.git
Integrate I/O memory regions into qemu
get_system_io() returns the root I/O memory region. Reviewed-by: Richard Henderson <rth@twiddle.net> Signed-off-by: Avi Kivity <avi@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
This commit is contained in:
parent
899adf8149
commit
309cb471c8
|
@ -28,6 +28,11 @@
|
||||||
*/
|
*/
|
||||||
MemoryRegion *get_system_memory(void);
|
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. */
|
/* Set the root memory region. This region is the system memory map. */
|
||||||
void set_system_memory_map(MemoryRegion *mr);
|
void set_system_memory_map(MemoryRegion *mr);
|
||||||
|
|
||||||
|
|
10
exec.c
10
exec.c
|
@ -113,6 +113,7 @@ static int in_migration;
|
||||||
RAMList ram_list = { .blocks = QLIST_HEAD_INITIALIZER(ram_list) };
|
RAMList ram_list = { .blocks = QLIST_HEAD_INITIALIZER(ram_list) };
|
||||||
|
|
||||||
static MemoryRegion *system_memory;
|
static MemoryRegion *system_memory;
|
||||||
|
static MemoryRegion *system_io;
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
@ -3830,6 +3831,10 @@ static void memory_map_init(void)
|
||||||
system_memory = qemu_malloc(sizeof(*system_memory));
|
system_memory = qemu_malloc(sizeof(*system_memory));
|
||||||
memory_region_init(system_memory, "system", INT64_MAX);
|
memory_region_init(system_memory, "system", INT64_MAX);
|
||||||
set_system_memory_map(system_memory);
|
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)
|
MemoryRegion *get_system_memory(void)
|
||||||
|
@ -3837,6 +3842,11 @@ MemoryRegion *get_system_memory(void)
|
||||||
return system_memory;
|
return system_memory;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
MemoryRegion *get_system_io(void)
|
||||||
|
{
|
||||||
|
return system_io;
|
||||||
|
}
|
||||||
|
|
||||||
#endif /* !defined(CONFIG_USER_ONLY) */
|
#endif /* !defined(CONFIG_USER_ONLY) */
|
||||||
|
|
||||||
/* physical memory access (slow version, mainly for debug) */
|
/* physical memory access (slow version, mainly for debug) */
|
||||||
|
|
Loading…
Reference in New Issue