Changeset 54537 in vbox
- Timestamp:
- Feb 26, 2015 4:55:58 PM (10 years ago)
- Location:
- trunk/src/VBox/VMM
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/VMM/VMMR0/CPUMR0.cpp
r54535 r54537 878 878 ApicRegRead(g_aLApics[iCpu].pv, APIC_REG_LVT_PC), ApicRegRead(g_aLApics[iCpu].pv, APIC_REG_LVT_THMR), 879 879 ApicRegRead(g_aLApics[iCpu].pv, APIC_REG_LVT_CMCI)); 880 uint32_t u32EBX, u32ECX, u32EDX; 881 uint32_t uMaxExtLeaf; 882 ASMCpuId(0x80000000, &uMaxExtLeaf, &u32EBX, &u32ECX, &u32EDX); 883 if ( uMaxExtLeaf >= UINT32_C(0x8000001b) 884 && ASMIsValidExtRange(uMaxExtLeaf)) 880 if (uApicVersion & 0x80000000) 885 881 { 886 uint32_t uIbsFeatures; 887 ASMCpuId(0x8000001b, &uIbsFeatures, &u32EBX, &u32ECX, &u32EDX); 888 if (uIbsFeatures & 1) 889 { 890 SUPR0Printf("CPUM: APIC %02u: IBS available. 400=%08x eilvt0=%08x %08x %08x %08x\n", 891 iCpu, 892 ApicRegRead(g_aLApics[iCpu].pv, 0x400), 893 ApicRegRead(g_aLApics[iCpu].pv, 0x500), 894 ApicRegRead(g_aLApics[iCpu].pv, 0x510), 895 ApicRegRead(g_aLApics[iCpu].pv, 0x520), 896 ApicRegRead(g_aLApics[iCpu].pv, 0x530)); 897 } 882 uint32_t uExtFeatures = ApicRegRead(g_aLApics[iCpu].pv, 0x400); 883 uint32_t cEiLvt = (uExtFeatures >> 16) & 0xff; 884 SUPR0Printf("CPUM: APIC %02u: ExtSpace available. extfeat=%08x eilvt[0..3]=%08x %08x %08x %08x\n", 885 iCpu, 886 ApicRegRead(g_aLApics[iCpu].pv, 0x400), 887 cEiLvt >= 1 ? ApicRegRead(g_aLApics[iCpu].pv, 0x500) : 0, 888 cEiLvt >= 2 ? ApicRegRead(g_aLApics[iCpu].pv, 0x510) : 0, 889 cEiLvt >= 3 ? ApicRegRead(g_aLApics[iCpu].pv, 0x520) : 0, 890 cEiLvt >= 4 ? ApicRegRead(g_aLApics[iCpu].pv, 0x530) : 0); 898 891 } 899 892 } -
trunk/src/VBox/VMM/VMMSwitcher/AMD64andLegacy.mac
r54496 r54537 422 422 423 423 ; AMD Extended LVT registers 424 mov esi, [rbx + 0x400] 425 shr esi, 16 426 and esi, 0xff 427 jz htg_noeilvt 428 mov ebp, 0x20 429 htg_tsteilvtx: 424 430 mov eax, [rbx + APIC_REG_EILVT0] 425 431 mov ecx, eax 426 432 and ecx, (APIC_REG_LVT_MASKED | APIC_REG_LVT_MODE_MASK) 427 433 cmp ecx, APIC_REG_LVT_MODE_NMI 428 jne htg_noeilvt 0429 or edi, 0x20434 jne htg_noeilvtx 435 or edi, ebp 430 436 or eax, APIC_REG_LVT_MASKED 431 437 mov [rbx + APIC_REG_EILVT0], eax 432 438 mov eax, [rbx + APIC_REG_EILVT0] ; write completion 433 htg_noeilvt0: 434 mov eax, [rbx + APIC_REG_EILVT1] 435 mov ecx, eax 436 and ecx, (APIC_REG_LVT_MASKED | APIC_REG_LVT_MODE_MASK) 437 cmp ecx, APIC_REG_LVT_MODE_NMI 438 jne htg_noeilvt1 439 or edi, 0x40 440 or eax, APIC_REG_LVT_MASKED 441 mov [rbx + APIC_REG_EILVT1], eax 442 mov eax, [rbx + APIC_REG_EILVT1] ; write completion 443 htg_noeilvt1: 444 mov eax, [rbx + APIC_REG_EILVT2] 445 mov ecx, eax 446 and ecx, (APIC_REG_LVT_MASKED | APIC_REG_LVT_MODE_MASK) 447 cmp ecx, APIC_REG_LVT_MODE_NMI 448 jne htg_noeilvt2 449 or edi, 0x80 450 or eax, APIC_REG_LVT_MASKED 451 mov [rbx + APIC_REG_EILVT2], eax 452 mov eax, [rbx + APIC_REG_EILVT2] ; write completion 453 htg_noeilvt2: 454 mov eax, [rbx + APIC_REG_EILVT3] 455 mov ecx, eax 456 and ecx, (APIC_REG_LVT_MASKED | APIC_REG_LVT_MODE_MASK) 457 cmp ecx, APIC_REG_LVT_MODE_NMI 458 jne htg_noeilvt 459 or edi, 0x100 460 or eax, APIC_REG_LVT_MASKED 461 mov [rbx + APIC_REG_EILVT3], eax 462 mov eax, [rbx + APIC_REG_EILVT3] ; write completion 439 htg_noeilvtx: 440 add rbx, 0x10 ; clobbers rbx! 441 shl ebp, 1 442 dec esi 443 jnz htg_tsteilvtx 463 444 464 445 htg_noeilvt:
Note:
See TracChangeset
for help on using the changeset viewer.