sbi_spec/srst.rs
1//! Chapter 10. System Reset Extension (EID #0x53525354 "SRST").
2
3/// Extension ID for System Reset extension.
4pub const EID_SRST: usize = crate::eid_from_str("SRST") as _;
5pub use fid::*;
6
7/// Shutdown as a reset type.
8pub const RESET_TYPE_SHUTDOWN: u32 = 0;
9/// Cold Reboot as a reset type.
10pub const RESET_TYPE_COLD_REBOOT: u32 = 1;
11/// Warm Reboot as a reset type.
12pub const RESET_TYPE_WARM_REBOOT: u32 = 2;
13
14/// No Reason as reset reason.
15pub const RESET_REASON_NO_REASON: u32 = 0;
16/// System Failure as reset reason.
17pub const RESET_REASON_SYSTEM_FAILURE: u32 = 1;
18
19/// Declared in §10.2.
20mod fid {
21 /// Function ID to reset the system based on provided reset type and reason.
22 ///
23 /// Declared in §10.1.
24 pub const SYSTEM_RESET: usize = 0;
25}