1 | /** @file
|
---|
2 | * REM - The Recompiled Execution Manager.
|
---|
3 | */
|
---|
4 |
|
---|
5 | /*
|
---|
6 | * Copyright (C) 2006-2015 Oracle Corporation
|
---|
7 | *
|
---|
8 | * This file is part of VirtualBox Open Source Edition (OSE), as
|
---|
9 | * available from http://www.virtualbox.org. This file is free software;
|
---|
10 | * you can redistribute it and/or modify it under the terms of the GNU
|
---|
11 | * General Public License (GPL) as published by the Free Software
|
---|
12 | * Foundation, in version 2 as it comes in the "COPYING" file of the
|
---|
13 | * VirtualBox OSE distribution. VirtualBox OSE is distributed in the
|
---|
14 | * hope that it will be useful, but WITHOUT ANY WARRANTY of any kind.
|
---|
15 | *
|
---|
16 | * The contents of this file may alternatively be used under the terms
|
---|
17 | * of the Common Development and Distribution License Version 1.0
|
---|
18 | * (CDDL) only, as it comes in the "COPYING.CDDL" file of the
|
---|
19 | * VirtualBox OSE distribution, in which case the provisions of the
|
---|
20 | * CDDL are applicable instead of those of the GPL.
|
---|
21 | *
|
---|
22 | * You may elect to license modified versions of this file under the
|
---|
23 | * terms and conditions of either the GPL or the CDDL or both.
|
---|
24 | */
|
---|
25 |
|
---|
26 | #ifndef ___VBox_vmm_rem_h
|
---|
27 | #define ___VBox_vmm_rem_h
|
---|
28 |
|
---|
29 | #include <VBox/types.h>
|
---|
30 | #include <VBox/vmm/pgm.h>
|
---|
31 | #include <VBox/vmm/vmapi.h>
|
---|
32 |
|
---|
33 |
|
---|
34 | RT_C_DECLS_BEGIN
|
---|
35 |
|
---|
36 | /** @defgroup grp_rem The Recompiled Execution Manager API
|
---|
37 | * @ingroup grp_vmm
|
---|
38 | * @{
|
---|
39 | */
|
---|
40 |
|
---|
41 | /** No pending interrupt. */
|
---|
42 | #define REM_NO_PENDING_IRQ (~(uint32_t)0)
|
---|
43 |
|
---|
44 |
|
---|
45 | #if defined(IN_RING0) || defined(IN_RC)
|
---|
46 | VMMDECL(void) REMNotifyInvalidatePage(PVM pVM, RTGCPTR GCPtrPage);
|
---|
47 | VMMDECL(void) REMNotifyHandlerPhysicalRegister(PVM pVM, PGMPHYSHANDLERKIND enmKind, RTGCPHYS GCPhys, RTGCPHYS cb, bool fHasHCHandler);
|
---|
48 | VMMDECL(void) REMNotifyHandlerPhysicalDeregister(PVM pVM, PGMPHYSHANDLERKIND enmKind, RTGCPHYS GCPhys, RTGCPHYS cb, bool fHasHCHandler, bool fRestoreAsRAM);
|
---|
49 | VMMDECL(void) REMNotifyHandlerPhysicalModify(PVM pVM, PGMPHYSHANDLERKIND enmKind, RTGCPHYS GCPhysOld, RTGCPHYS GCPhysNew, RTGCPHYS cb, bool fHasHCHandler, bool fRestoreAsRAM);
|
---|
50 | #endif /* IN_RING0 || IN_RC */
|
---|
51 | #ifdef IN_RC
|
---|
52 | VMMDECL(void) REMNotifyHandlerPhysicalFlushIfAlmostFull(PVM pVM, PVMCPU pVCpu);
|
---|
53 | #endif
|
---|
54 | VMMDECL(void) REMFlushTBs(PVM pVM);
|
---|
55 |
|
---|
56 |
|
---|
57 | #ifdef IN_RING3
|
---|
58 | /** @defgroup grp_rem_r3 REM Host Context Ring 3 API
|
---|
59 | * @{
|
---|
60 | */
|
---|
61 | REMR3DECL(int) REMR3Init(PVM pVM);
|
---|
62 | REMR3DECL(int) REMR3InitFinalize(PVM pVM);
|
---|
63 | REMR3DECL(int) REMR3Term(PVM pVM);
|
---|
64 | REMR3DECL(void) REMR3Reset(PVM pVM);
|
---|
65 | REMR3DECL(int) REMR3Run(PVM pVM, PVMCPU pVCpu);
|
---|
66 | REMR3DECL(int) REMR3EmulateInstruction(PVM pVM, PVMCPU pVCpu);
|
---|
67 | REMR3DECL(int) REMR3Step(PVM pVM, PVMCPU pVCpu);
|
---|
68 | REMR3DECL(int) REMR3BreakpointSet(PVM pVM, RTGCUINTPTR Address);
|
---|
69 | REMR3DECL(int) REMR3BreakpointClear(PVM pVM, RTGCUINTPTR Address);
|
---|
70 | REMR3DECL(int) REMR3State(PVM pVM, PVMCPU pVCpu);
|
---|
71 | REMR3DECL(int) REMR3StateBack(PVM pVM, PVMCPU pVCpu);
|
---|
72 | REMR3DECL(void) REMR3StateUpdate(PVM pVM, PVMCPU pVCpu);
|
---|
73 | REMR3DECL(void) REMR3A20Set(PVM pVM, PVMCPU pVCpu, bool fEnable);
|
---|
74 | REMR3DECL(int) REMR3DisasEnableStepping(PVM pVM, bool fEnable);
|
---|
75 | REMR3DECL(void) REMR3ReplayHandlerNotifications(PVM pVM);
|
---|
76 | REMR3DECL(int) REMR3NotifyCodePageChanged(PVM pVM, PVMCPU pVCpu, RTGCPTR pvCodePage);
|
---|
77 | REMR3DECL(void) REMR3NotifyPhysRamRegister(PVM pVM, RTGCPHYS GCPhys, RTGCPHYS cb, unsigned fFlags);
|
---|
78 | /** @name Flags for REMR3NotifyPhysRamRegister.
|
---|
79 | * @{ */
|
---|
80 | #define REM_NOTIFY_PHYS_RAM_FLAGS_RAM RT_BIT(16)
|
---|
81 | #define REM_NOTIFY_PHYS_RAM_FLAGS_MMIO2 RT_BIT(17)
|
---|
82 | /** @} */
|
---|
83 | REMR3DECL(void) REMR3NotifyPhysRomRegister(PVM pVM, RTGCPHYS GCPhys, RTUINT cb, void *pvCopy, bool fShadow);
|
---|
84 | REMR3DECL(void) REMR3NotifyPhysRamDeregister(PVM pVM, RTGCPHYS GCPhys, RTUINT cb);
|
---|
85 | REMR3DECL(void) REMR3NotifyHandlerPhysicalRegister(PVM pVM, PGMPHYSHANDLERKIND enmKind, RTGCPHYS GCPhys, RTGCPHYS cb, bool fHasHCHandler);
|
---|
86 | REMR3DECL(void) REMR3NotifyHandlerPhysicalDeregister(PVM pVM, PGMPHYSHANDLERKIND enmKind, RTGCPHYS GCPhys, RTGCPHYS cb, bool fHasHCHandler, bool fRestoreAsRAM);
|
---|
87 | REMR3DECL(void) REMR3NotifyHandlerPhysicalModify(PVM pVM, PGMPHYSHANDLERKIND enmKind, RTGCPHYS GCPhysOld, RTGCPHYS GCPhysNew, RTGCPHYS cb, bool fHasHCHandler, bool fRestoreAsRAM);
|
---|
88 | REMR3DECL(void) REMR3NotifyPendingInterrupt(PVM pVM, PVMCPU pVCpu, uint8_t u8Interrupt);
|
---|
89 | REMR3DECL(uint32_t) REMR3QueryPendingInterrupt(PVM pVM, PVMCPU pVCpu);
|
---|
90 | REMR3DECL(void) REMR3NotifyInterruptSet(PVM pVM, PVMCPU pVCpu);
|
---|
91 | REMR3DECL(void) REMR3NotifyInterruptClear(PVM pVM, PVMCPU pVCpu);
|
---|
92 | REMR3DECL(void) REMR3NotifyTimerPending(PVM pVM, PVMCPU pVCpuDst);
|
---|
93 | REMR3DECL(void) REMR3NotifyDmaPending(PVM pVM);
|
---|
94 | REMR3DECL(void) REMR3NotifyQueuePending(PVM pVM);
|
---|
95 | REMR3DECL(void) REMR3NotifyFF(PVM pVM);
|
---|
96 | REMR3DECL(bool) REMR3IsPageAccessHandled(PVM pVM, RTGCPHYS GCPhys);
|
---|
97 | /** @} */
|
---|
98 | #endif /* IN_RING3 */
|
---|
99 |
|
---|
100 |
|
---|
101 | /** @} */
|
---|
102 | RT_C_DECLS_END
|
---|
103 |
|
---|
104 |
|
---|
105 | #endif
|
---|
106 |
|
---|