Revision d0a9b5bc memory.h
b/memory.h | ||
---|---|---|
113 | 113 |
ram_addr_t ram_addr; |
114 | 114 |
IORange iorange; |
115 | 115 |
bool terminates; |
116 |
bool readable; |
|
116 | 117 |
MemoryRegion *alias; |
117 | 118 |
target_phys_addr_t alias_offset; |
118 | 119 |
unsigned priority; |
... | ... | |
219 | 220 |
MemoryRegion *orig, |
220 | 221 |
target_phys_addr_t offset, |
221 | 222 |
uint64_t size); |
223 |
|
|
224 |
/** |
|
225 |
* memory_region_init_rom_device: Initialize a ROM memory region. Writes are |
|
226 |
* handled via callbacks. |
|
227 |
* |
|
228 |
* @mr: the #MemoryRegion to be initialized. |
|
229 |
* @ops: callbacks for write access handling. |
|
230 |
* @dev: a device associated with the region; may be %NULL. |
|
231 |
* @name: the name of the region; the pair (@dev, @name) must be globally |
|
232 |
* unique. The name is part of the save/restore ABI and so cannot be |
|
233 |
* changed. |
|
234 |
* @size: size of the region. |
|
235 |
*/ |
|
236 |
void memory_region_init_rom_device(MemoryRegion *mr, |
|
237 |
const MemoryRegionOps *ops, |
|
238 |
DeviceState *dev, /* FIXME: layering violation */ |
|
239 |
const char *name, |
|
240 |
uint64_t size); |
|
241 |
|
|
222 | 242 |
/** |
223 | 243 |
* memory_region_destroy: Destroy a memory region and relaim all resources. |
224 | 244 |
* |
... | ... | |
331 | 351 |
void memory_region_set_readonly(MemoryRegion *mr, bool readonly); |
332 | 352 |
|
333 | 353 |
/** |
354 |
* memory_region_rom_device_set_readable: enable/disable ROM readability |
|
355 |
* |
|
356 |
* Allows a ROM device (initialized with memory_region_init_rom_device() to |
|
357 |
* to be marked as readable (default) or not readable. When it is readable, |
|
358 |
* the device is mapped to guest memory. When not readable, reads are |
|
359 |
* forwarded to the #MemoryRegion.read function. |
|
360 |
* |
|
361 |
* @mr: the memory region to be updated |
|
362 |
* @readable: whether reads are satisified directly (%true) or via callbacks |
|
363 |
* (%false) |
|
364 |
*/ |
|
365 |
void memory_region_rom_device_set_readable(MemoryRegion *mr, bool readable); |
|
366 |
|
|
367 |
/** |
|
334 | 368 |
* memory_region_set_coalescing: Enable memory coalescing for the region. |
335 | 369 |
* |
336 | 370 |
* Enabled writes to a region to be queued for later processing. MMIO ->write |
Also available in: Unified diff