From: Kit Rhett Aultman Date: Mon, 2 Sep 2024 23:31:18 +0000 (-0400) Subject: main.rs: remove commented-out ecall code X-Git-Url: https://git.kitaultman.com/?a=commitdiff_plain;h=e12724f2b9474014375e1147fb1f4c0ab3ab7318;p=riscv_baremetal.git main.rs: remove commented-out ecall code Before the commits supporting interrupts from the UART, it's worth stopping to clean up a little bit. This commented-out code to execute ecall (which triggers an exception and thus exercises the exception handler) isn't really needed going forward, so this commit drops it. --- diff --git a/src/main.rs b/src/main.rs index 76f3110..7c0fa4a 100644 --- a/src/main.rs +++ b/src/main.rs @@ -116,13 +116,6 @@ extern "C" fn entry() -> ! { } println!("Kernel init complete"); - // ecall from machine mode is currently a panic so uncommenting this block will trigger an - // exception and execute the panic handler. - /* - unsafe { - asm!("ecall") - } - */ println!("Going idle!"); unsafe { asm!("1:","wfi", "j 1b") } // Hopefully wfi will make this less busy (1b is // 'backwards to 1:'