2011-12-15 14:25:22 +01:00
|
|
|
/*
|
2017-11-21 16:08:08 +01:00
|
|
|
* Declarations for functions which are internal to the memory subsystem.
|
2011-12-15 14:25:22 +01:00
|
|
|
*
|
|
|
|
* Copyright 2011 Red Hat, Inc. and/or its affiliates
|
|
|
|
*
|
|
|
|
* Authors:
|
|
|
|
* Avi Kivity <avi@redhat.com>
|
|
|
|
*
|
2012-01-13 17:44:23 +01:00
|
|
|
* This work is licensed under the terms of the GNU GPL, version 2 or
|
|
|
|
* later. See the COPYING file in the top-level directory.
|
2011-12-15 14:25:22 +01:00
|
|
|
*
|
|
|
|
*/
|
|
|
|
|
|
|
|
/*
|
2017-11-21 16:08:08 +01:00
|
|
|
* This header is for use by exec.c, memory.c and accel/tcg/cputlb.c ONLY,
|
|
|
|
* for declarations which are shared between the memory subsystem's
|
|
|
|
* internals and the TCG TLB code. Do not include it from elsewhere.
|
2011-12-15 14:25:22 +01:00
|
|
|
*/
|
|
|
|
|
2012-09-20 15:02:51 +02:00
|
|
|
#ifndef MEMORY_INTERNAL_H
|
|
|
|
#define MEMORY_INTERNAL_H
|
2011-12-15 14:25:22 +01:00
|
|
|
|
2019-08-12 07:23:31 +02:00
|
|
|
#include "cpu.h"
|
|
|
|
|
2011-12-15 14:25:22 +01:00
|
|
|
#ifndef CONFIG_USER_ONLY
|
2018-03-05 00:31:20 +01:00
|
|
|
static inline AddressSpaceDispatch *flatview_to_dispatch(FlatView *fv)
|
|
|
|
{
|
|
|
|
return fv->dispatch;
|
|
|
|
}
|
|
|
|
|
|
|
|
static inline AddressSpaceDispatch *address_space_to_dispatch(AddressSpace *as)
|
|
|
|
{
|
|
|
|
return flatview_to_dispatch(address_space_to_flatview(as));
|
|
|
|
}
|
2012-10-03 16:22:53 +02:00
|
|
|
|
2018-03-18 18:26:36 +01:00
|
|
|
FlatView *address_space_get_flatview(AddressSpace *as);
|
|
|
|
void flatview_unref(FlatView *view);
|
|
|
|
|
2013-05-24 13:23:38 +02:00
|
|
|
extern const MemoryRegionOps unassigned_mem_ops;
|
|
|
|
|
2017-09-21 10:51:00 +02:00
|
|
|
void flatview_add_to_dispatch(FlatView *fv, MemoryRegionSection *section);
|
|
|
|
AddressSpaceDispatch *address_space_dispatch_new(FlatView *fv);
|
|
|
|
void address_space_dispatch_compact(AddressSpaceDispatch *d);
|
2017-09-21 10:50:56 +02:00
|
|
|
void address_space_dispatch_free(AddressSpaceDispatch *d);
|
2017-09-21 10:50:54 +02:00
|
|
|
|
2019-04-17 21:17:56 +02:00
|
|
|
void mtree_print_dispatch(struct AddressSpaceDispatch *d,
|
2017-09-21 10:51:06 +02:00
|
|
|
MemoryRegion *root);
|
2011-12-15 14:25:22 +01:00
|
|
|
#endif
|
|
|
|
#endif
|