Revision 309cb471
b/exec-memory.h | ||
---|---|---|
28 | 28 |
*/ |
29 | 29 |
MemoryRegion *get_system_memory(void); |
30 | 30 |
|
31 |
/* Get the root I/O port region. This interface should only be used |
|
32 |
* temporarily until a proper bus interface is available. |
|
33 |
*/ |
|
34 |
MemoryRegion *get_system_io(void); |
|
35 |
|
|
31 | 36 |
/* Set the root memory region. This region is the system memory map. */ |
32 | 37 |
void set_system_memory_map(MemoryRegion *mr); |
33 | 38 |
|
b/exec.c | ||
---|---|---|
113 | 113 |
RAMList ram_list = { .blocks = QLIST_HEAD_INITIALIZER(ram_list) }; |
114 | 114 |
|
115 | 115 |
static MemoryRegion *system_memory; |
116 |
static MemoryRegion *system_io; |
|
116 | 117 |
|
117 | 118 |
#endif |
118 | 119 |
|
... | ... | |
3830 | 3831 |
system_memory = qemu_malloc(sizeof(*system_memory)); |
3831 | 3832 |
memory_region_init(system_memory, "system", INT64_MAX); |
3832 | 3833 |
set_system_memory_map(system_memory); |
3834 |
|
|
3835 |
system_io = qemu_malloc(sizeof(*system_io)); |
|
3836 |
memory_region_init(system_io, "io", 65536); |
|
3837 |
set_system_io_map(system_io); |
|
3833 | 3838 |
} |
3834 | 3839 |
|
3835 | 3840 |
MemoryRegion *get_system_memory(void) |
... | ... | |
3837 | 3842 |
return system_memory; |
3838 | 3843 |
} |
3839 | 3844 |
|
3845 |
MemoryRegion *get_system_io(void) |
|
3846 |
{ |
|
3847 |
return system_io; |
|
3848 |
} |
|
3849 |
|
|
3840 | 3850 |
#endif /* !defined(CONFIG_USER_ONLY) */ |
3841 | 3851 |
|
3842 | 3852 |
/* physical memory access (slow version, mainly for debug) */ |
Also available in: Unified diff