]> git.proxmox.com Git - qemu.git/blob - exec-obsolete.h
sun4u: give ISA bus to ISA methods
[qemu.git] / exec-obsolete.h
1 /*
2 * Declarations for obsolete exec.c functions
3 *
4 * Copyright 2011 Red Hat, Inc. and/or its affiliates
5 *
6 * Authors:
7 * Avi Kivity <avi@redhat.com>
8 *
9 * This work is licensed under the terms of the GNU GPL, version 2. See
10 * the COPYING file in the top-level directory.
11 *
12 */
13
14 /*
15 * This header is for use by exec.c and memory.c ONLY. Do not include it.
16 * The functions declared here will be removed soon.
17 */
18
19 #ifndef EXEC_OBSOLETE_H
20 #define EXEC_OBSOLETE_H
21
22 #ifndef WANT_EXEC_OBSOLETE
23 #error Do not include exec-obsolete.h
24 #endif
25
26 #ifndef CONFIG_USER_ONLY
27
28 ram_addr_t qemu_ram_alloc_from_ptr(DeviceState *dev, const char *name,
29 ram_addr_t size, void *host,
30 MemoryRegion *mr);
31 ram_addr_t qemu_ram_alloc(DeviceState *dev, const char *name, ram_addr_t size,
32 MemoryRegion *mr);
33 void qemu_ram_free(ram_addr_t addr);
34 void qemu_ram_free_from_ptr(ram_addr_t addr);
35
36 int cpu_register_io_memory(CPUReadMemoryFunc * const *mem_read,
37 CPUWriteMemoryFunc * const *mem_write,
38 void *opaque, enum device_endian endian);
39 void cpu_unregister_io_memory(int table_address);
40
41 void cpu_register_physical_memory_log(target_phys_addr_t start_addr,
42 ram_addr_t size,
43 ram_addr_t phys_offset,
44 ram_addr_t region_offset,
45 bool log_dirty);
46
47 static inline void cpu_register_physical_memory_offset(target_phys_addr_t start_addr,
48 ram_addr_t size,
49 ram_addr_t phys_offset,
50 ram_addr_t region_offset)
51 {
52 cpu_register_physical_memory_log(start_addr, size, phys_offset,
53 region_offset, false);
54 }
55
56 static inline void cpu_register_physical_memory(target_phys_addr_t start_addr,
57 ram_addr_t size,
58 ram_addr_t phys_offset)
59 {
60 cpu_register_physical_memory_offset(start_addr, size, phys_offset, 0);
61 }
62
63 void qemu_register_coalesced_mmio(target_phys_addr_t addr, ram_addr_t size);
64 void qemu_unregister_coalesced_mmio(target_phys_addr_t addr, ram_addr_t size);
65
66 #endif
67
68 #endif