Re: How to identity processor architecture

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 




 64-bit processors  have lm ("long mode") in the flags section of cpuinfo whereas   32-bit processors have not.
regards
Dharmvir Kumar
Thanks a lot folks.

Adding more detail on this.

Below detail helps to understand CPU architecture.

Finding CPU Arch

    $ grep flags /proc/cpuinfo | uniq | egrep -o -w "rm|tm|lm"

    Under “Flags” section in /proc/cpuinfo, you will find any of the flags “tm” or

    “rm” or “lm”

        * rm (Real Mode) means it is a 16 bit processor
        * tm (Transparent Mode) means it is a 32 bit processor
        * lm (Long Mode) means it is a 64 bit processor



Is this only way to find the processor architecture ????

Any C programming technique apart from using this /proc/cpuinfo detail?

Thanks,
Prabhu

_______________________________________________
Kernelnewbies mailing list
Kernelnewbies@xxxxxxxxxxxxxxxxx
http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies

[Index of Archives]     [Newbies FAQ]     [Linux Kernel Mentors]     [Linux Kernel Development]     [IETF Annouce]     [Git]     [Networking]     [Security]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux SCSI]     [Linux ACPI]
  Powered by Linux