Skip to content

Commit

Permalink
Deployed c4f4e40 with MkDocs version: 1.5.3
Browse files Browse the repository at this point in the history
  • Loading branch information
Unknown committed Dec 11, 2023
1 parent 34bec40 commit e99ad36
Show file tree
Hide file tree
Showing 4 changed files with 73 additions and 73 deletions.
8 changes: 4 additions & 4 deletions blog/操作系统---lab4-用户态/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -1318,10 +1318,10 @@ <h2 id="kernel">kernel 执行流程<a class="headerlink" href="#kernel" title="A
</ol>
<h2 id="_1">注意事项<a class="headerlink" href="#_1" title="Anchor link to this section for reference">&para;</a></h2>
<h3 id="uapp">uapp 的加载<a class="headerlink" href="#uapp" title="Anchor link to this section for reference">&para;</a></h3>
<p>在 vmlinux.lds 中,我们指定了 uapp.S 文件会被加载到 _sramdisk,_eramdisk 之间</p>
<p>在 vmlinux.lds 中,我们指定的 uapp.S 文件会被加载到 _sramdisk,_eramdisk 之间</p>
<ul>
<li>如果 uapp.S 中我们用的是纯二进制文件,那么_sramdisk 第一行就是程序第一行</li>
<li>如果 uapp.S 中我们用的是 elf 文件,我们需要解码 elf 头来定位具体的文件位置</li>
<li>如果 uapp.S 中我们用的是 elf 文件,我们需要解码 elf 头来定位具体的二进制位置, 同时elf中也制定了程序入口一类的信息</li>
</ul>
<h3 id="phdr-p_flags">phdr-&gt;p_flags<a class="headerlink" href="#phdr-p_flags" title="Anchor link to this section for reference">&para;</a></h3>
<p>注意这一项虽然是声明权限的的但定义不等同于页表项的 perm,定义如下:</p>
Expand All @@ -1335,7 +1335,7 @@ <h3 id="_4">栈切换<a class="headerlink" href="#_4" title="Anchor link to this
<p>这一检查需要用到额外的寄存器(如 t0),但是我们是要保证 t0 的值在中断前后值不变,所以不能直接用,需要先压栈,返回之前记得恢复</p>
<div class="admonition bug">
<p class="admonition-title">Bug</p>
<p>这里提到的压栈的办法在此处仍然可行,但在Lab5中会遇到问题,现在有一个更好用也更简洁的<a href="https://stormckey.github.io/blog/%E6%93%8D%E4%BD%9C%E7%B3%BB%E7%BB%9F---lab5-demand-paging/"><span class="twemoji"><svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16"><path d="m7.775 3.275 1.25-1.25a3.5 3.5 0 1 1 4.95 4.95l-2.5 2.5a3.5 3.5 0 0 1-4.95 0 .751.751 0 0 1 .018-1.042.751.751 0 0 1 1.042-.018 1.998 1.998 0 0 0 2.83 0l2.5-2.5a2.002 2.002 0 0 0-2.83-2.83l-1.25 1.25a.751.751 0 0 1-1.042-.018.751.751 0 0 1-.018-1.042Zm-4.69 9.64a1.998 1.998 0 0 0 2.83 0l1.25-1.25a.751.751 0 0 1 1.042.018.751.751 0 0 1 .018 1.042l-1.25 1.25a3.5 3.5 0 1 1-4.95-4.95l2.5-2.5a3.5 3.5 0 0 1 4.95 0 .751.751 0 0 1-.018 1.042.751.751 0 0 1-1.042.018 1.998 1.998 0 0 0-2.83 0l-2.5 2.5a1.998 1.998 0 0 0 0 2.83Z"/></svg></span>方法</a></p>
<p>这里提到的压栈的办法在此处仍然可行,但在Lab5中会遇到问题,现在有一个更好用也更简洁的<a href="https://stormckey.github.io/blog/%E6%93%8D%E4%BD%9C%E7%B3%BB%E7%BB%9F---lab5-demand-paging/#_1"><span class="twemoji"><svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16"><path d="m7.775 3.275 1.25-1.25a3.5 3.5 0 1 1 4.95 4.95l-2.5 2.5a3.5 3.5 0 0 1-4.95 0 .751.751 0 0 1 .018-1.042.751.751 0 0 1 1.042-.018 1.998 1.998 0 0 0 2.83 0l2.5-2.5a2.002 2.002 0 0 0-2.83-2.83l-1.25 1.25a.751.751 0 0 1-1.042-.018.751.751 0 0 1-.018-1.042Zm-4.69 9.64a1.998 1.998 0 0 0 2.83 0l1.25-1.25a.751.751 0 0 1 1.042.018.751.751 0 0 1 .018 1.042l-1.25 1.25a3.5 3.5 0 1 1-4.95-4.95l2.5-2.5a3.5 3.5 0 0 1 4.95 0 .751.751 0 0 1-.018 1.042.751.751 0 0 1-1.042.018 1.998 1.998 0 0 0-2.83 0l-2.5 2.5a1.998 1.998 0 0 0 0 2.83Z"/></svg></span>方法</a></p>
</div>


Expand All @@ -1359,7 +1359,7 @@ <h3 id="_4">栈切换<a class="headerlink" href="#_4" title="Anchor link to this
<span class="md-icon" title="Last update">
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M21 13.1c-.1 0-.3.1-.4.2l-1 1 2.1 2.1 1-1c.2-.2.2-.6 0-.8l-1.3-1.3c-.1-.1-.2-.2-.4-.2m-1.9 1.8-6.1 6V23h2.1l6.1-6.1-2.1-2M12.5 7v5.2l4 2.4-1 1L11 13V7h1.5M11 21.9c-5.1-.5-9-4.8-9-9.9C2 6.5 6.5 2 12 2c5.3 0 9.6 4.1 10 9.3-.3-.1-.6-.2-1-.2s-.7.1-1 .2C19.6 7.2 16.2 4 12 4c-4.4 0-8 3.6-8 8 0 4.1 3.1 7.5 7.1 7.9l-.1.2v1.8Z"/></svg>
</span>
<span class="git-revision-date-localized-plugin git-revision-date-localized-plugin-date">December 10, 2023</span>
<span class="git-revision-date-localized-plugin git-revision-date-localized-plugin-date">December 11, 2023</span>
</span>


Expand Down
2 changes: 1 addition & 1 deletion search/search_index.json

Large diffs are not rendered by default.

Loading

0 comments on commit e99ad36

Please sign in to comment.