|
| 1 | +<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "https://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> |
| 2 | +<html xmlns="http://www.w3.org/1999/xhtml" lang="en-US"> |
| 3 | +<head> |
| 4 | +<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/> |
| 5 | +<meta http-equiv="X-UA-Compatible" content="IE=11"/> |
| 6 | +<meta name="generator" content="Doxygen 1.14.0"/> |
| 7 | +<meta name="viewport" content="width=device-width, initial-scale=1"/> |
| 8 | +<title>Retro Rocket OS: cpuid command</title> |
| 9 | +<link href="tabs.css" rel="stylesheet" type="text/css"/> |
| 10 | +<script type="text/javascript" src="jquery.js"></script> |
| 11 | +<script type="text/javascript" src="dynsections.js"></script> |
| 12 | +<script type="text/javascript" src="clipboard.js"></script> |
| 13 | +<link href="navtree.css" rel="stylesheet" type="text/css"/> |
| 14 | +<script type="text/javascript" src="navtreedata.js"></script> |
| 15 | +<script type="text/javascript" src="navtree.js"></script> |
| 16 | +<script type="text/javascript" src="cookie.js"></script> |
| 17 | +<link href="search/search.css" rel="stylesheet" type="text/css"/> |
| 18 | +<script type="text/javascript" src="search/searchdata.js"></script> |
| 19 | +<script type="text/javascript" src="search/search.js"></script> |
| 20 | +<link href="doxygen.css" rel="stylesheet" type="text/css" /> |
| 21 | +<link href="doxygen-awesome.css" rel="stylesheet" type="text/css"/> |
| 22 | +<link href="style.css" rel="stylesheet" type="text/css"/> |
| 23 | +</head> |
| 24 | +<body> |
| 25 | +<div id="top"><!-- do not remove this div, it is closed by doxygen! --> |
| 26 | +<div id="titlearea"> |
| 27 | +<table cellspacing="0" cellpadding="0"> |
| 28 | + <tbody> |
| 29 | + <tr id="projectrow"> |
| 30 | + <td id="projectlogo"><img alt="Logo" src="rr.png"/></td> |
| 31 | + <td id="projectalign"> |
| 32 | + <div id="projectname">Retro Rocket OS |
| 33 | + </div> |
| 34 | + <div id="projectbrief">BASIC-Powered Operating System</div> |
| 35 | + </td> |
| 36 | + </tr> |
| 37 | + </tbody> |
| 38 | +</table> |
| 39 | +</div> |
| 40 | +<!-- end header part --> |
| 41 | +<!-- Generated by Doxygen 1.14.0 --> |
| 42 | +<script type="text/javascript"> |
| 43 | +var searchBox = new SearchBox("searchBox", "search/",'.html'); |
| 44 | +</script> |
| 45 | +<script type="text/javascript"> |
| 46 | +$(function() { codefold.init(); }); |
| 47 | +</script> |
| 48 | +<script type="text/javascript" src="menudata.js"></script> |
| 49 | +<script type="text/javascript" src="menu.js"></script> |
| 50 | +<script type="text/javascript"> |
| 51 | +$(function() { |
| 52 | + initMenu('',true,false,'search.php','Search',true); |
| 53 | + $(function() { init_search(); }); |
| 54 | +}); |
| 55 | +</script> |
| 56 | +<div id="main-nav"></div> |
| 57 | +</div><!-- top --> |
| 58 | +<div id="side-nav" class="ui-resizable side-nav-resizable"> |
| 59 | + <div id="nav-tree"> |
| 60 | + <div id="nav-tree-contents"> |
| 61 | + <div id="nav-sync" class="sync"></div> |
| 62 | + </div> |
| 63 | + </div> |
| 64 | + <div id="splitbar" style="-moz-user-select:none;" |
| 65 | + class="ui-resizable-handle"> |
| 66 | + </div> |
| 67 | +</div> |
| 68 | +<script type="text/javascript"> |
| 69 | +$(function(){initNavTree('cpuid.html','',''); }); |
| 70 | +</script> |
| 71 | +<div id="container"> |
| 72 | +<div id="doc-content"> |
| 73 | +<!-- window showing the filter options --> |
| 74 | +<div id="MSearchSelectWindow" |
| 75 | + onmouseover="return searchBox.OnSearchSelectShow()" |
| 76 | + onmouseout="return searchBox.OnSearchSelectHide()" |
| 77 | + onkeydown="return searchBox.OnSearchSelectKey(event)"> |
| 78 | +</div> |
| 79 | + |
| 80 | +<!-- iframe showing the search results (closed by default) --> |
| 81 | +<div id="MSearchResultsWindow"> |
| 82 | +<div id="MSearchResults"> |
| 83 | +<div class="SRPage"> |
| 84 | +<div id="SRIndex"> |
| 85 | +<div id="SRResults"></div> |
| 86 | +<div class="SRStatus" id="Loading">Loading...</div> |
| 87 | +<div class="SRStatus" id="Searching">Searching...</div> |
| 88 | +<div class="SRStatus" id="NoMatches">No Matches</div> |
| 89 | +</div> |
| 90 | +</div> |
| 91 | +</div> |
| 92 | +</div> |
| 93 | + |
| 94 | +<div><div class="header"> |
| 95 | + <div class="headertitle"><div class="title">cpuid command </div></div> |
| 96 | +</div><!--header--> |
| 97 | +<div class="contents"> |
| 98 | +<div class="textblock"><div class="fragment"><div class="line">cpuid [leaf number]</div> |
| 99 | +</div><!-- fragment --><p> Retrieve CPUID information from the processor. See The documentation of CPUID for more information.</p> |
| 100 | +<p><img src="https://github.com/brainboxdotcc/retro-rocket/assets/1556794/523b5f5b-510e-4a91-a210-71eae0021fb4" alt="image" class="inline"/></p> |
| 101 | +<h3 class="doxsection"><a class="anchor" id="cpuid-leaf-values"></a> |
| 102 | +CPUID Leaf Values</h3> |
| 103 | +<table class="markdownTable"> |
| 104 | +<tr class="markdownTableHead"> |
| 105 | +<th class="markdownTableHeadNone">Leaf (EAX) </th><th class="markdownTableHeadNone">Sub-Leaf (ECX) </th><th class="markdownTableHeadNone">Purpose / Description </th><th class="markdownTableHeadNone">Example Outputs or Notes </th></tr> |
| 106 | +<tr class="markdownTableRowOdd"> |
| 107 | +<td class="markdownTableBodyNone"><b>0</b> </td><td class="markdownTableBodyNone">— </td><td class="markdownTableBodyNone"><b>Highest Standard Function</b> and <b>Vendor ID String</b>. Returns the maximum supported standard leaf in EAX, and the vendor string across EBX, EDX, and ECX. </td><td class="markdownTableBodyNone">Example vendor strings: <span class="tt">"GenuineIntel"</span>, <span class="tt">"AuthenticAMD"</span>. </td></tr> |
| 108 | +<tr class="markdownTableRowEven"> |
| 109 | +<td class="markdownTableBodyNone"><b>1</b> </td><td class="markdownTableBodyNone">— </td><td class="markdownTableBodyNone"><b>Processor Information and Feature Bits.</b> Reports family, model, stepping, and feature flags such as SSE, AVX, FPU, MMX, etc. </td><td class="markdownTableBodyNone">EAX: version info; EBX: logical cores; ECX/EDX: feature flags. </td></tr> |
| 110 | +<tr class="markdownTableRowOdd"> |
| 111 | +<td class="markdownTableBodyNone"><b>2</b> </td><td class="markdownTableBodyNone">— </td><td class="markdownTableBodyNone"><b>Cache and TLB Descriptor Information.</b> Legacy format describing cache/TLB layout. Superseded by leaf 4. </td><td class="markdownTableBodyNone">Used on older Intel CPUs. </td></tr> |
| 112 | +<tr class="markdownTableRowEven"> |
| 113 | +<td class="markdownTableBodyNone"><b>3</b> </td><td class="markdownTableBodyNone">— </td><td class="markdownTableBodyNone"><b>Processor Serial Number.</b> Deprecated and often disabled for privacy reasons. </td><td class="markdownTableBodyNone">Rarely supported. </td></tr> |
| 114 | +<tr class="markdownTableRowOdd"> |
| 115 | +<td class="markdownTableBodyNone"><b>4</b> </td><td class="markdownTableBodyNone"><em>n</em> (0… until type=0) </td><td class="markdownTableBodyNone"><b>Deterministic Cache Parameters.</b> Reports cache level, type, line size, associativity, and set count. </td><td class="markdownTableBodyNone">Iterate ECX from 0 until EAX[bits 4–0] = 0. </td></tr> |
| 116 | +<tr class="markdownTableRowEven"> |
| 117 | +<td class="markdownTableBodyNone"><b>5</b> </td><td class="markdownTableBodyNone">— </td><td class="markdownTableBodyNone"><b>MONITOR/MWAIT Parameters.</b> Reports monitor-line size and power hints. </td><td class="markdownTableBodyNone">Used in power-management routines. </td></tr> |
| 118 | +<tr class="markdownTableRowOdd"> |
| 119 | +<td class="markdownTableBodyNone"><b>6</b> </td><td class="markdownTableBodyNone">— </td><td class="markdownTableBodyNone"><b>Thermal and Power Management.</b> Indicates turbo boost, energy-performance bias, etc. </td><td class="markdownTableBodyNone">Features vary by generation. </td></tr> |
| 120 | +<tr class="markdownTableRowEven"> |
| 121 | +<td class="markdownTableBodyNone"><b>7</b> </td><td class="markdownTableBodyNone"><em>n</em> (0+) </td><td class="markdownTableBodyNone"><b>Structured Extended Feature Flags.</b> Lists AVX2, BMI, SMEP, SMAP, SHA, and other extensions. </td><td class="markdownTableBodyNone">ECX = 0 = base feature list. </td></tr> |
| 122 | +<tr class="markdownTableRowOdd"> |
| 123 | +<td class="markdownTableBodyNone"><b>8</b> </td><td class="markdownTableBodyNone">— </td><td class="markdownTableBodyNone"><b>Reserved (Intel).</b> </td><td class="markdownTableBodyNone">Typically returns zeros. </td></tr> |
| 124 | +<tr class="markdownTableRowEven"> |
| 125 | +<td class="markdownTableBodyNone"><b>9</b> </td><td class="markdownTableBodyNone">— </td><td class="markdownTableBodyNone"><b>Direct Cache Access (DCA) Capabilities.</b> </td><td class="markdownTableBodyNone">Rarely used outside servers. </td></tr> |
| 126 | +<tr class="markdownTableRowOdd"> |
| 127 | +<td class="markdownTableBodyNone"><b>10</b> </td><td class="markdownTableBodyNone">— </td><td class="markdownTableBodyNone"><b>Architectural Performance Monitoring.</b> Gives number and width of performance counters. </td><td class="markdownTableBodyNone">Used for profiling/perf events. </td></tr> |
| 128 | +<tr class="markdownTableRowEven"> |
| 129 | +<td class="markdownTableBodyNone"><b>11</b> </td><td class="markdownTableBodyNone"><em>n</em> (0… until type=0) </td><td class="markdownTableBodyNone"><b>Extended Topology Enumeration.</b> Replaces legacy APIC ID method for threads/cores. </td><td class="markdownTableBodyNone">Iterate until EAX[4–0] = 0. </td></tr> |
| 130 | +<tr class="markdownTableRowOdd"> |
| 131 | +<td class="markdownTableBodyNone"><b>12</b> </td><td class="markdownTableBodyNone">— </td><td class="markdownTableBodyNone"><b>SGX Capability Reporting.</b> </td><td class="markdownTableBodyNone">Secure Guard Extensions (if supported). </td></tr> |
| 132 | +<tr class="markdownTableRowEven"> |
| 133 | +<td class="markdownTableBodyNone"><b>13</b> </td><td class="markdownTableBodyNone"><em>n</em> (0+) </td><td class="markdownTableBodyNone"><b>Extended State Enumeration (XSAVE).</b> Reports supported CPU state components and save area size. </td><td class="markdownTableBodyNone">Used for AVX and AVX-512. </td></tr> |
| 134 | +<tr class="markdownTableRowOdd"> |
| 135 | +<td class="markdownTableBodyNone"><b>14</b> </td><td class="markdownTableBodyNone">— </td><td class="markdownTableBodyNone"><b>Intel Processor Trace.</b> </td><td class="markdownTableBodyNone">Reports tracing feature support. </td></tr> |
| 136 | +<tr class="markdownTableRowEven"> |
| 137 | +<td class="markdownTableBodyNone"><b>15</b> </td><td class="markdownTableBodyNone">— </td><td class="markdownTableBodyNone"><b>Time Stamp Counter and Crystal Clock Relationship.</b> </td><td class="markdownTableBodyNone">Defines TSC/core crystal frequency ratio. </td></tr> |
| 138 | +<tr class="markdownTableRowOdd"> |
| 139 | +<td class="markdownTableBodyNone"><b>16</b> </td><td class="markdownTableBodyNone">— </td><td class="markdownTableBodyNone"><b>Processor Frequency Information.</b> </td><td class="markdownTableBodyNone">Base, max, and bus ratio in MHz. </td></tr> |
| 140 | +<tr class="markdownTableRowEven"> |
| 141 | +<td class="markdownTableBodyNone"><b>17</b> </td><td class="markdownTableBodyNone"><em>n</em> (0+) </td><td class="markdownTableBodyNone"><b>System-on-Chip Vendor Attributes.</b> </td><td class="markdownTableBodyNone">Vendor ID and capabilities. </td></tr> |
| 142 | +<tr class="markdownTableRowOdd"> |
| 143 | +<td class="markdownTableBodyNone"><b>18</b> </td><td class="markdownTableBodyNone"><em>n</em> (0+) </td><td class="markdownTableBodyNone"><b>Platform QoS Monitoring.</b> </td><td class="markdownTableBodyNone">Cache and memory bandwidth monitoring. </td></tr> |
| 144 | +<tr class="markdownTableRowEven"> |
| 145 | +<td class="markdownTableBodyNone"><b>19</b> </td><td class="markdownTableBodyNone"><em>n</em> (0+) </td><td class="markdownTableBodyNone"><b>Platform QoS Enforcement.</b> </td><td class="markdownTableBodyNone">Cache/memory bandwidth allocation. </td></tr> |
| 146 | +<tr class="markdownTableRowOdd"> |
| 147 | +<td class="markdownTableBodyNone"><b>20–23</b> </td><td class="markdownTableBodyNone">— </td><td class="markdownTableBodyNone"><b>Reserved.</b> </td><td class="markdownTableBodyNone">May be vendor-specific. </td></tr> |
| 148 | +<tr class="markdownTableRowEven"> |
| 149 | +<td class="markdownTableBodyNone"><b>24</b> </td><td class="markdownTableBodyNone">— </td><td class="markdownTableBodyNone"><b>AMD SEV / Memory Encryption Capabilities.</b> </td><td class="markdownTableBodyNone">Only valid on AMD CPUs. </td></tr> |
| 150 | +<tr class="markdownTableRowOdd"> |
| 151 | +<td class="markdownTableBodyNone"><b>25</b> </td><td class="markdownTableBodyNone">— </td><td class="markdownTableBodyNone"><b>AMD Performance and Debug Features.</b> </td><td class="markdownTableBodyNone">Implementation-specific. </td></tr> |
| 152 | +<tr class="markdownTableRowEven"> |
| 153 | +<td class="markdownTableBodyNone"><b>26–29</b> </td><td class="markdownTableBodyNone">— </td><td class="markdownTableBodyNone"><b>Reserved.</b> </td><td class="markdownTableBodyNone">— </td></tr> |
| 154 | +<tr class="markdownTableRowOdd"> |
| 155 | +<td class="markdownTableBodyNone"><b>30</b> </td><td class="markdownTableBodyNone">— </td><td class="markdownTableBodyNone"><b>IA32 Architectural Capabilities.</b> </td><td class="markdownTableBodyNone">Provides details on RDPID, SGX, etc. </td></tr> |
| 156 | +<tr class="markdownTableRowEven"> |
| 157 | +<td class="markdownTableBodyNone"><b>31</b> </td><td class="markdownTableBodyNone">— </td><td class="markdownTableBodyNone"><b>AVX10 and Architectural Future Extensions.</b> </td><td class="markdownTableBodyNone">(Newer CPUs only.) </td></tr> |
| 158 | +</table> |
| 159 | +<hr /> |
| 160 | +<h3 class="doxsection"><a class="anchor" id="extended-high-leaves"></a> |
| 161 | +Extended (High) Leaves</h3> |
| 162 | +<table class="markdownTable"> |
| 163 | +<tr class="markdownTableHead"> |
| 164 | +<th class="markdownTableHeadNone">Leaf (EAX) </th><th class="markdownTableHeadNone">Sub-Leaf (ECX) </th><th class="markdownTableHeadNone">Purpose / Description </th><th class="markdownTableHeadNone">Example Outputs or Notes </th></tr> |
| 165 | +<tr class="markdownTableRowOdd"> |
| 166 | +<td class="markdownTableBodyNone"><b>2147483648</b> </td><td class="markdownTableBodyNone">— </td><td class="markdownTableBodyNone"><b>Highest Extended Function Supported.</b> </td><td class="markdownTableBodyNone">Returns maximum extended leaf. </td></tr> |
| 167 | +<tr class="markdownTableRowEven"> |
| 168 | +<td class="markdownTableBodyNone"><b>2147483649</b> </td><td class="markdownTableBodyNone">— </td><td class="markdownTableBodyNone"><b>Processor Brand String (part 1).</b> </td><td class="markdownTableBodyNone">ASCII characters in registers. </td></tr> |
| 169 | +<tr class="markdownTableRowOdd"> |
| 170 | +<td class="markdownTableBodyNone"><b>2147483650</b> </td><td class="markdownTableBodyNone">— </td><td class="markdownTableBodyNone"><b>Processor Brand String (part 2).</b> </td><td class="markdownTableBodyNone">Concatenate with other parts. </td></tr> |
| 171 | +<tr class="markdownTableRowEven"> |
| 172 | +<td class="markdownTableBodyNone"><b>2147483651</b> </td><td class="markdownTableBodyNone">— </td><td class="markdownTableBodyNone"><b>Processor Brand String (part 3).</b> </td><td class="markdownTableBodyNone">Full readable brand string. </td></tr> |
| 173 | +<tr class="markdownTableRowOdd"> |
| 174 | +<td class="markdownTableBodyNone"><b>2147483652</b> </td><td class="markdownTableBodyNone">— </td><td class="markdownTableBodyNone"><b>Extended Features (AMD).</b> </td><td class="markdownTableBodyNone">Reports long mode (64-bit), NX, etc. </td></tr> |
| 175 | +<tr class="markdownTableRowEven"> |
| 176 | +<td class="markdownTableBodyNone"><b>2147483653</b> </td><td class="markdownTableBodyNone">— </td><td class="markdownTableBodyNone"><b>AMD Brand ID and Feature Extensions.</b> </td><td class="markdownTableBodyNone">Reports 3DNow!+, LZCNT, etc. </td></tr> |
| 177 | +<tr class="markdownTableRowOdd"> |
| 178 | +<td class="markdownTableBodyNone"><b>2147483654</b> </td><td class="markdownTableBodyNone">— </td><td class="markdownTableBodyNone"><b>AMD Advanced Power Management Info.</b> </td><td class="markdownTableBodyNone">Frequency, voltage hints. </td></tr> |
| 179 | +<tr class="markdownTableRowEven"> |
| 180 | +<td class="markdownTableBodyNone"><b>2147483655</b> </td><td class="markdownTableBodyNone">— </td><td class="markdownTableBodyNone"><b>AMD Lightweight Profiling (LWP).</b> </td><td class="markdownTableBodyNone">Low-overhead performance monitoring. </td></tr> |
| 181 | +<tr class="markdownTableRowOdd"> |
| 182 | +<td class="markdownTableBodyNone"><b>2147483656</b> </td><td class="markdownTableBodyNone">— </td><td class="markdownTableBodyNone"><b>AMD Cache Topology and Address Translation.</b> </td><td class="markdownTableBodyNone">Page size and cache info. </td></tr> |
| 183 | +<tr class="markdownTableRowEven"> |
| 184 | +<td class="markdownTableBodyNone"><b>2147483657</b> </td><td class="markdownTableBodyNone">— </td><td class="markdownTableBodyNone"><b>AMD Processor Capacity / Die Identification.</b> </td><td class="markdownTableBodyNone">Used for multi-chip packages. </td></tr> |
| 185 | +<tr class="markdownTableRowOdd"> |
| 186 | +<td class="markdownTableBodyNone"><b>2147483658</b> </td><td class="markdownTableBodyNone">— </td><td class="markdownTableBodyNone"><b>AMD Encryption and Secure Memory Features.</b> </td><td class="markdownTableBodyNone">SME, SEV, SEV-ES flags. </td></tr> |
| 187 | +<tr class="markdownTableRowEven"> |
| 188 | +<td class="markdownTableBodyNone"><b>2147483659+</b> </td><td class="markdownTableBodyNone">— </td><td class="markdownTableBodyNone"><b>Reserved or Vendor-Specific Extensions.</b> </td><td class="markdownTableBodyNone">Future-use space. </td></tr> |
| 189 | +</table> |
| 190 | +<hr /> |
| 191 | +<h3 class="doxsection"><a class="anchor" id="notes-190"></a> |
| 192 | +Notes</h3> |
| 193 | +<ul> |
| 194 | +<li>All <b>leaf values</b> are shown in <b>decimal</b> form, as used by the <span class="tt">cpuid</span> command.</li> |
| 195 | +<li>Sub-leaves (ECX) are zero unless iterating over hierarchical data like cache or topology.</li> |
| 196 | +<li>The command reads <b>EAX, EBX, ECX, and EDX</b> and prints their raw 32-bit register values in hexadecimal for analysis.</li> |
| 197 | +<li>To reconstruct brand strings, concatenate ASCII bytes from the extended leaves (2147483649–2147483651). </li> |
| 198 | +</ul> |
| 199 | +</div></div><!-- contents --> |
| 200 | +</div><!-- PageDoc --> |
| 201 | +</div><!-- doc-content --> |
| 202 | +<div id="page-nav" class="page-nav-panel"> |
| 203 | +<div id="page-nav-resize-handle"></div> |
| 204 | +<div id="page-nav-tree"> |
| 205 | +<div id="page-nav-contents"> |
| 206 | +</div><!-- page-nav-contents --> |
| 207 | +</div><!-- page-nav-tree --> |
| 208 | +</div><!-- page-nav --> |
| 209 | +</div><!-- container --> |
| 210 | +<!-- start footer part --> |
| 211 | +<div id="nav-path" class="navpath"><!-- id is needed for treeview function! --> |
| 212 | + <ul> |
| 213 | + <li class="navelem"><a href="index.html">Retro Rocket OS</a></li><li class="navelem"><a href="user-guide.html">User Guide</a></li><li class="navelem"><a href="commands.html">Commands</a></li> |
| 214 | + <li class="footer">Generated by <a href="https://www.doxygen.org/index.html"><img class="footer" src="doxygen.svg" width="104" height="31" alt="doxygen"/></a> 1.14.0 </li> |
| 215 | + </ul> |
| 216 | +</div> |
| 217 | +</body> |
| 218 | +</html> |
0 commit comments