]>
Commit | Line | Data |
---|---|---|
67d95c15 | 1 | /* |
9d70618c | 2 | * Declarations for functions which are internal to the memory subsystem. |
67d95c15 AK |
3 | * |
4 | * Copyright 2011 Red Hat, Inc. and/or its affiliates | |
5 | * | |
6 | * Authors: | |
7 | * Avi Kivity <avi@redhat.com> | |
8 | * | |
6b620ca3 PB |
9 | * This work is licensed under the terms of the GNU GPL, version 2 or |
10 | * later. See the COPYING file in the top-level directory. | |
67d95c15 AK |
11 | * |
12 | */ | |
13 | ||
14 | /* | |
9d70618c PM |
15 | * This header is for use by exec.c, memory.c and accel/tcg/cputlb.c ONLY, |
16 | * for declarations which are shared between the memory subsystem's | |
17 | * internals and the TCG TLB code. Do not include it from elsewhere. | |
67d95c15 AK |
18 | */ |
19 | ||
7762c2c1 AK |
20 | #ifndef MEMORY_INTERNAL_H |
21 | #define MEMORY_INTERNAL_H | |
67d95c15 | 22 | |
ec150c7e MA |
23 | #include "cpu.h" |
24 | ||
67d95c15 | 25 | #ifndef CONFIG_USER_ONLY |
785a507e PB |
26 | static inline AddressSpaceDispatch *flatview_to_dispatch(FlatView *fv) |
27 | { | |
28 | return fv->dispatch; | |
29 | } | |
30 | ||
31 | static inline AddressSpaceDispatch *address_space_to_dispatch(AddressSpace *as) | |
32 | { | |
33 | return flatview_to_dispatch(address_space_to_flatview(as)); | |
34 | } | |
ac1970fb | 35 | |
48564041 PB |
36 | FlatView *address_space_get_flatview(AddressSpace *as); |
37 | void flatview_unref(FlatView *view); | |
38 | ||
d197063f PB |
39 | extern const MemoryRegionOps unassigned_mem_ops; |
40 | ||
d2702032 | 41 | bool memory_region_access_valid(MemoryRegion *mr, hwaddr addr, |
6d7b9a6c PM |
42 | unsigned size, bool is_write, |
43 | MemTxAttrs attrs); | |
d2702032 | 44 | |
8629d3fc AK |
45 | void flatview_add_to_dispatch(FlatView *fv, MemoryRegionSection *section); |
46 | AddressSpaceDispatch *address_space_dispatch_new(FlatView *fv); | |
47 | void address_space_dispatch_compact(AddressSpaceDispatch *d); | |
66a6df1d | 48 | void address_space_dispatch_free(AddressSpaceDispatch *d); |
9a62e24f | 49 | |
b6b71cb5 | 50 | void mtree_print_dispatch(struct AddressSpaceDispatch *d, |
5e8fd947 | 51 | MemoryRegion *root); |
67d95c15 | 52 | #endif |
67d95c15 | 53 | #endif |