Hasty Briefsbeta

Bilingual

Writing a RISC-V Emulator in Rust

6 months ago
  • #Rust
  • #Emulator
  • #RISC-V
  • Introduction to writing a 64-bit RISC-V emulator in Rust.
  • Goal: Run xv6, a simple Unix-like OS, in the emulator.
  • Topics covered: ISA, privileged architecture, exceptions, interrupts, peripheral devices, virtual memory system.
  • Source code available at d0iasm/rvemu-for-book.
  • Chapter 1: Hardware components needed for xv6 (CPU, Memory, PLIC, UART, etc.).
  • Chapter 2: Required ISAs (RV64I, M and A extensions).
  • Outcome: Ability to run xv6 in the emulator.
  • Author contact: @d0iasm on Twitter or GitHub issues.