Fixed kernel hanging by disabling timer interrupts
This commit is contained in:
parent
eab775e875
commit
7f183c7712
10
src/main.rs
10
src/main.rs
|
@ -48,11 +48,11 @@ unsafe extern "C" fn _enter() -> ! {
|
||||||
"csrw mtvec, t1",
|
"csrw mtvec, t1",
|
||||||
|
|
||||||
// Set MSIE, MTIE, and MEIE on machine interrupt enable CSR:
|
// Set MSIE, MTIE, and MEIE on machine interrupt enable CSR:
|
||||||
// MSIE to enable machine-/M-mode software interrupts
|
// (1 << 3) = MSIE to enable machine-/M-mode software interrupts
|
||||||
// MTIE to enable M-mode timer interrupts
|
// | (1 << 7) = MTIE to enable M-mode timer interrupts (disabled for now)
|
||||||
// MEIE to enable M-mode external interrupts
|
// | (1 << 11) = MEIE to enable M-mode external interrupts
|
||||||
//"li t2, (1 << 3) | (1 << 7) | (1 << 11)",
|
"li t2, (1 << 3) | (1 << 11)",
|
||||||
//"csrw mie, t2", -> This is causing problems - after setting this register the kernel hangs
|
"csrw mie, t2",
|
||||||
|
|
||||||
// clear the BSS
|
// clear the BSS
|
||||||
"la t0, _bss_start",
|
"la t0, _bss_start",
|
||||||
|
|
Loading…
Reference in a new issue