Changeset 24403 in vbox
- Timestamp:
- Nov 5, 2009 5:12:55 PM (16 years ago)
- svn:sync-xref-src-repo-rev:
- 54449
- Location:
- trunk/src/VBox/Main
- Files:
-
- 3 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 } -
trunk/src/VBox/Main/idl/VirtualBox.xidl
r24346 r24403 5183 5183 5184 5184 See the Intel and AMD programmer's manuals for detailed information 5185 about the cpuid instruction and its leafs. 5185 about the cpuid instruction and its leafs. 5186 5186 <result name="E_INVALIDARG"> 5187 5187 Invalid id. … … 7197 7197 <interface 7198 7198 name="IHost" extends="$unknown" 7199 uuid=" 95522f11-1ecc-443b-9242-3af6b24d430c"7199 uuid="e380cbfc-ae65-4fa6-899e-45ded6b3132a" 7200 7200 wsmap="managed" 7201 7201 > … … 7304 7304 <desc> 7305 7305 Identifier of the CPU. 7306 <note> 7307 The current implementation might not necessarily return the 7308 description for this exact CPU. 7309 </note> 7306 7310 </desc> 7307 7311 </param> … … 7310 7314 Model string. An empty string is returned if value is not known or 7311 7315 @a cpuId is invalid. 7316 </desc> 7317 </param> 7318 </method> 7319 7320 <method name="getProcessorCpuIdLeaf"> 7321 <desc> 7322 Returns the CPU cpuid information for the specified leaf. 7323 </desc> 7324 <param name="cpuId" type="unsigned long" dir="in"> 7325 <desc> 7326 Identifier of the CPU. The CPU most be online. 7327 <note> 7328 The current implementation might not necessarily return the 7329 description for this exact CPU. 7330 </note> 7331 </desc> 7332 </param> 7333 <param name="leaf" type="unsigned long" dir="in"> 7334 <desc> 7335 Cpuid leaf index (eax). 7336 </desc> 7337 </param> 7338 <param name="subLeaf" type="unsigned long" dir="in"> 7339 <desc> 7340 Cpuid leaf sub index (ecx). This currently only applies to cache 7341 information on Intel CPUs. Use 0 if retriving values for 7342 <link to="IMachine::setCpuIdLeaf"/>. 7343 </desc> 7344 </param> 7345 <param name="valEax" type="unsigned long" dir="out"> 7346 <desc> 7347 Cpuid leaf value for register eax. 7348 </desc> 7349 </param> 7350 <param name="valEbx" type="unsigned long" dir="out"> 7351 <desc> 7352 Cpuid leaf value for register ebx. 7353 </desc> 7354 </param> 7355 <param name="valEcx" type="unsigned long" dir="out"> 7356 <desc> 7357 Cpuid leaf value for register ecx. 7358 </desc> 7359 </param> 7360 <param name="valEdx" type="unsigned long" dir="out"> 7361 <desc> 7362 Cpuid leaf value for register edx. 7312 7363 </desc> 7313 7364 </param> -
trunk/src/VBox/Main/include/HostImpl.h
r23537 r24403 76 76 STDMETHOD(GetProcessorDescription)(ULONG cpuId, BSTR *description); 77 77 STDMETHOD(GetProcessorFeature) (ProcessorFeature_T feature, BOOL *supported); 78 STDMETHOD(GetProcessorCpuIdLeaf)(ULONG aCpuId, ULONG aLeaf, ULONG aSubLeaf, ULONG *aValEAX, ULONG *aValEBX, ULONG *aValECX, ULONG *aValEDX); 78 79 STDMETHOD(COMGETTER(MemorySize))(ULONG *size); 79 80 STDMETHOD(COMGETTER(MemoryAvailable))(ULONG *available);
Note:
See TracChangeset
for help on using the changeset viewer.