123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225 |
- #![no_std]
- #![feature(ptr_metadata)]
- #![deny(warnings)]
- #[doc(hidden)]
- #[macro_use]
- pub mod legacy_stdio;
- mod base;
- mod ecall;
- mod hart_mask;
- mod hsm;
- mod ipi;
- mod pmu;
- mod reset;
- mod rfence;
- mod timer;
- mod util;
- #[cfg(feature = "guest")]
- mod guest;
- const LOGO: &str = r"
- .______ __ __ _______.___________. _______..______ __
- | _ \ | | | | / | | / || _ \ | |
- | |_) | | | | | | (----`---| |----`| (----`| |_) || |
- | / | | | | \ \ | | \ \ | _ < | |
- | |\ \----.| `--' |.----) | | | .----) | | |_) || |
- | _| `._____| \______/ |_______/ |__| |_______/ |______/ |__|";
- pub fn logo() -> &'static str {
-
-
- LOGO.trim_start()
- }
- const SBI_SPEC_MAJOR: usize = 1;
- const SBI_SPEC_MINOR: usize = 0;
- const IMPL_ID_RUSTSBI: usize = 4;
- const RUSTSBI_VERSION_MAJOR: usize = (env!("CARGO_PKG_VERSION_MAJOR").as_bytes()[0] - b'0') as _;
- const RUSTSBI_VERSION_MINOR: usize = (env!("CARGO_PKG_VERSION_MINOR").as_bytes()[0] - b'0') as _;
- const RUSTSBI_VERSION_PATCH: usize = (env!("CARGO_PKG_VERSION_PATCH").as_bytes()[0] - b'0') as _;
- const RUSTSBI_VERSION: usize =
- (RUSTSBI_VERSION_MAJOR << 16) + (RUSTSBI_VERSION_MINOR << 8) + RUSTSBI_VERSION_PATCH;
- pub const VERSION: &str = env!("CARGO_PKG_VERSION");
- pub extern crate sbi_spec as spec;
- pub use ecall::handle_ecall as ecall;
- pub use hart_mask::HartMask;
- pub use hsm::{init_hsm, Hsm};
- pub use ipi::{init_ipi, Ipi};
- #[doc(hidden)]
- pub use legacy_stdio::{legacy_stdio_getchar, legacy_stdio_putchar};
- pub use pmu::{init_pmu, Pmu};
- pub use reset::{init_reset, Reset};
- pub use rfence::{init_rfence as init_remote_fence, Rfence as Fence};
- pub use timer::{init_timer, Timer};
|