<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta content="text/html;charset=ISO-8859-1" http-equiv="Content-Type">
</head>
<body bgcolor="#ffffff" text="#000000">
<br>
<blockquote cite="mid:21BC6FAC-048B-42A7-AA7C-4A89B2D0714A@cs.ucsd.edu"
type="cite">
<blockquote type="cite"> 64-bit processors have <span
style="font-family: monospace;">lm</span> ("long mode") in the <span
style="font-family: monospace;">flags</span> section of <span
style="font-family: monospace;">cpuinfo</span> whereas 32-bit
processors have not.<br>
regards<br>
Dharmvir Kumar<br>
</blockquote>
</blockquote>
<small>Thanks a lot folks.<br>
<br>
Adding more detail on this.<br>
<br>
Below detail helps to understand CPU architecture.<br>
</small><font color="#000066"><u><b><br>
</b></u><small><u><b>Finding CPU Arch</b></u><br>
<br>
$ grep flags /proc/cpuinfo | uniq | egrep -o -w "rm|tm|lm"<br>
<br>
Under “Flags” section in /proc/cpuinfo, you will find any of the
flags “tm” or<br>
<br>
“rm” or “lm”<br>
<br>
* rm (Real Mode) means it is a 16 bit processor<br>
* tm (Transparent Mode) means it is a 32 bit processor<br>
* lm (Long Mode) means it is a 64 bit processor</small><br>
</font><br>
<small><br>
Is this only way to find the processor architecture ???? <br>
<br>
Any C programming technique apart from using this /proc/cpuinfo detail?<br>
<br>
Thanks,<br>
Prabhu</small><br>
</body>
</html>