VirtualBox

source: vbox/trunk/include/VBox/cpum.mac@ 14711

Last change on this file since 14711 was 14411, checked in by vboxsync, 16 years ago

RDTSCP support added. Enabled only for AMD-V guests.

  • Property svn:eol-style set to native
  • Property svn:keywords set to Author Date Id Revision
File size: 6.5 KB
Line 
1;; @file
2;
3; CPUM - CPU Monitor.
4;
5
6;
7; Copyright (C) 2006-2007 Sun Microsystems, Inc.
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; The contents of this file may alternatively be used under the terms
18; of the Common Development and Distribution License Version 1.0
19; (CDDL) only, as it comes in the "COPYING.CDDL" file of the
20; VirtualBox OSE distribution, in which case the provisions of the
21; CDDL are applicable instead of those of the GPL.
22;
23; You may elect to license modified versions of this file under the
24; terms and conditions of either the GPL or the CDDL or both.
25;
26; Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa
27; Clara, CA 95054 USA or visit http://www.sun.com if you need
28; additional information or have any questions.
29;
30
31%ifndef __VBox_cpum_mac__
32%define __VBox_cpum_mac__
33
34;;
35; Registers frame.
36; This is used internally in TRPM, VMMSwitcher_GuestToHost_GuestCtx
37; and other places.
38struc CPUMCTXCORE
39 .edi resq 1
40 .esi resq 1
41 .ebp resq 1
42 .eax resq 1
43 .ebx resq 1
44 .edx resq 1
45 .ecx resq 1
46 .esp resq 1
47 .lss_esp resd 1
48 .ss resw 1
49 .ssPadding resw 1
50 .gs resw 1
51 .gsPadding resw 1
52 .fs resw 1
53 .fsPadding resw 1
54 .es resw 1
55 .esPadding resw 1
56 .ds resw 1
57 .dsPadding resw 1
58 .cs resw 1
59 .csPadding resw 3
60 .eflags resq 1
61 .eip resq 1
62
63 .r8 resq 1
64 .r9 resq 1
65 .r10 resq 1
66 .r11 resq 1
67 .r12 resq 1
68 .r13 resq 1
69 .r14 resq 1
70 .r15 resq 1
71
72 .esHid.u64Base resq 1
73 .esHid.u32Limit resd 1
74 .esHid.Attr resd 1
75
76 .csHid.u64Base resq 1
77 .csHid.u32Limit resd 1
78 .csHid.Attr resd 1
79
80 .ssHid.u64Base resq 1
81 .ssHid.u32Limit resd 1
82 .ssHid.Attr resd 1
83
84 .dsHid.u64Base resq 1
85 .dsHid.u32Limit resd 1
86 .dsHid.Attr resd 1
87
88 .fsHid.u64Base resq 1
89 .fsHid.u32Limit resd 1
90 .fsHid.Attr resd 1
91
92 .gsHid.u64Base resq 1
93 .gsHid.u32Limit resd 1
94 .gsHid.Attr resd 1
95
96endstruc
97
98
99struc CPUMCTX
100 .fpu resb 512
101
102 .edi resq 1
103 .esi resq 1
104 .ebp resq 1
105 .eax resq 1
106 .ebx resq 1
107 .edx resq 1
108 .ecx resq 1
109 .esp resq 1
110 .lss_esp resd 1
111 .ss resw 1
112 .ssPadding resw 1
113 .gs resw 1
114 .gsPadding resw 1
115 .fs resw 1
116 .fsPadding resw 1
117 .es resw 1
118 .esPadding resw 1
119 .ds resw 1
120 .dsPadding resw 1
121 .cs resw 1
122 .csPadding resw 3
123 .eflags resq 1
124 .eip resq 1
125
126 .r8 resq 1
127 .r9 resq 1
128 .r10 resq 1
129 .r11 resq 1
130 .r12 resq 1
131 .r13 resq 1
132 .r14 resq 1
133 .r15 resq 1
134
135 .esHid.u64Base resq 1
136 .esHid.u32Limit resd 1
137 .esHid.Attr resd 1
138
139 .csHid.u64Base resq 1
140 .csHid.u32Limit resd 1
141 .csHid.Attr resd 1
142
143 .ssHid.u64Base resq 1
144 .ssHid.u32Limit resd 1
145 .ssHid.Attr resd 1
146
147 .dsHid.u64Base resq 1
148 .dsHid.u32Limit resd 1
149 .dsHid.Attr resd 1
150
151 .fsHid.u64Base resq 1
152 .fsHid.u32Limit resd 1
153 .fsHid.Attr resd 1
154
155 .gsHid.u64Base resq 1
156 .gsHid.u32Limit resd 1
157 .gsHid.Attr resd 1
158
159
160 .cr0 resq 1
161 .cr2 resq 1
162 .cr3 resq 1
163 .cr4 resq 1
164
165 .dr resq 8
166
167 .gdtr resb 10 ; GDT limit + linear address
168 .gdtrPadding resw 1
169 .idtr resb 10 ; IDT limit + linear address
170 .idtrPadding resw 1
171 .ldtr resw 1
172 .ldtrPadding resw 1
173 .tr resw 1
174 .trPadding resw 1
175
176 .SysEnter.cs resb 8
177 .SysEnter.eip resb 8
178 .SysEnter.esp resb 8
179
180 .msrEFER resb 8
181 .msrSTAR resb 8
182 .msrPAT resb 8
183 .msrLSTAR resb 8
184 .msrCSTAR resb 8
185 .msrSFMASK resb 8
186 .msrKERNELGSBASE resb 8
187
188 .ldtrHid.u64Base resq 1
189 .ldtrHid.u32Limit resd 1
190 .ldtrHid.Attr resd 1
191
192 .trHid.u64Base resq 1
193 .trHid.u32Limit resd 1
194 .trHid.Attr resd 1
195
196 ; padding
197;;; .padding resd 6
198endstruc
199
200
201;;/* Guest MSR state. */
202struc CPUMCTXMSR
203 .au64 resq 64
204endstruc
205
206;;
207; FPU/XMM state
208;;
209struc X86FXSTATE
210 ;/** Control word. */
211 .FCW resw 1
212 ;/** Status word. */
213 .FSW resw 1
214 ;/** Tag word (it's a byte actually). */
215 .FTW resb 1
216 .huh1 resb 1
217 ;/** Opcode. */
218 .FOP resw 1
219 ;/** Instruction pointer. */
220 .FPUIP resd 1
221 ;/** Code selector. */
222 .CS resw 1
223 .Rsvrd1 resw 1
224 ;/* - offset 16 - */
225 ;/** Data pointer. */
226 .FPUDP resd 1
227 ;/** Data segment */
228 .DS resw 1
229 .Rsrvd2 resw 1
230 .MXCSR resd 1
231 .MXCSR_MASK resd 1
232 ;/* - offset 32 - */
233 ; FPU & MMX registers
234 .aRegs resq 8*2
235 ;/* - offset 160 - */
236 ;/* 8 XMM registers in 32 bits mode; 16 in long mode */
237 .aXMM resq 16*2
238 ;/* - offset 416 - */
239 .au32RsrvdRest resd (512 - 416) / 4
240endstruc
241
242%endif
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