duskmoon314 / rv-plic

Rust support for RISC-V Platform Level Interrupt Controller

Home Page:https://duskmoon314.github.io/rv-plic

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

rv-plic

Rust support for RISC-V Platform Level Interrupt Controller

Based on HUST-OS/plic

REF: RISC-V Platform-Level Interrupt Controller Specification

Usage

Add to Cargo.toml:

rv-plic = { git = "https://github.com/duskmoon314/rv-plic" }

Set qemu virt machine uart:

// context 1: hart 0, S mode
type PLIC = rv_plic::PLIC<PLIC_BASE, 3>;
PLIC::set_threshold(1, Priority::any());
PLIC::enable(1, 10);
PLIC::set_priority(10, Priority::lowest());

About

Rust support for RISC-V Platform Level Interrupt Controller

https://duskmoon314.github.io/rv-plic

License:MIT License


Languages

Language:Rust 100.0%