You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
31 lines
968 B
Rust
31 lines
968 B
Rust
5 years ago
|
// SPDX-License-Identifier: MIT OR Apache-2.0
|
||
|
//
|
||
4 years ago
|
// Copyright (c) 2020-2021 Andre Richter <andre.o.richter@gmail.com>
|
||
5 years ago
|
|
||
|
//! Synchronous and asynchronous exception handling.
|
||
|
|
||
|
#[cfg(target_arch = "aarch64")]
|
||
|
#[path = "_arch/aarch64/exception.rs"]
|
||
|
mod arch_exception;
|
||
|
|
||
|
pub mod asynchronous;
|
||
|
|
||
4 years ago
|
//--------------------------------------------------------------------------------------------------
|
||
|
// Architectural Public Reexports
|
||
|
//--------------------------------------------------------------------------------------------------
|
||
|
pub use arch_exception::{current_privilege_level, handling_init};
|
||
|
|
||
5 years ago
|
//--------------------------------------------------------------------------------------------------
|
||
|
// Public Definitions
|
||
|
//--------------------------------------------------------------------------------------------------
|
||
|
|
||
|
/// Kernel privilege levels.
|
||
|
#[allow(missing_docs)]
|
||
|
#[derive(PartialEq)]
|
||
|
pub enum PrivilegeLevel {
|
||
|
User,
|
||
|
Kernel,
|
||
|
Hypervisor,
|
||
|
Unknown,
|
||
|
}
|