docs.rs failed to build riscv_vplic-0.4.2
Please check the build logs for more information.
See Builds for ideas on how to fix a failed build, or Metadata for how to configure docs.rs builds.
If you believe this is docs.rs' fault, open an issue.
Please check the build logs for more information.
See Builds for ideas on how to fix a failed build, or Metadata for how to configure docs.rs builds.
If you believe this is docs.rs' fault, open an issue.
Visit the last successful build:
riscv_vplic-0.4.4
English | 中文
Introduction
RISC-V Virtual Platform-Level Interrupt Controller, providing a PLIC 1.0.0 compliant interrupt controller emulation for RISC-V Hypervisors. Supports #![no_std], suitable for bare-metal and virtualization development.
This crate exports the following core components:
VPlicGlobal— Virtual PLIC global controller, managing interrupt priorities, pending interrupts, and active interrupts- PLIC Constants — PLIC 1.0.0 memory map constant definitions (priority, pending, enable, context control, etc.)
Key Features
- PLIC 1.0.0 compliant memory map
- Interrupt priority, pending status, and enable management
- Context-based interrupt handling with Claim/Complete mechanism
- Integration with Hypervisor device emulation framework (implements
BaseDeviceOpstrait)
Quick Start
Prerequisites
- Rust nightly toolchain
- Rust components: rust-src, clippy, rustfmt
# Install rustup (if not installed)
|
# Install nightly toolchain and components
Running Checks and Tests
# 1. Clone the repository
# 2. Code check (format check + clippy + build + doc generation)
# 3. Run tests
# Run all tests (unit tests + integration tests)
# Run unit tests only
# Run integration tests only
# List all available test suites
# Specify unit test target
Integration
Installation
Add to your Cargo.toml:
[]
= "0.2.2"
Usage Example
use VPlicGlobal;
use GuestPhysAddr;
PLIC Memory Map Constants
use *;
// Number of interrupt sources (PLIC 1.0.0 defines 1024)
assert_eq!;
// Memory map offsets
assert_eq!; // Priority registers
assert_eq!; // Pending registers
assert_eq!; // Enable registers
assert_eq!; // Context control registers
// Context strides
assert_eq!; // Enable region stride
assert_eq!; // Context stride
// Context internal control offsets
assert_eq!; // Threshold register
assert_eq!; // Claim/Complete register
Documentation
Generate and view API documentation:
Online documentation: docs.rs/riscv_vplic
Related Projects
- axdevice_base - Basic device abstraction
- axvisor_api - Hypervisor API definitions
- axaddrspace - Address space management
Contributing
- Fork the repository and create a branch
- Run local checks:
./scripts/check.sh - Run local tests:
./scripts/test.sh - Submit a PR and pass CI checks
License
This project is licensed under the Apache License, Version 2.0. See the LICENSE file for details.