Changeset 18060 in vbox
- Timestamp:
- Mar 18, 2009 12:42:06 PM (16 years ago)
- svn:sync-xref-src-repo-rev:
- 44694
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/VMM/VMMR0/HWACCMR0Mixed.mac
r15440 r18060 117 117 push xAX 118 118 119 ; The TR limit is reset to 0x67; restore it manually 120 str eax 121 push xAX 122 119 123 ; VMX only saves the base of the GDTR & IDTR and resets the limit to 0xffff; we must restore the limit correctly! 120 124 sub xSP, xS*2 … … 123 127 sub xSP, xS*2 124 128 sidt [xSP] 125 129 126 130 %ifdef VBOX_WITH_DR6_EXPERIMENT 127 131 ; Restore DR6 - experiment, not safe! … … 177 181 178 182 push xDI 179 mov xDI, [xSP + xS * 2] ; pCtx (*2 to skip the saved LDTR)183 mov xDI, [xSP + xS * 3] ; pCtx (*3 to skip the saved LDTR + TR) 180 184 181 185 mov [ss:xDI + CPUMCTX.eax], eax … … 198 202 %endif 199 203 204 ; Restore TSS selector; must mark it as not busy before using ltr (!) 205 ; ASSUME that this is supposed to be 'BUSY'. (saves 20-30 ticks on the T42p) 206 ; @todo get rid of sgdt 207 pop xBX ; saved TR 208 sub xSP, xS*2 209 sgdt [xSP] 210 mov eax, ebx 211 and al, 0F8h ; mask away TI and RPL bits, get descriptor offset. 212 add eax, [xSP + 2] ; eax <- GDTR.address + descriptor offset. 213 and dword [ss:eax + 4], ~0200h ; clear busy flag (2nd type2 bit) 214 ltr bx 215 add xSP, xS*2 216 200 217 pop xAX ; saved LDTR 201 218 lldt ax 202 219 203 220 add xSP, xS ; pCtx 204 221 … … 246 263 add xSP, xS*2 247 264 265 ; Restore TSS selector; must mark it as not busy before using ltr (!) 266 ; ASSUME that this is supposed to be 'BUSY'. (saves 20-30 ticks on the T42p) 267 ; @todo get rid of sgdt 268 pop xBX ; saved TR 269 sub xSP, xS*2 270 sgdt [xSP] 271 mov eax, ebx 272 and al, 0F8h ; mask away TI and RPL bits, get descriptor offset. 273 add eax, [xSP + 2] ; eax <- GDTR.address + descriptor offset. 274 and dword [ss:eax + 4], ~0200h ; clear busy flag (2nd type2 bit) 275 ltr bx 276 add xSP, xS*2 277 248 278 pop xAX ; saved LDTR 249 279 lldt ax … … 268 298 add xSP, xS*2 269 299 lgdt [xSP] 300 add xSP, xS*2 301 302 ; Restore TSS selector; must mark it as not busy before using ltr (!) 303 ; ASSUME that this is supposed to be 'BUSY'. (saves 20-30 ticks on the T42p) 304 ; @todo get rid of sgdt 305 pop xBX ; saved TR 306 sub xSP, xS*2 307 sgdt [xSP] 308 mov eax, ebx 309 and al, 0F8h ; mask away TI and RPL bits, get descriptor offset. 310 add eax, [xSP + 2] ; eax <- GDTR.address + descriptor offset. 311 and dword [ss:eax + 4], ~0200h ; clear busy flag (2nd type2 bit) 312 ltr bx 270 313 add xSP, xS*2 271 314
Note:
See TracChangeset
for help on using the changeset viewer.