add exception handler, the AMD cpu must be single core if it do not support HTT

This commit is contained in:
volvet 2014-01-09 16:59:07 +08:00
parent 02e4bf6e9d
commit 0e38e5c4e7

View File

@ -133,7 +133,11 @@ uint32_t WelsCPUFeatureDetect (int32_t* pNumberOfLogicProcessors) {
if( pNumberOfLogicProcessors != NULL ){
if (!strcmp((const str_t*)chVenderName, CPU_Vender_AMD)){
*pNumberOfLogicProcessors = (uiFeatureB & 0x00ff0000) >> 16; // feature bits: 23-16 on returned EBX
if( uiCPU & WELS_CPU_HTT){
*pNumberOfLogicProcessors = (uiFeatureB & 0x00ff0000) >> 16; // feature bits: 23-16 on returned EBX
} else {
*pNumberOfLogicProcessors = 1;
}
} else if( !strcmp((const str_t*)chVenderName, CPU_Vender_INTEL) ){
uiFeatureC = 0;
WelsCPUId(0x4, &uiFeatureA, &uiFeatureB, &uiFeatureC, &uiFeatureD);