When I cat /proc/cpuinfo
, I see 8 cores, with ID\'s from 0
to 7
.
Is there an x86
instruction that will report th
Except already described CPUID and RDTSCP instructions also there is new one RDPID instruction (Intel SDM download page) exactly for this purpose.
Description
Reads the value of the IA32_TSC_AUX MSR (address C0000103H) into the destination register. The value of CS.D and operand-size prefixes (66H and REX.W) do not affect the behavior of the RDPID instruction.
Notes:
RDPID reads processor core id as uint32_r or uint64_r, so read value will not in sequential range [0,MAX_CPU_COUNT]
RDPID is new instruction so it is not widely supported by hardware