The special device /dev/cpuctl presents interface to the system CPU. It
provides functionality to retrieve CPUID information, read/write machine
specific registers (MSR) and perform CPU firmware updates.
For each CPU present in the system, the special device /dev/cpuctl%d with
the appropriate index will be created. For multicore CPUs such a special
device will be created for each core.
Currently, only i386 and amd64 processors are supported.
according to me there must be a way
That's probably because it uses the x86 CPUID instruction.
Yep, already did that too.I've just had a quick scan through the MIPS (64bit) instruction set reference and don't see anything at all that looks like it might get CPU information. As a RISC cpu is actually has quite a small instruction set.
Sunny Goel, Perhaps for the benefit of other people finding this thread you could post your C source code for fetching CPU information on a MIPS processor?i know how to do it with c code
If you have working code in C for fetching CPU information on a MIPS processor, why use inline assembler at all? But assuming you have a valid reason, why not just compile your working code and examine the machine instructions that the compiler generates?i am asking that how to do it with inline assembly in freebsd/mips
And also says that the MFC0 instruction can be used to read from registers in coprocessor 0.The Processor ID (PRId) is a read-only, special-purpose register found in the MIPS32 and MIPS64 ISAs that can be queried to identify the MIPS CPU. The Processor ID should be unique for each instruction set or CPU control register change. The PRId is the 15th register in Coprocessor 0.