VirtualBox

source: vbox/trunk/src/VBox/VMM/VMMSwitcher/VMMSwitcher.mac@ 4394

Last change on this file since 4394 was 4071, checked in by vboxsync, 17 years ago

Biggest check-in ever. New source code headers for all (C) innotek files.

  • Property svn:eol-style set to native
  • Property svn:keywords set to Id
File size: 4.1 KB
Line 
1; $Id: VMMSwitcher.mac 4071 2007-08-07 17:07:59Z vboxsync $
2;; @file
3; VMM - World Switchers.
4;
5
6;
7; Copyright (C) 2006-2007 innotek GmbH
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 as published by the Free Software Foundation,
13; in version 2 as it comes in the "COPYING" file of the VirtualBox OSE
14; distribution. VirtualBox OSE is distributed in the hope that it will
15; be useful, but WITHOUT ANY WARRANTY of any kind.
16
17%ifndef __VMMSwitcher_mac__
18%define __VMMSwitcher_mac__
19
20%include "iprt/asmdefs.mac"
21
22; enum VMMSWITCHER {
23%define VMMSWITCHER_INVALID 0
24%define VMMSWITCHER_32_TO_32 1
25%define VMMSWITCHER_32_TO_PAE 2
26%define VMMSWITCHER_32_TO_AMD64 3
27%define VMMSWITCHER_PAE_TO_32BIT 4
28%define VMMSWITCHER_PAE_TO_PAE 5
29%define VMMSWITCHER_PAE_TO_AMD64 6
30%define VMMSWITCHER_AMD64_TO_PAE 7
31%define VMMSWITCHER_AMD64_TO_AMD64 8
32%define VMMSWITCHER_HOST_TO_VMX 9
33%define VMMSWITCHER_HOST_TO_SVM 10
34%define VMMSWITCHER_MAX 11
35; }
36
37
38struc VMMSWITCHERDEF
39 .pvCode: RTCCPTR_RES 1
40 .pvFixups: RTCCPTR_RES 1
41 .pszDesc: RTCCPTR_RES 1
42 .pfnRelocate: RTCCPTR_RES 1
43 .enmType: resd 1
44 .cbCode: resd 1
45 .offR0HostToGuest: resd 1
46 .offGCGuestToHost: resd 1
47 .offGCCallTrampoline: resd 1
48 .offGCGuestToHostAsm: resd 1
49 .offGCGuestToHostAsmHyperCtx: resd 1
50 .offGCGuestToHostAsmGuestCtx: resd 1
51 ; disasm help
52 .offHCCode0: resd 1
53 .cbHCCode0: resd 1
54 .offHCCode1: resd 1
55 .cbHCCode1: resd 1
56 .offIDCode0: resd 1
57 .cbIDCode0: resd 1
58 .offIDCode1: resd 1
59 .cbIDCode1: resd 1
60 .offGCCode: resd 1
61 .cbGCCode: resd 1
62endstruc
63
64
65;/** @name Fixup Types.
66; * @{
67; */
68%define FIX_HC_2_GC_NEAR_REL 1
69%define FIX_HC_2_ID_NEAR_REL 2
70%define FIX_GC_2_HC_NEAR_REL 3
71%define FIX_GC_2_ID_NEAR_REL 4
72%define FIX_ID_2_HC_NEAR_REL 5
73%define FIX_ID_2_GC_NEAR_REL 6
74%define FIX_GC_FAR32 7
75%define FIX_GC_CPUM_OFF 8
76%define FIX_GC_VM_OFF 9
77%define FIX_HC_CPUM_OFF 10
78%define FIX_HC_VM_OFF 11
79%define FIX_INTER_32BIT_CR3 12
80%define FIX_INTER_PAE_CR3 13
81%define FIX_INTER_AMD64_CR3 14
82%define FIX_HYPER_32BIT_CR3 15
83%define FIX_HYPER_PAE_CR3 16
84%define FIX_HYPER_AMD64_CR3 17
85%define FIX_HYPER_CS 18
86%define FIX_HYPER_DS 19
87%define FIX_HYPER_TSS 20
88%define FIX_GC_TSS_GDTE_DW2 21
89%define FIX_CR4_MASK 22
90%define FIX_CR4_OSFSXR 23
91%define FIX_NO_FXSAVE_JMP 24
92%define FIX_NO_SYSENTER_JMP 25
93%define FIX_NO_SYSCALL_JMP 26
94%define FIX_HC_32BIT 27
95%define FIX_HC_64BIT 28
96%define FIX_HC_64BIT_CPUM 29
97%define FIX_HC_64BIT_CS 30
98%define FIX_ID_32BIT 31
99%define FIX_ID_64BIT 32
100%define FIX_ID_FAR32_TO_64BIT_MODE 33
101%define FIX_GC_APIC_BASE_32BIT 34
102%define FIX_THE_END 255
103;/** @} */
104
105
106;;
107; Generate a fixup label.
108; @param %1 Type of fixup (use one of those %defines)
109; @param %2 Offset into the instruction.
110; @param %3 Optional fixup data.
111%macro FIXUP 2-*
112BEGINDATA
113 db %1 ; the type
114 dd %%instruction + %2 - NAME(Start)
115 %rotate 2
116 %rep %0 - 2
117 dd %1
118 %rotate 1
119 %endrep
120
121BEGINCODE
122%%instruction:
123%endmacro
124
125
126;; IMPORTANT all COM_ functions trashes esi, some edi and the LOOP_SHORT_WHILE kills ecx.
127;%define DEBUG_STUFF 1
128
129%ifdef DEBUG_STUFF
130 %define DEBUG_CHAR(ch) COM_CHAR ch
131 %define DEBUG_S_CHAR(ch) COM_CHAR ch
132%else
133 %define DEBUG_CHAR(ch)
134 %define DEBUG_S_CHAR(ch)
135%endif
136
137%endif ; !__VMMSwitcher_mac__
138
Note: See TracBrowser for help on using the repository browser.

© 2024 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette