You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

49 lines
808 B

//! Interrupt and exception for aarch64.
mod handler;
mod context;
mod syndrome;
pub use self::context::*;
pub use self::handler::*;
/// Set the exception vector address
pub fn init() {
unsafe {
asm!(
"adr x0, __vectors;
msr vbar_el1, x0"
);
}
}
/// Enable the interrupt.
#[inline(always)]
pub unsafe fn enable() {
// TODO
}
/// Disable the interrupt.
#[inline(always)]
pub unsafe fn disable() {
// TODO
}
/// Disable the interrupt and store the status.
///
/// return: status(usize)
#[inline(always)]
pub unsafe fn disable_and_store() -> usize {
// TODO
0
}
/// Use the original status to restore the process
///
/// Arguments:
/// * flags: original status(usize)
#[inline(always)]
pub unsafe fn restore(flags: usize) {
// TODO
}