VirtualBox

source: vbox/trunk/include/iprt/x86.mac@ 60162

最後變更 在這個檔案從60162是 60087,由 vboxsync 提交於 9 年 前

iprt/x86.h: duh!

  • 屬性 svn:eol-style 設為 native
  • 屬性 svn:keywords 設為 Author Date Id Revision
檔案大小: 46.4 KB
 
1%ifndef ___iprt_x86_h
2%define ___iprt_x86_h
3%ifndef VBOX_FOR_DTRACE_LIB
4%else
5%endif
6%ifdef RT_OS_SOLARIS
7%endif
8%ifndef VBOX_FOR_DTRACE_LIB
9%endif
10%ifndef VBOX_FOR_DTRACE_LIB
11%endif
12%ifndef VBOX_FOR_DTRACE_LIB
13%endif
14%define X86_EFL_CF RT_BIT_32(0)
15%define X86_EFL_CF_BIT 0
16%define X86_EFL_1 RT_BIT_32(1)
17%define X86_EFL_PF RT_BIT_32(2)
18%define X86_EFL_AF RT_BIT_32(4)
19%define X86_EFL_AF_BIT 4
20%define X86_EFL_ZF RT_BIT_32(6)
21%define X86_EFL_ZF_BIT 6
22%define X86_EFL_SF RT_BIT_32(7)
23%define X86_EFL_SF_BIT 7
24%define X86_EFL_TF RT_BIT_32(8)
25%define X86_EFL_IF RT_BIT_32(9)
26%define X86_EFL_DF RT_BIT_32(10)
27%define X86_EFL_OF RT_BIT_32(11)
28%define X86_EFL_OF_BIT 11
29%define X86_EFL_IOPL (RT_BIT_32(12) | RT_BIT_32(13))
30%define X86_EFL_NT RT_BIT_32(14)
31%define X86_EFL_RF RT_BIT_32(16)
32%define X86_EFL_VM RT_BIT_32(17)
33%define X86_EFL_AC RT_BIT_32(18)
34%define X86_EFL_VIF RT_BIT_32(19)
35%define X86_EFL_VIP RT_BIT_32(20)
36%define X86_EFL_ID RT_BIT_32(21)
37%define X86_EFL_LIVE_MASK 0x003f7fd5
38%define X86_EFL_RA1_MASK RT_BIT_32(1)
39%define X86_EFL_IOPL_SHIFT 12
40%define X86_EFL_GET_IOPL(efl) (((efl) >> X86_EFL_IOPL_SHIFT) & 3)
41%define X86_EFL_POPF_BITS ( X86_EFL_CF | X86_EFL_PF | X86_EFL_AF | X86_EFL_ZF | X86_EFL_SF | X86_EFL_TF | X86_EFL_IF \
42 | X86_EFL_DF | X86_EFL_OF | X86_EFL_IOPL | X86_EFL_NT | X86_EFL_AC | X86_EFL_ID )
43%define X86_EFL_STATUS_BITS ( X86_EFL_CF | X86_EFL_PF | X86_EFL_AF | X86_EFL_ZF | X86_EFL_SF | X86_EFL_OF )
44%ifndef VBOX_FOR_DTRACE_LIB
45%else
46%endif
47%ifndef VBOX_FOR_DTRACE_LIB
48%else
49%endif
50%define X86_CPUID_VENDOR_INTEL_EBX 0x756e6547
51%define X86_CPUID_VENDOR_INTEL_ECX 0x6c65746e
52%define X86_CPUID_VENDOR_INTEL_EDX 0x49656e69
53%define X86_CPUID_VENDOR_AMD_EBX 0x68747541
54%define X86_CPUID_VENDOR_AMD_ECX 0x444d4163
55%define X86_CPUID_VENDOR_AMD_EDX 0x69746e65
56%define X86_CPUID_VENDOR_VIA_EBX 0x746e6543
57%define X86_CPUID_VENDOR_VIA_ECX 0x736c7561
58%define X86_CPUID_VENDOR_VIA_EDX 0x48727561
59%define X86_CPUID_FEATURE_ECX_SSE3 RT_BIT_32(0)
60%define X86_CPUID_FEATURE_ECX_PCLMUL RT_BIT_32(1)
61%define X86_CPUID_FEATURE_ECX_DTES64 RT_BIT_32(2)
62%define X86_CPUID_FEATURE_ECX_MONITOR RT_BIT_32(3)
63%define X86_CPUID_FEATURE_ECX_CPLDS RT_BIT_32(4)
64%define X86_CPUID_FEATURE_ECX_VMX RT_BIT_32(5)
65%define X86_CPUID_FEATURE_ECX_SMX RT_BIT_32(6)
66%define X86_CPUID_FEATURE_ECX_EST RT_BIT_32(7)
67%define X86_CPUID_FEATURE_ECX_TM2 RT_BIT_32(8)
68%define X86_CPUID_FEATURE_ECX_SSSE3 RT_BIT_32(9)
69%define X86_CPUID_FEATURE_ECX_CNTXID RT_BIT_32(10)
70%define X86_CPUID_FEATURE_ECX_SDBG RT_BIT_32(11)
71%define X86_CPUID_FEATURE_ECX_FMA RT_BIT_32(12)
72%define X86_CPUID_FEATURE_ECX_CX16 RT_BIT_32(13)
73%define X86_CPUID_FEATURE_ECX_TPRUPDATE RT_BIT_32(14)
74%define X86_CPUID_FEATURE_ECX_PDCM RT_BIT_32(15)
75%define X86_CPUID_FEATURE_ECX_PCID RT_BIT_32(17)
76%define X86_CPUID_FEATURE_ECX_DCA RT_BIT_32(18)
77%define X86_CPUID_FEATURE_ECX_SSE4_1 RT_BIT_32(19)
78%define X86_CPUID_FEATURE_ECX_SSE4_2 RT_BIT_32(20)
79%define X86_CPUID_FEATURE_ECX_X2APIC RT_BIT_32(21)
80%define X86_CPUID_FEATURE_ECX_MOVBE RT_BIT_32(22)
81%define X86_CPUID_FEATURE_ECX_POPCNT RT_BIT_32(23)
82%define X86_CPUID_FEATURE_ECX_TSCDEADL RT_BIT_32(24)
83%define X86_CPUID_FEATURE_ECX_AES RT_BIT_32(25)
84%define X86_CPUID_FEATURE_ECX_XSAVE RT_BIT_32(26)
85%define X86_CPUID_FEATURE_ECX_OSXSAVE RT_BIT_32(27)
86%define X86_CPUID_FEATURE_ECX_AVX RT_BIT_32(28)
87%define X86_CPUID_FEATURE_ECX_F16C RT_BIT_32(29)
88%define X86_CPUID_FEATURE_ECX_RDRAND RT_BIT_32(30)
89%define X86_CPUID_FEATURE_ECX_HVP RT_BIT_32(31)
90%define X86_CPUID_FEATURE_EDX_FPU RT_BIT_32(0)
91%define X86_CPUID_FEATURE_EDX_VME RT_BIT_32(1)
92%define X86_CPUID_FEATURE_EDX_DE RT_BIT_32(2)
93%define X86_CPUID_FEATURE_EDX_PSE RT_BIT_32(3)
94%define X86_CPUID_FEATURE_EDX_TSC RT_BIT_32(4)
95%define X86_CPUID_FEATURE_EDX_MSR RT_BIT_32(5)
96%define X86_CPUID_FEATURE_EDX_PAE RT_BIT_32(6)
97%define X86_CPUID_FEATURE_EDX_PAE_BIT 6
98%define X86_CPUID_FEATURE_EDX_MCE RT_BIT_32(7)
99%define X86_CPUID_FEATURE_EDX_CX8 RT_BIT_32(8)
100%define X86_CPUID_FEATURE_EDX_APIC RT_BIT_32(9)
101%define X86_CPUID_FEATURE_EDX_SEP RT_BIT_32(11)
102%define X86_CPUID_FEATURE_EDX_MTRR RT_BIT_32(12)
103%define X86_CPUID_FEATURE_EDX_PGE RT_BIT_32(13)
104%define X86_CPUID_FEATURE_EDX_MCA RT_BIT_32(14)
105%define X86_CPUID_FEATURE_EDX_CMOV RT_BIT_32(15)
106%define X86_CPUID_FEATURE_EDX_PAT RT_BIT_32(16)
107%define X86_CPUID_FEATURE_EDX_PSE36 RT_BIT_32(17)
108%define X86_CPUID_FEATURE_EDX_PSN RT_BIT_32(18)
109%define X86_CPUID_FEATURE_EDX_CLFSH RT_BIT_32(19)
110%define X86_CPUID_FEATURE_EDX_DS RT_BIT_32(21)
111%define X86_CPUID_FEATURE_EDX_ACPI RT_BIT_32(22)
112%define X86_CPUID_FEATURE_EDX_MMX RT_BIT_32(23)
113%define X86_CPUID_FEATURE_EDX_FXSR RT_BIT_32(24)
114%define X86_CPUID_FEATURE_EDX_SSE RT_BIT_32(25)
115%define X86_CPUID_FEATURE_EDX_SSE2 RT_BIT_32(26)
116%define X86_CPUID_FEATURE_EDX_SS RT_BIT_32(27)
117%define X86_CPUID_FEATURE_EDX_HTT RT_BIT_32(28)
118%define X86_CPUID_FEATURE_EDX_TM RT_BIT_32(29)
119%define X86_CPUID_FEATURE_EDX_PBE RT_BIT_32(31)
120%define X86_CPUID_MWAIT_ECX_EXT RT_BIT_32(0)
121%define X86_CPUID_MWAIT_ECX_BREAKIRQIF0 RT_BIT_32(1)
122%define X86_CPUID_STEXT_FEATURE_EBX_FSGSBASE RT_BIT_32(0)
123%define X86_CPUID_STEXT_FEATURE_EBX_TSC_ADJUST RT_BIT_32(1)
124%define X86_CPUID_STEXT_FEATURE_EBX_BMI1 RT_BIT_32(3)
125%define X86_CPUID_STEXT_FEATURE_EBX_HLE RT_BIT_32(4)
126%define X86_CPUID_STEXT_FEATURE_EBX_AVX2 RT_BIT_32(5)
127%define X86_CPUID_STEXT_FEATURE_EBX_SMEP RT_BIT_32(7)
128%define X86_CPUID_STEXT_FEATURE_EBX_BMI2 RT_BIT_32(8)
129%define X86_CPUID_STEXT_FEATURE_EBX_ERMS RT_BIT_32(9)
130%define X86_CPUID_STEXT_FEATURE_EBX_INVPCID RT_BIT_32(10)
131%define X86_CPUID_STEXT_FEATURE_EBX_RTM RT_BIT_32(11)
132%define X86_CPUID_STEXT_FEATURE_EBX_PQM RT_BIT_32(12)
133%define X86_CPUID_STEXT_FEATURE_EBX_DEPR_FPU_CS_DS RT_BIT_32(13)
134%define X86_CPUID_STEXT_FEATURE_EBX_MPE RT_BIT_32(14)
135%define X86_CPUID_STEXT_FEATURE_EBX_PQE RT_BIT_32(15)
136%define X86_CPUID_STEXT_FEATURE_EBX_AVX512F RT_BIT_32(16)
137%define X86_CPUID_STEXT_FEATURE_EBX_RDSEED RT_BIT_32(18)
138%define X86_CPUID_STEXT_FEATURE_EBX_ADX RT_BIT_32(19)
139%define X86_CPUID_STEXT_FEATURE_EBX_SMAP RT_BIT_32(20)
140%define X86_CPUID_STEXT_FEATURE_EBX_CLFLUSHOPT RT_BIT_32(23)
141%define X86_CPUID_STEXT_FEATURE_EBX_INTEL_PT RT_BIT_32(25)
142%define X86_CPUID_STEXT_FEATURE_EBX_AVX512PF RT_BIT_32(26)
143%define X86_CPUID_STEXT_FEATURE_EBX_AVX512ER RT_BIT_32(27)
144%define X86_CPUID_STEXT_FEATURE_EBX_AVX512CD RT_BIT_32(28)
145%define X86_CPUID_STEXT_FEATURE_EBX_SHA RT_BIT_32(29)
146%define X86_CPUID_STEXT_FEATURE_ECX_PREFETCHWT1 RT_BIT_32(0)
147%define X86_CPUID_EXT_FEATURE_ECX_LAHF_SAHF RT_BIT_32(0)
148%define X86_CPUID_EXT_FEATURE_EDX_SYSCALL RT_BIT_32(11)
149%define X86_CPUID_EXT_FEATURE_EDX_NX RT_BIT_32(20)
150%define X86_CPUID_EXT_FEATURE_EDX_PAGE1GB RT_BIT_32(26)
151%define X86_CPUID_EXT_FEATURE_EDX_RDTSCP RT_BIT_32(27)
152%define X86_CPUID_EXT_FEATURE_EDX_LONG_MODE RT_BIT_32(29)
153%define X86_CPUID_AMD_FEATURE_EDX_FPU RT_BIT_32(0)
154%define X86_CPUID_AMD_FEATURE_EDX_VME RT_BIT_32(1)
155%define X86_CPUID_AMD_FEATURE_EDX_DE RT_BIT_32(2)
156%define X86_CPUID_AMD_FEATURE_EDX_PSE RT_BIT_32(3)
157%define X86_CPUID_AMD_FEATURE_EDX_TSC RT_BIT_32(4)
158%define X86_CPUID_AMD_FEATURE_EDX_MSR RT_BIT_32(5)
159%define X86_CPUID_AMD_FEATURE_EDX_PAE RT_BIT_32(6)
160%define X86_CPUID_AMD_FEATURE_EDX_MCE RT_BIT_32(7)
161%define X86_CPUID_AMD_FEATURE_EDX_CX8 RT_BIT_32(8)
162%define X86_CPUID_AMD_FEATURE_EDX_APIC RT_BIT_32(9)
163%define X86_CPUID_AMD_FEATURE_EDX_MTRR RT_BIT_32(12)
164%define X86_CPUID_AMD_FEATURE_EDX_PGE RT_BIT_32(13)
165%define X86_CPUID_AMD_FEATURE_EDX_MCA RT_BIT_32(14)
166%define X86_CPUID_AMD_FEATURE_EDX_CMOV RT_BIT_32(15)
167%define X86_CPUID_AMD_FEATURE_EDX_PAT RT_BIT_32(16)
168%define X86_CPUID_AMD_FEATURE_EDX_PSE36 RT_BIT_32(17)
169%define X86_CPUID_AMD_FEATURE_EDX_AXMMX RT_BIT_32(22)
170%define X86_CPUID_AMD_FEATURE_EDX_MMX RT_BIT_32(23)
171%define X86_CPUID_AMD_FEATURE_EDX_FXSR RT_BIT_32(24)
172%define X86_CPUID_AMD_FEATURE_EDX_FFXSR RT_BIT_32(25)
173%define X86_CPUID_AMD_FEATURE_EDX_3DNOW_EX RT_BIT_32(30)
174%define X86_CPUID_AMD_FEATURE_EDX_3DNOW RT_BIT_32(31)
175%define X86_CPUID_AMD_FEATURE_ECX_CMPL RT_BIT_32(1)
176%define X86_CPUID_AMD_FEATURE_ECX_SVM RT_BIT_32(2)
177%define X86_CPUID_AMD_FEATURE_ECX_EXT_APIC RT_BIT_32(3)
178%define X86_CPUID_AMD_FEATURE_ECX_CR8L RT_BIT_32(4)
179%define X86_CPUID_AMD_FEATURE_ECX_ABM RT_BIT_32(5)
180%define X86_CPUID_AMD_FEATURE_ECX_SSE4A RT_BIT_32(6)
181%define X86_CPUID_AMD_FEATURE_ECX_MISALNSSE RT_BIT_32(7)
182%define X86_CPUID_AMD_FEATURE_ECX_3DNOWPRF RT_BIT_32(8)
183%define X86_CPUID_AMD_FEATURE_ECX_OSVW RT_BIT_32(9)
184%define X86_CPUID_AMD_FEATURE_ECX_IBS RT_BIT_32(10)
185%define X86_CPUID_AMD_FEATURE_ECX_XOP RT_BIT_32(11)
186%define X86_CPUID_AMD_FEATURE_ECX_SKINIT RT_BIT_32(12)
187%define X86_CPUID_AMD_FEATURE_ECX_WDT RT_BIT_32(13)
188%define X86_CPUID_AMD_FEATURE_ECX_LWP RT_BIT_32(15)
189%define X86_CPUID_AMD_FEATURE_ECX_FMA4 RT_BIT_32(16)
190%define X86_CPUID_AMD_FEATURE_ECX_NODEID RT_BIT_32(19)
191%define X86_CPUID_AMD_FEATURE_ECX_TBM RT_BIT_32(21)
192%define X86_CPUID_AMD_FEATURE_ECX_TOPOEXT RT_BIT_32(22)
193%define X86_CPUID_AMD_ADVPOWER_EDX_TS RT_BIT_32(0)
194%define X86_CPUID_AMD_ADVPOWER_EDX_FID RT_BIT_32(1)
195%define X86_CPUID_AMD_ADVPOWER_EDX_VID RT_BIT_32(2)
196%define X86_CPUID_AMD_ADVPOWER_EDX_TTP RT_BIT_32(3)
197%define X86_CPUID_AMD_ADVPOWER_EDX_TM RT_BIT_32(4)
198%define X86_CPUID_AMD_ADVPOWER_EDX_STC RT_BIT_32(5)
199%define X86_CPUID_AMD_ADVPOWER_EDX_MC RT_BIT_32(6)
200%define X86_CPUID_AMD_ADVPOWER_EDX_HWPSTATE RT_BIT_32(7)
201%define X86_CPUID_AMD_ADVPOWER_EDX_TSCINVAR RT_BIT_32(8)
202%define X86_CPUID_AMD_ADVPOWER_EDX_CPB RT_BIT_32(9)
203%define X86_CPUID_AMD_ADVPOWER_EDX_EFRO RT_BIT_32(10)
204%define X86_CPUID_AMD_ADVPOWER_EDX_PFI RT_BIT_32(11)
205%define X86_CPUID_AMD_ADVPOWER_EDX_PA RT_BIT_32(12)
206%define X86_CR0_PE RT_BIT_32(0)
207%define X86_CR0_PROTECTION_ENABLE RT_BIT_32(0)
208%define X86_CR0_MP RT_BIT_32(1)
209%define X86_CR0_MONITOR_COPROCESSOR RT_BIT_32(1)
210%define X86_CR0_EM RT_BIT_32(2)
211%define X86_CR0_EMULATE_FPU RT_BIT_32(2)
212%define X86_CR0_TS RT_BIT_32(3)
213%define X86_CR0_TASK_SWITCH RT_BIT_32(3)
214%define X86_CR0_ET RT_BIT_32(4)
215%define X86_CR0_EXTENSION_TYPE RT_BIT_32(4)
216%define X86_CR0_NE RT_BIT_32(5)
217%define X86_CR0_NUMERIC_ERROR RT_BIT_32(5)
218%define X86_CR0_WP RT_BIT_32(16)
219%define X86_CR0_WRITE_PROTECT RT_BIT_32(16)
220%define X86_CR0_AM RT_BIT_32(18)
221%define X86_CR0_ALIGMENT_MASK RT_BIT_32(18)
222%define X86_CR0_NW RT_BIT_32(29)
223%define X86_CR0_NOT_WRITE_THROUGH RT_BIT_32(29)
224%define X86_CR0_CD RT_BIT_32(30)
225%define X86_CR0_CACHE_DISABLE RT_BIT_32(30)
226%define X86_CR0_PG RT_BIT_32(31)
227%define X86_CR0_PAGING RT_BIT_32(31)
228%define X86_CR3_PWT RT_BIT_32(3)
229%define X86_CR3_PCD RT_BIT_32(4)
230%define X86_CR3_PAGE_MASK (0xfffff000)
231%define X86_CR3_PAE_PAGE_MASK (0xffffffe0)
232%define X86_CR3_AMD64_PAGE_MASK 0x000ffffffffff000
233%define X86_CR4_VME RT_BIT_32(0)
234%define X86_CR4_PVI RT_BIT_32(1)
235%define X86_CR4_TSD RT_BIT_32(2)
236%define X86_CR4_DE RT_BIT_32(3)
237%define X86_CR4_PSE RT_BIT_32(4)
238%define X86_CR4_PAE RT_BIT_32(5)
239%define X86_CR4_MCE RT_BIT_32(6)
240%define X86_CR4_PGE RT_BIT_32(7)
241%define X86_CR4_PCE RT_BIT_32(8)
242%define X86_CR4_OSFXSR RT_BIT_32(9)
243%define X86_CR4_OSXMMEEXCPT RT_BIT_32(10)
244%define X86_CR4_VMXE RT_BIT_32(13)
245%define X86_CR4_SMXE RT_BIT_32(14)
246%define X86_CR4_PCIDE RT_BIT_32(17)
247%define X86_CR4_OSXSAVE RT_BIT_32(18)
248%define X86_CR4_SMEP RT_BIT_32(20)
249%define X86_CR4_SMAP RT_BIT_32(21)
250%define X86_CR4_PKE RT_BIT_32(22)
251%define X86_DR6_B0 RT_BIT_32(0)
252%define X86_DR6_B1 RT_BIT_32(1)
253%define X86_DR6_B2 RT_BIT_32(2)
254%define X86_DR6_B3 RT_BIT_32(3)
255%define X86_DR6_B_MASK 0x0000000f
256%define X86_DR6_BD RT_BIT_32(13)
257%define X86_DR6_BS RT_BIT_32(14)
258%define X86_DR6_BT RT_BIT_32(15)
259%define X86_DR6_INIT_VAL 0xFFFF0FF0
260%define X86_DR6_RA1_MASK 0xffff0ff0
261%define X86_DR6_RAZ_MASK RT_BIT_64(12)
262%define X86_DR6_MBZ_MASK 0xffffffff00000000
263%define X86_DR6_B(iBp) RT_BIT_64(iBp)
264%define X86_DR7_L0 RT_BIT_32(0)
265%define X86_DR7_G0 RT_BIT_32(1)
266%define X86_DR7_L1 RT_BIT_32(2)
267%define X86_DR7_G1 RT_BIT_32(3)
268%define X86_DR7_L2 RT_BIT_32(4)
269%define X86_DR7_G2 RT_BIT_32(5)
270%define X86_DR7_L3 RT_BIT_32(6)
271%define X86_DR7_G3 RT_BIT_32(7)
272%define X86_DR7_LE RT_BIT_32(8)
273%define X86_DR7_GE RT_BIT_32(9)
274%define X86_DR7_LE_ALL 0x0000000000000055
275%define X86_DR7_GE_ALL 0x00000000000000aa
276%define X86_DR7_ICE_IR RT_BIT_32(12)
277%define X86_DR7_GD RT_BIT_32(13)
278%define X86_DR7_ICE_TR1 RT_BIT_32(14)
279%define X86_DR7_ICE_TR2 RT_BIT_32(15)
280%define X86_DR7_RW0_MASK (3 << 16)
281%define X86_DR7_LEN0_MASK (3 << 18)
282%define X86_DR7_RW1_MASK (3 << 20)
283%define X86_DR7_LEN1_MASK (3 << 22)
284%define X86_DR7_RW2_MASK (3 << 24)
285%define X86_DR7_LEN2_MASK (3 << 26)
286%define X86_DR7_RW3_MASK (3 << 28)
287%define X86_DR7_LEN3_MASK (3 << 30)
288%define X86_DR7_RA1_MASK RT_BIT_32(10)
289%define X86_DR7_RAZ_MASK 0x0000d800
290%define X86_DR7_MBZ_MASK 0xffffffff00000000
291%define X86_DR7_L(iBp) ( 1 << (iBp * 2) )
292%define X86_DR7_G(iBp) ( 1 << (iBp * 2 + 1) )
293%define X86_DR7_L_G(iBp) ( 3 << (iBp * 2) )
294%define X86_DR7_RW_EO 0
295%define X86_DR7_RW_WO 1
296%define X86_DR7_RW_IO 2
297%define X86_DR7_RW_RW 3
298%define X86_DR7_RW(iBp, fRw) ( (fRw) << ((iBp) * 4 + 16) )
299%define X86_DR7_GET_RW(uDR7, iBp) ( ( (uDR7) >> ((iBp) * 4 + 16) ) & 3 )
300%define X86_DR7_RW_ALL_MASKS 0x33330000
301%ifndef VBOX_FOR_DTRACE_LIB
302 %define X86_DR7_ANY_RW_IO(uDR7) \
303 ( ( 0x22220000 & (uDR7) )
304%endif
305%define X86_DR7_LEN_BYTE 0
306%define X86_DR7_LEN_WORD 1
307%define X86_DR7_LEN_QWORD 2
308%define X86_DR7_LEN_DWORD 3
309%define X86_DR7_LEN(iBp, cb) ( (cb) << ((iBp) * 4 + 18) )
310%define X86_DR7_GET_LEN(uDR7, iBp) ( ( (uDR7) >> ((iBp) * 4 + 18) ) & 0x3 )
311%define X86_DR7_ENABLED_MASK 0x000000ff
312%define X86_DR7_LEN_ALL_MASKS 0xcccc0000
313%define X86_DR7_RW_LEN_ALL_MASKS 0xffff0000
314%define X86_DR7_INIT_VAL 0x400
315%define MSR_P5_MC_ADDR 0x00000000
316%define MSR_P5_MC_TYPE 0x00000001
317%define MSR_IA32_TSC 0x10
318%define MSR_IA32_CESR 0x00000011
319%define MSR_IA32_CTR0 0x00000012
320%define MSR_IA32_CTR1 0x00000013
321%define MSR_IA32_PLATFORM_ID 0x17
322%ifndef MSR_IA32_APICBASE
323 %define MSR_IA32_APICBASE 0x1b
324 %define MSR_IA32_APICBASE_EN RT_BIT_64(11)
325 %define MSR_IA32_APICBASE_EXTD RT_BIT_64(10)
326 %define MSR_IA32_APICBASE_BSP RT_BIT_64(8)
327 %define MSR_IA32_APICBASE_BASE_MIN 0x0000000ffffff000
328%endif
329%define MSR_CORE_THREAD_COUNT 0x35
330%define MSR_IA32_FEATURE_CONTROL 0x3A
331%define MSR_IA32_FEATURE_CONTROL_LOCK RT_BIT_32(0)
332%define MSR_IA32_FEATURE_CONTROL_SMX_VMXON RT_BIT_32(1)
333%define MSR_IA32_FEATURE_CONTROL_VMXON RT_BIT_32(2)
334%define MSR_IA32_TSC_ADJUST 0x3B
335%define MSR_IA32_BIOS_UPDT_TRIG 0x79
336%define MSR_IA32_BIOS_SIGN_ID 0x8B
337%define MSR_IA32_SMM_MONITOR_CTL 0x9B
338%define MSR_IA32_PMC0 0xC1
339%define MSR_IA32_PMC1 0xC2
340%define MSR_IA32_PMC2 0xC3
341%define MSR_IA32_PMC3 0xC4
342%define MSR_IA32_PLATFORM_INFO 0xCE
343%define MSR_IA32_FSB_CLOCK_STS 0xCD
344%define MSR_PKG_CST_CONFIG_CONTROL 0x000000e2
345%define MSR_IA32_MPERF 0xE7
346%define MSR_IA32_APERF 0xE8
347%define MSR_IA32_MTRR_CAP 0xFE
348%define MSR_BBL_CR_CTL3 0x11e
349%ifndef MSR_IA32_SYSENTER_CS
350%define MSR_IA32_SYSENTER_CS 0x174
351%define MSR_IA32_SYSENTER_ESP 0x175
352%define MSR_IA32_SYSENTER_EIP 0x176
353%endif
354%define MSR_IA32_MCG_CAP 0x179
355%define MSR_IA32_MCG_STATUS 0x17A
356%define MSR_IA32_MCG_CTRL 0x17B
357%define MSR_IA32_CR_PAT 0x277
358%define MSR_IA32_PERFEVTSEL0 0x186
359%define MSR_IA32_PERFEVTSEL1 0x187
360%define MSR_FLEX_RATIO 0x194
361%define MSR_IA32_PERF_STATUS 0x198
362%define MSR_IA32_PERF_CTL 0x199
363%define MSR_IA32_THERM_STATUS 0x19c
364%define MSR_IA32_MISC_ENABLE 0x1A0
365%define MSR_IA32_MISC_ENABLE_FAST_STRINGS RT_BIT_64(0)
366%define MSR_IA32_MISC_ENABLE_TCC RT_BIT_64(3)
367%define MSR_IA32_MISC_ENABLE_PERF_MON RT_BIT_64(7)
368%define MSR_IA32_MISC_ENABLE_BTS_UNAVAIL RT_BIT_64(11)
369%define MSR_IA32_MISC_ENABLE_PEBS_UNAVAIL RT_BIT_64(12)
370%define MSR_IA32_MISC_ENABLE_SST_ENABLE RT_BIT_64(16)
371%define MSR_IA32_MISC_ENABLE_MONITOR RT_BIT_64(18)
372%define MSR_IA32_MISC_ENABLE_LIMIT_CPUID RT_BIT_64(22)
373%define MSR_IA32_MISC_ENABLE_XTPR_MSG_DISABLE RT_BIT_64(23)
374%define MSR_IA32_MISC_ENABLE_XD_DISABLE RT_BIT_64(34)
375%define MSR_IA32_DEBUGCTL 0x000001d9
376%define MSR_P4_LASTBRANCH_TOS 0x000001da
377%define MSR_P4_LASTBRANCH_0 0x000001db
378%define MSR_P4_LASTBRANCH_1 0x000001dc
379%define MSR_P4_LASTBRANCH_2 0x000001dd
380%define MSR_P4_LASTBRANCH_3 0x000001de
381%define IA32_MTRR_PHYSBASE0 0x200
382%define IA32_MTRR_PHYSMASK0 0x201
383%define IA32_MTRR_PHYSBASE1 0x202
384%define IA32_MTRR_PHYSMASK1 0x203
385%define IA32_MTRR_PHYSBASE2 0x204
386%define IA32_MTRR_PHYSMASK2 0x205
387%define IA32_MTRR_PHYSBASE3 0x206
388%define IA32_MTRR_PHYSMASK3 0x207
389%define IA32_MTRR_PHYSBASE4 0x208
390%define IA32_MTRR_PHYSMASK4 0x209
391%define IA32_MTRR_PHYSBASE5 0x20a
392%define IA32_MTRR_PHYSMASK5 0x20b
393%define IA32_MTRR_PHYSBASE6 0x20c
394%define IA32_MTRR_PHYSMASK6 0x20d
395%define IA32_MTRR_PHYSBASE7 0x20e
396%define IA32_MTRR_PHYSMASK7 0x20f
397%define IA32_MTRR_PHYSBASE8 0x210
398%define IA32_MTRR_PHYSMASK8 0x211
399%define IA32_MTRR_PHYSBASE9 0x212
400%define IA32_MTRR_PHYSMASK9 0x213
401%define IA32_MTRR_FIX64K_00000 0x250
402%define IA32_MTRR_FIX16K_80000 0x258
403%define IA32_MTRR_FIX16K_A0000 0x259
404%define IA32_MTRR_FIX4K_C0000 0x268
405%define IA32_MTRR_FIX4K_C8000 0x269
406%define IA32_MTRR_FIX4K_D0000 0x26a
407%define IA32_MTRR_FIX4K_D8000 0x26b
408%define IA32_MTRR_FIX4K_E0000 0x26c
409%define IA32_MTRR_FIX4K_E8000 0x26d
410%define IA32_MTRR_FIX4K_F0000 0x26e
411%define IA32_MTRR_FIX4K_F8000 0x26f
412%define MSR_IA32_MTRR_DEF_TYPE 0x2FF
413%define MSR_IA32_MC0_CTL 0x400
414%define MSR_IA32_MC0_STATUS 0x401
415%define MSR_IA32_VMX_BASIC_INFO 0x480
416%define MSR_IA32_VMX_PINBASED_CTLS 0x481
417%define MSR_IA32_VMX_PROCBASED_CTLS 0x482
418%define MSR_IA32_VMX_EXIT_CTLS 0x483
419%define MSR_IA32_VMX_ENTRY_CTLS 0x484
420%define MSR_IA32_VMX_MISC 0x485
421%define MSR_IA32_VMX_CR0_FIXED0 0x486
422%define MSR_IA32_VMX_CR0_FIXED1 0x487
423%define MSR_IA32_VMX_CR4_FIXED0 0x488
424%define MSR_IA32_VMX_CR4_FIXED1 0x489
425%define MSR_IA32_VMX_VMCS_ENUM 0x48A
426%define MSR_IA32_VMX_VMFUNC 0x491
427%define MSR_IA32_VMX_PROCBASED_CTLS2 0x48B
428%define MSR_IA32_VMX_EPT_VPID_CAP 0x48C
429%define MSR_IA32_DS_AREA 0x600
430%define MSR_RAPL_POWER_UNIT 0x606
431%define MSR_IA32_X2APIC_START 0x800
432%define MSR_IA32_X2APIC_ID 0x802
433%define MSR_IA32_X2APIC_VERSION 0x803
434%define MSR_IA32_X2APIC_TPR 0x808
435%define MSR_IA32_X2APIC_PPR 0x80A
436%define MSR_IA32_X2APIC_EOI 0x80B
437%define MSR_IA32_X2APIC_LDR 0x80D
438%define MSR_IA32_X2APIC_SVR 0x80F
439%define MSR_IA32_X2APIC_ISR0 0x810
440%define MSR_IA32_X2APIC_ISR1 0x811
441%define MSR_IA32_X2APIC_ISR2 0x812
442%define MSR_IA32_X2APIC_ISR3 0x813
443%define MSR_IA32_X2APIC_ISR4 0x814
444%define MSR_IA32_X2APIC_ISR5 0x815
445%define MSR_IA32_X2APIC_ISR6 0x816
446%define MSR_IA32_X2APIC_ISR7 0x817
447%define MSR_IA32_X2APIC_TMR0 0x818
448%define MSR_IA32_X2APIC_TMR1 0x819
449%define MSR_IA32_X2APIC_TMR2 0x81A
450%define MSR_IA32_X2APIC_TMR3 0x81B
451%define MSR_IA32_X2APIC_TMR4 0x81C
452%define MSR_IA32_X2APIC_TMR5 0x81D
453%define MSR_IA32_X2APIC_TMR6 0x81E
454%define MSR_IA32_X2APIC_TMR7 0x81F
455%define MSR_IA32_X2APIC_IRR0 0x820
456%define MSR_IA32_X2APIC_IRR1 0x821
457%define MSR_IA32_X2APIC_IRR2 0x822
458%define MSR_IA32_X2APIC_IRR3 0x823
459%define MSR_IA32_X2APIC_IRR4 0x824
460%define MSR_IA32_X2APIC_IRR5 0x825
461%define MSR_IA32_X2APIC_IRR6 0x826
462%define MSR_IA32_X2APIC_IRR7 0x827
463%define MSR_IA32_X2APIC_ESR 0x828
464%define MSR_IA32_X2APIC_LVT_CMCI 0x82F
465%define MSR_IA32_X2APIC_ICR 0x830
466%define MSR_IA32_X2APIC_LVT_TIMER 0x832
467%define MSR_IA32_X2APIC_LVT_THERMAL 0x833
468%define MSR_IA32_X2APIC_LVT_PERF 0x834
469%define MSR_IA32_X2APIC_LVT_LINT0 0x835
470%define MSR_IA32_X2APIC_LVT_LINT1 0x836
471%define MSR_IA32_X2APIC_LVT_ERROR 0x837
472%define MSR_IA32_X2APIC_TIMER_ICR 0x838
473%define MSR_IA32_X2APIC_TIMER_CCR 0x839
474%define MSR_IA32_X2APIC_TIMER_DCR 0x83E
475%define MSR_IA32_X2APIC_SELF_IPI 0x83F
476%define MSR_IA32_X2APIC_END 0xBFF
477%define MSR_IA32_X2APIC_LVT_START MSR_IA32_X2APIC_LVT_TIMER
478%define MSR_IA32_X2APIC_LVT_END MSR_IA32_X2APIC_LVT_ERROR
479%define MSR_K6_EFER 0xc0000080
480%define MSR_K6_EFER_SCE RT_BIT_32(0)
481%define MSR_K6_EFER_LME RT_BIT_32(8)
482%define MSR_K6_EFER_LMA RT_BIT_32(10)
483%define MSR_K6_EFER_NXE RT_BIT_32(11)
484%define MSR_K6_EFER_SVME RT_BIT_32(12)
485%define MSR_K6_EFER_LMSLE RT_BIT_32(13)
486%define MSR_K6_EFER_FFXSR RT_BIT_32(14)
487%define MSR_K6_EFER_TCE RT_BIT_32(15)
488%define MSR_K6_STAR 0xc0000081
489%define MSR_K6_STAR_SYSRET_CS_SS_SHIFT 48
490%define MSR_K6_STAR_SYSCALL_CS_SS_SHIFT 32
491%define MSR_K6_STAR_SEL_MASK 0xffff
492%define MSR_K6_STAR_SYSCALL_EIP_MASK 0xffffffff
493%define MSR_K6_WHCR 0xc0000082
494%define MSR_K6_UWCCR 0xc0000085
495%define MSR_K6_PSOR 0xc0000087
496%define MSR_K6_PFIR 0xc0000088
497%define MSR_K7_EVNTSEL0 0xc0010000
498%define MSR_K7_EVNTSEL1 0xc0010001
499%define MSR_K7_EVNTSEL2 0xc0010002
500%define MSR_K7_EVNTSEL3 0xc0010003
501%define MSR_K7_PERFCTR0 0xc0010004
502%define MSR_K7_PERFCTR1 0xc0010005
503%define MSR_K7_PERFCTR2 0xc0010006
504%define MSR_K7_PERFCTR3 0xc0010007
505%define MSR_K8_LSTAR 0xc0000082
506%define MSR_K8_CSTAR 0xc0000083
507%define MSR_K8_SF_MASK 0xc0000084
508%define MSR_K8_FS_BASE 0xc0000100
509%define MSR_K8_GS_BASE 0xc0000101
510%define MSR_K8_KERNEL_GS_BASE 0xc0000102
511%define MSR_K8_TSC_AUX 0xc0000103
512%define MSR_K8_SYSCFG 0xc0010010
513%define MSR_K8_HWCR 0xc0010015
514%define MSR_K8_IORRBASE0 0xc0010016
515%define MSR_K8_IORRMASK0 0xc0010017
516%define MSR_K8_IORRBASE1 0xc0010018
517%define MSR_K8_IORRMASK1 0xc0010019
518%define MSR_K8_TOP_MEM1 0xc001001a
519%define MSR_K8_TOP_MEM2 0xc001001d
520%define MSR_K8_NB_CFG 0xc001001f
521%define MSR_K8_INT_PENDING 0xc0010055
522%define MSR_K8_VM_CR 0xc0010114
523%define MSR_K8_VM_CR_SVM_DISABLE RT_BIT_32(4)
524%define MSR_K8_IGNNE 0xc0010115
525%define MSR_K8_SMM_CTL 0xc0010116
526%define MSR_K8_VM_HSAVE_PA 0xc0010117
527%define X86_PG_ENTRIES 1024
528%define X86_PG_PAE_ENTRIES 512
529%define X86_PG_PAE_PDPE_ENTRIES 4
530%define X86_PG_AMD64_ENTRIES X86_PG_PAE_ENTRIES
531%define X86_PG_AMD64_PDPE_ENTRIES X86_PG_AMD64_ENTRIES
532%define X86_PAGE_4K_SIZE _4K
533%define X86_PAGE_4K_SHIFT 12
534%define X86_PAGE_4K_OFFSET_MASK 0xfff
535%define X86_PAGE_4K_BASE_MASK 0xfffffffffffff000
536%define X86_PAGE_4K_BASE_MASK_32 0xfffff000
537%define X86_PAGE_2M_SIZE _2M
538%define X86_PAGE_2M_SHIFT 21
539%define X86_PAGE_2M_OFFSET_MASK 0x001fffff
540%define X86_PAGE_2M_BASE_MASK 0xffffffffffe00000
541%define X86_PAGE_2M_BASE_MASK_32 0xffe00000
542%define X86_PAGE_4M_SIZE _4M
543%define X86_PAGE_4M_SHIFT 22
544%define X86_PAGE_4M_OFFSET_MASK 0x003fffff
545%define X86_PAGE_4M_BASE_MASK 0xffffffffffc00000
546%define X86_PAGE_4M_BASE_MASK_32 0xffc00000
547%define X86_IS_CANONICAL(a_u64Addr) ((uint64_t)(a_u64Addr) + 0x800000000000 < UINT64_C(0x1000000000000))
548%define X86_PTE_BIT_P 0
549%define X86_PTE_BIT_RW 1
550%define X86_PTE_BIT_US 2
551%define X86_PTE_BIT_PWT 3
552%define X86_PTE_BIT_PCD 4
553%define X86_PTE_BIT_A 5
554%define X86_PTE_BIT_D 6
555%define X86_PTE_BIT_PAT 7
556%define X86_PTE_BIT_G 8
557%define X86_PTE_P RT_BIT_32(0)
558%define X86_PTE_RW RT_BIT_32(1)
559%define X86_PTE_US RT_BIT_32(2)
560%define X86_PTE_PWT RT_BIT_32(3)
561%define X86_PTE_PCD RT_BIT_32(4)
562%define X86_PTE_A RT_BIT_32(5)
563%define X86_PTE_D RT_BIT_32(6)
564%define X86_PTE_PAT RT_BIT_32(7)
565%define X86_PTE_G RT_BIT_32(8)
566%define X86_PTE_AVL_MASK (RT_BIT_32(9) | RT_BIT_32(10) | RT_BIT_32(11))
567%define X86_PTE_PG_MASK ( 0xfffff000 )
568%define X86_PTE_PAE_PG_MASK 0x000ffffffffff000
569%define X86_PTE_PAE_NX RT_BIT_64(63)
570%define X86_PTE_PAE_MBZ_MASK_NX 0x7ff0000000000000
571%define X86_PTE_PAE_MBZ_MASK_NO_NX 0xfff0000000000000
572%define X86_PTE_LM_MBZ_MASK_NX 0x0000000000000000
573%define X86_PTE_LM_MBZ_MASK_NO_NX 0x8000000000000000
574%ifndef VBOX_FOR_DTRACE_LIB
575%endif
576%ifndef VBOX_FOR_DTRACE_LIB
577%endif
578%ifndef VBOX_FOR_DTRACE_LIB
579%endif
580%ifndef VBOX_FOR_DTRACE_LIB
581%endif
582%ifndef VBOX_FOR_DTRACE_LIB
583%endif
584%define X86_PT_SHIFT 12
585%define X86_PT_MASK 0x3ff
586%ifndef VBOX_FOR_DTRACE_LIB
587%endif
588%define X86_PT_PAE_SHIFT 12
589%define X86_PT_PAE_MASK 0x1ff
590%define X86_PDE_P RT_BIT_32(0)
591%define X86_PDE_RW RT_BIT_32(1)
592%define X86_PDE_US RT_BIT_32(2)
593%define X86_PDE_PWT RT_BIT_32(3)
594%define X86_PDE_PCD RT_BIT_32(4)
595%define X86_PDE_A RT_BIT_32(5)
596%define X86_PDE_PS RT_BIT_32(7)
597%define X86_PDE_AVL_MASK (RT_BIT_32(9) | RT_BIT_32(10) | RT_BIT_32(11))
598%define X86_PDE_PG_MASK ( 0xfffff000 )
599%define X86_PDE_PAE_PG_MASK 0x000ffffffffff000
600%define X86_PDE_PAE_NX RT_BIT_64(63)
601%define X86_PDE_PAE_MBZ_MASK_NX 0x7ff0000000000080
602%define X86_PDE_PAE_MBZ_MASK_NO_NX 0xfff0000000000080
603%define X86_PDE_LM_MBZ_MASK_NX 0x0000000000000080
604%define X86_PDE_LM_MBZ_MASK_NO_NX 0x8000000000000080
605%ifndef VBOX_FOR_DTRACE_LIB
606%endif
607%ifndef VBOX_FOR_DTRACE_LIB
608%endif
609%define X86_PDE4M_P RT_BIT_32(0)
610%define X86_PDE4M_RW RT_BIT_32(1)
611%define X86_PDE4M_US RT_BIT_32(2)
612%define X86_PDE4M_PWT RT_BIT_32(3)
613%define X86_PDE4M_PCD RT_BIT_32(4)
614%define X86_PDE4M_A RT_BIT_32(5)
615%define X86_PDE4M_D RT_BIT_32(6)
616%define X86_PDE4M_PS RT_BIT_32(7)
617%define X86_PDE4M_G RT_BIT_32(8)
618%define X86_PDE4M_AVL (RT_BIT_32(9) | RT_BIT_32(10) | RT_BIT_32(11))
619%define X86_PDE4M_PAT RT_BIT_32(12)
620%define X86_PDE4M_PAT_SHIFT (12 - 7)
621%define X86_PDE4M_PG_MASK ( 0xffc00000 )
622%define X86_PDE4M_PG_HIGH_MASK ( 0x001fe000 )
623%define X86_PDE4M_PG_HIGH_SHIFT 19
624%define X86_PDE4M_MBZ_MASK RT_BIT_32(21)
625%define X86_PDE2M_PAE_PG_MASK 0x000fffffffe00000
626%define X86_PDE2M_PAE_NX RT_BIT_64(63)
627%define X86_PDE2M_PAE_MBZ_MASK_NX 0x7ff00000001fe000
628%define X86_PDE2M_PAE_MBZ_MASK_NO_NX 0xfff00000001fe000
629%define X86_PDE2M_LM_MBZ_MASK_NX 0x00000000001fe000
630%define X86_PDE2M_LM_MBZ_MASK_NO_NX 0x80000000001fe000
631%ifndef VBOX_FOR_DTRACE_LIB
632%endif
633%ifndef VBOX_FOR_DTRACE_LIB
634%endif
635%ifndef VBOX_FOR_DTRACE_LIB
636%endif
637%ifndef VBOX_FOR_DTRACE_LIB
638%endif
639%ifndef VBOX_FOR_DTRACE_LIB
640%endif
641%define X86_PD_SHIFT 22
642%define X86_PD_MASK 0x3ff
643%ifndef VBOX_FOR_DTRACE_LIB
644%endif
645%define X86_PD_PAE_SHIFT 21
646%define X86_PD_PAE_MASK 0x1ff
647%define X86_PDPE_P RT_BIT_32(0)
648%define X86_PDPE_RW RT_BIT_32(1)
649%define X86_PDPE_US RT_BIT_32(2)
650%define X86_PDPE_PWT RT_BIT_32(3)
651%define X86_PDPE_PCD RT_BIT_32(4)
652%define X86_PDPE_A RT_BIT_32(5)
653%define X86_PDPE_LM_PS RT_BIT_32(7)
654%define X86_PDPE_AVL_MASK (RT_BIT_32(9) | RT_BIT_32(10) | RT_BIT_32(11))
655%define X86_PDPE_PG_MASK 0x000ffffffffff000
656%define X86_PDPE_PAE_MBZ_MASK 0xfff00000000001e6
657%define X86_PDPE_LM_NX RT_BIT_64(63)
658%define X86_PDPE_LM_MBZ_MASK_NX 0x0000000000000180
659%define X86_PDPE_LM_MBZ_MASK_NO_NX 0x8000000000000180
660%define X86_PDPE1G_LM_MBZ_MASK_NX 0x000000003fffe000
661%define X86_PDPE1G_LM_MBZ_MASK_NO_NX 0x800000003fffe000
662%ifndef VBOX_FOR_DTRACE_LIB
663%endif
664%ifndef VBOX_FOR_DTRACE_LIB
665%endif
666%ifndef VBOX_FOR_DTRACE_LIB
667%endif
668%ifndef VBOX_FOR_DTRACE_LIB
669%endif
670%define X86_PDPT_SHIFT 30
671%define X86_PDPT_MASK_PAE 0x3
672%define X86_PDPT_MASK_AMD64 0x1ff
673%define X86_PML4E_P RT_BIT_32(0)
674%define X86_PML4E_RW RT_BIT_32(1)
675%define X86_PML4E_US RT_BIT_32(2)
676%define X86_PML4E_PWT RT_BIT_32(3)
677%define X86_PML4E_PCD RT_BIT_32(4)
678%define X86_PML4E_A RT_BIT_32(5)
679%define X86_PML4E_AVL_MASK (RT_BIT_32(9) | RT_BIT_32(10) | RT_BIT_32(11))
680%define X86_PML4E_PG_MASK 0x000ffffffffff000
681%define X86_PML4E_MBZ_MASK_NX 0x0000000000000080
682%define X86_PML4E_MBZ_MASK_NO_NX 0x8000000000000080
683%define X86_PML4E_NX RT_BIT_64(63)
684%ifndef VBOX_FOR_DTRACE_LIB
685%endif
686%ifndef VBOX_FOR_DTRACE_LIB
687%endif
688%ifndef VBOX_FOR_DTRACE_LIB
689%endif
690%define X86_PML4_SHIFT 39
691%define X86_PML4_MASK 0x1ff
692%ifndef VBOX_FOR_DTRACE_LIB
693%endif
694%ifndef VBOX_FOR_DTRACE_LIB
695%endif
696%ifndef VBOX_FOR_DTRACE_LIB
697%endif
698%ifndef VBOX_FOR_DTRACE_LIB
699%endif
700%ifndef VBOX_FOR_DTRACE_LIB
701%endif
702%define X86_OFF_FXSTATE_RSVD 0x1d0
703%define X86_FXSTATE_RSVD_32BIT_MAGIC 0x32b3232b
704%ifndef VBOX_FOR_DTRACE_LIB
705%endif
706%define X86_FSW_IE RT_BIT_32(0)
707%define X86_FSW_DE RT_BIT_32(1)
708%define X86_FSW_ZE RT_BIT_32(2)
709%define X86_FSW_OE RT_BIT_32(3)
710%define X86_FSW_UE RT_BIT_32(4)
711%define X86_FSW_PE RT_BIT_32(5)
712%define X86_FSW_SF RT_BIT_32(6)
713%define X86_FSW_ES RT_BIT_32(7)
714%define X86_FSW_XCPT_MASK 0x007f
715%define X86_FSW_XCPT_ES_MASK 0x00ff
716%define X86_FSW_C0 RT_BIT_32(8)
717%define X86_FSW_C1 RT_BIT_32(9)
718%define X86_FSW_C2 RT_BIT_32(10)
719%define X86_FSW_TOP_MASK 0x3800
720%define X86_FSW_TOP_SHIFT 11
721%define X86_FSW_TOP_SMASK 0x0007
722%define X86_FSW_TOP_GET(a_uFsw) (((a_uFsw) >> X86_FSW_TOP_SHIFT) & X86_FSW_TOP_SMASK)
723%define X86_FSW_C3 RT_BIT_32(14)
724%define X86_FSW_C_MASK 0x4700
725%define X86_FSW_B RT_BIT_32(15)
726%define X86_FCW_IM RT_BIT_32(0)
727%define X86_FCW_DM RT_BIT_32(1)
728%define X86_FCW_ZM RT_BIT_32(2)
729%define X86_FCW_OM RT_BIT_32(3)
730%define X86_FCW_UM RT_BIT_32(4)
731%define X86_FCW_PM RT_BIT_32(5)
732%define X86_FCW_MASK_ALL 0x007f
733%define X86_FCW_XCPT_MASK 0x003f
734%define X86_FCW_PC_MASK 0x0300
735%define X86_FCW_PC_24 0x0000
736%define X86_FCW_PC_RSVD 0x0100
737%define X86_FCW_PC_53 0x0200
738%define X86_FCW_PC_64 0x0300
739%define X86_FCW_RC_MASK 0x0c00
740%define X86_FCW_RC_NEAREST 0x0000
741%define X86_FCW_RC_DOWN 0x0400
742%define X86_FCW_RC_UP 0x0800
743%define X86_FCW_RC_ZERO 0x0c00
744%define X86_FCW_ZERO_MASK 0xf080
745%define X86_MXSCR_IE RT_BIT_32(0)
746%define X86_MXSCR_DE RT_BIT_32(1)
747%define X86_MXSCR_ZE RT_BIT_32(2)
748%define X86_MXSCR_OE RT_BIT_32(3)
749%define X86_MXSCR_UE RT_BIT_32(4)
750%define X86_MXSCR_PE RT_BIT_32(5)
751%define X86_MXSCR_DAZ RT_BIT_32(6)
752%define X86_MXSCR_IM RT_BIT_32(7)
753%define X86_MXSCR_DM RT_BIT_32(8)
754%define X86_MXSCR_ZM RT_BIT_32(9)
755%define X86_MXSCR_OM RT_BIT_32(10)
756%define X86_MXSCR_UM RT_BIT_32(11)
757%define X86_MXSCR_PM RT_BIT_32(12)
758%define X86_MXSCR_RC_MASK 0x6000
759%define X86_MXSCR_RC_NEAREST 0x0000
760%define X86_MXSCR_RC_DOWN 0x2000
761%define X86_MXSCR_RC_UP 0x4000
762%define X86_MXSCR_RC_ZERO 0x6000
763%define X86_MXSCR_FZ RT_BIT_32(15)
764%define X86_MXSCR_MM RT_BIT_32(17)
765%ifndef VBOX_FOR_DTRACE_LIB
766%endif
767%ifndef VBOX_FOR_DTRACE_LIB
768%endif
769%ifndef VBOX_FOR_DTRACE_LIB
770%endif
771%ifndef VBOX_FOR_DTRACE_LIB
772%endif
773%ifndef VBOX_FOR_DTRACE_LIB
774%endif
775%ifndef VBOX_FOR_DTRACE_LIB
776%endif
777%ifndef VBOX_FOR_DTRACE_LIB
778%endif
779%ifndef VBOX_FOR_DTRACE_LIB
780%endif
781%ifndef VBOX_FOR_DTRACE_LIB
782%endif
783%define XSAVE_C_X87_BIT 0
784%define XSAVE_C_X87 RT_BIT_64(XSAVE_C_X87_BIT)
785%define XSAVE_C_SSE_BIT 1
786%define XSAVE_C_SSE RT_BIT_64(XSAVE_C_SSE_BIT)
787%define XSAVE_C_YMM_BIT 2
788%define XSAVE_C_YMM RT_BIT_64(XSAVE_C_YMM_BIT)
789%define XSAVE_C_BNDREGS_BIT 3
790%define XSAVE_C_BNDREGS RT_BIT_64(XSAVE_C_BNDREGS_BIT)
791%define XSAVE_C_BNDCSR_BIT 4
792%define XSAVE_C_BNDCSR RT_BIT_64(XSAVE_C_BNDCSR_BIT)
793%define XSAVE_C_OPMASK_BIT 5
794%define XSAVE_C_OPMASK RT_BIT_64(XSAVE_C_OPMASK_BIT)
795%define XSAVE_C_ZMM_HI256_BIT 6
796%define XSAVE_C_ZMM_HI256 RT_BIT_64(XSAVE_C_ZMM_HI256_BIT)
797%define XSAVE_C_ZMM_16HI_BIT 7
798%define XSAVE_C_ZMM_16HI RT_BIT_64(XSAVE_C_ZMM_16HI_BIT)
799%define XSAVE_C_PKRU_BIT 9
800%define XSAVE_C_PKRU RT_BIT_64(XSAVE_C_PKRU_BIT)
801%define XSAVE_C_LWP_BIT 62
802%define XSAVE_C_LWP RT_BIT_64(XSAVE_C_LWP_BIT)
803%ifndef VBOX_FOR_DTRACE_LIB
804%endif
805%define X86DESCATTR_TYPE 0x0000000f
806%define X86DESCATTR_DT 0x00000010
807%define X86DESCATTR_DPL 0x00000060
808%define X86DESCATTR_DPL_SHIFT 5
809%define X86DESCATTR_P 0x00000080
810%define X86DESCATTR_LIMIT_HIGH 0x00000f00
811%define X86DESCATTR_AVL 0x00001000
812%define X86DESCATTR_L 0x00002000
813%define X86DESCATTR_D 0x00004000
814%define X86DESCATTR_G 0x00008000
815%define X86DESCATTR_UNUSABLE 0x00010000
816%ifndef VBOX_FOR_DTRACE_LIB
817%endif
818%ifndef VBOX_FOR_DTRACE_LIB
819%define X86DESCGENERIC_BIT_OFF_LIMIT_LOW (0)
820%define X86DESCGENERIC_BIT_OFF_BASE_LOW (16)
821%define X86DESCGENERIC_BIT_OFF_BASE_HIGH1 (32)
822%define X86DESCGENERIC_BIT_OFF_TYPE (40)
823%define X86DESCGENERIC_BIT_OFF_DESC_TYPE (44)
824%define X86DESCGENERIC_BIT_OFF_DPL (45)
825%define X86DESCGENERIC_BIT_OFF_PRESENT (47)
826%define X86DESCGENERIC_BIT_OFF_LIMIT_HIGH (48)
827%define X86DESCGENERIC_BIT_OFF_AVAILABLE (52)
828%define X86DESCGENERIC_BIT_OFF_LONG (53)
829%define X86DESCGENERIC_BIT_OFF_DEF_BIG (54)
830%define X86DESCGENERIC_BIT_OFF_GRANULARITY (55)
831%define X86DESCGENERIC_BIT_OFF_BASE_HIGH2 (56)
832%define X86LAR_F_TYPE 0x0f00
833%define X86LAR_F_DT 0x1000
834%define X86LAR_F_DPL 0x6000
835%define X86LAR_F_DPL_SHIFT 13
836%define X86LAR_F_P 0x8000
837%define X86LAR_F_AVL 0x00100000
838%define X86LAR_F_L 0x00200000
839%define X86LAR_F_D 0x00400000
840%define X86LAR_F_G 0x00800000
841%endif
842%ifndef VBOX_FOR_DTRACE_LIB
843%endif
844%ifndef VBOX_FOR_DTRACE_LIB
845%endif
846%ifndef VBOX_FOR_DTRACE_LIB
847%endif
848%ifndef VBOX_FOR_DTRACE_LIB
849%endif
850%ifndef VBOX_FOR_DTRACE_LIB
851%endif
852%if HC_ARCH_BITS == 64
853%else
854%endif
855%if HC_ARCH_BITS == 64
856%else
857%endif
858%if HC_ARCH_BITS == 64
859%else
860%endif
861%define X86_SEL_TYPE_CODE 8
862%define X86_SEL_TYPE_MEMORY RT_BIT_32(4)
863%define X86_SEL_TYPE_ACCESSED 1
864%define X86_SEL_TYPE_DOWN 4
865%define X86_SEL_TYPE_CONF 4
866%define X86_SEL_TYPE_WRITE 2
867%define X86_SEL_TYPE_READ 2
868%define X86_SEL_TYPE_READ_BIT 1
869%define X86_SEL_TYPE_RO 0
870%define X86_SEL_TYPE_RO_ACC (0 | X86_SEL_TYPE_ACCESSED)
871%define X86_SEL_TYPE_RW 2
872%define X86_SEL_TYPE_RW_ACC (2 | X86_SEL_TYPE_ACCESSED)
873%define X86_SEL_TYPE_RO_DOWN 4
874%define X86_SEL_TYPE_RO_DOWN_ACC (4 | X86_SEL_TYPE_ACCESSED)
875%define X86_SEL_TYPE_RW_DOWN 6
876%define X86_SEL_TYPE_RW_DOWN_ACC (6 | X86_SEL_TYPE_ACCESSED)
877%define X86_SEL_TYPE_EO (0 | X86_SEL_TYPE_CODE)
878%define X86_SEL_TYPE_EO_ACC (0 | X86_SEL_TYPE_CODE | X86_SEL_TYPE_ACCESSED)
879%define X86_SEL_TYPE_ER (2 | X86_SEL_TYPE_CODE)
880%define X86_SEL_TYPE_ER_ACC (2 | X86_SEL_TYPE_CODE | X86_SEL_TYPE_ACCESSED)
881%define X86_SEL_TYPE_EO_CONF (4 | X86_SEL_TYPE_CODE)
882%define X86_SEL_TYPE_EO_CONF_ACC (4 | X86_SEL_TYPE_CODE | X86_SEL_TYPE_ACCESSED)
883%define X86_SEL_TYPE_ER_CONF (6 | X86_SEL_TYPE_CODE)
884%define X86_SEL_TYPE_ER_CONF_ACC (6 | X86_SEL_TYPE_CODE | X86_SEL_TYPE_ACCESSED)
885%define X86_SEL_TYPE_SYS_TSS_BUSY_MASK 2
886%define X86_SEL_TYPE_SYS_UNDEFINED 0
887%define X86_SEL_TYPE_SYS_286_TSS_AVAIL 1
888%define X86_SEL_TYPE_SYS_LDT 2
889%define X86_SEL_TYPE_SYS_286_TSS_BUSY 3
890%define X86_SEL_TYPE_SYS_286_CALL_GATE 4
891%define X86_SEL_TYPE_SYS_TASK_GATE 5
892%define X86_SEL_TYPE_SYS_286_INT_GATE 6
893%define X86_SEL_TYPE_SYS_286_TRAP_GATE 7
894%define X86_SEL_TYPE_SYS_UNDEFINED2 8
895%define X86_SEL_TYPE_SYS_386_TSS_AVAIL 9
896%define X86_SEL_TYPE_SYS_UNDEFINED3 0xA
897%define X86_SEL_TYPE_SYS_386_TSS_BUSY 0xB
898%define X86_SEL_TYPE_SYS_386_CALL_GATE 0xC
899%define X86_SEL_TYPE_SYS_UNDEFINED4 0xD
900%define X86_SEL_TYPE_SYS_386_INT_GATE 0xE
901%define X86_SEL_TYPE_SYS_386_TRAP_GATE 0xF
902%define AMD64_SEL_TYPE_SYS_LDT 2
903%define AMD64_SEL_TYPE_SYS_TSS_AVAIL 9
904%define AMD64_SEL_TYPE_SYS_TSS_BUSY 0xB
905%define AMD64_SEL_TYPE_SYS_CALL_GATE 0xC
906%define AMD64_SEL_TYPE_SYS_INT_GATE 0xE
907%define AMD64_SEL_TYPE_SYS_TRAP_GATE 0xF
908%define X86_DESC_TYPE_MASK (RT_BIT_32(8) | RT_BIT_32(9) | RT_BIT_32(10) | RT_BIT_32(11))
909%define X86_DESC_S RT_BIT_32(12)
910%define X86_DESC_DPL (RT_BIT_32(13) | RT_BIT_32(14))
911%define X86_DESC_P RT_BIT_32(15)
912%define X86_DESC_AVL RT_BIT_32(20)
913%define X86_DESC_DB RT_BIT_32(22)
914%define X86_DESC_G RT_BIT_32(23)
915%define X86_SEL_TYPE_SYS_286_TSS_LIMIT_MIN 0x2b
916%define X86_SEL_TYPE_SYS_386_TSS_LIMIT_MIN 0x67
917%ifndef VBOX_FOR_DTRACE_LIB
918%endif
919%ifndef VBOX_FOR_DTRACE_LIB
920%endif
921%ifndef VBOX_FOR_DTRACE_LIB
922%endif
923%define X86_SEL_SHIFT 3
924%define X86_SEL_MASK 0xfff8
925%define X86_SEL_MASK_OFF_RPL 0xfffc
926%define X86_SEL_LDT 0x0004
927%define X86_SEL_RPL 0x0003
928%define X86_SEL_RPL_LDT 0x0007
929%define X86_XCPT_MAX (X86_XCPT_SX)
930%define X86_TRAP_ERR_EXTERNAL 1
931%define X86_TRAP_ERR_IDT 2
932%define X86_TRAP_ERR_TI 4
933%define X86_TRAP_ERR_SEL_MASK 0xfff8
934%define X86_TRAP_ERR_SEL_SHIFT 3
935%define X86_TRAP_PF_P RT_BIT_32(0)
936%define X86_TRAP_PF_RW RT_BIT_32(1)
937%define X86_TRAP_PF_US RT_BIT_32(2)
938%define X86_TRAP_PF_RSVD RT_BIT_32(3)
939%define X86_TRAP_PF_ID RT_BIT_32(4)
940%define X86_TRAP_PF_PK RT_BIT_32(5)
941%ifndef VBOX_FOR_DTRACE_LIB
942%else
943%endif
944%ifndef VBOX_FOR_DTRACE_LIB
945%else
946%endif
947%define X86_MODRM_RM_MASK 0x07
948%define X86_MODRM_REG_MASK 0x38
949%define X86_MODRM_REG_SMASK 0x07
950%define X86_MODRM_REG_SHIFT 3
951%define X86_MODRM_MOD_MASK 0xc0
952%define X86_MODRM_MOD_SMASK 0x03
953%define X86_MODRM_MOD_SHIFT 6
954%ifndef VBOX_FOR_DTRACE_LIB
955%endif
956%define X86_SIB_BASE_MASK 0x07
957%define X86_SIB_INDEX_MASK 0x38
958%define X86_SIB_INDEX_SMASK 0x07
959%define X86_SIB_INDEX_SHIFT 3
960%define X86_SIB_SCALE_MASK 0xc0
961%define X86_SIB_SCALE_SMASK 0x03
962%define X86_SIB_SCALE_SHIFT 6
963%ifndef VBOX_FOR_DTRACE_LIB
964%endif
965%define X86_GREG_xAX 0
966%define X86_GREG_xCX 1
967%define X86_GREG_xDX 2
968%define X86_GREG_xBX 3
969%define X86_GREG_xSP 4
970%define X86_GREG_xBP 5
971%define X86_GREG_xSI 6
972%define X86_GREG_xDI 7
973%define X86_GREG_x8 8
974%define X86_GREG_x9 9
975%define X86_GREG_x10 10
976%define X86_GREG_x11 11
977%define X86_GREG_x12 12
978%define X86_GREG_x13 13
979%define X86_GREG_x14 14
980%define X86_GREG_x15 15
981%define X86_SREG_ES 0
982%define X86_SREG_CS 1
983%define X86_SREG_SS 2
984%define X86_SREG_DS 3
985%define X86_SREG_FS 4
986%define X86_SREG_GS 5
987%define X86_SREG_COUNT 6
988%define X86_OP_PRF_CS 0x2e
989%define X86_OP_PRF_SS 0x36
990%define X86_OP_PRF_DS 0x3e
991%define X86_OP_PRF_ES 0x26
992%define X86_OP_PRF_FS 0x64
993%define X86_OP_PRF_GS 0x65
994%define X86_OP_PRF_SIZE_OP 0x66
995%define X86_OP_PRF_SIZE_ADDR 0x67
996%define X86_OP_PRF_LOCK 0xf0
997%define X86_OP_PRF_REPZ 0xf2
998%define X86_OP_PRF_REPNZ 0xf3
999%define X86_OP_REX_B 0x41
1000%define X86_OP_REX_X 0x42
1001%define X86_OP_REX_R 0x44
1002%define X86_OP_REX_W 0x48
1003%endif
1004%include "iprt/x86extra.mac"
注意: 瀏覽 TracBrowser 來幫助您使用儲存庫瀏覽器

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