/proc/cpuinfo not showing all info
Hi, i am using sifive's u540, RISCV64 with custom kernel 5.10.2 and i am trying to get all hardware information with the help of /proc/cpuinfo but i am not able get all information i need. i am attaching current /proc/cpuinfo rocessor : 0 hart : 2 isa : rv64imafdc mmu : sv39 uarch : sifive,u54-mc but i am expecting following kind of output processor : 0 vendor_id : GenuineIntel cpu family : 6 model : 142 model name : Intel(R) Core(TM) i3-7020U CPU @ 2.30GHz stepping : 9 microcode : 0xde cpu MHz : 700.027 cache size : 3072 KB physical id : 0 siblings : 4 core id : 0 cpu cores : 2 apicid : 0 initial apicid : 0 fpu : yes fpu_exception : yes cpuid level : 22 wp : yes Can someone suggest me how i can print all info with /proc/cpuinfo ?? Thanks!
On Wed, Jan 13, 2021 at 09:21:31AM +0000, Pankaj Vinodrao Joshi wrote:
Hi, i am using sifive's u540, RISCV64 with custom kernel 5.10.2 and i am trying to get all hardware information with the help of /proc/cpuinfo but i am not able get all information i need.
i am attaching current /proc/cpuinfo
rocessor : 0 hart : 2 isa : rv64imafdc mmu : sv39 uarch : sifive,u54-mc
but i am expecting following kind of output
processor : 0 vendor_id : GenuineIntel cpu family : 6 model : 142 model name : Intel(R) Core(TM) i3-7020U CPU @ 2.30GHz stepping : 9 microcode : 0xde cpu MHz : 700.027 cache size : 3072 KB physical id : 0 siblings : 4 core id : 0 cpu cores : 2 apicid : 0 initial apicid : 0 fpu : yes fpu_exception : yes cpuid level : 22 wp : yes
Can someone suggest me how i can print all info with /proc/cpuinfo ??
Each processor type exports different information in /proc/cpuinfo. How would a riscv cpu have the same types as an x86 cpu? You have to treat each cpu type individually, there is no common format for all different CPUs out there, sorry. Hope this helps, greg k-h
i agree each processor type exports different information but i need to pop up information while i do /proc/cpu also i have observed that almost every arch display information w.r.t frequency. Can you suggest how i can add info related to cpufreq into /proc ? Thanks ________________________________ From: Greg KH <greg@kroah.com> Sent: Wednesday, January 13, 2021 3:12 PM To: Pankaj Vinodrao Joshi <Pankaj.VJ@exaleapsemi.com> Cc: kernelnewbies@kernelnewbies.org <kernelnewbies@kernelnewbies.org> Subject: Re: /proc/cpuinfo not showing all info On Wed, Jan 13, 2021 at 09:21:31AM +0000, Pankaj Vinodrao Joshi wrote:
Hi, i am using sifive's u540, RISCV64 with custom kernel 5.10.2 and i am trying to get all hardware information with the help of /proc/cpuinfo but i am not able get all information i need.
i am attaching current /proc/cpuinfo
rocessor : 0 hart : 2 isa : rv64imafdc mmu : sv39 uarch : sifive,u54-mc
but i am expecting following kind of output
processor : 0 vendor_id : GenuineIntel cpu family : 6 model : 142 model name : Intel(R) Core(TM) i3-7020U CPU @ 2.30GHz stepping : 9 microcode : 0xde cpu MHz : 700.027 cache size : 3072 KB physical id : 0 siblings : 4 core id : 0 cpu cores : 2 apicid : 0 initial apicid : 0 fpu : yes fpu_exception : yes cpuid level : 22 wp : yes
Can someone suggest me how i can print all info with /proc/cpuinfo ??
Each processor type exports different information in /proc/cpuinfo. How would a riscv cpu have the same types as an x86 cpu? You have to treat each cpu type individually, there is no common format for all different CPUs out there, sorry. Hope this helps, greg k-h [EXT]
On Tue, Jan 19, 2021 at 07:38:13AM +0000, Pankaj Vinodrao Joshi wrote:
i agree each processor type exports different information but i need to pop up information while i do /proc/cpu also i have observed that almost every arch display information w.r.t frequency. Can you suggest how i can add info related to cpufreq into /proc ?
I am sorry, but I can not parse this very well, can you please explain exactly what you wish to do and why the "normal" apis that expose the current frequency of the processor do not work for you? (hint, it's not /proc/cpuinfo) Also, who is demanding this requirement? thanks, greg k-h
sorry for the last mail that i was not able to convey what i was meaning to, i have noticed for almost all ARCH when i will do $ cat /proc/cpuinfo ,it will shows all cpu related info including cpu frequency but for my case i am getting almost everything except cpu frequency in /proc/cpuinfo. Now my question is how i can add this cpufreq related info into /proc/cpuinfo ?? Also what all other alternatives /methods are there to get cpufreq related info from kernel ?? Thanks ________________________________ From: Greg KH <greg@kroah.com> Sent: Tuesday, January 19, 2021 1:25 PM To: Pankaj Vinodrao Joshi <Pankaj.VJ@exaleapsemi.com> Cc: kernelnewbies@kernelnewbies.org <kernelnewbies@kernelnewbies.org> Subject: Re: /proc/cpuinfo not showing all info On Tue, Jan 19, 2021 at 07:38:13AM +0000, Pankaj Vinodrao Joshi wrote:
i agree each processor type exports different information but i need to pop up information while i do /proc/cpu also i have observed that almost every arch display information w.r.t frequency. Can you suggest how i can add info related to cpufreq into /proc ?
I am sorry, but I can not parse this very well, can you please explain exactly what you wish to do and why the "normal" apis that expose the current frequency of the processor do not work for you? (hint, it's not /proc/cpuinfo) Also, who is demanding this requirement? thanks, greg k-h [EXT]
On Tue, Jan 19, 2021 at 09:08:23AM +0000, Pankaj Vinodrao Joshi wrote:
sorry for the last mail that i was not able to convey what i was meaning to, i have noticed for almost all ARCH when i will do $ cat /proc/cpuinfo ,it will shows all cpu related info including cpu frequency but for my case i am getting almost everything except cpu frequency in /proc/cpuinfo. Now my question is how i can add this cpufreq related info into /proc/cpuinfo ??
Why do you want to add cpu frequency to /proc/cpuinfo? You can do that, but it will not be the "correct" way to export this information to userspace so that userspace can properly handle it.
Also what all other alternatives /methods are there to get cpufreq related info from kernel ??
See what Valdis wrote, that's the correct api to use. Good luck! greg k-h
On Tue, 19 Jan 2021 07:38:13 +0000, "Pankaj Vinodrao Joshi" said:
i agree each processor type exports different information but i need to pop up information while i do /proc/cpu also i have observed that almost every arch display information w.r.t frequency. Can you suggest how i can add info related to cpufreq into /proc ?
You may wish to issue this command: find /sys -name '*freq*' and then meditate on the relative difficulty of parsing /proc/cpuinfo and a sysfs file, and ask yourself if you want to to re-think your design.
participants (3)
-
Greg KH -
Pankaj Vinodrao Joshi -
Valdis Klētnieks