1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
|
; $Id: X86Stub.asm $
;; @file
; VMM - World Switchers, X86 Stub.
;
;
; Copyright (C) 2006-2019 Oracle Corporation
;
; This file is part of VirtualBox Open Source Edition (OSE), as
; available from http://www.virtualbox.org. This file is free software;
; you can redistribute it and/or modify it under the terms of the GNU
; General Public License (GPL) as published by the Free Software
; Foundation, in version 2 as it comes in the "COPYING" file of the
; VirtualBox OSE distribution. VirtualBox OSE is distributed in the
; hope that it will be useful, but WITHOUT ANY WARRANTY of any kind.
;
;*******************************************************************************
;* Defined Constants And Macros *
;*******************************************************************************
%define NAME_OVERLOAD(name) vmmR3SwitcherX86Stub_ %+ name
;*******************************************************************************
;* Header Files *
;*******************************************************************************
%include "VBox/asmdefs.mac"
%include "VBox/err.mac"
%include "VMMSwitcher.mac"
BEGINCODE
GLOBALNAME Start
BITS 32
BEGINPROC vmmR0ToRawMode
mov eax, VERR_VMM_SWITCHER_STUB
ret
ENDPROC vmmR0ToRawMode
BEGINPROC vmmRCCallTrampoline
.tight_loop:
int3
jmp .tight_loop
ENDPROC vmmRCCallTrampoline
BEGINPROC vmmRCToHost
mov eax, VERR_VMM_SWITCHER_STUB
ret
ENDPROC vmmRCToHost
BEGINPROC vmmRCToHostAsmNoReturn
mov eax, VERR_VMM_SWITCHER_STUB
ret
ENDPROC vmmRCToHostAsmNoReturn
BEGINPROC vmmRCToHostAsm
mov eax, VERR_VMM_SWITCHER_STUB
ret
ENDPROC vmmRCToHostAsm
GLOBALNAME End
;
; The description string (in the text section).
;
NAME(Description):
db "X86 Stub."
db 0
;
; Dummy fixups.
;
BEGINDATA
GLOBALNAME Fixups
db FIX_THE_END ; final entry.
GLOBALNAME FixupsEnd
;;
; The switcher definition structure.
ALIGNDATA(16)
GLOBALNAME Def
istruc VMMSWITCHERDEF
at VMMSWITCHERDEF.pvCode, RTCCPTR_DEF NAME(Start)
at VMMSWITCHERDEF.pvFixups, RTCCPTR_DEF NAME(Fixups)
at VMMSWITCHERDEF.pszDesc, RTCCPTR_DEF NAME(Description)
at VMMSWITCHERDEF.pfnRelocate, RTCCPTR_DEF 0
at VMMSWITCHERDEF.enmType, dd VMMSWITCHER_X86_STUB
at VMMSWITCHERDEF.cbCode, dd NAME(End) - NAME(Start)
at VMMSWITCHERDEF.offR0ToRawMode, dd NAME(vmmR0ToRawMode) - NAME(Start)
at VMMSWITCHERDEF.offRCToHost, dd NAME(vmmRCToHost) - NAME(Start)
at VMMSWITCHERDEF.offRCCallTrampoline, dd NAME(vmmRCCallTrampoline) - NAME(Start)
at VMMSWITCHERDEF.offRCToHostAsm, dd NAME(vmmRCToHostAsm) - NAME(Start)
at VMMSWITCHERDEF.offRCToHostAsmNoReturn, dd NAME(vmmRCToHostAsmNoReturn) - NAME(Start)
; disasm help
at VMMSWITCHERDEF.offHCCode0, dd 0
at VMMSWITCHERDEF.cbHCCode0, dd NAME(vmmRCCallTrampoline) - NAME(Start)
at VMMSWITCHERDEF.offHCCode1, dd 0
at VMMSWITCHERDEF.cbHCCode1, dd 0
at VMMSWITCHERDEF.offIDCode0, dd 0
at VMMSWITCHERDEF.cbIDCode0, dd 0
at VMMSWITCHERDEF.offIDCode1, dd 0
at VMMSWITCHERDEF.cbIDCode1, dd 0
at VMMSWITCHERDEF.offGCCode, dd NAME(vmmRCCallTrampoline) - NAME(Start)
at VMMSWITCHERDEF.cbGCCode, dd NAME(End) - NAME(vmmRCCallTrampoline)
iend
|