<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:content="http://purl.org/rss/1.0/modules/content/">
  <channel>
    <title>RISC-V on memory</title>
    <link>https://mem.leabol.top/tags/risc-v/</link>
    <description>Recent content in RISC-V on memory</description>
    <generator>Hugo</generator>
    <language>zh-cn</language>
    <lastBuildDate>Thu, 11 Jun 2026 00:00:00 +0000</lastBuildDate>
    <atom:link href="https://mem.leabol.top/tags/risc-v/index.xml" rel="self" type="application/rss+xml" />
    <item>
      <title>RISC-V trap / syscall / trampoline 机制完整解析</title>
      <link>https://mem.leabol.top/posts/xv6/risc-v-trap-%E6%9C%BA%E5%88%B6%E5%AE%8C%E6%95%B4%E8%A7%A3%E6%9E%90/</link>
      <pubDate>Thu, 11 Jun 2026 00:00:00 +0000</pubDate>
      <guid>https://mem.leabol.top/posts/xv6/risc-v-trap-%E6%9C%BA%E5%88%B6%E5%AE%8C%E6%95%B4%E8%A7%A3%E6%9E%90/</guid>
      <description>&lt;h1 id=&#34;risc-v-trap--syscall--trampoline-机制完整解析&#34;&gt;RISC-V Trap / Syscall / Trampoline 机制完整解析&lt;/h1&gt;
&lt;hr&gt;
&lt;h1 id=&#34;一整体流程概览&#34;&gt;一、整体流程概览&lt;/h1&gt;
&lt;h2 id=&#34;11-总览&#34;&gt;1.1 总览&lt;/h2&gt;
&lt;p&gt;用户态通过 &lt;code&gt;ecall&lt;/code&gt; 触发异常 → 硬件最小保存 → 跳转到 &lt;code&gt;stvec&lt;/code&gt; → trampoline 完成上下文保存 + 切页表 → 进入内核 → 执行 syscall → 再通过 trampoline 返回用户态。&lt;/p&gt;</description>
    </item>
  </channel>
</rss>
