Changeset 30414 in vbox
- Timestamp:
- Jun 24, 2010 8:46:18 AM (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/VMM/VMMR0/HWACCMR0Mixed.mac
r28800 r30414 202 202 ; @todo get rid of sgdt 203 203 pop xBX ; saved TR 204 %ifndef RT_ARCH_AMD64205 204 sub xSP, xS*2 206 205 sgdt [xSP] 207 mov eax, ebx206 mov xAX, xBX 208 207 and al, 0F8h ; mask away TI and RPL bits, get descriptor offset. 209 208 add xAX, [xSP + 2] ; eax <- GDTR.address + descriptor offset. … … 211 210 ltr bx 212 211 add xSP, xS*2 213 %endif214 212 215 213 pop xAX ; saved LDTR … … 265 263 ; @todo get rid of sgdt 266 264 pop xBX ; saved TR 267 %ifndef RT_ARCH_AMD64268 265 sub xSP, xS*2 269 266 sgdt [xSP] 270 mov eax, ebx267 mov xAX, xBX 271 268 and al, 0F8h ; mask away TI and RPL bits, get descriptor offset. 272 add eax, [xSP + 2] ; eax <- GDTR.address + descriptor offset.273 and dword [ss: eax+ 4], ~0200h ; clear busy flag (2nd type2 bit)269 add xAX, [xSP + 2] ; eax <- GDTR.address + descriptor offset. 270 and dword [ss:xAX + 4], ~0200h ; clear busy flag (2nd type2 bit) 274 271 ltr bx 275 272 add xSP, xS*2 276 %endif277 273 278 274 pop xAX ; saved LDTR … … 304 300 ; @todo get rid of sgdt 305 301 pop xBX ; saved TR 306 %ifndef RT_ARCH_AMD64307 302 sub xSP, xS*2 308 303 sgdt [xSP] 309 mov eax, ebx304 mov xAX, xBX 310 305 and al, 0F8h ; mask away TI and RPL bits, get descriptor offset. 311 add eax, [xSP + 2] ; eax <- GDTR.address + descriptor offset.312 and dword [ss: eax+ 4], ~0200h ; clear busy flag (2nd type2 bit)306 add xAX, [xSP + 2] ; eax <- GDTR.address + descriptor offset. 307 and dword [ss:xAX + 4], ~0200h ; clear busy flag (2nd type2 bit) 313 308 ltr bx 314 309 add xSP, xS*2 315 %endif316 310 317 311 pop xAX ; saved LDTR … … 426 420 xor eax, eax 427 421 sldt ax 422 push xAX 423 424 ; The TR limit is reset to 0x67; restore it manually 425 str eax 428 426 push xAX 429 427 … … 496 494 497 495 push xDI 498 mov xDI, [xSP + xS * 2] ; pCtx (*2 to skip the saved LDTR)496 mov xDI, [xSP + xS * 3] ; pCtx (*3 to skip the saved LDTR + TR) 499 497 500 498 mov qword [xDI + CPUMCTX.eax], rax … … 522 520 %endif 523 521 522 ; Restore TSS selector; must mark it as not busy before using ltr (!) 523 ; ASSUME that this is supposed to be 'BUSY'. (saves 20-30 ticks on the T42p) 524 ; @todo get rid of sgdt 525 pop xBX ; saved TR 526 sub xSP, xS*2 527 sgdt [xSP] 528 mov xAX, xBX 529 and al, 0F8h ; mask away TI and RPL bits, get descriptor offset. 530 add xAX, [xSP + 2] ; eax <- GDTR.address + descriptor offset. 531 and dword [xAX + 4], ~0200h ; clear busy flag (2nd type2 bit) 532 ltr bx 533 add xSP, xS*2 534 524 535 pop xAX ; saved LDTR 525 536 lldt ax … … 580 591 add xSP, xS*2 581 592 593 ; Restore TSS selector; must mark it as not busy before using ltr (!) 594 ; ASSUME that this is supposed to be 'BUSY'. (saves 20-30 ticks on the T42p) 595 ; @todo get rid of sgdt 596 pop xBX ; saved TR 597 sub xSP, xS*2 598 sgdt [xSP] 599 mov xAX, xBX 600 and al, 0F8h ; mask away TI and RPL bits, get descriptor offset. 601 add xAX, [xSP + 2] ; eax <- GDTR.address + descriptor offset. 602 and dword [xAX + 4], ~0200h ; clear busy flag (2nd type2 bit) 603 ltr bx 604 add xSP, xS*2 605 582 606 pop xAX ; saved LDTR 583 607 lldt ax … … 612 636 add xSP, xS*2 613 637 lgdt [xSP] 638 add xSP, xS*2 639 640 ; Restore TSS selector; must mark it as not busy before using ltr (!) 641 ; ASSUME that this is supposed to be 'BUSY'. (saves 20-30 ticks on the T42p) 642 ; @todo get rid of sgdt 643 pop xBX ; saved TR 644 sub xSP, xS*2 645 sgdt [xSP] 646 mov xAX, xBX 647 and al, 0F8h ; mask away TI and RPL bits, get descriptor offset. 648 add xAX, [xSP + 2] ; eax <- GDTR.address + descriptor offset. 649 and dword [xAX + 4], ~0200h ; clear busy flag (2nd type2 bit) 650 ltr bx 614 651 add xSP, xS*2 615 652
Note:
See TracChangeset
for help on using the changeset viewer.