Skip to content

Commit cead96d

Browse files
committed
feat(hal/imx8mn): added test code to test armv8 exception handling impl
1 parent b898123 commit cead96d

File tree

4 files changed

+6
-4
lines changed

4 files changed

+6
-4
lines changed

boards/bootloaders/imx8mn/imx8mn.bin

100755100644
64 Bytes
Binary file not shown.

boards/bootloaders/imx8mn/src/boot.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ global_asm!(include_str!("entry.s"));
1818
///
1919
#[no_mangle]
2020
pub unsafe extern "C" fn _start_rust() -> ! {
21-
// disable mmu, i and d caching
21+
// disable i and d caching, mmu is already disabled.
2222
memory::mmu::mmu().disable_mmu_and_caching();
2323
// set the vector base address for excpetion handlers
2424
exception::exception::handling_init();

boards/bootloaders/imx8mn/src/main.rs

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -71,9 +71,8 @@ fn kernel_main() -> ! {
7171
}
7272

7373
// info!("");
74-
// info!("Trying to read from address 8 GiB...");
75-
// let mut big_addr: u64 = 8 * 1024 * 1024 * 1024;
76-
// unsafe { core::ptr::read_volatile(big_addr as *mut u64) };
74+
// info!("Trying to read from non-existent OCRAM addresss 0x980000...");
75+
// unsafe { core::ptr::read_volatile(0x980000 as *mut u64) };
7776

7877
wait_forever()
7978
}

boards/hal/src/nxp/imx8mn/exception/exception.rs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,8 @@ use tock_registers::{
88
registers::InMemoryRegister,
99
};
1010

11+
pub use aarch64_cpu::registers::VBAR_EL3;
12+
1113
// Assembly counterpart to this file.
1214
global_asm!(include_str!("exception.s"));
1315

@@ -270,4 +272,5 @@ pub unsafe fn handling_init() {
270272

271273
// Force VBAR update to complete before next instruction.
272274
barrier::isb(barrier::SY);
275+
273276
}

0 commit comments

Comments
 (0)