1 | /* $Id: pgm.h 56287 2015-06-09 11:15:22Z vboxsync $ */
|
---|
2 | /** @file
|
---|
3 | * PGM - Internal VMM header file.
|
---|
4 | */
|
---|
5 |
|
---|
6 | /*
|
---|
7 | * Copyright (C) 2006-2015 Oracle Corporation
|
---|
8 | *
|
---|
9 | * This file is part of VirtualBox Open Source Edition (OSE), as
|
---|
10 | * available from http://www.virtualbox.org. This file is free software;
|
---|
11 | * you can redistribute it and/or modify it under the terms of the GNU
|
---|
12 | * General Public License (GPL) as published by the Free Software
|
---|
13 | * Foundation, in version 2 as it comes in the "COPYING" file of the
|
---|
14 | * VirtualBox OSE distribution. VirtualBox OSE is distributed in the
|
---|
15 | * hope that it will be useful, but WITHOUT ANY WARRANTY of any kind.
|
---|
16 | */
|
---|
17 |
|
---|
18 | #ifndef ___PGM_include_internal_h
|
---|
19 | #define ___PGM_include_internal_h
|
---|
20 |
|
---|
21 | #include <VBox/vmm/pgm.h>
|
---|
22 |
|
---|
23 | /** @defgroup grp_pgm_int Internals
|
---|
24 | * @ingroup grp_pgm
|
---|
25 | * @internal
|
---|
26 | * @{
|
---|
27 | */
|
---|
28 |
|
---|
29 | /**
|
---|
30 | * Page type.
|
---|
31 | *
|
---|
32 | * @remarks This enum has to fit in a 3-bit field (see PGMPAGE::u3Type).
|
---|
33 | * @remarks This is used in the saved state, so changes to it requires bumping
|
---|
34 | * the saved state version.
|
---|
35 | * @todo So, convert to \#defines!
|
---|
36 | */
|
---|
37 | typedef enum PGMPAGETYPE
|
---|
38 | {
|
---|
39 | /** The usual invalid zero entry. */
|
---|
40 | PGMPAGETYPE_INVALID = 0,
|
---|
41 | /** RAM page. (RWX) */
|
---|
42 | PGMPAGETYPE_RAM,
|
---|
43 | /** MMIO2 page. (RWX) */
|
---|
44 | PGMPAGETYPE_MMIO2,
|
---|
45 | /** MMIO2 page aliased over an MMIO page. (RWX)
|
---|
46 | * See PGMHandlerPhysicalPageAlias(). */
|
---|
47 | PGMPAGETYPE_MMIO2_ALIAS_MMIO,
|
---|
48 | /** Special page aliased over an MMIO page. (RWX)
|
---|
49 | * See PGMHandlerPhysicalPageAliasHC(), but this is generally only used for
|
---|
50 | * VT-x's APIC access page at the moment. Treated as MMIO by everyone except
|
---|
51 | * the shadow paging code. */
|
---|
52 | PGMPAGETYPE_SPECIAL_ALIAS_MMIO,
|
---|
53 | /** Shadowed ROM. (RWX) */
|
---|
54 | PGMPAGETYPE_ROM_SHADOW,
|
---|
55 | /** ROM page. (R-X) */
|
---|
56 | PGMPAGETYPE_ROM,
|
---|
57 | /** MMIO page. (---) */
|
---|
58 | PGMPAGETYPE_MMIO,
|
---|
59 | /** End of valid entries. */
|
---|
60 | PGMPAGETYPE_END
|
---|
61 | } PGMPAGETYPE;
|
---|
62 | AssertCompile(PGMPAGETYPE_END == 8);
|
---|
63 |
|
---|
64 | VMMDECL(PGMPAGETYPE) PGMPhysGetPageType(PVM pVM, RTGCPHYS GCPhys);
|
---|
65 |
|
---|
66 | VMMDECL(int) PGMPhysGCPhys2HCPhys(PVM pVM, RTGCPHYS GCPhys, PRTHCPHYS pHCPhys);
|
---|
67 | VMMDECL(int) PGMPhysGCPtr2HCPhys(PVMCPU pVCpu, RTGCPTR GCPtr, PRTHCPHYS pHCPhys);
|
---|
68 | VMMDECL(int) PGMPhysGCPhys2CCPtr(PVM pVM, RTGCPHYS GCPhys, void **ppv, PPGMPAGEMAPLOCK pLock);
|
---|
69 | VMMDECL(int) PGMPhysGCPhys2CCPtrReadOnly(PVM pVM, RTGCPHYS GCPhys, void const **ppv, PPGMPAGEMAPLOCK pLock);
|
---|
70 | VMMDECL(int) PGMPhysGCPtr2CCPtr(PVMCPU pVCpu, RTGCPTR GCPtr, void **ppv, PPGMPAGEMAPLOCK pLock);
|
---|
71 | VMMDECL(int) PGMPhysGCPtr2CCPtrReadOnly(PVMCPU pVCpu, RTGCPTR GCPtr, void const **ppv, PPGMPAGEMAPLOCK pLock);
|
---|
72 | VMMR3DECL(void) PGMR3ResetNoMorePhysWritesFlag(PVM pVM);
|
---|
73 |
|
---|
74 | /** @} */
|
---|
75 | #endif
|
---|
76 |
|
---|