Bladeren bron

fix: rearrange prototyper Cargo.toml dependencies, move RustSBI changelog file (#100)

* fix(prototyper): rearrange Cargo.toml dependencies to use relative paths instead of URLs

Remove unnecessary files after refactor.

Signed-off-by: Zhouqi Jiang <[email protected]>

* fix: move RustSBI changelog to rustsbi module, modify prototyper changelog

Signed-off-by: Zhouqi Jiang <[email protected]>

---------

Signed-off-by: Zhouqi Jiang <[email protected]>
Luo Jia / Zhouqi Jiang 1 maand geleden
bovenliggende
commit
8448631133

+ 2 - 1
Cargo.toml

@@ -1,5 +1,5 @@
 [workspace]
-resolver = "2"
+resolver = "3"
 members = [
     "library/macros",
     "library/sbi-rt",
@@ -19,4 +19,5 @@ repository = "https://github.com/rustsbi/rustsbi"
 
 [profile.release]
 debug = true
+
 # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html

+ 230 - 230
CHANGELOG.md → library/rustsbi/CHANGELOG.md

@@ -1,230 +1,230 @@
-# Changelog
-
-All notable changes to this project will be documented in this file.
-
-The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), and this project adheres
-to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
-
-## Unreleased
-
-### Added
-
-- ci: add `check-changlog` and `check-commit-signatures` in `workflows`.
-- pmu: add missing `snapshot_set_shmem` function and testcases in `Pmu` trait.
-- pmu: add missing `snapshot_set_shmem` function in `Pmu` trait, impl for `&T` and `Option<T>` and `Forward` structure
-- forward: derive `Copy`, `Default`, `PartialEq`, `Eq` and `Hash` for struct Forward
-- pmu: mark that signatures of `pmu_counter_{config_matching, start, stop}` would be changed in RustSBI 0.5.0, as they are breaking changes.
-- lib: re-export `CounterMask` structure from `sbi-spec` crate.
-
-### Modified
-
-- Migrate sbi-rt crate to Rust 2024 edition.
-- susp: amend documentation on `system_suspend` function.
-- lib: replace map+unwrap_or with Option::map_or in impls
-
-### Removed
-
-## [0.4.0]
-
-### Added
-
-- macro based `#[derive(RustSBI)]` interface
-- support System Suspend extension
-- support CPPC extension
-- support for NACL and STA extensions
-- `handle_ecall` now only requires `&self` since RustSBI trait implementations are internally mutable
-- `into_inner` function for `HartMask`
-- forward extensions to current environment by `Forward` struct
-
-### Modified
-
-- run on provided `EnvInfo` by default; bare metal M-mode environment should gate `machine`
-- doc: grammar tweaks in hsm module
-- update dependency `sbi-spec` to v0.0.6, use `Physical` struct from `sbi-spec` crate.
-- merge rustsbi/sbi-{rt, spec, testing} repositories into rustsbi/rustsbi repository.
-
-### Removed
-
-- `sbi_2_0` feature; RustSBI now supports SBI 2.0-rc1 by default
-- support for legacy SBI extensions
-- singleton-based RustSBI interface; use derive macro `#[derive(RustSBI)]` instead
-
-## [0.3.2] - 2023-02-26
-
-Bump RISC-V SBI specification version to 2.0-rc1.
-
-### Added
-
-- pmu: counter_fw_read_hi function in SBI 2.0-rc1
-- lib: memory address parameters and DBCN extension
-- lib: adds feature `sbi_2_0` and gate pmu read_hi
-
-### Modified
-
-- doc: amend using SBI 2.0-rc1 specification
-
-### Fixed
-
-- `impl<T: Console> Console for &T`
-
-## [0.3.1] - 2023-01-20
-
-### Modified
-
-- Update dependency crate `riscv` to version 0.10.1
-- Use let-else to simplify code, bump MSRV to 1.65.0
-
-## [0.3.0] - 2022-11-03
-
-### Added
-
-- Instance based and/or machine independent RustSBI to support hypervisor development
-- Structure `MachineInfo` for non-machine environment, e.g. cross-architecture emulator
-- Builder structure for instance based RustSBI framework
-- Implement RustSBI traits for their references
-- Extensive documents for hypervisors, emulators, and machine environments using RustSBI
-- Feature `legacy` to gate the SBI legacy extension
-- Expose `init_*` functions on instance-based RustSBI implementation
-- LEGACY_CLEAR_IPI implemented
-
-### Modified
-
-- Probe function now returns if legacy extensions are available
-- Update to `riscv` crate 0.9.0, sbi-spec crate version 0.0.4
-- Rename `send_ipi_many` to `send_ipi`
-
-### Removed
-
-- Remove dependency on crate alloc; RustSBI now works without a heap
-- Remove embedded-hal serial adapter to legacy console
-
-### Fixed
-
-## [0.2.2] - 2022-03-23
-
-This update adapts to ratified RISC-V SBI v1.0.0 specification, it's recommended for users to update to
-the latest RustSBI version.
-
-### Added
-
-- Support for RISC-V SBI v1.0.0 Ratified Specification
-- Internal guest and instance module
-
-### Modified
-
-- Use the Rust 2021 edition
-- Update dependency `embedded-hal` to v0.2.7
-
-## [0.2.1] - 2022-02-14
-
-This update fixes a severe bug on IPI module. The previous version of RustSBI did not follow the SBI definition of IPI
-module on SBI v0.3 format. Users are encouraged to use 0.2.1 and newer version instead of yanked 0.2.0 version.
-
-### Modified
-
-- Internal speed up to new SBI v0.3+ IPI procedure
-- Reduce code size by inlining internal functions
-
-### Fixed
-
-- Severe bug on IPI does not follow the new SBI version convention rule
-- Pass cargo test on docs, add test cases on hart mask
-
-## [0.2.0] - 2022-02-13
-
-### Added
-
-- Support for RISC-V SBI v1.0 and v0.3 Specification
-- S-level Illegal instruction exception is now delegated into S-level software handler
-- Support RFENCE extension in RustSBI framework
-- Added a test kernel to test SBI function on RustSBI implementations
-- Support device tree binary in the K210 platform
-- Support SBI v0.3 hart suspend function
-- Support PMU extension trait and init function
-- Use fat pointer cell to support asynchronous hart state monitor module
-- Build under new asm! macro
-
-### Modified
-
-- Reform RustSBI project into a library
-- Use `u32` function and module id width for SBI 1.0
-- Function `rustsbi::ecall` now require `a0`-`a5` input parameters
-- Enhanced in-line code documents from the SBI standard
-- Now IPI module requires to return an `SbiRet` value
-- Remove use of `global_asm` and `llvm_asm` in test kernel
-- Align to 4 bytes for interrupt handler on QEMU and test kernel
-- Update `riscv` crate dependency for QEMU platform
-- Use `mtval` to read instruction on QEMU; still need to be kept on K210 as 1.9.1 does not define this register behavior
-- Modify second parameter of `enter_privileged` to `opaque` other than `dtb_pa`
-- Dump all trap frame registers when exception happened in reference implementations
-- Use `embedded-hal` dependency version `0.2.6`
-- Change to asynchronous lock structure trait style
-- Function `num_counters` returns `usize` and its SBI call must return ``SbiRet::success()``
-- Use amo mutex for legacy stdio handler; remove dependency on `lazy_static` and `spin`
-- Improve documents to adapt to v1.0-rc2 specification
-
-### Fixed
-
-- Test kernel console now will lock before `println` line is finished
-- Non-legacy supervisor IPI extension is fixed
-- Returns -1 other than 0 when legacy console getchar function fails; thanks to @duskmoon314
-
-## [0.1.1] - 2021-02-01
-
-### Added
-
-- Abstract support for HSM and SRST extensions
-- Support SRST extension using the test device on QEMU
-- Count harts from device tree binary on QEMU platform
-- Show hart id on panic for QEMU platform
-
-### Modified
-
-- Use '#[naked]' instead of global assembly in newer Rust versions for RustSBI platforms
-
-### Fixed
-
-- Fix `init_hsm` function which is not exported before
-- Small fixes on library documents
-
-## [0.1.0] - 2020-12-26
-
-RustSBI is adapted to the SBI standard with implementation number 4.
-
-### Added
-
-- Implementation specific SBI module `0x0A000004` defined
-- K210 specific sbi_rustsbi_k210_sext SBI call
-
-### Modified
-
-- Update private SBI function to K210 implementation
-
-### Fixed
-
-- Delegate instruction load/store faults to S mode, allowing legacy console getchar to work on K210 (#7).
-- Fixed 64-bit and 32-bit instruction value for target pointer widths
-- Fixed readme document path for crates.io
-
-## [0.0.2] - 2020-10-20
-
-### Added
-
-- Support for Kendryte K210 with MMU and S-Mode
-- Support for QEMU
-- SBI v0.2 TIME extension and IPI extension
-- RISC-V ISA both RV32 and RV64
-- RISC-V Privileged Specification v1.11
-- Backward compatible to privileged spec v1.9.1
-
-[Unreleased]: https://github.com/rustsbi/rustsbi/compare/v0.4.0...HEAD
-[0.4.0]: https://github.com/rustsbi/rustsbi/compare/v0.3.2...v0.4.0
-[0.3.2]: https://github.com/rustsbi/rustsbi/compare/v0.3.1...v0.3.2
-[0.3.1]: https://github.com/rustsbi/rustsbi/compare/v0.3.0...v0.3.1
-[0.3.0]: https://github.com/rustsbi/rustsbi/compare/v0.2.2...v0.3.0
-[0.2.2]: https://github.com/rustsbi/rustsbi/compare/v0.2.1...v0.2.2
-[0.2.1]: https://github.com/rustsbi/rustsbi/compare/v0.2.0...v0.2.1
-[0.2.0]: https://github.com/rustsbi/rustsbi/compare/v0.1.1...v0.2.0
-[0.1.1]: https://github.com/rustsbi/rustsbi/compare/v0.1.0...v0.1.1
-[0.1.0]: https://github.com/rustsbi/rustsbi/compare/v0.0.2...v0.1.0
-[0.0.2]: https://github.com/rustsbi/rustsbi/releases/tag/v0.0.2
+# Changelog
+
+All notable changes to this project will be documented in this file.
+
+The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), and this project adheres
+to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
+
+## Unreleased
+
+### Added
+
+- ci: add `check-changlog` and `check-commit-signatures` in `workflows`.
+- pmu: add missing `snapshot_set_shmem` function and testcases in `Pmu` trait.
+- pmu: add missing `snapshot_set_shmem` function in `Pmu` trait, impl for `&T` and `Option<T>` and `Forward` structure
+- forward: derive `Copy`, `Default`, `PartialEq`, `Eq` and `Hash` for struct Forward
+- pmu: mark that signatures of `pmu_counter_{config_matching, start, stop}` would be changed in RustSBI 0.5.0, as they are breaking changes.
+- lib: re-export `CounterMask` structure from `sbi-spec` crate.
+
+### Modified
+
+- Migrate sbi-rt crate to Rust 2024 edition.
+- susp: amend documentation on `system_suspend` function.
+- lib: replace map+unwrap_or with Option::map_or in impls
+
+### Removed
+
+## [0.4.0]
+
+### Added
+
+- macro based `#[derive(RustSBI)]` interface
+- support System Suspend extension
+- support CPPC extension
+- support for NACL and STA extensions
+- `handle_ecall` now only requires `&self` since RustSBI trait implementations are internally mutable
+- `into_inner` function for `HartMask`
+- forward extensions to current environment by `Forward` struct
+
+### Modified
+
+- run on provided `EnvInfo` by default; bare metal M-mode environment should gate `machine`
+- doc: grammar tweaks in hsm module
+- update dependency `sbi-spec` to v0.0.6, use `Physical` struct from `sbi-spec` crate.
+- merge rustsbi/sbi-{rt, spec, testing} repositories into rustsbi/rustsbi repository.
+
+### Removed
+
+- `sbi_2_0` feature; RustSBI now supports SBI 2.0-rc1 by default
+- support for legacy SBI extensions
+- singleton-based RustSBI interface; use derive macro `#[derive(RustSBI)]` instead
+
+## [0.3.2] - 2023-02-26
+
+Bump RISC-V SBI specification version to 2.0-rc1.
+
+### Added
+
+- pmu: counter_fw_read_hi function in SBI 2.0-rc1
+- lib: memory address parameters and DBCN extension
+- lib: adds feature `sbi_2_0` and gate pmu read_hi
+
+### Modified
+
+- doc: amend using SBI 2.0-rc1 specification
+
+### Fixed
+
+- `impl<T: Console> Console for &T`
+
+## [0.3.1] - 2023-01-20
+
+### Modified
+
+- Update dependency crate `riscv` to version 0.10.1
+- Use let-else to simplify code, bump MSRV to 1.65.0
+
+## [0.3.0] - 2022-11-03
+
+### Added
+
+- Instance based and/or machine independent RustSBI to support hypervisor development
+- Structure `MachineInfo` for non-machine environment, e.g. cross-architecture emulator
+- Builder structure for instance based RustSBI framework
+- Implement RustSBI traits for their references
+- Extensive documents for hypervisors, emulators, and machine environments using RustSBI
+- Feature `legacy` to gate the SBI legacy extension
+- Expose `init_*` functions on instance-based RustSBI implementation
+- LEGACY_CLEAR_IPI implemented
+
+### Modified
+
+- Probe function now returns if legacy extensions are available
+- Update to `riscv` crate 0.9.0, sbi-spec crate version 0.0.4
+- Rename `send_ipi_many` to `send_ipi`
+
+### Removed
+
+- Remove dependency on crate alloc; RustSBI now works without a heap
+- Remove embedded-hal serial adapter to legacy console
+
+### Fixed
+
+## [0.2.2] - 2022-03-23
+
+This update adapts to ratified RISC-V SBI v1.0.0 specification, it's recommended for users to update to
+the latest RustSBI version.
+
+### Added
+
+- Support for RISC-V SBI v1.0.0 Ratified Specification
+- Internal guest and instance module
+
+### Modified
+
+- Use the Rust 2021 edition
+- Update dependency `embedded-hal` to v0.2.7
+
+## [0.2.1] - 2022-02-14
+
+This update fixes a severe bug on IPI module. The previous version of RustSBI did not follow the SBI definition of IPI
+module on SBI v0.3 format. Users are encouraged to use 0.2.1 and newer version instead of yanked 0.2.0 version.
+
+### Modified
+
+- Internal speed up to new SBI v0.3+ IPI procedure
+- Reduce code size by inlining internal functions
+
+### Fixed
+
+- Severe bug on IPI does not follow the new SBI version convention rule
+- Pass cargo test on docs, add test cases on hart mask
+
+## [0.2.0] - 2022-02-13
+
+### Added
+
+- Support for RISC-V SBI v1.0 and v0.3 Specification
+- S-level Illegal instruction exception is now delegated into S-level software handler
+- Support RFENCE extension in RustSBI framework
+- Added a test kernel to test SBI function on RustSBI implementations
+- Support device tree binary in the K210 platform
+- Support SBI v0.3 hart suspend function
+- Support PMU extension trait and init function
+- Use fat pointer cell to support asynchronous hart state monitor module
+- Build under new asm! macro
+
+### Modified
+
+- Reform RustSBI project into a library
+- Use `u32` function and module id width for SBI 1.0
+- Function `rustsbi::ecall` now require `a0`-`a5` input parameters
+- Enhanced in-line code documents from the SBI standard
+- Now IPI module requires to return an `SbiRet` value
+- Remove use of `global_asm` and `llvm_asm` in test kernel
+- Align to 4 bytes for interrupt handler on QEMU and test kernel
+- Update `riscv` crate dependency for QEMU platform
+- Use `mtval` to read instruction on QEMU; still need to be kept on K210 as 1.9.1 does not define this register behavior
+- Modify second parameter of `enter_privileged` to `opaque` other than `dtb_pa`
+- Dump all trap frame registers when exception happened in reference implementations
+- Use `embedded-hal` dependency version `0.2.6`
+- Change to asynchronous lock structure trait style
+- Function `num_counters` returns `usize` and its SBI call must return ``SbiRet::success()``
+- Use amo mutex for legacy stdio handler; remove dependency on `lazy_static` and `spin`
+- Improve documents to adapt to v1.0-rc2 specification
+
+### Fixed
+
+- Test kernel console now will lock before `println` line is finished
+- Non-legacy supervisor IPI extension is fixed
+- Returns -1 other than 0 when legacy console getchar function fails; thanks to @duskmoon314
+
+## [0.1.1] - 2021-02-01
+
+### Added
+
+- Abstract support for HSM and SRST extensions
+- Support SRST extension using the test device on QEMU
+- Count harts from device tree binary on QEMU platform
+- Show hart id on panic for QEMU platform
+
+### Modified
+
+- Use '#[naked]' instead of global assembly in newer Rust versions for RustSBI platforms
+
+### Fixed
+
+- Fix `init_hsm` function which is not exported before
+- Small fixes on library documents
+
+## [0.1.0] - 2020-12-26
+
+RustSBI is adapted to the SBI standard with implementation number 4.
+
+### Added
+
+- Implementation specific SBI module `0x0A000004` defined
+- K210 specific sbi_rustsbi_k210_sext SBI call
+
+### Modified
+
+- Update private SBI function to K210 implementation
+
+### Fixed
+
+- Delegate instruction load/store faults to S mode, allowing legacy console getchar to work on K210 (#7).
+- Fixed 64-bit and 32-bit instruction value for target pointer widths
+- Fixed readme document path for crates.io
+
+## [0.0.2] - 2020-10-20
+
+### Added
+
+- Support for Kendryte K210 with MMU and S-Mode
+- Support for QEMU
+- SBI v0.2 TIME extension and IPI extension
+- RISC-V ISA both RV32 and RV64
+- RISC-V Privileged Specification v1.11
+- Backward compatible to privileged spec v1.9.1
+
+[Unreleased]: https://github.com/rustsbi/rustsbi/compare/v0.4.0...HEAD
+[0.4.0]: https://github.com/rustsbi/rustsbi/compare/v0.3.2...v0.4.0
+[0.3.2]: https://github.com/rustsbi/rustsbi/compare/v0.3.1...v0.3.2
+[0.3.1]: https://github.com/rustsbi/rustsbi/compare/v0.3.0...v0.3.1
+[0.3.0]: https://github.com/rustsbi/rustsbi/compare/v0.2.2...v0.3.0
+[0.2.2]: https://github.com/rustsbi/rustsbi/compare/v0.2.1...v0.2.2
+[0.2.1]: https://github.com/rustsbi/rustsbi/compare/v0.2.0...v0.2.1
+[0.2.0]: https://github.com/rustsbi/rustsbi/compare/v0.1.1...v0.2.0
+[0.1.1]: https://github.com/rustsbi/rustsbi/compare/v0.1.0...v0.1.1
+[0.1.0]: https://github.com/rustsbi/rustsbi/compare/v0.0.2...v0.1.0
+[0.0.2]: https://github.com/rustsbi/rustsbi/releases/tag/v0.0.2

+ 0 - 5
prototyper/.cargo/config.toml

@@ -1,5 +0,0 @@
-[alias]
-xtask = "run --package xtask --release --"
-prototyper = "xtask prototyper"
-test-kernel = "xtask test"
-bench-kernel = "xtask bench"

+ 0 - 49
prototyper/.github/workflows/workflow.yml

@@ -1,49 +0,0 @@
-# This workflow uses actions that are not certified by GitHub.
-# They are provided by a third-party and are governed by
-# separate terms of service, privacy policy, and support
-# documentation.
-# rust-clippy is a tool that runs a bunch of lints to catch common
-# mistakes in your Rust code and help improve your Rust code.
-# More details at https://github.com/rust-lang/rust-clippy
-# and https://rust-lang.github.io/rust-clippy/
-
-name: CI
-
-on:
-  pull_request:
-  push:
-    paths-ignore:
-      - '**.md'
-      - 'LICENSE'
-
-jobs:
-  rust-clippy-analyze:
-    name: Run rust-clippy analyzing
-    runs-on: ubuntu-latest
-    permissions:
-      security-events: write
-    steps:
-      - name: Checkout code
-        uses: actions/checkout@v4
-
-      - name: Check format
-        run: cargo fmt --check
-
-      - name: Run test
-        run: cargo test
-
-      - name: Install required cargo
-        run: cargo install clippy-sarif sarif-fmt
-
-      - name: Run rust-clippy
-        run: |
-          cargo clippy -p rustsbi-prototyper --target riscv64imac-unknown-none-elf  --message-format=json  | clippy-sarif | tee rust-clippy-results.sarif | sarif-fmt
-          cargo clippy -p rustsbi-test-kernel --target riscv64imac-unknown-none-elf --message-format=json  | clippy-sarif | tee rust-clippy-results.sarif | sarif-fmt
-          cargo clippy -p rustsbi-bench-kernel --target riscv64imac-unknown-none-elf --message-format=json | clippy-sarif | tee rust-clippy-results.sarif | sarif-fmt
-        continue-on-error: true
-
-      - name: Upload analysis results to GitHub
-        uses: github/codeql-action/upload-sarif@v3
-        with:
-          sarif_file: rust-clippy-results.sarif
-          wait-for-processing: true

+ 8 - 1
prototyper/CHANGELOG.md

@@ -3,4 +3,11 @@
 All notable changes to this project will be documented in this file. See [conventional commits](https://www.conventionalcommits.org/) for commit guidelines.
 
 ---
-## [unreleased]
+
+## Unreleased
+
+### Added
+
+### Modified
+
+### Removed

+ 0 - 788
prototyper/Cargo.lock

@@ -1,788 +0,0 @@
-# This file is automatically @generated by Cargo.
-# It is not intended for manual editing.
-version = 4
-
-[[package]]
-name = "aclint"
-version = "0.1.0"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "8cc30f3f60fd3106787fa9b540e64372dd4793813c400ba12d113506e94dcb8c"
-
-[[package]]
-name = "anstream"
-version = "0.6.18"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "8acc5369981196006228e28809f761875c0327210a891e941f4c683b3a99529b"
-dependencies = [
- "anstyle",
- "anstyle-parse",
- "anstyle-query",
- "anstyle-wincon",
- "colorchoice",
- "is_terminal_polyfill",
- "utf8parse",
-]
-
-[[package]]
-name = "anstyle"
-version = "1.0.10"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "55cc3b69f167a1ef2e161439aa98aed94e6028e5f9a59be9a6ffb47aef1651f9"
-
-[[package]]
-name = "anstyle-parse"
-version = "0.2.6"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "3b2d16507662817a6a20a9ea92df6652ee4f94f914589377d69f3b21bc5798a9"
-dependencies = [
- "utf8parse",
-]
-
-[[package]]
-name = "anstyle-query"
-version = "1.1.2"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "79947af37f4177cfead1110013d678905c37501914fba0efea834c3fe9a8d60c"
-dependencies = [
- "windows-sys",
-]
-
-[[package]]
-name = "anstyle-wincon"
-version = "3.0.7"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "ca3534e77181a9cc07539ad51f2141fe32f6c3ffd4df76db8ad92346b003ae4e"
-dependencies = [
- "anstyle",
- "once_cell",
- "windows-sys",
-]
-
-[[package]]
-name = "as-slice"
-version = "0.2.1"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "516b6b4f0e40d50dcda9365d53964ec74560ad4284da2e7fc97122cd83174516"
-dependencies = [
- "stable_deref_trait",
-]
-
-[[package]]
-name = "autocfg"
-version = "1.4.0"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "ace50bade8e6234aa140d9a2f552bbee1db4d353f69b8217bc503490fc1a9f26"
-
-[[package]]
-name = "bit_field"
-version = "0.10.2"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "dc827186963e592360843fb5ba4b973e145841266c1357f7180c43526f2e5b61"
-
-[[package]]
-name = "bitflags"
-version = "2.8.0"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "8f68f53c83ab957f72c32642f3868eec03eb974d1fb82e453128456482613d36"
-
-[[package]]
-name = "bouffalo-hal"
-version = "0.0.0"
-source = "git+https://github.com/rustsbi/bouffalo-hal?rev=968b949#968b949466adeb6773f7ca3c1052e3a400533ed9"
-dependencies = [
- "as-slice",
- "cfg-if",
- "embedded-hal 0.2.7",
- "embedded-hal 1.0.0",
- "embedded-hal-nb",
- "embedded-io",
- "embedded-time",
- "nb 1.1.0",
- "volatile-register",
-]
-
-[[package]]
-name = "buddy_system_allocator"
-version = "0.11.0"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "a1a0108968a3a2dab95b089c0fc3f1afa7759aa5ebe6f1d86d206d6f7ba726eb"
-dependencies = [
- "spin",
-]
-
-[[package]]
-name = "cfg-if"
-version = "1.0.0"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "baf1de4339761588bc0619e3cbc0120ee582ebb74b53b4efbf79117bd2da40fd"
-
-[[package]]
-name = "clap"
-version = "4.5.28"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "3e77c3243bd94243c03672cb5154667347c457ca271254724f9f393aee1c05ff"
-dependencies = [
- "clap_builder",
- "clap_derive",
-]
-
-[[package]]
-name = "clap-verbosity-flag"
-version = "3.0.2"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "2678fade3b77aa3a8ff3aae87e9c008d3fb00473a41c71fbf74e91c8c7b37e84"
-dependencies = [
- "clap",
- "log",
-]
-
-[[package]]
-name = "clap_builder"
-version = "4.5.27"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "1b26884eb4b57140e4d2d93652abfa49498b938b3c9179f9fc487b0acc3edad7"
-dependencies = [
- "anstream",
- "anstyle",
- "clap_lex",
- "strsim",
-]
-
-[[package]]
-name = "clap_derive"
-version = "4.5.28"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "bf4ced95c6f4a675af3da73304b9ac4ed991640c36374e4b46795c49e17cf1ed"
-dependencies = [
- "heck",
- "proc-macro2",
- "quote",
- "syn",
-]
-
-[[package]]
-name = "clap_lex"
-version = "0.7.4"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "f46ad14479a25103f283c0f10005961cf086d8dc42205bb44c46ac563475dca6"
-
-[[package]]
-name = "colorchoice"
-version = "1.0.3"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "5b63caa9aa9397e2d9480a9b13673856c78d8ac123288526c37d7839f2a86990"
-
-[[package]]
-name = "critical-section"
-version = "1.2.0"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "790eea4361631c5e7d22598ecd5723ff611904e3344ce8720784c93e3d83d40b"
-
-[[package]]
-name = "dtb-walker"
-version = "0.2.0-alpha.3"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "9404d41caa1aa659f7be44d5a902e318c0672900822fe9ca41d9e38c14b52332"
-
-[[package]]
-name = "embedded-hal"
-version = "0.2.7"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "35949884794ad573cf46071e41c9b60efb0cb311e3ca01f7af807af1debc66ff"
-dependencies = [
- "nb 0.1.3",
- "void",
-]
-
-[[package]]
-name = "embedded-hal"
-version = "1.0.0"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "361a90feb7004eca4019fb28352a9465666b24f840f5c3cddf0ff13920590b89"
-
-[[package]]
-name = "embedded-hal-nb"
-version = "1.0.0"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "fba4268c14288c828995299e59b12babdbe170f6c6d73731af1b4648142e8605"
-dependencies = [
- "embedded-hal 1.0.0",
- "nb 1.1.0",
-]
-
-[[package]]
-name = "embedded-io"
-version = "0.6.1"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "edd0f118536f44f5ccd48bcb8b111bdc3de888b58c74639dfb034a357d0f206d"
-
-[[package]]
-name = "embedded-time"
-version = "0.12.1"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "d7a4b4d10ac48d08bfe3db7688c402baadb244721f30a77ce360bd24c3dffe58"
-dependencies = [
- "num",
-]
-
-[[package]]
-name = "fast-trap"
-version = "0.1.0"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "46da95e6fcc7619a12d05594693e48591c0b574aef6fe5d7a7e765e6763a2cb2"
-
-[[package]]
-name = "heck"
-version = "0.5.0"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "2304e00983f87ffb38b55b444b5e3b60a884b5d30c0fca7d82fe33449bbe55ea"
-
-[[package]]
-name = "is_terminal_polyfill"
-version = "1.70.1"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "7943c866cc5cd64cbc25b2e01621d07fa8eb2a1a23160ee81ce38704e97b8ecf"
-
-[[package]]
-name = "lock_api"
-version = "0.4.12"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "07af8b9cdd281b7915f413fa73f29ebd5d55d0d3f0155584dade1ff18cea1b17"
-dependencies = [
- "autocfg",
- "scopeguard",
-]
-
-[[package]]
-name = "log"
-version = "0.4.21"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "90ed8c1e510134f979dbc4f070f87d4313098b704861a105fe34231c70a3901c"
-
-[[package]]
-name = "nb"
-version = "0.1.3"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "801d31da0513b6ec5214e9bf433a77966320625a37860f910be265be6e18d06f"
-dependencies = [
- "nb 1.1.0",
-]
-
-[[package]]
-name = "nb"
-version = "1.1.0"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "8d5439c4ad607c3c23abf66de8c8bf57ba8adcd1f129e699851a6e43935d339d"
-
-[[package]]
-name = "num"
-version = "0.3.1"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "8b7a8e9be5e039e2ff869df49155f1c06bd01ade2117ec783e56ab0932b67a8f"
-dependencies = [
- "num-complex",
- "num-integer",
- "num-iter",
- "num-rational",
- "num-traits",
-]
-
-[[package]]
-name = "num-complex"
-version = "0.3.1"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "747d632c0c558b87dbabbe6a82f3b4ae03720d0646ac5b7b4dae89394be5f2c5"
-dependencies = [
- "num-traits",
-]
-
-[[package]]
-name = "num-integer"
-version = "0.1.46"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "7969661fd2958a5cb096e56c8e1ad0444ac2bbcd0061bd28660485a44879858f"
-dependencies = [
- "num-traits",
-]
-
-[[package]]
-name = "num-iter"
-version = "0.1.45"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "1429034a0490724d0075ebb2bc9e875d6503c3cf69e235a8941aa757d83ef5bf"
-dependencies = [
- "autocfg",
- "num-integer",
- "num-traits",
-]
-
-[[package]]
-name = "num-rational"
-version = "0.3.2"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "12ac428b1cb17fce6f731001d307d351ec70a6d202fc2e60f7d4c5e42d8f4f07"
-dependencies = [
- "autocfg",
- "num-integer",
- "num-traits",
-]
-
-[[package]]
-name = "num-traits"
-version = "0.2.19"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "071dfc062690e90b734c0b2273ce72ad0ffa95f0c74596bc250dcfd960262841"
-dependencies = [
- "autocfg",
-]
-
-[[package]]
-name = "once_cell"
-version = "1.20.3"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "945462a4b81e43c4e3ba96bd7b49d834c6f61198356aa858733bc4acf3cbe62e"
-
-[[package]]
-name = "panic-halt"
-version = "1.0.0"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "a513e167849a384b7f9b746e517604398518590a9142f4846a32e3c2a4de7b11"
-
-[[package]]
-name = "paste"
-version = "1.0.15"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "57c0d7b74b563b49d38dae00a0c37d4d6de9b432382b2892f0574ddcae73fd0a"
-
-[[package]]
-name = "plic"
-version = "0.0.2"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "2ad606bf31d67b0e10a161b7df7d6a97dda7be22ce4bebcff889476e867c9b7a"
-
-[[package]]
-name = "proc-macro2"
-version = "1.0.93"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "60946a68e5f9d28b0dc1c21bb8a97ee7d018a8b322fa57838ba31cc878e22d99"
-dependencies = [
- "unicode-ident",
-]
-
-[[package]]
-name = "quote"
-version = "1.0.38"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "0e4dccaaaf89514f546c693ddc140f729f958c247918a13380cccc6078391acc"
-dependencies = [
- "proc-macro2",
-]
-
-[[package]]
-name = "rcore-console"
-version = "0.0.0"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "63aae49a6d2e6fd69821507a979b5871e4c47dc3abc9066347fa5c4a51a73dd6"
-dependencies = [
- "log",
- "spin",
-]
-
-[[package]]
-name = "riscv"
-version = "0.11.1"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "2f5c1b8bf41ea746266cdee443d1d1e9125c86ce1447e1a2615abd34330d33a9"
-dependencies = [
- "critical-section",
- "embedded-hal 1.0.0",
-]
-
-[[package]]
-name = "riscv"
-version = "0.12.1"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "5ea8ff73d3720bdd0a97925f0bf79ad2744b6da8ff36be3840c48ac81191d7a7"
-dependencies = [
- "critical-section",
- "embedded-hal 1.0.0",
- "paste",
- "riscv-macros",
- "riscv-pac",
-]
-
-[[package]]
-name = "riscv-decode"
-version = "0.2.2"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "cf8b4cfb0da0528321d22daee4299a23a8c5ac8848623d716e898d2a9eec0694"
-
-[[package]]
-name = "riscv-macros"
-version = "0.1.0"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "f265be5d634272320a7de94cea15c22a3bfdd4eb42eb43edc528415f066a1f25"
-dependencies = [
- "proc-macro2",
- "quote",
- "syn",
-]
-
-[[package]]
-name = "riscv-pac"
-version = "0.2.0"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "8188909339ccc0c68cfb5a04648313f09621e8b87dc03095454f1a11f6c5d436"
-
-[[package]]
-name = "rustsbi"
-version = "0.4.0"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "44c13763120794ed11d64bac885fb31d384ae385c3287b0697711b97affbf8ab"
-dependencies = [
- "riscv 0.11.1",
- "rustsbi-macros",
- "sbi-spec 0.0.7",
-]
-
-[[package]]
-name = "rustsbi-bench-kernel"
-version = "0.0.0"
-dependencies = [
- "log",
- "rcore-console",
- "riscv 0.11.1",
- "sbi-spec 0.0.8 (git+https://github.com/rustsbi/rustsbi?rev=4821073)",
- "sbi-testing 0.0.3-alpha.2 (git+https://github.com/rustsbi/rustsbi?rev=4821073)",
- "serde",
- "serde-device-tree",
- "spin",
- "uart16550",
-]
-
-[[package]]
-name = "rustsbi-macros"
-version = "0.0.2"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "a71347da9582cc6b6f3652c7d2c06516c9555690b3738ecdff7e84297f4e17fc"
-dependencies = [
- "proc-macro2",
- "quote",
- "syn",
-]
-
-[[package]]
-name = "rustsbi-prototyper"
-version = "0.0.0"
-dependencies = [
- "aclint",
- "bouffalo-hal",
- "buddy_system_allocator",
- "cfg-if",
- "fast-trap",
- "log",
- "panic-halt",
- "riscv 0.12.1",
- "riscv-decode",
- "rustsbi",
- "sbi-spec 0.0.8 (registry+https://github.com/rust-lang/crates.io-index)",
- "serde",
- "serde-device-tree",
- "sifive-test-device",
- "spin",
- "uart16550",
- "uart_xilinx",
- "xuantie-riscv",
-]
-
-[[package]]
-name = "rustsbi-test-kernel"
-version = "0.0.0"
-dependencies = [
- "dtb-walker",
- "log",
- "rcore-console",
- "riscv 0.11.1",
- "sbi-testing 0.0.3-alpha.2 (git+https://github.com/rustsbi/rustsbi)",
- "spin",
- "uart16550",
-]
-
-[[package]]
-name = "sbi-rt"
-version = "0.0.3"
-source = "git+https://github.com/rustsbi/rustsbi?rev=4821073#4821073b56a7223781c11a49aba743785d89d3ea"
-dependencies = [
- "sbi-spec 0.0.8 (git+https://github.com/rustsbi/rustsbi?rev=4821073)",
-]
-
-[[package]]
-name = "sbi-rt"
-version = "0.0.3"
-source = "git+https://github.com/rustsbi/rustsbi#99f4177fbed12c96c2c62121d51953b1bfa0ff43"
-dependencies = [
- "sbi-spec 0.0.8 (git+https://github.com/rustsbi/rustsbi)",
-]
-
-[[package]]
-name = "sbi-spec"
-version = "0.0.7"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "e6e36312fb5ddc10d08ecdc65187402baba4ac34585cb9d1b78522ae2358d890"
-
-[[package]]
-name = "sbi-spec"
-version = "0.0.8"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "8309630ab2b300d4fe52b6757e53a7cbb6672f55aa08b50e28b1952c06dd994d"
-
-[[package]]
-name = "sbi-spec"
-version = "0.0.8"
-source = "git+https://github.com/rustsbi/rustsbi?rev=4821073#4821073b56a7223781c11a49aba743785d89d3ea"
-dependencies = [
- "bitflags",
-]
-
-[[package]]
-name = "sbi-spec"
-version = "0.0.8"
-source = "git+https://github.com/rustsbi/rustsbi#99f4177fbed12c96c2c62121d51953b1bfa0ff43"
-dependencies = [
- "bitflags",
-]
-
-[[package]]
-name = "sbi-testing"
-version = "0.0.3-alpha.2"
-source = "git+https://github.com/rustsbi/rustsbi?rev=4821073#4821073b56a7223781c11a49aba743785d89d3ea"
-dependencies = [
- "log",
- "riscv 0.12.1",
- "sbi-rt 0.0.3 (git+https://github.com/rustsbi/rustsbi?rev=4821073)",
- "sbi-spec 0.0.8 (git+https://github.com/rustsbi/rustsbi?rev=4821073)",
-]
-
-[[package]]
-name = "sbi-testing"
-version = "0.0.3-alpha.2"
-source = "git+https://github.com/rustsbi/rustsbi#99f4177fbed12c96c2c62121d51953b1bfa0ff43"
-dependencies = [
- "log",
- "riscv 0.12.1",
- "sbi-rt 0.0.3 (git+https://github.com/rustsbi/rustsbi)",
- "sbi-spec 0.0.8 (git+https://github.com/rustsbi/rustsbi)",
-]
-
-[[package]]
-name = "scopeguard"
-version = "1.2.0"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "94143f37725109f92c262ed2cf5e59bce7498c01bcc1502d7b9afe439a4e9f49"
-
-[[package]]
-name = "serde"
-version = "1.0.217"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "02fc4265df13d6fa1d00ecff087228cc0a2b5f3c0e87e258d8b94a156e984c70"
-dependencies = [
- "serde_derive",
-]
-
-[[package]]
-name = "serde-device-tree"
-version = "0.0.1"
-source = "git+https://github.com/rustsbi/serde-device-tree#e7f9404fc07bc3f8cce4e7a833be6a0fff93b5c4"
-dependencies = [
- "serde",
-]
-
-[[package]]
-name = "serde_derive"
-version = "1.0.217"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "5a9bf7cf98d04a2b28aead066b7496853d4779c9cc183c440dbac457641e19a0"
-dependencies = [
- "proc-macro2",
- "quote",
- "syn",
-]
-
-[[package]]
-name = "sifive-test-device"
-version = "0.0.0"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "ba50a6fd7cb5cdb2645fb93fb2bbae7d8d78390677a889bdcfaf13c3d29286d0"
-
-[[package]]
-name = "spin"
-version = "0.9.8"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "6980e8d7511241f8acf4aebddbb1ff938df5eebe98691418c4468d0b72a96a67"
-dependencies = [
- "lock_api",
-]
-
-[[package]]
-name = "stable_deref_trait"
-version = "1.2.0"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "a8f112729512f8e442d81f95a8a7ddf2b7c6b8a1a6f509a95864142b30cab2d3"
-
-[[package]]
-name = "strsim"
-version = "0.11.1"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "7da8b5736845d9f2fcb837ea5d9e2628564b3b043a70948a3f0b778838c5fb4f"
-
-[[package]]
-name = "syn"
-version = "2.0.98"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "36147f1a48ae0ec2b5b3bc5b537d267457555a10dc06f3dbc8cb11ba3006d3b1"
-dependencies = [
- "proc-macro2",
- "quote",
- "unicode-ident",
-]
-
-[[package]]
-name = "uart16550"
-version = "0.0.1"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "939f6f9ccad815fe3efca8fd06f2ec1620c0387fb1bca2b231b61ce710bffb9b"
-
-[[package]]
-name = "uart_xilinx"
-version = "0.2.0"
-source = "git+https://github.com/duskmoon314/uart-rs/#12be91421ad140f2a4bf4179578fd7a8fbc7ff5c"
-dependencies = [
- "bitflags",
- "volatile-register",
-]
-
-[[package]]
-name = "unicode-ident"
-version = "1.0.16"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "a210d160f08b701c8721ba1c726c11662f877ea6b7094007e1ca9a1041945034"
-
-[[package]]
-name = "utf8parse"
-version = "0.2.2"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "06abde3611657adf66d383f00b093d7faecc7fa57071cce2578660c9f1010821"
-
-[[package]]
-name = "vcell"
-version = "0.1.3"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "77439c1b53d2303b20d9459b1ade71a83c716e3f9c34f3228c00e6f185d6c002"
-
-[[package]]
-name = "void"
-version = "1.0.2"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "6a02e4885ed3bc0f2de90ea6dd45ebcbb66dacffe03547fadbb0eeae2770887d"
-
-[[package]]
-name = "volatile-register"
-version = "0.2.2"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "de437e2a6208b014ab52972a27e59b33fa2920d3e00fe05026167a1c509d19cc"
-dependencies = [
- "vcell",
-]
-
-[[package]]
-name = "windows-sys"
-version = "0.59.0"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "1e38bc4d79ed67fd075bcc251a1c39b32a1776bbe92e5bef1f0bf1f8c531853b"
-dependencies = [
- "windows-targets",
-]
-
-[[package]]
-name = "windows-targets"
-version = "0.52.6"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "9b724f72796e036ab90c1021d4780d4d3d648aca59e491e6b98e725b84e99973"
-dependencies = [
- "windows_aarch64_gnullvm",
- "windows_aarch64_msvc",
- "windows_i686_gnu",
- "windows_i686_gnullvm",
- "windows_i686_msvc",
- "windows_x86_64_gnu",
- "windows_x86_64_gnullvm",
- "windows_x86_64_msvc",
-]
-
-[[package]]
-name = "windows_aarch64_gnullvm"
-version = "0.52.6"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "32a4622180e7a0ec044bb555404c800bc9fd9ec262ec147edd5989ccd0c02cd3"
-
-[[package]]
-name = "windows_aarch64_msvc"
-version = "0.52.6"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "09ec2a7bb152e2252b53fa7803150007879548bc709c039df7627cabbd05d469"
-
-[[package]]
-name = "windows_i686_gnu"
-version = "0.52.6"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "8e9b5ad5ab802e97eb8e295ac6720e509ee4c243f69d781394014ebfe8bbfa0b"
-
-[[package]]
-name = "windows_i686_gnullvm"
-version = "0.52.6"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "0eee52d38c090b3caa76c563b86c3a4bd71ef1a819287c19d586d7334ae8ed66"
-
-[[package]]
-name = "windows_i686_msvc"
-version = "0.52.6"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "240948bc05c5e7c6dabba28bf89d89ffce3e303022809e73deaefe4f6ec56c66"
-
-[[package]]
-name = "windows_x86_64_gnu"
-version = "0.52.6"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "147a5c80aabfbf0c7d901cb5895d1de30ef2907eb21fbbab29ca94c5b08b1a78"
-
-[[package]]
-name = "windows_x86_64_gnullvm"
-version = "0.52.6"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "24d5b23dc417412679681396f2b49f3de8c1473deb516bd34410872eff51ed0d"
-
-[[package]]
-name = "windows_x86_64_msvc"
-version = "0.52.6"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "589f6da84c646204747d1270a2a5661ea66ed1cced2631d546fdfb155959f9ec"
-
-[[package]]
-name = "xtask"
-version = "0.1.0"
-dependencies = [
- "clap",
- "clap-verbosity-flag",
- "log",
-]
-
-[[package]]
-name = "xuantie-riscv"
-version = "0.0.0"
-source = "git+https://github.com/rustsbi/xuantie#7a521c0400dc7edb7a3ee103206dd8246c78d542"
-dependencies = [
- "bit_field",
- "bitflags",
- "plic",
- "volatile-register",
-]

+ 0 - 11
prototyper/Cargo.toml

@@ -1,11 +0,0 @@
-[workspace]
-resolver = "3"
-members = ["prototyper", "bench-kernel", "test-kernel", "xtask"]
-
-[workspace.package]
-edition = "2024"
-license = "MulanPSL-2.0 OR MIT"
-repository = "https://github.com/rustsbi/prototyper"
-
-[profile.release]
-debug = true

+ 0 - 7
prototyper/LICENSE-MIT

@@ -1,7 +0,0 @@
-Copyright (C) 2024 RustSBI Organization
-
-Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
-
-The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
-
-THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

+ 0 - 131
prototyper/LICENSE-MULAN

@@ -1,131 +0,0 @@
-木兰宽松许可证, 第2版
-
-木兰宽松许可证, 第2版
-
-2020年1月 http://license.coscl.org.cn/MulanPSL2
-
-您对"软件"的复制、使用、修改及分发受木兰宽松许可证,第2版("本许可证")的如下条款的约束:
-
-    0. 定义
-
-    "软件" 是指由"贡献"构成的许可在"本许可证"下的程序和相关文档的集合。
-
-    "贡献" 是指由任一"贡献者"许可在"本许可证"下的受版权法保护的作品。
-
-    "贡献者" 是指将受版权法保护的作品许可在"本许可证"下的自然人或"法人实体"。
-
-    "法人实体" 是指提交贡献的机构及其"关联实体"。
-
-    "关联实体" 是指,对"本许可证"下的行为方而言,控制、受控制或与其共同受控制的机构,此处的控制是指有受控方或共同受控方至少50%直接或间接的投票权、资金或其他有价证券。
-    1. 授予版权许可
-
-    每个"贡献者"根据"本许可证"授予您永久性的、全球性的、免费的、非独占的、不可撤销的版权许可,您可以复制、使用、修改、分发其"贡献",不论修改与否。
-    2. 授予专利许可
-
-    每个"贡献者"根据"本许可证"授予您永久性的、全球性的、免费的、非独占的、不可撤销的(根据本条规定撤销除外)专利许可,供您制造、委托制造、使用、许诺销售、销售、进口其"贡献"或以其他方式转移其"贡献"。前述专利许可仅限于"贡献者"现在或将来拥有或控制的其"贡献"本身或其"贡献"与许可"贡献"时的"软件"结合而将必然会侵犯的专利权利要求,不包括对"贡献"的修改或包含"贡献"的其他结合。如果您或您的"关联实体"直接或间接地,就"软件"或其中的"贡献"对任何人发起专利侵权诉讼(包括反诉或交叉诉讼)或其他专利维权行动,指控其侵犯专利权,则"本许可证"授予您对"软件"的专利许可自您提起诉讼或发起维权行动之日终止。
-    3. 无商标许可
-
-    "本许可证"不提供对"贡献者"的商品名称、商标、服务标志或产品名称的商标许可,但您为满足第4条规定的声明义务而必须使用除外。
-    4. 分发限制
-
-    您可以在任何媒介中将"软件"以源程序形式或可执行形式重新分发,不论修改与否,但您必须向接收者提供"本许可证"的副本,并保留"软件"中的版权、商标、专利及免责声明。
-    5. 免责声明与责任限制
-
-    "软件"及其中的"贡献"在提供时不带任何明示或默示的担保。在任何情况下,"贡献者"或版权所有者不对任何人因使用"软件"或其中的"贡献"而引发的任何直接或间接损失承担责任,不论因何种原因导致或者基于何种法律理论,即使其曾被建议有此种损失的可能性。
-    6. 语言
-
-    "本许可证"以中英文双语表述,中英文版本具有同等法律效力。如果中英文版本存在任何冲突不一致,以中文版为准。
-
-条款结束
-
-如何将木兰宽松许可证,第2版,应用到您的软件
-
-如果您希望将木兰宽松许可证,第2版,应用到您的新软件,为了方便接收者查阅,建议您完成如下三步:
-
-    1, 请您补充如下声明中的空白,包括软件名、软件的首次发表年份以及您作为版权人的名字;
-    2, 请您在软件包的一级目录下创建以"LICENSE"为名的文件,将整个许可证文本放入该文件中;
-    3, 请将如下声明文本放入每个源文件的头部注释中。
-
-Copyright (c) 2024 RustSBI Organization
-
-RustSBI Prototyper is licensed under Mulan PSL v2.
-
-You can use this software according to the terms and conditions of the Mulan PSL v2.
-
-You may obtain a copy of Mulan PSL v2 at:
-
-http://license.coscl.org.cn/MulanPSL2
-
-THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND,
-
-EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT,
-
-MERCHANTABILITY OR FIT FOR A PARTICULAR PURPOSE.
-
-See the Mulan PSL v2 for more details.
-
-Mulan Permissive Software License,Version 2
-
-Mulan Permissive Software License,Version 2 (Mulan PSL v2)
-
-January 2020 http://license.coscl.org.cn/MulanPSL2
-
-Your reproduction, use, modification and distribution of the Software shall be subject to Mulan PSL v2 (this License) with the following terms and conditions:
-
-    0. Definition
-
-    Software means the program and related documents which are licensed under this License and comprise all Contribution(s).
-
-    Contribution means the copyrightable work licensed by a particular Contributor under this License.
-
-    Contributor means the Individual or Legal Entity who licenses its copyrightable work under this License.
-
-    Legal Entity means the entity making a Contribution and all its Affiliates.
-
-    Affiliates means entities that control, are controlled by, or are under common control with the acting entity under this License, 'control' means direct or indirect ownership of at least fifty percent (50%) of the voting power, capital or other securities of controlled or commonly controlled entity.
-    1. Grant of Copyright License
-
-    Subject to the terms and conditions of this License, each Contributor hereby grants to you a perpetual, worldwide, royalty-free, non-exclusive, irrevocable copyright license to reproduce, use, modify, or distribute its Contribution, with modification or not.
-    2. Grant of Patent License
-
-    Subject to the terms and conditions of this License, each Contributor hereby grants to you a perpetual, worldwide, royalty-free, non-exclusive, irrevocable (except for revocation under this Section) patent license to make, have made, use, offer for sale, sell, import or otherwise transfer its Contribution, where such patent license is only limited to the patent claims owned or controlled by such Contributor now or in future which will be necessarily infringed by its Contribution alone, or by combination of the Contribution with the Software to which the Contribution was contributed. The patent license shall not apply to any modification of the Contribution, and any other combination which includes the Contribution. If you or your Affiliates directly or indirectly institute patent litigation (including a cross claim or counterclaim in a litigation) or other patent enforcement activities against any individual or entity by alleging that the Software or any Contribution in it infringes patents, then any patent license granted to you under this License for the Software shall terminate as of the date such litigation or activity is filed or taken.
-    3. No Trademark License
-
-    No trademark license is granted to use the trade names, trademarks, service marks, or product names of Contributor, except as required to fulfill notice requirements in section 4.
-    4. Distribution Restriction
-
-    You may distribute the Software in any medium with or without modification, whether in source or executable forms, provided that you provide recipients with a copy of this License and retain copyright, patent, trademark and disclaimer statements in the Software.
-    5. Disclaimer of Warranty and Limitation of Liability
-
-    THE SOFTWARE AND CONTRIBUTION IN IT ARE PROVIDED WITHOUT WARRANTIES OF ANY KIND, EITHER EXPRESS OR IMPLIED. IN NO EVENT SHALL ANY CONTRIBUTOR OR COPYRIGHT HOLDER BE LIABLE TO YOU FOR ANY DAMAGES, INCLUDING, BUT NOT LIMITED TO ANY DIRECT, OR INDIRECT, SPECIAL OR CONSEQUENTIAL DAMAGES ARISING FROM YOUR USE OR INABILITY TO USE THE SOFTWARE OR THE CONTRIBUTION IN IT, NO MATTER HOW IT'S CAUSED OR BASED ON WHICH LEGAL THEORY, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
-    6. Language
-
-    THIS LICENSE IS WRITTEN IN BOTH CHINESE AND ENGLISH, AND THE CHINESE VERSION AND ENGLISH VERSION SHALL HAVE THE SAME LEGAL EFFECT. IN THE CASE OF DIVERGENCE BETWEEN THE CHINESE AND ENGLISH VERSIONS, THE CHINESE VERSION SHALL PREVAIL.
-
-END OF THE TERMS AND CONDITIONS
-
-How to Apply the Mulan Permissive Software License,Version 2 (Mulan PSL v2) to Your Software
-
-To apply the Mulan PSL v2 to your work, for easy identification by recipients, you are suggested to complete following three steps:
-
-    i. Fill in the blanks in following statement, including insert your software name, the year of the first publication of your software, and your name identified as the copyright owner;
-    ii. Create a file named "LICENSE" which contains the whole context of this License in the first directory of your software package;
-    iii. Attach the statement to the appropriate annotated syntax at the beginning of each source file.
-
-Copyright (c) 2024 RustSBI Organization
-
-RustSBI Prototyper is licensed under Mulan PSL v2.
-
-You can use this software according to the terms and conditions of the Mulan PSL v2.
-
-You may obtain a copy of Mulan PSL v2 at:
-
-http://license.coscl.org.cn/MulanPSL2
-
-THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND,
-
-EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT,
-
-MERCHANTABILITY OR FIT FOR A PARTICULAR PURPOSE.
-
-See the Mulan PSL v2 for more details.

+ 2 - 5
prototyper/bench-kernel/Cargo.toml

@@ -1,19 +1,16 @@
-cargo-features = ["per-package-target"]
-
 [package]
 name = "rustsbi-bench-kernel"
 version = "0.0.0"
 edition.workspace = true
 license.workspace = true
 repository.workspace = true
-forced-target = "riscv64imac-unknown-none-elf"
 publish = false
 
 # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
 
 [dependencies]
-sbi-testing = { git = "https://github.com/rustsbi/rustsbi", rev = "4821073", features = ["log"] }
-sbi-spec = { git = "https://github.com/rustsbi/rustsbi", rev = "4821073" }
+sbi-testing = { path = "../../library/sbi-testing", features = ["log"] }
+sbi-spec = { version = "0.0.8", path = "../../library/sbi-spec" }
 serde-device-tree = { git = "https://github.com/rustsbi/serde-device-tree", default-features = false }
 serde = { version = "1.0.202", default-features = false, features = ["derive"] }
 log = "0.4"

+ 2 - 5
prototyper/prototyper/Cargo.toml

@@ -1,12 +1,9 @@
-cargo-features = ["per-package-target"]
-
 [package]
 name = "rustsbi-prototyper"
 version = "0.0.0"
 edition.workspace = true
 license.workspace = true
 repository.workspace = true
-forced-target = "riscv64imac-unknown-none-elf"
 
 [dependencies]
 aclint = "=0.1.0"
@@ -19,8 +16,8 @@ uart16550 = "0.0.1"
 riscv-decode = "0.2.1"
 cfg-if = "1.0.0"
 buddy_system_allocator = "0.11.0"
-rustsbi = { version = "0.4.0", features = ["machine"] }
-sbi-spec = { version = "0.0.8", features = ["legacy"] }
+rustsbi = { version = "0.4.0", features = ["machine"], path = "../../library/rustsbi" }
+sbi-spec = { version = "0.0.8", features = ["legacy"], path = "../../library/sbi-spec" }
 serde = { version = "1.0.202", default-features = false, features = ["derive"] }
 fast-trap = { version = "0.1.0",  features = ["riscv-m"] }
 serde-device-tree = { git = "https://github.com/rustsbi/serde-device-tree", default-features = false }

+ 0 - 5
prototyper/rust-toolchain.toml

@@ -1,5 +0,0 @@
-[toolchain]
-channel = "nightly-2025-02-08"
-components = ["rustfmt", "llvm-tools-preview", "clippy", "rust-src"]
-targets = ["riscv64imac-unknown-none-elf"]
-profile = "minimal"

+ 1 - 4
prototyper/test-kernel/Cargo.toml

@@ -1,18 +1,15 @@
-cargo-features = ["per-package-target"]
-
 [package]
 name = "rustsbi-test-kernel"
 version = "0.0.0"
 edition.workspace = true
 license.workspace = true
 repository.workspace = true
-forced-target = "riscv64imac-unknown-none-elf"
 publish = false
 
 # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
 
 [dependencies]
-sbi-testing = { git = "https://github.com/rustsbi/rustsbi" , features = ["log"] }
+sbi-testing = { features = ["log"], path = "../../library/sbi-testing" }
 log = "0.4"
 riscv = "0.11.1"
 spin = "0.9"

+ 0 - 11
prototyper/xtask/Cargo.toml

@@ -1,11 +0,0 @@
-[package]
-name = "xtask"
-version = "0.1.0"
-edition.workspace = true
-license.workspace = true
-repository.workspace = true
-
-[dependencies]
-clap = { version = "4.5.4", features = ["derive", "env", "suggestions"] }
-log = "0.4.21"
-clap-verbosity-flag = "3.0.2"

+ 0 - 79
prototyper/xtask/src/bench.rs

@@ -1,79 +0,0 @@
-use std::{
-    env, fs,
-    process::{Command, ExitStatus},
-};
-
-use clap::Args;
-
-use crate::utils::cargo;
-
-#[derive(Debug, Args, Clone)]
-pub struct BenchArg {
-    /// Package Prototyper and Test-Kernel
-    #[clap(long)]
-    pub pack: bool,
-}
-
-#[must_use]
-pub fn run(arg: &BenchArg) -> Option<ExitStatus> {
-    let arch = "riscv64imac-unknown-none-elf";
-    let current_dir = env::current_dir();
-    let target_dir = current_dir
-        .as_ref()
-        .unwrap()
-        .join("target")
-        .join(arch)
-        .join("release");
-
-    info!("Building bench kernel");
-    cargo::Cargo::new("build")
-        .package("rustsbi-bench-kernel")
-        .target(arch)
-        .release()
-        .status()
-        .ok()?;
-
-    info!("Copy to binary");
-    let exit_status = Command::new("rust-objcopy")
-        .args(["-O", "binary"])
-        .arg("--binary-architecture=riscv64")
-        .arg(target_dir.join("rustsbi-bench-kernel"))
-        .arg(target_dir.join("rustsbi-bench-kernel.bin"))
-        .status()
-        .ok()?;
-
-    if arg.pack {
-        info!("Pack to image");
-        match fs::exists(target_dir.join("rustsbi-prototyper.bin")) {
-            Ok(true) => {}
-            Ok(false) => {
-                panic!(
-                    " Couldn't open \"rustsbi-prototyper.bin\": No such file or directory. Please compile Prototyper first"
-                );
-            }
-            Err(_) => {
-                panic!(
-                    "Can't check existence of file rustsbi-prototyper.bin, please compile Prototyper first"
-                );
-            }
-        }
-        fs::copy(
-            current_dir
-                .as_ref()
-                .unwrap()
-                .join("bench-kernel")
-                .join("scripts")
-                .join("rustsbi-bench-kernel.its"),
-            target_dir.join("rustsbi-bench-kernel.its"),
-        )
-        .ok()?;
-        env::set_current_dir(&target_dir).ok()?;
-        Command::new("mkimage")
-            .args(["-f", "rustsbi-bench-kernel.its"])
-            .arg("rustsbi-bench-kernel.itb")
-            .status()
-            .ok()?;
-        fs::remove_file(env::current_dir().unwrap().join("rustsbi-bench-kernel.its")).ok()?;
-    }
-    Some(exit_status)
-}

+ 0 - 55
prototyper/xtask/src/logger.rs

@@ -1,55 +0,0 @@
-use log::Level;
-use std::io::Write;
-
-use crate::Cli;
-
-/// Simple logger implementation for RustSBI that supports colored output.
-pub struct Logger;
-
-impl Logger {
-    /// Initialize the logger with log level from RUST_LOG env var or default to Info.
-    pub fn init(cli: &Cli) -> Result<(), log::SetLoggerError> {
-        // Set max log level from parmas env var if present, otherwise use Info
-        log::set_max_level(cli.verbose.log_level_filter());
-        log::set_logger(&Logger)
-    }
-}
-
-impl log::Log for Logger {
-    // Always enable logging for all log levels
-    #[inline]
-    fn enabled(&self, _metadata: &log::Metadata) -> bool {
-        true
-    }
-
-    // Log messages with color-coded levels
-    #[inline]
-    fn log(&self, record: &log::Record) {
-        // ANSI color codes for different log levels
-        const ERROR_COLOR: u8 = 31; // Red
-        const WARN_COLOR: u8 = 93; // Bright yellow
-        const INFO_COLOR: u8 = 32; // Green
-        const DEBUG_COLOR: u8 = 36; // Cyan
-        const TRACE_COLOR: u8 = 90; // Bright black
-
-        let color_code = match record.level() {
-            Level::Error => ERROR_COLOR,
-            Level::Warn => WARN_COLOR,
-            Level::Info => INFO_COLOR,
-            Level::Debug => DEBUG_COLOR,
-            Level::Trace => TRACE_COLOR,
-        };
-
-        eprintln!(
-            "\x1b[1;37m[RustSBI-xtask] \x1b[1;{color_code}m{:^5}\x1b[0m - {}",
-            record.level(),
-            record.args(),
-        );
-    }
-
-    // No-op flush since we use println! which is already line-buffered
-    #[inline]
-    fn flush(&self) {
-        std::io::stderr().flush().expect("Unable to flush stderr");
-    }
-}

+ 0 - 56
prototyper/xtask/src/main.rs

@@ -1,56 +0,0 @@
-use clap::{Parser, Subcommand};
-use clap_verbosity_flag::{InfoLevel, Verbosity};
-use std::process::ExitCode;
-
-#[macro_use]
-mod utils;
-mod bench;
-mod logger;
-mod prototyper;
-mod test;
-
-#[macro_use]
-extern crate log;
-
-use crate::bench::BenchArg;
-use crate::prototyper::PrototyperArg;
-use crate::test::TestArg;
-
-#[derive(Parser)]
-#[clap(
-    name = "xtask",
-    about = "A task runner for building, running and testing Prototyper",
-    long_about = None,
-)]
-struct Cli {
-    #[clap(subcommand)]
-    cmd: Cmd,
-    #[command(flatten)]
-    verbose: Verbosity<InfoLevel>,
-}
-
-#[derive(Subcommand)]
-enum Cmd {
-    Prototyper(PrototyperArg),
-    Test(TestArg),
-    Bench(BenchArg),
-}
-
-fn main() -> ExitCode {
-    let cli_args = Cli::parse();
-    logger::Logger::init(&cli_args).expect("Unable to init logger");
-
-    if let Some(code) = match cli_args.cmd {
-        Cmd::Prototyper(ref arg) => prototyper::run(arg),
-        Cmd::Test(ref arg) => test::run(arg),
-        Cmd::Bench(ref arg) => bench::run(arg),
-    } {
-        if code.success() {
-            info!("Finished");
-            return ExitCode::SUCCESS;
-        }
-    }
-
-    error!("Failed to run task!");
-    ExitCode::FAILURE
-}

+ 0 - 120
prototyper/xtask/src/prototyper.rs

@@ -1,120 +0,0 @@
-use std::{
-    env, fs,
-    process::{Command, ExitStatus},
-};
-
-use clap::Args;
-
-use crate::utils::CmdOptional;
-use crate::utils::cargo;
-
-#[derive(Debug, Args, Clone)]
-pub struct PrototyperArg {
-    #[clap(long, short = 'f')]
-    pub features: Vec<String>,
-
-    #[clap(long, env = "PROTOTYPER_FDT_PATH")]
-    pub fdt: Option<String>,
-
-    #[clap(long, env = "PROTOTYPER_PAYLOAD_PATH")]
-    pub payload: Option<String>,
-
-    #[clap(long)]
-    pub jump: bool,
-
-    #[clap(long, default_value = "INFO")]
-    pub log_level: String,
-}
-
-#[must_use]
-#[rustfmt::skip] // "export_env!("PROTOTYPER_FDT_PATH" ?= fdt.unwrap());" is a macro, rustfmt will not format it correctly
-pub fn run(arg: &PrototyperArg) -> Option<ExitStatus> {
-    let arch = "riscv64imac-unknown-none-elf";
-    let fdt = arg.fdt.clone();
-    let payload = arg.payload.clone();
-    let jump = arg.jump;
-    let current_dir = env::current_dir();
-    let target_dir = current_dir
-        .as_ref()
-        .unwrap()
-        .join("target")
-        .join(arch)
-        .join("release");
-
-    info!("Building Protoyper");
-    cargo::Cargo::new("build")
-        .package("rustsbi-prototyper")
-        .target(arch)
-        .unstable("build-std", ["core","alloc"])
-        .env("RUSTFLAGS", "-C relocation-model=pie -C link-arg=-pie")
-        .features(&arg.features)
-        .optional(arg.fdt.is_some(), |cargo| {
-            cargo.env("PROTOTYPER_FDT_PATH", fdt.as_ref().unwrap());
-            cargo.features(["fdt".to_string()])
-        })
-        .optional(payload.is_some(), |cargo| {
-            cargo.env("PROTOTYPER_PAYLOAD_PATH", payload.as_ref().unwrap());
-            cargo.features(["payload".to_string()])
-        })
-        .optional(jump, |cargo| {
-            cargo.features(["jump".to_string()])
-        })
-        .env("RUST_LOG", &arg.log_level)
-        .release()
-        .status()
-        .ok()?;
-
-    info!("Copy to binary");
-    let exit_status = Command::new("rust-objcopy")
-        .args(["-O", "binary"])
-        .arg("--binary-architecture=riscv64")
-        .arg(target_dir.join("rustsbi-prototyper"))
-        .arg(target_dir.join("rustsbi-prototyper.bin"))
-        .status()
-        .ok()?;
-    if !exit_status.success() {
-        error!("Failed to exec rust-objcopy, please check if cargo-binutils has been installed?");
-        return Some(exit_status);
-    }
-
-    if arg.payload.is_some() {
-        info!("Copy for payload mode");
-        fs::copy(
-            target_dir.join("rustsbi-prototyper"),
-            target_dir.join("rustsbi-prototyper-payload.elf"),
-        )
-        .ok()?;
-        fs::copy(
-            target_dir.join("rustsbi-prototyper.bin"),
-            target_dir.join("rustsbi-prototyper-payload.bin"),
-        )
-        .ok()?;
-    } else if arg.jump {
-        info!("Copy for jump mode");
-        fs::copy(
-            target_dir.join("rustsbi-prototyper"),
-            target_dir.join("rustsbi-prototyper-jump.elf"),
-        )
-        .ok()?;
-        fs::copy(
-            target_dir.join("rustsbi-prototyper.bin"),
-            target_dir.join("rustsbi-prototyper-jump.bin"),
-        )
-        .ok()?;
-    } else {
-        info!("Copy for dynamic mode");
-        fs::copy(
-            target_dir.join("rustsbi-prototyper"),
-            target_dir.join("rustsbi-prototyper-dynamic.elf"),
-        )
-        .ok()?;
-        fs::copy(
-            target_dir.join("rustsbi-prototyper.bin"),
-            target_dir.join("rustsbi-prototyper-dynamic.bin"),
-        )
-        .ok()?;
-
-    }
-
-    Some(exit_status)
-}

+ 0 - 79
prototyper/xtask/src/test.rs

@@ -1,79 +0,0 @@
-use std::{
-    env, fs,
-    process::{Command, ExitStatus},
-};
-
-use clap::Args;
-
-use crate::utils::cargo;
-
-#[derive(Debug, Args, Clone)]
-pub struct TestArg {
-    /// Package Prototyper and Test-Kernel
-    #[clap(long)]
-    pub pack: bool,
-}
-
-#[must_use]
-pub fn run(arg: &TestArg) -> Option<ExitStatus> {
-    let arch = "riscv64imac-unknown-none-elf";
-    let current_dir = env::current_dir();
-    let target_dir = current_dir
-        .as_ref()
-        .unwrap()
-        .join("target")
-        .join(arch)
-        .join("release");
-
-    info!("Building test kernel");
-    cargo::Cargo::new("build")
-        .package("rustsbi-test-kernel")
-        .target(arch)
-        .release()
-        .status()
-        .ok()?;
-
-    info!("Copy to binary");
-    let exit_status = Command::new("rust-objcopy")
-        .args(["-O", "binary"])
-        .arg("--binary-architecture=riscv64")
-        .arg(target_dir.join("rustsbi-test-kernel"))
-        .arg(target_dir.join("rustsbi-test-kernel.bin"))
-        .status()
-        .ok()?;
-
-    if arg.pack {
-        info!("Pack to image");
-        match fs::exists(target_dir.join("rustsbi-prototyper.bin")) {
-            Ok(true) => {}
-            Ok(false) => {
-                panic!(
-                    " Couldn't open \"rustsbi-prototyper.bin\": No such file or directory. Please compile Prototyper first"
-                );
-            }
-            Err(_) => {
-                panic!(
-                    "Can't check existence of file rustsbi-prototyper.bin, please compile Prototyper first"
-                );
-            }
-        }
-        fs::copy(
-            current_dir
-                .as_ref()
-                .unwrap()
-                .join("test-kernel")
-                .join("scripts")
-                .join("rustsbi-test-kernel.its"),
-            target_dir.join("rustsbi-test-kernel.its"),
-        )
-        .ok()?;
-        env::set_current_dir(&target_dir).ok()?;
-        Command::new("mkimage")
-            .args(["-f", "rustsbi-test-kernel.its"])
-            .arg("rustsbi-test-kernel.itb")
-            .status()
-            .ok()?;
-        fs::remove_file(env::current_dir().unwrap().join("rustsbi-test-kernel.its")).ok()?;
-    }
-    Some(exit_status)
-}

+ 0 - 105
prototyper/xtask/src/utils/cargo.rs

@@ -1,105 +0,0 @@
-use std::{
-    ffi::OsStr,
-    ops::{Deref, DerefMut},
-    path::Path,
-    process::Command,
-};
-
-use super::CmdOptional;
-
-pub struct Cargo {
-    cmd: Command,
-}
-
-#[allow(unused)]
-impl Cargo {
-    pub fn new(action: &str) -> Self {
-        let mut cmd = Command::new(env!("CARGO"));
-        cmd.arg(action);
-        Self { cmd }
-    }
-
-    pub fn package<S: AsRef<OsStr>>(&mut self, package: S) -> &mut Self {
-        self.args(["--package", package.as_ref().to_str().unwrap()]);
-        self
-    }
-
-    pub fn work_dir<S: AsRef<Path>>(&mut self, dir: S) -> &mut Self {
-        self.current_dir(dir);
-        self
-    }
-
-    pub fn release(&mut self) -> &mut Self {
-        self.arg("--release");
-        self
-    }
-
-    pub fn target<S: AsRef<OsStr>>(&mut self, target: S) -> &mut Self {
-        self.args(["--target", target.as_ref().to_str().unwrap()]);
-        self
-    }
-
-    pub fn features<I, S>(&mut self, features: I) -> &mut Self
-    where
-        I: IntoIterator<Item = S>,
-        S: AsRef<OsStr>,
-    {
-        self.args([
-            "--features",
-            features
-                .into_iter()
-                .map(|f| f.as_ref().to_str().unwrap().to_string())
-                .collect::<Vec<_>>()
-                .join(",")
-                .as_ref(),
-        ]);
-        self
-    }
-
-    pub fn no_default_features(&mut self) -> &mut Self {
-        self.arg("--no-default-features");
-        self
-    }
-
-    pub fn unstable<I, S>(&mut self, key: S, values: I) -> &mut Self
-    where
-        I: IntoIterator<Item = S>,
-        S: AsRef<OsStr>,
-    {
-        self.arg(format!(
-            "-Z{}={}",
-            key.as_ref().to_str().unwrap(),
-            values
-                .into_iter()
-                .map(|f| f.as_ref().to_str().unwrap().to_string())
-                .collect::<Vec<_>>()
-                .join(",")
-        ));
-        self
-    }
-
-    pub fn env<K, V>(&mut self, key: K, value: V) -> &mut Self
-    where
-        K: AsRef<OsStr>,
-        V: AsRef<OsStr>,
-    {
-        self.cmd.env(key, value);
-        self
-    }
-}
-
-impl CmdOptional for Cargo {}
-
-impl Deref for Cargo {
-    type Target = Command;
-
-    fn deref(&self) -> &Self::Target {
-        &self.cmd
-    }
-}
-
-impl DerefMut for Cargo {
-    fn deref_mut(&mut self) -> &mut Self::Target {
-        &mut self.cmd
-    }
-}

+ 0 - 14
prototyper/xtask/src/utils/envs.rs

@@ -1,14 +0,0 @@
-#[allow(unused)]
-macro_rules! export_env {
-    ($env:literal ?= $val:expr) => {
-        if std::env::vars_os().all(|(k, _)| k != $env) {
-            std::env::set_var($env, $val);
-        }
-    };
-    ($env0:literal ?= $val0:expr, $($env:literal ?= $val:expr,)+) => {
-        export_env!($env0 ?= $val0);
-        $(
-            export_env!($env ?= $val);
-        )+
-    };
-}

+ 0 - 13
prototyper/xtask/src/utils/mod.rs

@@ -1,13 +0,0 @@
-pub mod cargo;
-
-#[macro_use]
-pub mod envs;
-
-pub trait CmdOptional {
-    fn optional(&mut self, pred: bool, f: impl FnOnce(&mut Self) -> &mut Self) -> &mut Self {
-        if pred {
-            f(self);
-        }
-        self
-    }
-}

+ 2 - 1
rust-toolchain.toml

@@ -1,5 +1,6 @@
 [toolchain]
 profile = "minimal"
-channel = "nightly-2025-02-08"
+# channel = "nightly-2025-02-08"
+channel = "nightly"
 components = ["rustfmt", "llvm-tools-preview", "clippy", "rust-src"]
 # targets = ["riscv64imac-unknown-none-elf"]

+ 1 - 0
xtask/Cargo.toml

@@ -4,6 +4,7 @@ version = "0.1.0"
 edition.workspace = true
 license.workspace = true
 repository.workspace = true
+publish = false
 
 [dependencies]
 clap = { version = "4.5.4", features = ["derive", "env", "suggestions"] }