Skip to content
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
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
/target
/.vscode
.DS_Store
*.swp
*.swo
2 changes: 1 addition & 1 deletion src/aarch64/asm.rs
Original file line number Diff line number Diff line change
Expand Up @@ -139,7 +139,7 @@ pub fn flush_tlb(vaddr: Option<VirtAddr>) {
#[cfg(not(feature = "arm-el2"))]
unsafe {
// TLB Invalidate by VMID, All at stage 1, EL1
asm!("tlbi vmalle1; dsb sy; isb")
asm!("dsb sy; isb; tlbi vmalle1; dsb sy; isb")
}
#[cfg(feature = "arm-el2")]
unsafe {
Expand Down
3 changes: 3 additions & 0 deletions src/aarch64/context.rs
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,9 @@ pub struct TrapFrame {
pub elr: u64,
/// Saved Process Status Register (SPSR_EL1).
pub spsr: u64,

/// make sure the size is 16 bytes aligned
pub __pad: [u8; 8],
}

impl fmt::Debug for TrapFrame {
Expand Down
4 changes: 3 additions & 1 deletion src/aarch64/trap.rs
Original file line number Diff line number Diff line change
Expand Up @@ -104,12 +104,14 @@ fn aarch64_trap_handler(tf: &mut TrapFrame, kind: TrapKind, source: TrapSource)
tf.elr += 4;
}
e => {
let vaddr = va!(FAR_EL1.get() as usize);
panic!(
"Unhandled synchronous exception {:?} @ {:#x}: ESR={:#x} (EC {:#08b}, ISS {:#x})\n{}",
"Unhandled synchronous exception {:?} @ {:#x}: ESR={:#x} (EC {:#08b}, FAR: {:#x} ISS {:#x})\n{}",
e,
tf.elr,
esr.get(),
esr.read(ESR_EL1::EC),
vaddr,
iss,
tf.backtrace()
);
Expand Down
1 change: 1 addition & 0 deletions src/aarch64/uspace.rs
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@ impl UserContext {
+ SPSR_EL1::I::Unmasked
+ SPSR_EL1::F::Masked)
.value,
__pad: [0; 8],
},
sp: ustack_top.as_usize() as _,
tpidr: 0,
Expand Down