Changeset 24416 in vbox for trunk/src/VBox/Frontends/VBoxManage
- Timestamp:
- Nov 5, 2009 9:17:56 PM (15 years ago)
- Location:
- trunk/src/VBox/Frontends/VBoxManage
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Frontends/VBoxManage/VBoxManageInfo.cpp
r24404 r24416 257 257 RTPrintf("CPUID overrides: "); 258 258 ULONG cFound = 0; 259 static uint32_t const s_auCpuIdRanges[ 4] =259 static uint32_t const s_auCpuIdRanges[] = 260 260 { 261 261 UINT32_C(0x00000000), UINT32_C(0x0000000a), 262 UINT32_C(0x80000000), UINT32_C(0x 0000000a)262 UINT32_C(0x80000000), UINT32_C(0x8000000a) 263 263 }; 264 264 for (unsigned i = 0; i < RT_ELEMENTS(s_auCpuIdRanges); i += 2) -
trunk/src/VBox/Frontends/VBoxManage/VBoxManageList.cpp
r24404 r24416 444 444 RTPrintf("Host CPUIDs:\n\nLeaf no. EAX EBX ECX EDX\n"); 445 445 ULONG uCpuNo = 0; /* ASSUMES that CPU#0 is online. */ 446 ULONG uEAX, uEBX, uECX, uEDX; 447 ULONG cLeafs; 448 449 /* Standard */ 450 CHECK_ERROR(Host, GetProcessorCpuIdLeaf(uCpuNo, 0, 0, &cLeafs, &uEBX, &uECX, &uEDX)); 451 if (cLeafs > UINT32_C(0x00000000) && cLeafs <= UINT32_C(0x0000007f)) 452 for (ULONG iLeaf = 0; iLeaf < cLeafs; iLeaf++) 446 static uint32_t const s_auCpuIdRanges[] = 447 { 448 UINT32_C(0x00000000), UINT32_C(0x0000007f), 449 UINT32_C(0x80000000), UINT32_C(0x8000007f), 450 UINT32_C(0xc0000000), UINT32_C(0xc000007f) 451 }; 452 for (unsigned i = 0; i < RT_ELEMENTS(s_auCpuIdRanges); i += 2) 453 { 454 ULONG uEAX, uEBX, uECX, uEDX, cLeafs; 455 CHECK_ERROR(Host, GetProcessorCpuIdLeaf(uCpuNo, s_auCpuIdRanges[i], 0, &cLeafs, &uEBX, &uECX, &uEDX)); 456 if (cLeafs < s_auCpuIdRanges[i] || cLeafs > s_auCpuIdRanges[i+1]) 457 continue; 458 cLeafs++; 459 for (ULONG iLeaf = s_auCpuIdRanges[i]; iLeaf <= cLeafs; iLeaf++) 453 460 { 454 461 CHECK_ERROR(Host, GetProcessorCpuIdLeaf(uCpuNo, iLeaf, 0, &uEAX, &uEBX, &uECX, &uEDX)); 455 462 RTPrintf("%08x %08x %08x %08x %08x\n", iLeaf, uEAX, uEBX, uECX, uEDX); 456 463 } 457 458 /* Extended */ 459 CHECK_ERROR(Host, GetProcessorCpuIdLeaf(uCpuNo, UINT32_C(0x80000000), 0, &cLeafs, &uEBX, &uECX, &uEDX)); 460 if (cLeafs > UINT32_C(0x80000000) && cLeafs <= UINT32_C(0x8000007f)) 461 for (ULONG iLeaf = UINT32_C(0x80000000); iLeaf < cLeafs; iLeaf++) 462 { 463 CHECK_ERROR(Host, GetProcessorCpuIdLeaf(uCpuNo, iLeaf, 0, &uEAX, &uEBX, &uECX, &uEDX)); 464 RTPrintf("%08x %08x %08x %08x %08x\n", iLeaf, uEAX, uEBX, uECX, uEDX); 465 } 464 } 466 465 } 467 466 break;
Note:
See TracChangeset
for help on using the changeset viewer.