Changeset 44172 in vbox for trunk/src/VBox/VMM
- Timestamp:
- Dec 19, 2012 6:09:21 PM (12 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/VMM/VMMR0/CPUMR0.cpp
r44078 r44172 737 737 AssertReturnVoid(iCpu >= 0 && (unsigned)iCpu < RT_ELEMENTS(g_aLApics)); 738 738 739 uint32_t u32MaxIdx, u32EBX, u32ECX, u32EDX; 740 ASMCpuId(0, &u32MaxIdx, &u32EBX, &u32ECX, &u32EDX); 741 if ( ( ( u32EBX == X86_CPUID_VENDOR_INTEL_EBX 742 && u32ECX == X86_CPUID_VENDOR_INTEL_ECX 743 && u32EDX == X86_CPUID_VENDOR_INTEL_EDX) 744 || ( u32EBX == X86_CPUID_VENDOR_AMD_EBX 745 && u32ECX == X86_CPUID_VENDOR_AMD_ECX 746 && u32EDX == X86_CPUID_VENDOR_AMD_EDX) 747 || ( u32EBX == X86_CPUID_VENDOR_VIA_EBX 748 && u32ECX == X86_CPUID_VENDOR_VIA_ECX 749 && u32EDX == X86_CPUID_VENDOR_VIA_EDX)) 750 && u32MaxIdx >= 1) 739 uint32_t uMaxLeaf, u32EBX, u32ECX, u32EDX; 740 ASMCpuId(0, &uMaxLeaf, &u32EBX, &u32ECX, &u32EDX); 741 if ( ( ASMIsIntelCpuEx(u32EBX, u32ECX, u32EDX) 742 || ASMIsAmdCpuEx(u32EBX, u32ECX, u32EDX) 743 || ASMIsViaCentaurCpuEx(u32EBX, u32ECX, u32EDX)) 744 && ASMIsValidStdRange(uMaxLeaf)) 751 745 { 752 746 ASMCpuId(1, &u32MaxIdx, &u32EBX, &u32ECX, &u32EDX); … … 758 752 759 753 /* see Intel Manual: Local APIC Status and Location: MAXPHYADDR default is bit 36 */ 760 uint32_t u 32MaxExtIdx;761 ASMCpuId(0x80000000, &u 32MaxExtIdx, &u32EBX, &u32ECX, &u32EDX);762 if ( u 32MaxExtIdx>= UINT32_C(0x80000008)763 && u32MaxExtIdx < UINT32_C(0x8000ffff))754 uint32_t uMaxExtLeaf; 755 ASMCpuId(0x80000000, &uMaxExtLeaf, &u32EBX, &u32ECX, &u32EDX); 756 if ( uMaxExtLeaf >= UINT32_C(0x80000008) 757 && ASMIsValidExtRange(uMaxExtLeaf)) 764 758 { 765 759 uint32_t u32PhysBits;
Note:
See TracChangeset
for help on using the changeset viewer.