FPGA開発日記

カテゴリ別記事インデックス https://msyksphinz.github.io/github_pages , English Version https://fpgadevdiary.hatenadiary.com/

RISC-V の Privileged Instruction Set の仕様書Ver1.7が公開

今朝MLで飛んでいたが、RISC-VのPrivileged Instruction SetのVer1.7が公開されたようだ。

RISC-V Draft Privileged Architecture Version 1.7 Released | RISC-V BLOG

http://www.eecs.berkeley.edu/Pubs/TechRpts/2015/EECS-2015-49.pdf

55ページある。ユーザモードの命令仕様書が100ページくらいだから、まあそんな感じだろうか。

  1. Introduction
  2. Control and Status Registers (CSRs)
  3. Machine-Level ISA
  4. Supervisor-Level ISA
  5. Hypervisor-Level ISA
  6. RISC-V Privileged Instruction Set Listings

とりあえず概念的なところだけピックアップしていくと、まずは以下のような階層レイヤになっている。

(上記仕様書から抜粋)

f:id:msyksphinz:20150510141652j:plain

権限は「ユーザモード」「スーパバイザモード」「ハイパーバイザーモード」「マシンモード」の4種類。後者になるほど権限が高くなる。

Although none are currently defined, future hypervisor-level ISA extensions will be added to
improve virtualization performance. One common feature to support hypervisors is to provide
a second level of translation and protection, from supervisor physical addresses to hypervisor
physical addresses.

えー。でもまあ、とりあえず最低限の実装としてはマシンモードがあればよく、次にユーザモードを持っているのが良いらしい。

  1. レベル1: マシンモード
  2. レベル2: マシンモード、ユーザモード
  3. レベル3: マシンモード、スーパバイザモード、ユーザモード
  4. レベル4: マシンモード、ハイパーバイザモード、スーパバイザモード、ユーザモード