-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #34 from chipsec/release/"Update to
Update to release/1.12.6
- Loading branch information
Showing
544 changed files
with
86,119 additions
and
5,509 deletions.
There are no files selected for viewing
Large diffs are not rendered by default.
Oops, something went wrong.
Large diffs are not rendered by default.
Oops, something went wrong.
Large diffs are not rendered by default.
Oops, something went wrong.
Large diffs are not rendered by default.
Oops, something went wrong.
Large diffs are not rendered by default.
Oops, something went wrong.
Large diffs are not rendered by default.
Oops, something went wrong.
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,179 @@ | ||
<!DOCTYPE html> | ||
|
||
<html lang="en" data-content_root="../../../"> | ||
<head> | ||
<meta charset="utf-8" /> | ||
<meta name="viewport" content="width=device-width, initial-scale=1.0" /> | ||
<title>chipsec.hal.cpuid — CHIPSEC documentation</title> | ||
<link rel="stylesheet" type="text/css" href="../../../_static/pygments.css?v=fa44fd50" /> | ||
<link rel="stylesheet" type="text/css" href="../../../_static/classic.css?v=f40a2feb" /> | ||
|
||
<script src="../../../_static/documentation_options.js?v=5929fcd5"></script> | ||
<script src="../../../_static/doctools.js?v=888ff710"></script> | ||
<script src="../../../_static/sphinx_highlight.js?v=dc90522c"></script> | ||
|
||
<link rel="icon" href="../../../_static/chipsec_favicon.jpg"/> | ||
<link rel="index" title="Index" href="../../../genindex.html" /> | ||
<link rel="search" title="Search" href="../../../search.html" /> | ||
</head><body> | ||
<div class="related" role="navigation" aria-label="related navigation"> | ||
<h3>Navigation</h3> | ||
<ul> | ||
<li class="right" style="margin-right: 10px"> | ||
<a href="../../../genindex.html" title="General Index" | ||
accesskey="I">index</a></li> | ||
<li class="right" > | ||
<a href="../../../py-modindex.html" title="Python Module Index" | ||
>modules</a> |</li> | ||
<li class="nav-item nav-item-0"><a href="../../../index.html">CHIPSEC documentation</a> »</li> | ||
<li class="nav-item nav-item-1"><a href="../../index.html" accesskey="U">Module code</a> »</li> | ||
<li class="nav-item nav-item-this"><a href="">chipsec.hal.cpuid</a></li> | ||
</ul> | ||
</div> | ||
|
||
<div class="document"> | ||
<div class="documentwrapper"> | ||
<div class="bodywrapper"> | ||
<div class="body" role="main"> | ||
|
||
<h1>Source code for chipsec.hal.cpuid</h1><div class="highlight"><pre> | ||
<span></span><span class="c1"># CHIPSEC: Platform Security Assessment Framework</span> | ||
<span class="c1"># Copyright (c) 2010-2021, Intel Corporation</span> | ||
<span class="c1">#</span> | ||
<span class="c1"># This program is free software; you can redistribute it and/or</span> | ||
<span class="c1"># modify it under the terms of the GNU General Public License</span> | ||
<span class="c1"># as published by the Free Software Foundation; Version 2.</span> | ||
<span class="c1">#</span> | ||
<span class="c1"># This program is distributed in the hope that it will be useful,</span> | ||
<span class="c1"># but WITHOUT ANY WARRANTY; without even the implied warranty of</span> | ||
<span class="c1"># MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the</span> | ||
<span class="c1"># GNU General Public License for more details.</span> | ||
<span class="c1">#</span> | ||
<span class="c1"># You should have received a copy of the GNU General Public License</span> | ||
<span class="c1"># along with this program; if not, write to the Free Software</span> | ||
<span class="c1"># Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.</span> | ||
<span class="c1">#</span> | ||
<span class="c1"># Contact information:</span> | ||
<span class="c1"># [email protected]</span> | ||
<span class="c1">#</span> | ||
|
||
<span class="sd">"""</span> | ||
<span class="sd">CPUID information</span> | ||
|
||
<span class="sd">usage:</span> | ||
<span class="sd"> >>> cpuid(0)</span> | ||
<span class="sd">"""</span> | ||
|
||
<span class="kn">from</span> <span class="nn">typing</span> <span class="kn">import</span> <span class="n">Tuple</span> | ||
<span class="kn">from</span> <span class="nn">chipsec.hal</span> <span class="kn">import</span> <span class="n">hal_base</span> | ||
<span class="kn">from</span> <span class="nn">chipsec.logger</span> <span class="kn">import</span> <span class="n">logger</span> | ||
|
||
|
||
<div class="viewcode-block" id="CpuID"> | ||
<a class="viewcode-back" href="../../../modules/chipsec.hal.cpuid.html#chipsec.hal.cpuid.CpuID">[docs]</a> | ||
<span class="k">class</span> <span class="nc">CpuID</span><span class="p">(</span><span class="n">hal_base</span><span class="o">.</span><span class="n">HALBase</span><span class="p">):</span> | ||
|
||
<span class="k">def</span> <span class="fm">__init__</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="n">cs</span><span class="p">):</span> | ||
<span class="nb">super</span><span class="p">(</span><span class="n">CpuID</span><span class="p">,</span> <span class="bp">self</span><span class="p">)</span><span class="o">.</span><span class="fm">__init__</span><span class="p">(</span><span class="n">cs</span><span class="p">)</span> | ||
<span class="bp">self</span><span class="o">.</span><span class="n">helper</span> <span class="o">=</span> <span class="n">cs</span><span class="o">.</span><span class="n">helper</span> | ||
|
||
<div class="viewcode-block" id="CpuID.cpuid"> | ||
<a class="viewcode-back" href="../../../modules/chipsec.hal.cpuid.html#chipsec.hal.cpuid.CpuID.cpuid">[docs]</a> | ||
<span class="k">def</span> <span class="nf">cpuid</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="n">eax</span><span class="p">:</span> <span class="nb">int</span><span class="p">,</span> <span class="n">ecx</span><span class="p">:</span> <span class="nb">int</span><span class="p">)</span> <span class="o">-></span> <span class="n">Tuple</span><span class="p">[</span><span class="nb">int</span><span class="p">,</span> <span class="nb">int</span><span class="p">,</span> <span class="nb">int</span><span class="p">,</span> <span class="nb">int</span><span class="p">]:</span> | ||
<span class="n">logger</span><span class="p">()</span><span class="o">.</span><span class="n">log_hal</span><span class="p">(</span><span class="sa">f</span><span class="s1">'[cpuid] in: EAX=0x</span><span class="si">{</span><span class="n">eax</span><span class="si">:</span><span class="s1">08X</span><span class="si">}</span><span class="s1">, ECX=0x</span><span class="si">{</span><span class="n">ecx</span><span class="si">:</span><span class="s1">08X</span><span class="si">}</span><span class="s1">'</span><span class="p">)</span> | ||
<span class="p">(</span><span class="n">eax</span><span class="p">,</span> <span class="n">ebx</span><span class="p">,</span> <span class="n">ecx</span><span class="p">,</span> <span class="n">edx</span><span class="p">)</span> <span class="o">=</span> <span class="bp">self</span><span class="o">.</span><span class="n">helper</span><span class="o">.</span><span class="n">cpuid</span><span class="p">(</span><span class="n">eax</span><span class="p">,</span> <span class="n">ecx</span><span class="p">)</span> | ||
<span class="n">logger</span><span class="p">()</span><span class="o">.</span><span class="n">log_hal</span><span class="p">(</span><span class="sa">f</span><span class="s1">'[cpuid] out: EAX=0x</span><span class="si">{</span><span class="n">eax</span><span class="si">:</span><span class="s1">08X</span><span class="si">}</span><span class="s1">, EBX=0x</span><span class="si">{</span><span class="n">ebx</span><span class="si">:</span><span class="s1">08X</span><span class="si">}</span><span class="s1">, ECX=0x</span><span class="si">{</span><span class="n">ecx</span><span class="si">:</span><span class="s1">08X</span><span class="si">}</span><span class="s1">, EDX=0x</span><span class="si">{</span><span class="n">edx</span><span class="si">:</span><span class="s1">08X</span><span class="si">}</span><span class="s1">'</span><span class="p">)</span> | ||
<span class="k">return</span> <span class="p">(</span><span class="n">eax</span><span class="p">,</span> <span class="n">ebx</span><span class="p">,</span> <span class="n">ecx</span><span class="p">,</span> <span class="n">edx</span><span class="p">)</span></div> | ||
|
||
|
||
<div class="viewcode-block" id="CpuID.get_proc_info"> | ||
<a class="viewcode-back" href="../../../modules/chipsec.hal.cpuid.html#chipsec.hal.cpuid.CpuID.get_proc_info">[docs]</a> | ||
<span class="k">def</span> <span class="nf">get_proc_info</span><span class="p">(</span><span class="bp">self</span><span class="p">):</span> | ||
<span class="p">(</span><span class="n">eax</span><span class="p">,</span> <span class="n">_</span><span class="p">,</span> <span class="n">_</span><span class="p">,</span> <span class="n">_</span><span class="p">)</span> <span class="o">=</span> <span class="bp">self</span><span class="o">.</span><span class="n">cpuid</span><span class="p">(</span><span class="mh">0x01</span><span class="p">,</span> <span class="mh">0x00</span><span class="p">)</span> | ||
<span class="k">return</span> <span class="n">eax</span></div> | ||
</div> | ||
|
||
</pre></div> | ||
|
||
<div class="clearer"></div> | ||
</div> | ||
</div> | ||
</div> | ||
<div class="sphinxsidebar" role="navigation" aria-label="main navigation"> | ||
<div class="sphinxsidebarwrapper"> | ||
<p class="logo"><a href="../../../index.html"> | ||
<img class="logo" src="../../../_static/chipsec_logo_transparent.png" alt="Logo"/> | ||
</a></p> | ||
<h3><a href="../../../index.html">Table of Contents</a></h3> | ||
<p class="caption" role="heading"><span class="caption-text">Start here</span></p> | ||
<ul> | ||
<li class="toctree-l1"><a class="reference internal" href="../../../start/Contact.html">Contact</a></li> | ||
<li class="toctree-l1"><a class="reference internal" href="../../../start/Download.html">Download CHIPSEC</a></li> | ||
</ul> | ||
<p class="caption" role="heading"><span class="caption-text">Installation</span></p> | ||
<ul> | ||
<li class="toctree-l1"><a class="reference internal" href="../../../installation/InstallLinux.html">Linux Installation</a></li> | ||
<li class="toctree-l1"><a class="reference internal" href="../../../installation/InstallWinDAL.html">DAL Windows Installation</a></li> | ||
<li class="toctree-l1"><a class="reference internal" href="../../../installation/InstallWindows.html">Windows Installation</a></li> | ||
<li class="toctree-l1"><a class="reference internal" href="../../../installation/USBwithUEFIShell.html">Building a Bootable USB drive with UEFI Shell (x64)</a></li> | ||
</ul> | ||
<p class="caption" role="heading"><span class="caption-text">Using CHIPSEC</span></p> | ||
<ul> | ||
<li class="toctree-l1"><a class="reference internal" href="../../../usage/Interpreting-Results.html">Interpreting results</a></li> | ||
<li class="toctree-l1"><a class="reference internal" href="../../../usage/Running-Chipsec.html">Running CHIPSEC</a></li> | ||
</ul> | ||
<p class="caption" role="heading"><span class="caption-text">Architecture and Modules</span></p> | ||
<ul> | ||
<li class="toctree-l1"><a class="reference internal" href="../../../development/Architecture-Overview.html">Architecture Overview</a></li> | ||
<li class="toctree-l1"><a class="reference internal" href="../../../development/Configuration-Files.html">Configuration Files</a></li> | ||
<li class="toctree-l1"><a class="reference internal" href="../../../development/Developing.html">Writing Your Own Modules</a></li> | ||
<li class="toctree-l1"><a class="reference internal" href="../../../development/OS-Helpers-and-Drivers.html">OS Helpers and Drivers</a></li> | ||
<li class="toctree-l1"><a class="reference internal" href="../../../development/Platform-Detection.html">Methods for Platform Detection</a></li> | ||
<li class="toctree-l1"><a class="reference internal" href="../../../development/Sample-Module-Code.html">Sample module code template</a></li> | ||
<li class="toctree-l1"><a class="reference internal" href="../../../development/Vulnerabilities-and-CHIPSEC-Modules.html">CHIPSEC Modules</a></li> | ||
</ul> | ||
<p class="caption" role="heading"><span class="caption-text">Contribution Guide</span></p> | ||
<ul> | ||
<li class="toctree-l1"><a class="reference internal" href="../../../contribution/code-style-python.html">Python Version</a></li> | ||
<li class="toctree-l1"><a class="reference internal" href="../../../contribution/code-style-python.html#python-coding-style-guide">Python Coding Style Guide</a></li> | ||
<li class="toctree-l1"><a class="reference internal" href="../../../contribution/code-style-python.html#f-strings">f-Strings</a></li> | ||
<li class="toctree-l1"><a class="reference internal" href="../../../contribution/code-style-python.html#type-hints">Type Hints</a></li> | ||
<li class="toctree-l1"><a class="reference internal" href="../../../contribution/code-style-python.html#underscores-in-numeric-literals">Underscores in Numeric Literals</a></li> | ||
<li class="toctree-l1"><a class="reference internal" href="../../../contribution/code-style-python.html#walrus-operator">Walrus Operator (:=)</a></li> | ||
<li class="toctree-l1"><a class="reference internal" href="../../../contribution/code-style-python.html#deprecate-distutils-module-support">Deprecate distutils module support</a></li> | ||
</ul> | ||
|
||
<div id="searchbox" style="display: none" role="search"> | ||
<h3 id="searchlabel">Quick search</h3> | ||
<div class="searchformwrapper"> | ||
<form class="search" action="../../../search.html" method="get"> | ||
<input type="text" name="q" aria-labelledby="searchlabel" autocomplete="off" autocorrect="off" autocapitalize="off" spellcheck="false"/> | ||
<input type="submit" value="Go" /> | ||
</form> | ||
</div> | ||
</div> | ||
<script>document.getElementById('searchbox').style.display = "block"</script> | ||
</div> | ||
</div> | ||
<div class="clearer"></div> | ||
</div> | ||
<div class="related" role="navigation" aria-label="related navigation"> | ||
<h3>Navigation</h3> | ||
<ul> | ||
<li class="right" style="margin-right: 10px"> | ||
<a href="../../../genindex.html" title="General Index" | ||
>index</a></li> | ||
<li class="right" > | ||
<a href="../../../py-modindex.html" title="Python Module Index" | ||
>modules</a> |</li> | ||
<li class="nav-item nav-item-0"><a href="../../../index.html">CHIPSEC documentation</a> »</li> | ||
<li class="nav-item nav-item-1"><a href="../../index.html" >Module code</a> »</li> | ||
<li class="nav-item nav-item-this"><a href="">chipsec.hal.cpuid</a></li> | ||
</ul> | ||
</div> | ||
<div class="footer" role="contentinfo"> | ||
Last updated on Dec 18, 2023. | ||
Created using <a href="https://www.sphinx-doc.org/">Sphinx</a> 7.2.6. | ||
</div> | ||
</body> | ||
</html> |
Oops, something went wrong.