Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Revert "Use DUCT-TAPE to fix irq test" #354

Merged
merged 1 commit into from
Jul 19, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 0 additions & 13 deletions lib/armv9a/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -11,16 +11,3 @@ pub use regs::*;
pub const fn bits_in_reg(mask: u64, val: u64) -> u64 {
(val << (mask.trailing_zeros())) & mask
}

pub fn is_irq_pending() -> bool {
let val: u64;

unsafe {
core::arch::asm!(
"mrs {}, ISR_EL1",
out(reg) val
)
}

val != 0
}
9 changes: 0 additions & 9 deletions rmm/src/rsi/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@ pub mod ripas;
pub mod version;

use alloc::vec::Vec;
use armv9a::is_irq_pending;

use crate::define_interface;
use crate::event::RsiHandle;
Expand Down Expand Up @@ -215,14 +214,6 @@ pub fn set_event_handler(rsi: &mut RsiHandle) {
{
let (token_part, token_left) = get_token_part(&rd, rec, buffer_size)?;

if is_irq_pending() {
error!("IRQ is pending while fetching token");
set_reg(rec, 0, INCOMPLETE)?;
set_reg(rec, 1, 0)?;
ret[0] = rmi::SUCCESS_REC_ENTER;
return Ok(());
}

unsafe {
let pa_ptr = attest_pa as *mut u8;
core::ptr::copy(token_part.as_ptr(), pa_ptr.add(pa_offset), token_part.len());
Expand Down
Loading