mirror of
https://github.com/rcore-os/rCore-Tutorial-v3.git
synced 2024-11-24 10:26:25 +04:00
deploy: 4ceb50d702
This commit is contained in:
parent
5054212f56
commit
ba0c1e6369
@ -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::sbi</a></h2><div id="sidebar-vars" data-name="console_getchar" 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">sbi</a>::<wbr><a class="fn" href="#">console_getchar</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/sbi.rs.html#36-38">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>pub fn console_getchar() -> <a class="primitive" href="https://doc.rust-lang.org/nightly/core/primitive.usize.html">usize</a></code></pre></div><details class="rustdoc-toggle top-doc" open><summary class="hideme"><span>Expand description</span></summary><div class="docblock"><p>use sbi call to getchar from console (qemu uart handler)</p>
|
||||
<h1 class="fqn"><span class="in-band">Function <a href="../index.html">os</a>::<wbr><a href="index.html">sbi</a>::<wbr><a class="fn" href="#">console_getchar</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/sbi.rs.html#37-39">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>pub fn console_getchar() -> <a class="primitive" href="https://doc.rust-lang.org/nightly/core/primitive.usize.html">usize</a></code></pre></div><details class="rustdoc-toggle top-doc" open><summary class="hideme"><span>Expand description</span></summary><div class="docblock"><p>use sbi call to getchar from console (qemu uart handler)</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,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::sbi</a></h2><div id="sidebar-vars" data-name="console_putchar" 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">sbi</a>::<wbr><a class="fn" href="#">console_putchar</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/sbi.rs.html#31-33">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>pub fn console_putchar(c: <a class="primitive" href="https://doc.rust-lang.org/nightly/core/primitive.usize.html">usize</a>)</code></pre></div><details class="rustdoc-toggle top-doc" open><summary class="hideme"><span>Expand description</span></summary><div class="docblock"><p>use sbi call to putchar in console (qemu uart handler)</p>
|
||||
<h1 class="fqn"><span class="in-band">Function <a href="../index.html">os</a>::<wbr><a href="index.html">sbi</a>::<wbr><a class="fn" href="#">console_putchar</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/sbi.rs.html#32-34">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>pub fn console_putchar(c: <a class="primitive" href="https://doc.rust-lang.org/nightly/core/primitive.usize.html">usize</a>)</code></pre></div><details class="rustdoc-toggle top-doc" open><summary class="hideme"><span>Expand description</span></summary><div class="docblock"><p>use sbi call to putchar in console (qemu uart handler)</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,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::sbi</a></h2><div id="sidebar-vars" data-name="sbi_call" 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">sbi</a>::<wbr><a class="fn" href="#">sbi_call</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/sbi.rs.html#16-28">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>fn sbi_call(which: <a class="primitive" href="https://doc.rust-lang.org/nightly/core/primitive.usize.html">usize</a>, arg0: <a class="primitive" href="https://doc.rust-lang.org/nightly/core/primitive.usize.html">usize</a>, arg1: <a class="primitive" href="https://doc.rust-lang.org/nightly/core/primitive.usize.html">usize</a>, arg2: <a class="primitive" href="https://doc.rust-lang.org/nightly/core/primitive.usize.html">usize</a>) -> <a class="primitive" href="https://doc.rust-lang.org/nightly/core/primitive.usize.html">usize</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">Function <a href="../index.html">os</a>::<wbr><a href="index.html">sbi</a>::<wbr><a class="fn" href="#">sbi_call</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/sbi.rs.html#16-29">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>fn sbi_call(which: <a class="primitive" href="https://doc.rust-lang.org/nightly/core/primitive.usize.html">usize</a>, arg0: <a class="primitive" href="https://doc.rust-lang.org/nightly/core/primitive.usize.html">usize</a>, arg1: <a class="primitive" href="https://doc.rust-lang.org/nightly/core/primitive.usize.html">usize</a>, arg2: <a class="primitive" href="https://doc.rust-lang.org/nightly/core/primitive.usize.html">usize</a>) -> <a class="primitive" href="https://doc.rust-lang.org/nightly/core/primitive.usize.html">usize</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,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::sbi</a></h2><div id="sidebar-vars" data-name="shutdown" 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">sbi</a>::<wbr><a class="fn" href="#">shutdown</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/sbi.rs.html#41-44">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>pub fn shutdown() -> <a class="primitive" href="https://doc.rust-lang.org/nightly/core/primitive.never.html">!</a></code></pre></div><details class="rustdoc-toggle top-doc" open><summary class="hideme"><span>Expand description</span></summary><div class="docblock"><p>use sbi call to shutdown the kernel</p>
|
||||
<h1 class="fqn"><span class="in-band">Function <a href="../index.html">os</a>::<wbr><a href="index.html">sbi</a>::<wbr><a class="fn" href="#">shutdown</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/sbi.rs.html#42-45">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>pub fn shutdown() -> <a class="primitive" href="https://doc.rust-lang.org/nightly/core/primitive.never.html">!</a></code></pre></div><details class="rustdoc-toggle top-doc" open><summary class="hideme"><span>Expand description</span></summary><div class="docblock"><p>use sbi call to shutdown the kernel</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 sbi</a></h2><div class="sidebar-elems"><section><div class="block"><ul><li><a href="#constants">Constants</a></li><li><a href="#functions">Functions</a></li></ul></div></section><div id="sidebar-vars" data-name="sbi" 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="#">sbi</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/sbi.rs.html#1-44">source</a> · <a id="toggle-all-docs" href="javascript:void(0)" title="collapse all docs">[<span class="inner">−</span>]</a></span></div><h2 id="constants" class="small-section-header"><a href="#constants">Constants</a></h2>
|
||||
<h1 class="fqn"><span class="in-band">Module <a href="../index.html">os</a>::<wbr><a class="mod" href="#">sbi</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/sbi.rs.html#1-45">source</a> · <a id="toggle-all-docs" href="javascript:void(0)" title="collapse all docs">[<span class="inner">−</span>]</a></span></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.SBI_CLEAR_IPI.html" title="os::sbi::SBI_CLEAR_IPI constant">SBI_CLEAR_IPI</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.SBI_CONSOLE_GETCHAR.html" title="os::sbi::SBI_CONSOLE_GETCHAR constant">SBI_CONSOLE_GETCHAR</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.SBI_CONSOLE_PUTCHAR.html" title="os::sbi::SBI_CONSOLE_PUTCHAR constant">SBI_CONSOLE_PUTCHAR</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.SBI_REMOTE_FENCE_I.html" title="os::sbi::SBI_REMOTE_FENCE_I constant">SBI_REMOTE_FENCE_I</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.SBI_REMOTE_SFENCE_VMA.html" title="os::sbi::SBI_REMOTE_SFENCE_VMA constant">SBI_REMOTE_SFENCE_VMA</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.SBI_REMOTE_SFENCE_VMA_ASID.html" title="os::sbi::SBI_REMOTE_SFENCE_VMA_ASID constant">SBI_REMOTE_SFENCE_VMA_ASID</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.SBI_SEND_IPI.html" title="os::sbi::SBI_SEND_IPI constant">SBI_SEND_IPI</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.SBI_SET_TIMER.html" title="os::sbi::SBI_SET_TIMER constant">SBI_SET_TIMER</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.SBI_SHUTDOWN.html" title="os::sbi::SBI_SHUTDOWN constant">SBI_SHUTDOWN</a><span title="Restricted Visibility"> 🔒</span> </div><div class="item-right docblock-short"></div></div></div><h2 id="functions" class="small-section-header"><a href="#functions">Functions</a></h2>
|
||||
<div class="item-table"><div class="item-row"><div class="item-left module-item"><a class="fn" href="fn.console_getchar.html" title="os::sbi::console_getchar fn">console_getchar</a></div><div class="item-right docblock-short"><p>use sbi call to getchar from console (qemu uart handler)</p>
|
||||
</div></div><div class="item-row"><div class="item-left module-item"><a class="fn" href="fn.console_putchar.html" title="os::sbi::console_putchar fn">console_putchar</a></div><div class="item-right docblock-short"><p>use sbi call to putchar in console (qemu uart handler)</p>
|
||||
|
@ -47,6 +47,7 @@
|
||||
<span id="42">42</span>
|
||||
<span id="43">43</span>
|
||||
<span id="44">44</span>
|
||||
<span id="45">45</span>
|
||||
</pre><pre class="rust"><code><span class="attribute">#![<span class="ident">allow</span>(<span class="ident">unused</span>)]</span>
|
||||
|
||||
<span class="kw">use</span> <span class="ident">core::arch::asm</span>;
|
||||
@ -66,6 +67,7 @@
|
||||
<span class="kw">let</span> <span class="kw-2">mut</span> <span class="ident">ret</span>;
|
||||
<span class="kw">unsafe</span> {
|
||||
<span class="macro">asm!</span>(
|
||||
<span class="string">"li x16, 0"</span>,
|
||||
<span class="string">"ecall"</span>,
|
||||
<span class="ident">inlateout</span>(<span class="string">"x10"</span>) <span class="ident">arg0</span> => <span class="ident">ret</span>,
|
||||
<span class="kw">in</span>(<span class="string">"x11"</span>) <span class="ident">arg1</span>,
|
||||
|
Loading…
Reference in New Issue
Block a user