mirror of
https://github.com/rcore-os/rCore-Tutorial-v3.git
synced 2024-11-24 10:26:25 +04:00
deploy: 5a362ba7cd
This commit is contained in:
parent
d025f18ef1
commit
9a52c0f148
@ -4,5 +4,5 @@
|
||||
</nav>
|
||||
<nav class="sidebar"><a class="sidebar-logo" href="../../os/index.html"><div class="logo-container"><img class="rust-logo" src="../../rust-logo.svg" alt="logo"></div>
|
||||
</a><div class="sidebar-elems"><h2 class="location"><a href="index.html">In os::board</a></h2><div id="sidebar-vars" data-name="QEMU_EXIT_HANDLE" data-ty="constant" data-relpath=""></div><script defer src="sidebar-items.js"></script></div></nav><main><div class="width-limiter"><div class="sub-container"><a class="sub-logo-container" href="../../os/index.html"><img class="rust-logo" src="../../rust-logo.svg" alt="logo"></a><nav class="sub"><div class="theme-picker hidden"><button id="theme-picker" aria-label="Pick another theme!" aria-haspopup="menu" title="themes"><img width="22" height="22" alt="Pick another theme!" src="../../brush.svg"></button><div id="theme-choices" role="menu"></div></div><form class="search-form"><div class="search-container"><span></span><input class="search-input" name="search" autocomplete="off" spellcheck="false" placeholder="Click or press ‘S’ to search, ‘?’ for more options…" type="search"><button type="button" id="help-button" title="help">?</button><a id="settings-menu" href="../../settings.html" title="settings"><img width="22" height="22" alt="Change settings" src="../../wheel.svg"></a></div></form></nav></div><section id="main-content" class="content"><div class="main-heading">
|
||||
<h1 class="fqn"><span class="in-band">Constant <a href="../index.html">os</a>::<wbr><a href="index.html">board</a>::<wbr><a class="constant" href="#">QEMU_EXIT_HANDLE</a><button id="copy-path" onclick="copy_path(this)" title="Copy item path to clipboard"><img src="../../clipboard.svg" width="19" height="18" alt="Copy item path"></button></span></h1><span class="out-of-band"><a class="srclink" href="../../src/os/boards/qemu.rs.html#127">source</a> · <a id="toggle-all-docs" href="javascript:void(0)" title="collapse all docs">[<span class="inner">−</span>]</a></span></div><div class="docblock item-decl"><pre class="rust const"><code>pub const QEMU_EXIT_HANDLE: <a class="struct" href="struct.RISCV64.html" title="struct os::board::RISCV64">RISCV64</a>;</code></pre></div></section><section id="search" class="content hidden"></section></div></main><div id="rustdoc-vars" data-root-path="../../" data-current-crate="os" data-themes="ayu,dark,light" data-resource-suffix="" data-rustdoc-version="1.62.0-nightly (1f7fb6413 2022-04-10)" ></div>
|
||||
<h1 class="fqn"><span class="in-band">Constant <a href="../index.html">os</a>::<wbr><a href="index.html">board</a>::<wbr><a class="constant" href="#">QEMU_EXIT_HANDLE</a><button id="copy-path" onclick="copy_path(this)" title="Copy item path to clipboard"><img src="../../clipboard.svg" width="19" height="18" alt="Copy item path"></button></span></h1><span class="out-of-band"><a class="srclink" href="../../src/os/boards/qemu.rs.html#126">source</a> · <a id="toggle-all-docs" href="javascript:void(0)" title="collapse all docs">[<span class="inner">−</span>]</a></span></div><div class="docblock item-decl"><pre class="rust const"><code>pub const QEMU_EXIT_HANDLE: <a class="struct" href="struct.RISCV64.html" title="struct os::board::RISCV64">RISCV64</a>;</code></pre></div></section><section id="search" class="content hidden"></section></div></main><div id="rustdoc-vars" data-root-path="../../" data-current-crate="os" data-themes="ayu,dark,light" data-resource-suffix="" data-rustdoc-version="1.62.0-nightly (1f7fb6413 2022-04-10)" ></div>
|
||||
</body></html>
|
@ -4,5 +4,5 @@
|
||||
</nav>
|
||||
<nav class="sidebar"><a class="sidebar-logo" href="../../os/index.html"><div class="logo-container"><img class="rust-logo" src="../../rust-logo.svg" alt="logo"></div>
|
||||
</a><div class="sidebar-elems"><h2 class="location"><a href="index.html">In os::board</a></h2><div id="sidebar-vars" data-name="VIRT_TEST" data-ty="constant" data-relpath=""></div><script defer src="sidebar-items.js"></script></div></nav><main><div class="width-limiter"><div class="sub-container"><a class="sub-logo-container" href="../../os/index.html"><img class="rust-logo" src="../../rust-logo.svg" alt="logo"></a><nav class="sub"><div class="theme-picker hidden"><button id="theme-picker" aria-label="Pick another theme!" aria-haspopup="menu" title="themes"><img width="22" height="22" alt="Pick another theme!" src="../../brush.svg"></button><div id="theme-choices" role="menu"></div></div><form class="search-form"><div class="search-container"><span></span><input class="search-input" name="search" autocomplete="off" spellcheck="false" placeholder="Click or press ‘S’ to search, ‘?’ for more options…" type="search"><button type="button" id="help-button" title="help">?</button><a id="settings-menu" href="../../settings.html" title="settings"><img width="22" height="22" alt="Change settings" src="../../wheel.svg"></a></div></form></nav></div><section id="main-content" class="content"><div class="main-heading">
|
||||
<h1 class="fqn"><span class="in-band">Constant <a href="../index.html">os</a>::<wbr><a href="index.html">board</a>::<wbr><a class="constant" href="#">VIRT_TEST</a><button id="copy-path" onclick="copy_path(this)" title="Copy item path to clipboard"><img src="../../clipboard.svg" width="19" height="18" alt="Copy item path"></button></span></h1><span class="out-of-band"><a class="srclink" href="../../src/os/boards/qemu.rs.html#125">source</a> · <a id="toggle-all-docs" href="javascript:void(0)" title="collapse all docs">[<span class="inner">−</span>]</a></span></div><div class="docblock item-decl"><pre class="rust const"><code>const VIRT_TEST: <a class="primitive" href="https://doc.rust-lang.org/nightly/core/primitive.u64.html">u64</a> = 0x100000;</code></pre></div></section><section id="search" class="content hidden"></section></div></main><div id="rustdoc-vars" data-root-path="../../" data-current-crate="os" data-themes="ayu,dark,light" data-resource-suffix="" data-rustdoc-version="1.62.0-nightly (1f7fb6413 2022-04-10)" ></div>
|
||||
<h1 class="fqn"><span class="in-band">Constant <a href="../index.html">os</a>::<wbr><a href="index.html">board</a>::<wbr><a class="constant" href="#">VIRT_TEST</a><button id="copy-path" onclick="copy_path(this)" title="Copy item path to clipboard"><img src="../../clipboard.svg" width="19" height="18" alt="Copy item path"></button></span></h1><span class="out-of-band"><a class="srclink" href="../../src/os/boards/qemu.rs.html#124">source</a> · <a id="toggle-all-docs" href="javascript:void(0)" title="collapse all docs">[<span class="inner">−</span>]</a></span></div><div class="docblock item-decl"><pre class="rust const"><code>const VIRT_TEST: <a class="primitive" href="https://doc.rust-lang.org/nightly/core/primitive.u64.html">u64</a> = 0x100000;</code></pre></div></section><section id="search" class="content hidden"></section></div></main><div id="rustdoc-vars" data-root-path="../../" data-current-crate="os" data-themes="ayu,dark,light" data-resource-suffix="" data-rustdoc-version="1.62.0-nightly (1f7fb6413 2022-04-10)" ></div>
|
||||
</body></html>
|
@ -4,6 +4,6 @@
|
||||
</nav>
|
||||
<nav class="sidebar"><a class="sidebar-logo" href="../../os/index.html"><div class="logo-container"><img class="rust-logo" src="../../rust-logo.svg" alt="logo"></div>
|
||||
</a><div class="sidebar-elems"><h2 class="location"><a href="index.html">In os::board</a></h2><div id="sidebar-vars" data-name="exit_code_encode" data-ty="fn" data-relpath=""></div><script defer src="sidebar-items.js"></script></div></nav><main><div class="width-limiter"><div class="sub-container"><a class="sub-logo-container" href="../../os/index.html"><img class="rust-logo" src="../../rust-logo.svg" alt="logo"></a><nav class="sub"><div class="theme-picker hidden"><button id="theme-picker" aria-label="Pick another theme!" aria-haspopup="menu" title="themes"><img width="22" height="22" alt="Pick another theme!" src="../../brush.svg"></button><div id="theme-choices" role="menu"></div></div><form class="search-form"><div class="search-container"><span></span><input class="search-input" name="search" autocomplete="off" spellcheck="false" placeholder="Click or press ‘S’ to search, ‘?’ for more options…" type="search"><button type="button" id="help-button" title="help">?</button><a id="settings-menu" href="../../settings.html" title="settings"><img width="22" height="22" alt="Change settings" src="../../wheel.svg"></a></div></form></nav></div><section id="main-content" class="content"><div class="main-heading">
|
||||
<h1 class="fqn"><span class="in-band">Function <a href="../index.html">os</a>::<wbr><a href="index.html">board</a>::<wbr><a class="fn" href="#">exit_code_encode</a><button id="copy-path" onclick="copy_path(this)" title="Copy item path to clipboard"><img src="../../clipboard.svg" width="19" height="18" alt="Copy item path"></button></span></h1><span class="out-of-band"><a class="srclink" href="../../src/os/boards/qemu.rs.html#80-82">source</a> · <a id="toggle-all-docs" href="javascript:void(0)" title="collapse all docs">[<span class="inner">−</span>]</a></span></div><div class="docblock item-decl"><pre class="rust fn"><code>const fn exit_code_encode(code: <a class="primitive" href="https://doc.rust-lang.org/nightly/core/primitive.u32.html">u32</a>) -> <a class="primitive" href="https://doc.rust-lang.org/nightly/core/primitive.u32.html">u32</a></code></pre></div><details class="rustdoc-toggle top-doc" open><summary class="hideme"><span>Expand description</span></summary><div class="docblock"><p>Encode the exit code using EXIT_FAILURE_FLAG.</p>
|
||||
<h1 class="fqn"><span class="in-band">Function <a href="../index.html">os</a>::<wbr><a href="index.html">board</a>::<wbr><a class="fn" href="#">exit_code_encode</a><button id="copy-path" onclick="copy_path(this)" title="Copy item path to clipboard"><img src="../../clipboard.svg" width="19" height="18" alt="Copy item path"></button></span></h1><span class="out-of-band"><a class="srclink" href="../../src/os/boards/qemu.rs.html#79-81">source</a> · <a id="toggle-all-docs" href="javascript:void(0)" title="collapse all docs">[<span class="inner">−</span>]</a></span></div><div class="docblock item-decl"><pre class="rust fn"><code>const fn exit_code_encode(code: <a class="primitive" href="https://doc.rust-lang.org/nightly/core/primitive.u32.html">u32</a>) -> <a class="primitive" href="https://doc.rust-lang.org/nightly/core/primitive.u32.html">u32</a></code></pre></div><details class="rustdoc-toggle top-doc" open><summary class="hideme"><span>Expand description</span></summary><div class="docblock"><p>Encode the exit code using EXIT_FAILURE_FLAG.</p>
|
||||
</div></details></section><section id="search" class="content hidden"></section></div></main><div id="rustdoc-vars" data-root-path="../../" data-current-crate="os" data-themes="ayu,dark,light" data-resource-suffix="" data-rustdoc-version="1.62.0-nightly (1f7fb6413 2022-04-10)" ></div>
|
||||
</body></html>
|
@ -4,7 +4,7 @@
|
||||
</nav>
|
||||
<nav class="sidebar"><a class="sidebar-logo" href="../../os/index.html"><div class="logo-container"><img class="rust-logo" src="../../rust-logo.svg" alt="logo"></div>
|
||||
</a><h2 class="location"><a href="#">Module board</a></h2><div class="sidebar-elems"><section><div class="block"><ul><li><a href="#structs">Structs</a></li><li><a href="#constants">Constants</a></li><li><a href="#traits">Traits</a></li><li><a href="#functions">Functions</a></li><li><a href="#types">Type Definitions</a></li></ul></div></section><div id="sidebar-vars" data-name="board" data-ty="mod" data-relpath="./"></div><script defer src="./sidebar-items.js"></script></div></nav><main><div class="width-limiter"><div class="sub-container"><a class="sub-logo-container" href="../../os/index.html"><img class="rust-logo" src="../../rust-logo.svg" alt="logo"></a><nav class="sub"><div class="theme-picker hidden"><button id="theme-picker" aria-label="Pick another theme!" aria-haspopup="menu" title="themes"><img width="22" height="22" alt="Pick another theme!" src="../../brush.svg"></button><div id="theme-choices" role="menu"></div></div><form class="search-form"><div class="search-container"><span></span><input class="search-input" name="search" autocomplete="off" spellcheck="false" placeholder="Click or press ‘S’ to search, ‘?’ for more options…" type="search"><button type="button" id="help-button" title="help">?</button><a id="settings-menu" href="../../settings.html" title="settings"><img width="22" height="22" alt="Change settings" src="../../wheel.svg"></a></div></form></nav></div><section id="main-content" class="content"><div class="main-heading">
|
||||
<h1 class="fqn"><span class="in-band">Module <a href="../index.html">os</a>::<wbr><a class="mod" href="#">board</a><button id="copy-path" onclick="copy_path(this)" title="Copy item path to clipboard"><img src="../../clipboard.svg" width="19" height="18" alt="Copy item path"></button></span></h1><span class="out-of-band"><a class="srclink" href="../../src/os/boards/qemu.rs.html#1-127">source</a> · <a id="toggle-all-docs" href="javascript:void(0)" title="collapse all docs">[<span class="inner">−</span>]</a></span></div><h2 id="structs" class="small-section-header"><a href="#structs">Structs</a></h2>
|
||||
<h1 class="fqn"><span class="in-band">Module <a href="../index.html">os</a>::<wbr><a class="mod" href="#">board</a><button id="copy-path" onclick="copy_path(this)" title="Copy item path to clipboard"><img src="../../clipboard.svg" width="19" height="18" alt="Copy item path"></button></span></h1><span class="out-of-band"><a class="srclink" href="../../src/os/boards/qemu.rs.html#1-126">source</a> · <a id="toggle-all-docs" href="javascript:void(0)" title="collapse all docs">[<span class="inner">−</span>]</a></span></div><h2 id="structs" class="small-section-header"><a href="#structs">Structs</a></h2>
|
||||
<div class="item-table"><div class="item-row"><div class="item-left module-item"><a class="struct" href="struct.RISCV64.html" title="os::board::RISCV64 struct">RISCV64</a></div><div class="item-right docblock-short"><p>RISCV64 configuration</p>
|
||||
</div></div></div><h2 id="constants" class="small-section-header"><a href="#constants">Constants</a></h2>
|
||||
<div class="item-table"><div class="item-row"><div class="item-left module-item"><a class="constant" href="constant.CLOCK_FREQ.html" title="os::board::CLOCK_FREQ constant">CLOCK_FREQ</a></div><div class="item-right docblock-short"></div></div><div class="item-row"><div class="item-left module-item"><a class="constant" href="constant.EXIT_FAILURE.html" title="os::board::EXIT_FAILURE constant">EXIT_FAILURE</a><span title="Restricted Visibility"> 🔒</span> </div><div class="item-right docblock-short"></div></div><div class="item-row"><div class="item-left module-item"><a class="constant" href="constant.EXIT_FAILURE_FLAG.html" title="os::board::EXIT_FAILURE_FLAG constant">EXIT_FAILURE_FLAG</a><span title="Restricted Visibility"> 🔒</span> </div><div class="item-right docblock-short"></div></div><div class="item-row"><div class="item-left module-item"><a class="constant" href="constant.EXIT_RESET.html" title="os::board::EXIT_RESET constant">EXIT_RESET</a><span title="Restricted Visibility"> 🔒</span> </div><div class="item-right docblock-short"></div></div><div class="item-row"><div class="item-left module-item"><a class="constant" href="constant.EXIT_SUCCESS.html" title="os::board::EXIT_SUCCESS constant">EXIT_SUCCESS</a><span title="Restricted Visibility"> 🔒</span> </div><div class="item-right docblock-short"></div></div><div class="item-row"><div class="item-left module-item"><a class="constant" href="constant.MMIO.html" title="os::board::MMIO constant">MMIO</a></div><div class="item-right docblock-short"></div></div><div class="item-row"><div class="item-left module-item"><a class="constant" href="constant.QEMU_EXIT_HANDLE.html" title="os::board::QEMU_EXIT_HANDLE constant">QEMU_EXIT_HANDLE</a></div><div class="item-right docblock-short"></div></div><div class="item-row"><div class="item-left module-item"><a class="constant" href="constant.VIRT_PLIC.html" title="os::board::VIRT_PLIC constant">VIRT_PLIC</a></div><div class="item-right docblock-short"></div></div><div class="item-row"><div class="item-left module-item"><a class="constant" href="constant.VIRT_TEST.html" title="os::board::VIRT_TEST constant">VIRT_TEST</a><span title="Restricted Visibility"> 🔒</span> </div><div class="item-right docblock-short"></div></div><div class="item-row"><div class="item-left module-item"><a class="constant" href="constant.VIRT_UART.html" title="os::board::VIRT_UART constant">VIRT_UART</a></div><div class="item-right docblock-short"></div></div></div><h2 id="traits" class="small-section-header"><a href="#traits">Traits</a></h2>
|
||||
|
@ -4,14 +4,14 @@
|
||||
</nav>
|
||||
<nav class="sidebar"><a class="sidebar-logo" href="../../os/index.html"><div class="logo-container"><img class="rust-logo" src="../../rust-logo.svg" alt="logo"></div>
|
||||
</a><h2 class="location"><a href="#">RISCV64</a></h2><div class="sidebar-elems"><section><div class="block"><h3 class="sidebar-title"><a href="#fields">Fields</a></h3><ul><li><a href="#structfield.addr">addr</a></li></ul></div><div class="block"><h3 class="sidebar-title"><a href="#implementations">Methods</a></h3><ul><li><a href="#method.new">new</a></li></ul></div><div class="block"><h3 class="sidebar-title"><a href="#trait-implementations">Trait Implementations</a></h3><ul><li><a href="#impl-QEMUExit">QEMUExit</a></li></ul></div><div class="block"><h3 class="sidebar-title"><a href="#synthetic-implementations">Auto Trait Implementations</a></h3><ul><li><a href="#impl-RefUnwindSafe">RefUnwindSafe</a></li><li><a href="#impl-Send">Send</a></li><li><a href="#impl-Sync">Sync</a></li><li><a href="#impl-Unpin">Unpin</a></li><li><a href="#impl-UnwindSafe">UnwindSafe</a></li></ul></div><div class="block"><h3 class="sidebar-title"><a href="#blanket-implementations">Blanket Implementations</a></h3><ul><li><a href="#impl-Any">Any</a></li><li><a href="#impl-Borrow%3CT%3E">Borrow<T></a></li><li><a href="#impl-BorrowMut%3CT%3E">BorrowMut<T></a></li><li><a href="#impl-From%3CT%3E">From<T></a></li><li><a href="#impl-Into%3CU%3E">Into<U></a></li><li><a href="#impl-TryFrom%3CU%3E">TryFrom<U></a></li><li><a href="#impl-TryInto%3CU%3E">TryInto<U></a></li></ul></div></section><h2 class="location"><a href="index.html">In os::board</a></h2><div id="sidebar-vars" data-name="RISCV64" data-ty="struct" data-relpath=""></div><script defer src="sidebar-items.js"></script></div></nav><main><div class="width-limiter"><div class="sub-container"><a class="sub-logo-container" href="../../os/index.html"><img class="rust-logo" src="../../rust-logo.svg" alt="logo"></a><nav class="sub"><div class="theme-picker hidden"><button id="theme-picker" aria-label="Pick another theme!" aria-haspopup="menu" title="themes"><img width="22" height="22" alt="Pick another theme!" src="../../brush.svg"></button><div id="theme-choices" role="menu"></div></div><form class="search-form"><div class="search-container"><span></span><input class="search-input" name="search" autocomplete="off" spellcheck="false" placeholder="Click or press ‘S’ to search, ‘?’ for more options…" type="search"><button type="button" id="help-button" title="help">?</button><a id="settings-menu" href="../../settings.html" title="settings"><img width="22" height="22" alt="Change settings" src="../../wheel.svg"></a></div></form></nav></div><section id="main-content" class="content"><div class="main-heading">
|
||||
<h1 class="fqn"><span class="in-band">Struct <a href="../index.html">os</a>::<wbr><a href="index.html">board</a>::<wbr><a class="struct" href="#">RISCV64</a><button id="copy-path" onclick="copy_path(this)" title="Copy item path to clipboard"><img src="../../clipboard.svg" width="19" height="18" alt="Copy item path"></button></span></h1><span class="out-of-band"><a class="srclink" href="../../src/os/boards/qemu.rs.html#74-77">source</a> · <a id="toggle-all-docs" href="javascript:void(0)" title="collapse all docs">[<span class="inner">−</span>]</a></span></div><div class="docblock item-decl"><pre class="rust struct"><code>pub struct RISCV64 {
|
||||
<h1 class="fqn"><span class="in-band">Struct <a href="../index.html">os</a>::<wbr><a href="index.html">board</a>::<wbr><a class="struct" href="#">RISCV64</a><button id="copy-path" onclick="copy_path(this)" title="Copy item path to clipboard"><img src="../../clipboard.svg" width="19" height="18" alt="Copy item path"></button></span></h1><span class="out-of-band"><a class="srclink" href="../../src/os/boards/qemu.rs.html#73-76">source</a> · <a id="toggle-all-docs" href="javascript:void(0)" title="collapse all docs">[<span class="inner">−</span>]</a></span></div><div class="docblock item-decl"><pre class="rust struct"><code>pub struct RISCV64 {
|
||||
addr: <a class="primitive" href="https://doc.rust-lang.org/nightly/core/primitive.u64.html">u64</a>,
|
||||
}</code></pre></div><details class="rustdoc-toggle top-doc" open><summary class="hideme"><span>Expand description</span></summary><div class="docblock"><p>RISCV64 configuration</p>
|
||||
</div></details><h2 id="fields" class="fields small-section-header">Fields<a href="#fields" class="anchor"></a></h2><span id="structfield.addr" class="structfield small-section-header"><a href="#structfield.addr" class="anchor field"></a><code>addr: <a class="primitive" href="https://doc.rust-lang.org/nightly/core/primitive.u64.html">u64</a></code></span><div class="docblock"><p>Address of the sifive_test mapped device.</p>
|
||||
</div><h2 id="implementations" class="small-section-header">Implementations<a href="#implementations" class="anchor"></a></h2><div id="implementations-list"><details class="rustdoc-toggle implementors-toggle" open><summary><section id="impl" class="impl has-srclink"><span class="rightside"><a class="srclink" href="../../src/os/boards/qemu.rs.html#84-89">source</a></span><a href="#impl" class="anchor"></a><h3 class="code-header in-band">impl <a class="struct" href="struct.RISCV64.html" title="struct os::board::RISCV64">RISCV64</a></h3></section></summary><div class="impl-items"><details class="rustdoc-toggle method-toggle" open><summary><section id="method.new" class="method has-srclink"><span class="rightside"><a class="srclink" href="../../src/os/boards/qemu.rs.html#86-88">source</a></span><a href="#method.new" class="anchor"></a><h4 class="code-header">pub const fn <a href="#method.new" class="fnname">new</a>(addr: <a class="primitive" href="https://doc.rust-lang.org/nightly/core/primitive.u64.html">u64</a>) -> Self</h4></section></summary><div class="docblock"><p>Create an instance.</p>
|
||||
</div></details></div></details></div><h2 id="trait-implementations" class="small-section-header">Trait Implementations<a href="#trait-implementations" class="anchor"></a></h2><div id="trait-implementations-list"><details class="rustdoc-toggle implementors-toggle" open><summary><section id="impl-QEMUExit" class="impl has-srclink"><span class="rightside"><a class="srclink" href="../../src/os/boards/qemu.rs.html#91-123">source</a></span><a href="#impl-QEMUExit" class="anchor"></a><h3 class="code-header in-band">impl <a class="trait" href="trait.QEMUExit.html" title="trait os::board::QEMUExit">QEMUExit</a> for <a class="struct" href="struct.RISCV64.html" title="struct os::board::RISCV64">RISCV64</a></h3></section></summary><div class="impl-items"><details class="rustdoc-toggle method-toggle" open><summary><section id="method.exit" class="method trait-impl has-srclink"><span class="rightside"><a class="srclink" href="../../src/os/boards/qemu.rs.html#93-114">source</a></span><a href="#method.exit" class="anchor"></a><h4 class="code-header">fn <a href="trait.QEMUExit.html#tymethod.exit" class="fnname">exit</a>(&self, code: <a class="primitive" href="https://doc.rust-lang.org/nightly/core/primitive.u32.html">u32</a>) -> <a class="primitive" href="https://doc.rust-lang.org/nightly/core/primitive.never.html">!</a></h4></section></summary><div class="docblock"><p>Exit qemu with specified exit code.</p>
|
||||
</div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.exit_success" class="method trait-impl has-srclink"><span class="rightside"><a class="srclink" href="../../src/os/boards/qemu.rs.html#116-118">source</a></span><a href="#method.exit_success" class="anchor"></a><h4 class="code-header">fn <a href="trait.QEMUExit.html#tymethod.exit_success" class="fnname">exit_success</a>(&self) -> <a class="primitive" href="https://doc.rust-lang.org/nightly/core/primitive.never.html">!</a></h4></section></summary><div class='docblock'><p>Exit QEMU using <code>EXIT_SUCCESS</code>, aka <code>0</code>, if possible. <a href="trait.QEMUExit.html#tymethod.exit_success">Read more</a></p>
|
||||
</div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.exit_failure" class="method trait-impl has-srclink"><span class="rightside"><a class="srclink" href="../../src/os/boards/qemu.rs.html#120-122">source</a></span><a href="#method.exit_failure" class="anchor"></a><h4 class="code-header">fn <a href="trait.QEMUExit.html#tymethod.exit_failure" class="fnname">exit_failure</a>(&self) -> <a class="primitive" href="https://doc.rust-lang.org/nightly/core/primitive.never.html">!</a></h4></section></summary><div class='docblock'><p>Exit QEMU using <code>EXIT_FAILURE</code>, aka <code>1</code>.</p>
|
||||
</div><h2 id="implementations" class="small-section-header">Implementations<a href="#implementations" class="anchor"></a></h2><div id="implementations-list"><details class="rustdoc-toggle implementors-toggle" open><summary><section id="impl" class="impl has-srclink"><span class="rightside"><a class="srclink" href="../../src/os/boards/qemu.rs.html#83-88">source</a></span><a href="#impl" class="anchor"></a><h3 class="code-header in-band">impl <a class="struct" href="struct.RISCV64.html" title="struct os::board::RISCV64">RISCV64</a></h3></section></summary><div class="impl-items"><details class="rustdoc-toggle method-toggle" open><summary><section id="method.new" class="method has-srclink"><span class="rightside"><a class="srclink" href="../../src/os/boards/qemu.rs.html#85-87">source</a></span><a href="#method.new" class="anchor"></a><h4 class="code-header">pub const fn <a href="#method.new" class="fnname">new</a>(addr: <a class="primitive" href="https://doc.rust-lang.org/nightly/core/primitive.u64.html">u64</a>) -> Self</h4></section></summary><div class="docblock"><p>Create an instance.</p>
|
||||
</div></details></div></details></div><h2 id="trait-implementations" class="small-section-header">Trait Implementations<a href="#trait-implementations" class="anchor"></a></h2><div id="trait-implementations-list"><details class="rustdoc-toggle implementors-toggle" open><summary><section id="impl-QEMUExit" class="impl has-srclink"><span class="rightside"><a class="srclink" href="../../src/os/boards/qemu.rs.html#90-122">source</a></span><a href="#impl-QEMUExit" class="anchor"></a><h3 class="code-header in-band">impl <a class="trait" href="trait.QEMUExit.html" title="trait os::board::QEMUExit">QEMUExit</a> for <a class="struct" href="struct.RISCV64.html" title="struct os::board::RISCV64">RISCV64</a></h3></section></summary><div class="impl-items"><details class="rustdoc-toggle method-toggle" open><summary><section id="method.exit" class="method trait-impl has-srclink"><span class="rightside"><a class="srclink" href="../../src/os/boards/qemu.rs.html#92-113">source</a></span><a href="#method.exit" class="anchor"></a><h4 class="code-header">fn <a href="trait.QEMUExit.html#tymethod.exit" class="fnname">exit</a>(&self, code: <a class="primitive" href="https://doc.rust-lang.org/nightly/core/primitive.u32.html">u32</a>) -> <a class="primitive" href="https://doc.rust-lang.org/nightly/core/primitive.never.html">!</a></h4></section></summary><div class="docblock"><p>Exit qemu with specified exit code.</p>
|
||||
</div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.exit_success" class="method trait-impl has-srclink"><span class="rightside"><a class="srclink" href="../../src/os/boards/qemu.rs.html#115-117">source</a></span><a href="#method.exit_success" class="anchor"></a><h4 class="code-header">fn <a href="trait.QEMUExit.html#tymethod.exit_success" class="fnname">exit_success</a>(&self) -> <a class="primitive" href="https://doc.rust-lang.org/nightly/core/primitive.never.html">!</a></h4></section></summary><div class='docblock'><p>Exit QEMU using <code>EXIT_SUCCESS</code>, aka <code>0</code>, if possible. <a href="trait.QEMUExit.html#tymethod.exit_success">Read more</a></p>
|
||||
</div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.exit_failure" class="method trait-impl has-srclink"><span class="rightside"><a class="srclink" href="../../src/os/boards/qemu.rs.html#119-121">source</a></span><a href="#method.exit_failure" class="anchor"></a><h4 class="code-header">fn <a href="trait.QEMUExit.html#tymethod.exit_failure" class="fnname">exit_failure</a>(&self) -> <a class="primitive" href="https://doc.rust-lang.org/nightly/core/primitive.never.html">!</a></h4></section></summary><div class='docblock'><p>Exit QEMU using <code>EXIT_FAILURE</code>, aka <code>1</code>.</p>
|
||||
</div></details></div></details></div><h2 id="synthetic-implementations" class="small-section-header">Auto Trait Implementations<a href="#synthetic-implementations" class="anchor"></a></h2><div id="synthetic-implementations-list"><section id="impl-RefUnwindSafe" class="impl has-srclink"><a href="#impl-RefUnwindSafe" class="anchor"></a><h3 class="code-header in-band">impl <a class="trait" href="https://doc.rust-lang.org/nightly/core/panic/unwind_safe/trait.RefUnwindSafe.html" title="trait core::panic::unwind_safe::RefUnwindSafe">RefUnwindSafe</a> for <a class="struct" href="struct.RISCV64.html" title="struct os::board::RISCV64">RISCV64</a></h3></section><section id="impl-Send" class="impl has-srclink"><a href="#impl-Send" class="anchor"></a><h3 class="code-header in-band">impl <a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Send.html" title="trait core::marker::Send">Send</a> for <a class="struct" href="struct.RISCV64.html" title="struct os::board::RISCV64">RISCV64</a></h3></section><section id="impl-Sync" class="impl has-srclink"><a href="#impl-Sync" class="anchor"></a><h3 class="code-header in-band">impl <a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Sync.html" title="trait core::marker::Sync">Sync</a> for <a class="struct" href="struct.RISCV64.html" title="struct os::board::RISCV64">RISCV64</a></h3></section><section id="impl-Unpin" class="impl has-srclink"><a href="#impl-Unpin" class="anchor"></a><h3 class="code-header in-band">impl <a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Unpin.html" title="trait core::marker::Unpin">Unpin</a> for <a class="struct" href="struct.RISCV64.html" title="struct os::board::RISCV64">RISCV64</a></h3></section><section id="impl-UnwindSafe" class="impl has-srclink"><a href="#impl-UnwindSafe" class="anchor"></a><h3 class="code-header in-band">impl <a class="trait" href="https://doc.rust-lang.org/nightly/core/panic/unwind_safe/trait.UnwindSafe.html" title="trait core::panic::unwind_safe::UnwindSafe">UnwindSafe</a> for <a class="struct" href="struct.RISCV64.html" title="struct os::board::RISCV64">RISCV64</a></h3></section></div><h2 id="blanket-implementations" class="small-section-header">Blanket Implementations<a href="#blanket-implementations" class="anchor"></a></h2><div id="blanket-implementations-list"><details class="rustdoc-toggle implementors-toggle"><summary><section id="impl-Any" class="impl has-srclink"><span class="rightside"><a class="srclink" href="https://doc.rust-lang.org/nightly/src/core/any.rs.html#132-136">source</a></span><a href="#impl-Any" class="anchor"></a><h3 class="code-header in-band">impl<T> <a class="trait" href="https://doc.rust-lang.org/nightly/core/any/trait.Any.html" title="trait core::any::Any">Any</a> for T <span class="where fmt-newline">where<br> T: 'static + ?<a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>, </span></h3></section></summary><div class="impl-items"><details class="rustdoc-toggle method-toggle" open><summary><section id="method.type_id" class="method trait-impl has-srclink"><span class="rightside"><a class="srclink" href="https://doc.rust-lang.org/nightly/src/core/any.rs.html#133">source</a></span><a href="#method.type_id" class="anchor"></a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/nightly/core/any/trait.Any.html#tymethod.type_id" class="fnname">type_id</a>(&self) -> <a class="struct" href="https://doc.rust-lang.org/nightly/core/any/struct.TypeId.html" title="struct core::any::TypeId">TypeId</a></h4></section></summary><div class='docblock'><p>Gets the <code>TypeId</code> of <code>self</code>. <a href="https://doc.rust-lang.org/nightly/core/any/trait.Any.html#tymethod.type_id">Read more</a></p>
|
||||
</div></details></div></details><details class="rustdoc-toggle implementors-toggle"><summary><section id="impl-Borrow%3CT%3E" class="impl has-srclink"><span class="rightside"><a class="srclink" href="https://doc.rust-lang.org/nightly/src/core/borrow.rs.html#209-214">source</a></span><a href="#impl-Borrow%3CT%3E" class="anchor"></a><h3 class="code-header in-band">impl<T> <a class="trait" href="https://doc.rust-lang.org/nightly/core/borrow/trait.Borrow.html" title="trait core::borrow::Borrow">Borrow</a><T> for T <span class="where fmt-newline">where<br> T: ?<a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>, </span></h3></section></summary><div class="impl-items"><details class="rustdoc-toggle method-toggle" open><summary><section id="method.borrow" class="method trait-impl has-srclink"><span class="rightside"><span class="since" title="const unstable">const: <a href="https://github.com/rust-lang/rust/issues/91522" title="Tracking issue for const_borrow">unstable</a></span> · <a class="srclink" href="https://doc.rust-lang.org/nightly/src/core/borrow.rs.html#211">source</a></span><a href="#method.borrow" class="anchor"></a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/nightly/core/borrow/trait.Borrow.html#tymethod.borrow" class="fnname">borrow</a>(&self) -> <a class="primitive" href="https://doc.rust-lang.org/nightly/core/primitive.reference.html">&</a>T</h4></section></summary><div class='docblock'><p>Immutably borrows from an owned value. <a href="https://doc.rust-lang.org/nightly/core/borrow/trait.Borrow.html#tymethod.borrow">Read more</a></p>
|
||||
</div></details></div></details><details class="rustdoc-toggle implementors-toggle"><summary><section id="impl-BorrowMut%3CT%3E" class="impl has-srclink"><span class="rightside"><a class="srclink" href="https://doc.rust-lang.org/nightly/src/core/borrow.rs.html#218-222">source</a></span><a href="#impl-BorrowMut%3CT%3E" class="anchor"></a><h3 class="code-header in-band">impl<T> <a class="trait" href="https://doc.rust-lang.org/nightly/core/borrow/trait.BorrowMut.html" title="trait core::borrow::BorrowMut">BorrowMut</a><T> for T <span class="where fmt-newline">where<br> T: ?<a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>, </span></h3></section></summary><div class="impl-items"><details class="rustdoc-toggle method-toggle" open><summary><section id="method.borrow_mut" class="method trait-impl has-srclink"><span class="rightside"><span class="since" title="const unstable">const: <a href="https://github.com/rust-lang/rust/issues/91522" title="Tracking issue for const_borrow">unstable</a></span> · <a class="srclink" href="https://doc.rust-lang.org/nightly/src/core/borrow.rs.html#219">source</a></span><a href="#method.borrow_mut" class="anchor"></a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/nightly/core/borrow/trait.BorrowMut.html#tymethod.borrow_mut" class="fnname">borrow_mut</a>(&mut self) -> <a class="primitive" href="https://doc.rust-lang.org/nightly/core/primitive.reference.html">&mut </a>T</h4></section></summary><div class='docblock'><p>Mutably borrows from an owned value. <a href="https://doc.rust-lang.org/nightly/core/borrow/trait.BorrowMut.html#tymethod.borrow_mut">Read more</a></p>
|
||||
|
@ -13,5 +13,5 @@
|
||||
</div></details><details class="rustdoc-toggle" open><summary><div id="tymethod.exit_success" class="method has-srclink"><div class="rightside"><a class="srclink" href="../../src/os/boards/qemu.rs.html#66">source</a></div><h4 class="code-header">fn <a href="#tymethod.exit_success" class="fnname">exit_success</a>(&self) -> <a class="primitive" href="https://doc.rust-lang.org/nightly/core/primitive.never.html">!</a></h4></div></summary><div class="docblock"><p>Exit QEMU using <code>EXIT_SUCCESS</code>, aka <code>0</code>, if possible.</p>
|
||||
<p>Note: Not possible for <code>X86</code>.</p>
|
||||
</div></details><details class="rustdoc-toggle" open><summary><div id="tymethod.exit_failure" class="method has-srclink"><div class="rightside"><a class="srclink" href="../../src/os/boards/qemu.rs.html#69">source</a></div><h4 class="code-header">fn <a href="#tymethod.exit_failure" class="fnname">exit_failure</a>(&self) -> <a class="primitive" href="https://doc.rust-lang.org/nightly/core/primitive.never.html">!</a></h4></div></summary><div class="docblock"><p>Exit QEMU using <code>EXIT_FAILURE</code>, aka <code>1</code>.</p>
|
||||
</div></details></div><h2 id="implementors" class="small-section-header">Implementors<a href="#implementors" class="anchor"></a></h2><div class="item-list" id="implementors-list"><section id="impl-QEMUExit" class="impl has-srclink"><span class="rightside"><a class="srclink" href="../../src/os/boards/qemu.rs.html#91-123">source</a></span><a href="#impl-QEMUExit" class="anchor"></a><h3 class="code-header in-band">impl <a class="trait" href="trait.QEMUExit.html" title="trait os::board::QEMUExit">QEMUExit</a> for <a class="struct" href="struct.RISCV64.html" title="struct os::board::RISCV64">RISCV64</a></h3></section></div><script type="text/javascript" src="../../implementors/os/board/trait.QEMUExit.js" async></script></section><section id="search" class="content hidden"></section></div></main><div id="rustdoc-vars" data-root-path="../../" data-current-crate="os" data-themes="ayu,dark,light" data-resource-suffix="" data-rustdoc-version="1.62.0-nightly (1f7fb6413 2022-04-10)" ></div>
|
||||
</div></details></div><h2 id="implementors" class="small-section-header">Implementors<a href="#implementors" class="anchor"></a></h2><div class="item-list" id="implementors-list"><section id="impl-QEMUExit" class="impl has-srclink"><span class="rightside"><a class="srclink" href="../../src/os/boards/qemu.rs.html#90-122">source</a></span><a href="#impl-QEMUExit" class="anchor"></a><h3 class="code-header in-band">impl <a class="trait" href="trait.QEMUExit.html" title="trait os::board::QEMUExit">QEMUExit</a> for <a class="struct" href="struct.RISCV64.html" title="struct os::board::RISCV64">RISCV64</a></h3></section></div><script type="text/javascript" src="../../implementors/os/board/trait.QEMUExit.js" async></script></section><section id="search" class="content hidden"></section></div></main><div id="rustdoc-vars" data-root-path="../../" data-current-crate="os" data-themes="ayu,dark,light" data-resource-suffix="" data-rustdoc-version="1.62.0-nightly (1f7fb6413 2022-04-10)" ></div>
|
||||
</body></html>
|
@ -129,12 +129,11 @@
|
||||
<span id="124">124</span>
|
||||
<span id="125">125</span>
|
||||
<span id="126">126</span>
|
||||
<span id="127">127</span>
|
||||
</pre><pre class="rust"><code><span class="kw">pub</span> <span class="kw">const</span> <span class="ident">CLOCK_FREQ</span>: <span class="ident">usize</span> <span class="op">=</span> <span class="number">12500000</span>;
|
||||
|
||||
<span class="kw">pub</span> <span class="kw">const</span> <span class="ident">MMIO</span>: <span class="kw-2">&</span>[(<span class="ident">usize</span>, <span class="ident">usize</span>)] <span class="op">=</span> <span class="kw-2">&</span>[
|
||||
(<span class="number">0x1000_0000</span>, <span class="number">0x1000</span>), <span class="comment">// VIRT_UART0 in virt machine</span>
|
||||
(<span class="number">0x1000_1000</span>, <span class="number">0x1000</span>), <span class="comment">// VIRT_VIRTIO in virt machine </span>
|
||||
(<span class="number">0x1000_1000</span>, <span class="number">0x1000</span>), <span class="comment">// VIRT_VIRTIO in virt machine</span>
|
||||
(<span class="number">0x0C00_0000</span>, <span class="number">0x40_0000</span>), <span class="comment">// VIRT_PLIC in virt machine</span>
|
||||
(<span class="number">0x0010_0000</span>, <span class="number">0x00_2000</span>), <span class="comment">// VIRT_TEST/RTC in virt machine</span>
|
||||
];
|
||||
@ -183,7 +182,7 @@
|
||||
<span class="kw">const</span> <span class="ident">EXIT_SUCCESS</span>: <span class="ident">u32</span> <span class="op">=</span> <span class="number">0x5555</span>; <span class="comment">// Equals `exit(0)`. qemu successful exit</span>
|
||||
|
||||
<span class="kw">const</span> <span class="ident">EXIT_FAILURE_FLAG</span>: <span class="ident">u32</span> <span class="op">=</span> <span class="number">0x3333</span>;
|
||||
<span class="kw">const</span> <span class="ident">EXIT_FAILURE</span>: <span class="ident">u32</span> <span class="op">=</span> <span class="ident">exit_code_encode</span>(<span class="number">1</span>); <span class="comment">// Equals `exit(1)`. qemu failed exit </span>
|
||||
<span class="kw">const</span> <span class="ident">EXIT_FAILURE</span>: <span class="ident">u32</span> <span class="op">=</span> <span class="ident">exit_code_encode</span>(<span class="number">1</span>); <span class="comment">// Equals `exit(1)`. qemu failed exit</span>
|
||||
<span class="kw">const</span> <span class="ident">EXIT_RESET</span>: <span class="ident">u32</span> <span class="op">=</span> <span class="number">0x7777</span>; <span class="comment">// qemu reset</span>
|
||||
|
||||
<span class="kw">pub</span> <span class="kw">trait</span> <span class="ident">QEMUExit</span> {
|
||||
@ -201,7 +200,6 @@
|
||||
<span class="kw">fn</span> <span class="ident">exit_failure</span>(<span class="kw-2">&</span><span class="self">self</span>) -> <span class="op">!</span>;
|
||||
}
|
||||
|
||||
|
||||
<span class="doccomment">/// RISCV64 configuration</span>
|
||||
<span class="kw">pub</span> <span class="kw">struct</span> <span class="ident">RISCV64</span> {
|
||||
<span class="doccomment">/// Address of the sifive_test mapped device.</span>
|
||||
@ -254,7 +252,7 @@
|
||||
}
|
||||
}
|
||||
|
||||
<span class="kw">const</span> <span class="ident">VIRT_TEST</span>: <span class="ident">u64</span> <span class="op">=</span><span class="number">0x100000</span>;
|
||||
<span class="kw">const</span> <span class="ident">VIRT_TEST</span>: <span class="ident">u64</span> <span class="op">=</span> <span class="number">0x100000</span>;
|
||||
|
||||
<span class="kw">pub</span> <span class="kw">const</span> <span class="ident">QEMU_EXIT_HANDLE</span>: <span class="ident">RISCV64</span> <span class="op">=</span> <span class="ident">RISCV64::new</span>(<span class="ident">VIRT_TEST</span>);
|
||||
</code></pre></div>
|
||||
|
Loading…
Reference in New Issue
Block a user