Skip to content

Commit

Permalink
FIx test
Browse files Browse the repository at this point in the history
Signed-off-by: Graham MacDonald <[email protected]>
  • Loading branch information
gmacd committed Sep 16, 2023
1 parent 5d09d0b commit c03b9de
Showing 1 changed file with 10 additions and 4 deletions.
14 changes: 10 additions & 4 deletions aarch64/src/vm.rs
Original file line number Diff line number Diff line change
Expand Up @@ -418,13 +418,19 @@ pub unsafe fn init(kpage_table: &mut PageTable, dtb_phys: PhysAddr, edtb_phys: P

/// Return the root kernel page table physical address
fn ttbr1_el1() -> u64 {
let mut addr: u64;
unsafe {
core::arch::asm!("mrs {value}, ttbr1_el1", value = out(reg) addr);
#[cfg(not(test))]
{
let mut addr: u64;
unsafe {
core::arch::asm!("mrs {value}, ttbr1_el1", value = out(reg) addr);
}
addr
}
addr
#[cfg(test)]
0
}

#[allow(unused_variables)]
pub unsafe fn switch(kpage_table: &PageTable) {
#[cfg(not(test))]
unsafe {
Expand Down

0 comments on commit c03b9de

Please sign in to comment.