1 | ; $Id: AMD64Stub.asm 45701 2013-04-24 14:21:09Z vboxsync $
|
---|
2 | ;; @file
|
---|
3 | ; VMM - World Switchers, AMD64 Stub.
|
---|
4 | ;
|
---|
5 |
|
---|
6 | ;
|
---|
7 | ; Copyright (C) 2006-2013 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 | ;*******************************************************************************
|
---|
19 | ;* Defined Constants And Macros *
|
---|
20 | ;*******************************************************************************
|
---|
21 | %define NAME_OVERLOAD(name) vmmR3SwitcherAMD64Stub_ %+ name
|
---|
22 |
|
---|
23 | ;*******************************************************************************
|
---|
24 | ;* Header Files *
|
---|
25 | ;*******************************************************************************
|
---|
26 | %include "VBox/asmdefs.mac"
|
---|
27 | %include "VBox/err.mac"
|
---|
28 | %include "VMMSwitcher.mac"
|
---|
29 |
|
---|
30 |
|
---|
31 | BEGINCODE
|
---|
32 | GLOBALNAME Start
|
---|
33 |
|
---|
34 | %ifndef VBOX_WITH_HYBRID_32BIT_KERNEL
|
---|
35 | BITS 64
|
---|
36 | %else
|
---|
37 | BITS 32
|
---|
38 | %endif
|
---|
39 | BEGINPROC vmmR0ToRawMode
|
---|
40 | mov eax, VERR_VMM_SWITCHER_STUB
|
---|
41 | ret
|
---|
42 | ENDPROC vmmR0ToRawMode
|
---|
43 |
|
---|
44 | BITS 32
|
---|
45 | BEGINPROC vmmRCCallTrampoline
|
---|
46 | .tight_loop:
|
---|
47 | int3
|
---|
48 | jmp .tight_loop
|
---|
49 | ENDPROC vmmRCCallTrampoline
|
---|
50 |
|
---|
51 | BEGINPROC vmmRCToHost
|
---|
52 | mov eax, VERR_VMM_SWITCHER_STUB
|
---|
53 | ret
|
---|
54 | ENDPROC vmmRCToHost
|
---|
55 |
|
---|
56 | BEGINPROC vmmRCToHostAsmNoReturn
|
---|
57 | mov eax, VERR_VMM_SWITCHER_STUB
|
---|
58 | ret
|
---|
59 | ENDPROC vmmRCToHostAsmNoReturn
|
---|
60 |
|
---|
61 | BEGINPROC vmmRCToHostAsm
|
---|
62 | mov eax, VERR_VMM_SWITCHER_STUB
|
---|
63 | ret
|
---|
64 | ENDPROC vmmRCToHostAsm
|
---|
65 |
|
---|
66 | GLOBALNAME End
|
---|
67 |
|
---|
68 | ;
|
---|
69 | ; The description string (in the text section).
|
---|
70 | ;
|
---|
71 | NAME(Description):
|
---|
72 | db "AMD64 Stub."
|
---|
73 | db 0
|
---|
74 |
|
---|
75 |
|
---|
76 | ;
|
---|
77 | ; Dummy fixups.
|
---|
78 | ;
|
---|
79 | BEGINDATA
|
---|
80 | GLOBALNAME Fixups
|
---|
81 | db FIX_THE_END ; final entry.
|
---|
82 | GLOBALNAME FixupsEnd
|
---|
83 |
|
---|
84 |
|
---|
85 | ;;
|
---|
86 | ; The switcher definition structure.
|
---|
87 | ALIGNDATA(16)
|
---|
88 | GLOBALNAME Def
|
---|
89 | istruc VMMSWITCHERDEF
|
---|
90 | at VMMSWITCHERDEF.pvCode, RTCCPTR_DEF NAME(Start)
|
---|
91 | at VMMSWITCHERDEF.pvFixups, RTCCPTR_DEF NAME(Fixups)
|
---|
92 | at VMMSWITCHERDEF.pszDesc, RTCCPTR_DEF NAME(Description)
|
---|
93 | at VMMSWITCHERDEF.pfnRelocate, RTCCPTR_DEF 0
|
---|
94 | at VMMSWITCHERDEF.enmType, dd VMMSWITCHER_AMD64_STUB
|
---|
95 | at VMMSWITCHERDEF.cbCode, dd NAME(End) - NAME(Start)
|
---|
96 | at VMMSWITCHERDEF.offR0ToRawMode, dd NAME(vmmR0ToRawMode) - NAME(Start)
|
---|
97 | at VMMSWITCHERDEF.offRCToHost, dd NAME(vmmRCToHost) - NAME(Start)
|
---|
98 | at VMMSWITCHERDEF.offRCCallTrampoline, dd NAME(vmmRCCallTrampoline) - NAME(Start)
|
---|
99 | at VMMSWITCHERDEF.offRCToHostAsm, dd NAME(vmmRCToHostAsm) - NAME(Start)
|
---|
100 | at VMMSWITCHERDEF.offRCToHostAsmNoReturn, dd NAME(vmmRCToHostAsmNoReturn) - NAME(Start)
|
---|
101 | ; disasm help
|
---|
102 | at VMMSWITCHERDEF.offHCCode0, dd 0
|
---|
103 | at VMMSWITCHERDEF.cbHCCode0, dd NAME(vmmRCCallTrampoline) - NAME(Start)
|
---|
104 | at VMMSWITCHERDEF.offHCCode1, dd 0
|
---|
105 | at VMMSWITCHERDEF.cbHCCode1, dd 0
|
---|
106 | at VMMSWITCHERDEF.offIDCode0, dd 0
|
---|
107 | at VMMSWITCHERDEF.cbIDCode0, dd 0
|
---|
108 | at VMMSWITCHERDEF.offIDCode1, dd 0
|
---|
109 | at VMMSWITCHERDEF.cbIDCode1, dd 0
|
---|
110 | at VMMSWITCHERDEF.offGCCode, dd NAME(vmmRCCallTrampoline) - NAME(Start)
|
---|
111 | at VMMSWITCHERDEF.cbGCCode, dd NAME(End) - NAME(vmmRCCallTrampoline)
|
---|
112 |
|
---|
113 | iend
|
---|
114 |
|
---|