Changeset 24403 in vbox for trunk/src/VBox/Main/HostImpl.cpp
- Timestamp:
- Nov 5, 2009 5:12:55 PM (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Main/HostImpl.cpp
r23702 r24403 1004 1004 return S_OK; 1005 1005 } 1006 1006 1007 /** 1007 1008 * Returns a description string for the host CPU … … 1060 1061 ReturnComNotImplemented(); 1061 1062 } 1063 return S_OK; 1064 } 1065 1066 /** 1067 * Returns the specific CPUID leaf. 1068 * 1069 * @returns COM status code 1070 * @param aCpuId The CPU number. Mostly ignored. 1071 * @param aLeaf The leaf number. 1072 * @param aSubLeaf The sub-leaf number. 1073 * @param aValEAX Where to return EAX. 1074 * @param aValEBX Where to return EBX. 1075 * @param aValECX Where to return ECX. 1076 * @param aValEDX Where to return EDX. 1077 */ 1078 STDMETHODIMP Host::GetProcessorCpuIdLeaf(ULONG aCpuId, ULONG aLeaf, ULONG aSubLeaf, 1079 ULONG *aValEAX, ULONG *aValEBX, ULONG *aValECX, ULONG *aValEDX) 1080 { 1081 CheckComArgOutPointerValid(aValEAX); 1082 CheckComArgOutPointerValid(aValEBX); 1083 CheckComArgOutPointerValid(aValECX); 1084 CheckComArgOutPointerValid(aValEDX); 1085 // no locking required 1086 1087 /* Check that the CPU is online. */ 1088 /** @todo later use RTMpOnSpecific. */ 1089 if (!RTMpIsCpuOnline(aCpuId)) 1090 return RTMpIsCpuPresent(aCpuId) 1091 ? setError(E_FAIL, tr("CPU no.%u is not present"), aCpuId) 1092 : setError(E_FAIL, tr("CPU no.%u is not online"), aCpuId); 1093 1094 uint32_t uEAX, uEBX, uECX, uEDX; 1095 ASMCpuId_Idx_ECX(aLeaf, aSubLeaf, &uEAX, &uEBX, &uECX, &uEDX); 1096 *aValEAX = uEAX; 1097 *aValEBX = uEBX; 1098 *aValECX = uECX; 1099 *aValEDX = uEDX; 1100 1062 1101 return S_OK; 1063 1102 }
Note:
See TracChangeset
for help on using the changeset viewer.