the 'core' num detected under bochs never changes (always 1)
Posted: Thu Dec 19, 2013 9:39 am
my bochs is configured as:1 package * 2 cores * 2 threads
------------------------
cpu: count=1:2:2 ...
------------------------
i use cpuid's leaf-4 to detect addressable cores, but always get '1'. Here is a part of code:
I can guarantee that the bochs support xapic, and, from the test results,the num of 'addressable logical processor'' detected using cpuid's leaf-0 is always right.(it's 4 in the case above)
------------------------
cpu: count=1:2:2 ...
------------------------
i use cpuid's leaf-4 to detect addressable cores, but always get '1'. Here is a part of code:
Code: Select all
"movl $4,%%eax\n\t"
"movl $0,%%ecx\n\t"
"cpuid\n\t"
"shr $26,%%eax\n\t"
"inc %%eax\n\t"
"movl %%eax,%5\n\t"
"end:nop"
:"=m"(xapic_support),"=m"(x2apic_support),"=m"(multi_thread_support),"=m"(cpuid_input_max),"=m"(addressable_logic_num),\
"=m"(addressable_core_num), "=m"(cpuid_family)