← Back to Blog
ISA Standard

SJTU IPADS SPMP Ratified into RISC-V ISA — First China-Led ISA Extension in RISC-V’s 11-Year History

SPMP SJTU IPADS RISC-V Privileged ISA Memory Protection TEE XiangShan

TL;DR: On August 31, 2026 the RISC-V International Board of Directors formally approved the SPMP (Supervisor Physical Memory Protection) extension after a seven-year technical campaign led by Shanghai Jiao Tong University’s IPADS team — Du Dongdong, Yang Bicheng, Xia Yubin, and Chen Haibo. SPMP is the first ISA extension ever defined end-to-end by a Chinese team since RISC-V was founded in 2015. It adds a compact hardware register file that lets a machine-mode (M-mode) hypervisor enforce physical-address range checks on supervisor accesses with a single-cycle lookup, replacing the page-table walks that dominate runtime cost in TEE / confidential-computing flows on resource-constrained RISC-V SoCs. SPMP is shipping in the XiangShan open-source core and is deployed in commercial silicon from Nuclei and other vendors.

Why a Memory-Protection Extension for M-Mode?

On every mainstream architecture, the operating system relies on page tables to translate virtual addresses into physical addresses and to gate memory access permissions. The IPADS team uses a vivid analogy for their pitch to the RISC-V community: a campus with a multi-tier access index.

“A multi-tier index is fine for a sprawling campus where anyone might want to visit any building. But many RISC-V targets — AI chips, automotive MCUs, smart-terminal SoCs, IIoT controllers — are more like a fixed-layout enclosed park. Function regions are pre-assigned, and bolting a multi-tier lookup onto that is using a sledgehammer to crack a nut.”

Page-table walks cost area (TLB + walker state), power (extra memory traffic on misses), and latency (two to four dependent memory accesses on first miss). For chips that already know the address layout at design time — the address map is fixed by the SoC integrator — the page table is redundant.

SPMP takes the opposite approach: keep a small set of physical-address sticky notes in dedicated CSRs, and consult them in one cycle whenever a memory access crosses into M-mode or S-mode.

What problem does this actually solve? Machine-mode firmware and hypervisors today have to either (a) trust S-mode software completely, or (b) emulate page-table enforcement in software, which is slow and inconsistent across implementations. SPMP gives hardware vendors a deterministic, one-cycle enforcement primitive that fits in <1% of a small RISC-V core’s area budget.

The SPMP Hardware Model

SPMP introduces a new class of CSR — the SPMPADDR entries — that record physical-address regions. Each entry is a base-and-length pair (encoded as address-aligned start plus size or as start+end depending on mode) plus permission flags:

  • R / W / X — read / write / execute permissions
  • L (Locked) — once set, the entry cannot be modified until the next system reset; this is the TEE anchor
  • M-mode enforcement selector — controls whether M-mode loads/stores are checked against the entry
  • S-mode enforcement selector — parallel control for S-mode accesses

A reference configuration supports up to 8 or 16 SPMP entries depending on profile, with an extension hook for vendor-defined wider configurations. Entries are checked in parallel against the target physical address, and the first match wins; if no entry matches, access falls through to the default policy controlled by mseccfg.SPMPCFG.

Locked entries are the security anchor. A hypervisor can lock a region’s SPMP entry after programming it. Once locked, the entry cannot be softened — not by an untrusted S-mode kernel, not by a later bootloader stage, not by a DMA engine. This is the hardware root of trust for lightweight TEEs.

Encoding & CSR Surface

SPMP occupies three new CSRs in the machine-mode privileged spec:

  • spmpcfg0…spmpcfgN — configuration / permission / lock bits for each entry (WARL)
  • spmpaddr0…spmpaddrN — the address for each entry (in NAPOT or NA4 mode)
  • seccfg.SPMPCFG — top-level enforcement enable plus global defaults

Two addressing modes are supported to give integrators flexibility:

Mode Encoding Granularity Best For
NA4 Naturally-aligned 4-byte 4 B Register-level isolation, single variables
NAPOT Naturally-aligned power-of-two 8 B – 4 GB Buffer / mailbox / firmware-region isolation

The spmpaddr register holds bits [paddrhi : paddrlo] shifted by one bit to make room for the mode field, mirroring the encoding style used by the original PMP. This means that vendor tooling that already understands PMP can be extended with minimal effort.

Tooling note: The IPADS team worked with the GNU and LLVM RISC-V backends to add SPMP-aware intrinsics (__riscv_spmp_set, __riscv_spmp_lock) and a -march=rv64imac_spmp target flag. Binutils and GDB gained read/write support in the 2.42 and 16.x release lines.

SPMP vs PMP vs Page Tables

RISC-V already shipped the PMP (Physical Memory Protection) unit for many years. PMP applies only to M-mode accesses; SPMP extends that model to S-mode accesses while still respecting M-mode, and adds the lock primitive as a first-class concept.

Feature PMP (legacy) SPMP (new) Page Tables (Sv32 / Sv39 / Sv57)
Lookup cost 1 cycle 1 cycle 2–4 cycles on miss (TLB refill)
Hardware state ≤64 entries, 4–8 B each 8 / 16 entries, < 1 KB total TLB + walker: 4–16 KB
Virtual-address aware No (physical) No (physical) Yes
Covers S-mode? No Yes Yes (via PTW)
Lockable per entry Yes Yes, with finer-grained M/S split N/A
Best fit M-mode firmware isolation TEE / hypervisor / shared-buffer isolation on edge chips General-purpose OS, virtual memory

The crucial difference: page tables solve the open-world problem where any process may live at any virtual address. SPMP solves the closed-world problem where the address map is known at integration time and isolation is the only thing that matters.

Workloads That Benefit

SPMP is purpose-built for the workloads that have made RISC-V dominant in AI chips, IoT MCUs, and IIoT controllers:

  • Edge AI SoCs — protect model weights from a compromised inference engine; lock the TEE anchor that decrypts weights at boot.
  • Automotive MCUs — ASIL-D-grade isolation of safety firmware from non-safety firmware without paying for a full MMU.
  • Smart-terminal and wearable SoCs — sandbox secure elements (payment tokens, biometric templates) on a chip that has no MMU.
  • Industrial IoT controllers — isolate PLC firmware updates from runtime control code without a hypervisor.
  • Confidential computing — lightweight TEE attestation without paying for hardware page-table walks on every transition.

Seven Years from Sketch to BoD Approval

The SPMP journey began in earnest on September 23, 2019, when the IPADS team submitted the initial architecture draft to the RISC-V community. The path from sketch to ratification ran through:

  • 2019 Q4 – 2021: Architecture design, formal model in Sail, and the first XiangShan integration. Yang Bicheng served as the SPMP working group chair throughout.
  • 2022 – 2024: Multiple public review cycles, addressing community concerns about CSR-space consumption, lock-state recovery on debug, and compatibility with existing PMP users.
  • 2025: Final architecture freeze; cross-implementation verification on FPGA prototypes; toolchain patches merged into GNU and LLVM.
  • 2026 Q3 (August 31): Formal Board of Directors approval — the BoD vote came after the TSC technical freeze and the Architecture Review Committee’s final sign-off.

Why this matters symbolically: Bao Yangang (包云岗), Vice Chairman of the RISC-V International Board and Deputy Director of the CAS Institute of Computing Technology, called SPMP a “first zero-to-one moment for Chinese teams in RISC-V ISA extension authorship. It not only materially strengthens RISC-V’s security architecture — it sets a vivid example for domestic institutions to engage deeply with international standard setting.”

Deployment Today: XiangShan, Nuclei, Rivos

SPMP is not a paper standard. Three independent silicon-and-IP paths have already shipped:

  • XiangShan (香山) — the open-source high-performance RISC-V core from CAS Institute of Computing Technology. SPMP is the default isolation primitive for the secure-boot and TEE flows on Kunming Lake and Yanqi Lake revisions.
  • Nuclei (芯来科技) — the leading domestic commercial RISC-V IP vendor. SPMP is exposed in the N-series UX10 / UX10B profiles targeting AIoT and IIoT SoCs.
  • Other adopters — several commercial SoC vendors have integrated SPMP into their 2025–2026 product flows; FPGA emulation targets are public on IPADS’ GitLab.

How to use SPMP today

If you have a RISC-V toolchain built after mid-2026, SPMP is available out of the box:

# Compile a C program that locks a region via SPMP intrinsics # Compile with SPMP support (GCC 14+ / LLVM 19+) riscv64-unknown-linux-gnu-gcc -march=rv64imac_zicsr_spmp \ -mabi=lp64 -O2 -o teeset teeset.c # At runtime: lock the secure mailbox region # (the L bit survives any later M-mode CSR write attempts) __riscv_spmp_set(0, MAILBOX_PHYS_BASE, NAPOT_4KB, RW, LOCKED); __riscv_spmp_set(1, MODEL_WEIGHTS_BASE, NAPOT_8MB, R, LOCKED);

For bare-metal environments without an OS, IPADS publishes a reference spmp_init.S in the XiangShan repository that programs the entries during boot and then locks them before handing off to S-mode.

Official Sources

摘要:2026 年 8 月 31 日,RISC-V 国际基金会董事会正式审议通过由上海交通大学计算机学院并行与分布式系统研究所(IPADS)主导的 SPMP(Supervisor Physical Memory Protection) 指令集扩展。这是 RISC-V 自 2015 年成立以来,首个由中国本土团队从零起步、自主发起并完整主导制定的 ISA 标准特性。SPMP 用一组小型 CSR “便签条"取代传统页表的复杂多级查找,为 AI 芯片、车载 MCU、智能终端、工业控制器等对功耗与面积敏感的场景提供硬件级、轻量级、高确定性的内存隔离与可信执行环境锚点。SPMP 已在香山、芯来等国产 RISC-V 内核与商业芯片上落地。

为什么需要这个扩展

传统页表是多层级索引系统:访客凭门禁卡进入大型园区时,要先到总服务台查园区总索引确定楼栋,再到对应楼栋查分索引确定楼层,最后到楼层确认具体房间。每次都要层层查询,开销极大。在 AI 芯片、车载 MCU、智能终端、工业控制器等封闭园区式场景中,功能区域事先划定,再配一套庞大的多级索引系统无疑是杀鸡用牛刀。

SPMP 的硬件模型

SPMP 用 SPMPADDR 系列 CSR 记录若干物理地址区间(起始地址、长度与权限),每次访存只做一次寄存器查询即可当场决策,无任何多级地址转换和内存查询,从而在极小的硬件面积和功耗下实现灵活的安全隔离。

  • R / W / X 位 — 读 / 写 / 执行权限
  • L(Locked)位 — 锁定后任何后续软件都无法改写,是可信执行环境的硬件锚点
  • M / S 模式独立控制位 — 同一区间对 M-mode 与 S-mode 可设置不同强制策略

对比:PMP / SPMP / 页表

特性PMPSPMP页表
查询成本1 周期1 周期缺页时 2-4 周期
硬件状态≤64 条目8 / 16 条目TLB + walker
覆盖 S-mode
每条可锁定是,M/S 独立不适用

受益场景

  • 边缘 AI SoC — 保护模型权重与推理引擎隔离
  • 车载 MCU — ASIL-D 安全固件与非安全固件隔离
  • 智能终端 / 可穿戴 — 沙箱化安全元件
  • 工业 IoT 控制器 — PLC 升级与运行时隔离
  • 机密计算 — 轻量级 TEE 锚点

七年攻关

2019 年 9 月 23 日 IPADS 提交架构初稿 → 2026 年 8 月 31 日 BoD 通过。杨 Bicheng 长期担任 SPMP 工作组主席。已落地于香山(昆明湖、雁栖湖版本)、芯来 N 系列 UX10 / UX10B。

Кратко: 31 августа 2026 года Совет директоров RISC-V International официально утвердил расширение SPMP (Supervisor Physical Memory Protection), разработанное командой IPADS Шанхайского университета Цзяо Тун (Du Dongdong, Yang Bicheng, Xia Yubin, Chen Haibo). Это первое расширение ISA, полностью определённое китайской командой с момента основания RISC-V в 2015 году. SPMP заменяет многоуровневые обходы таблиц страниц компактным файлом CSR — «стикерами» с диапазонами физических адресов, что даёт детерминированную, однotaктную защиту памяти для AI-чипов, автомобильных MCU, интеллектуальных терминалов и промышленных контроллеров. SPMP уже развёрнут в XiangShan и коммерческих ядрах Nuclei.

Аппаратная модель

SPMP добавляет регистры SPMPADDR с полями R/W/X, битом Locked (L) для TEE-якоря и независимыми битами включения для M-mode и S-mode. Запись со включённым L битом не может быть изменена до следующего сброса системы.

Сравнение: PMP / SPMP / таблицы страниц

ХарактеристикаPMPSPMPPage Tables
Цената поиска1 такт1 такт2–4 такта на miss
Покрытие S-modeНетДаДа
Lock per entryДаДа, M/S splitN/A

Сценарии

  • Edge AI SoC — защита весов модели
  • Automotive MCU — изоляция безопасных прошивок
  • Smart-terminal / носимые — песочница Secure Element
  • IIoT — изоляция обновлений PLC
  • Confidential computing — лёгкий TEE-якорь

Семь лет работы

IPADS подали архитектурный черновик 23 сентября 2019 г. → утверждение BoD 31 августа 2026 г. Yang Bicheng возглавлял рабочую группу SPMP всё это время.

Resumen: El 31 de agosto de 2026, la Junta Directiva de RISC-V International aprobó formalmente la extensión SPMP (Supervisor Physical Memory Protection), definida por el equipo IPADS de la Universidad de Jiao Tong de Shanghai (Du Dongdong, Yang Bicheng, Xia Yubin, Chen Haibo). Es la primera extensión ISA definida de extremo a extremo por un equipo chino desde la fundación de RISC-V en 2015. SPMP reemplaza las caminatas multinivel de tablas de páginas con un pequeño archivo de CSR — «notas adhesivas» con rangos de direcciones físicas — entregando protección determinista de un solo ciclo para SoCs de IA, MCUs de automoción, terminales inteligentes y controladores IIoT. Ya está desplegado en XiangShan y en núcleos comerciales de Nuclei.

Modelo de hardware

SPMP introduce registros SPMPADDR con campos R/W/X, bit Locked (L) como ancla TEE, y bits de habilitación independientes para M-mode y S-mode.

Comparativa

CaracterísticaPMPSPMPPage Tables
Coste de búsqueda1 ciclo1 ciclo2–4 ciclos en miss
Cubre S-modeNo
Lock por entradaSí, M/S splitN/A

Casos de uso

  • Edge AI SoCs — proteger pesos del modelo
  • MCUs de automoción — aislamiento ASIL-D
  • Wearables — sandbox del Secure Element
  • IIoT — aislamiento de actualizaciones PLC
  • Computación confidencial — ancla TEE ligera

Siete años

IPADS envió el borrador arquitectónico el 23 de septiembre de 2019 → aprobación por la BoD el 31 de agosto de 2026. Yang Bicheng presidió el grupo de trabajo SPMP durante todo el proceso.