Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/duskmoon314/rv-plic
Rust support for RISC-V Platform Level Interrupt Controller
https://github.com/duskmoon314/rv-plic
risc-v rust
Last synced: 12 days ago
JSON representation
Rust support for RISC-V Platform Level Interrupt Controller
- Host: GitHub
- URL: https://github.com/duskmoon314/rv-plic
- Owner: duskmoon314
- License: mit
- Created: 2021-07-18T15:41:27.000Z (over 3 years ago)
- Default Branch: main
- Last Pushed: 2023-12-15T05:40:54.000Z (11 months ago)
- Last Synced: 2024-10-10T20:49:59.770Z (28 days ago)
- Topics: risc-v, rust
- Language: Rust
- Homepage: https://duskmoon314.github.io/rv-plic
- Size: 1.14 MB
- Stars: 2
- Watchers: 2
- Forks: 0
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE
Awesome Lists containing this project
README
# rv-plic
Rust support for RISC-V Platform Level Interrupt Controller
Based on [HUST-OS/plic](https://github.com/HUST-OS/plic)
REF: [RISC-V Platform-Level Interrupt Controller Specification](https://github.com/riscv/riscv-plic-spec/blob/master/riscv-plic.adoc)
## Usage
Add to `Cargo.toml`:
```toml
rv-plic = { git = "https://github.com/duskmoon314/rv-plic" }
```Set qemu virt machine uart:
```rust
// context 1: hart 0, S mode
type PLIC = rv_plic::PLIC;
PLIC::set_threshold(1, Priority::any());
PLIC::enable(1, 10);
PLIC::set_priority(10, Priority::lowest());
```