From b13833e0e9a3edf84426883395fe4eeb834b5958 Mon Sep 17 00:00:00 2001 From: Jiajie Chen Date: Tue, 7 Jul 2020 20:41:27 +0800 Subject: [PATCH] Implement wait_for_interrupt properly --- kernel/Cargo.lock | 2 +- kernel/Cargo.toml | 2 +- kernel/src/arch/mipsel/interrupt/mod.rs | 3 ++- 3 files changed, 4 insertions(+), 3 deletions(-) diff --git a/kernel/Cargo.lock b/kernel/Cargo.lock index 53c6ee35..364d8cd1 100644 --- a/kernel/Cargo.lock +++ b/kernel/Cargo.lock @@ -709,7 +709,7 @@ checksum = "3a385d94f3f62e60445a0adb9ff8d9621faa272234530d4c0f848ec98f88e316" [[package]] name = "trapframe" version = "0.4.3" -source = "git+https://github.com/rcore-os/trapframe-rs?rev=e9a2164#e9a21646169f23934facdcf2299490732dbc6a7f" +source = "git+https://github.com/rcore-os/trapframe-rs?rev=bdfe5aa#bdfe5aaebcdd64636c8831c2b8c17e4fede40c0b" dependencies = [ "raw-cpuid", "x86_64", diff --git a/kernel/Cargo.toml b/kernel/Cargo.toml index 1b2fa371..eb316f37 100644 --- a/kernel/Cargo.toml +++ b/kernel/Cargo.toml @@ -69,7 +69,7 @@ rcore-fs-devfs = { git = "https://github.com/rcore-os/rcore-fs", rev = "517af47" rlibc = "1.0" smoltcp = { git = "https://github.com/rcore-os/smoltcp", rev = "5bd87c7c", default-features = false, features = ["alloc", "log", "ethernet", "proto-ipv4", "proto-igmp", "socket-icmp", "socket-udp", "socket-tcp", "socket-raw"] } spin = "0.5" -trapframe = { git = "https://github.com/rcore-os/trapframe-rs", rev = "e9a2164" } +trapframe = { git = "https://github.com/rcore-os/trapframe-rs", rev = "bdfe5aa" } virtio-drivers = { git = "https://github.com/rcore-os/virtio-drivers", rev = "dfa70e14" } volatile = "0.2" woke = "0.0.2" diff --git a/kernel/src/arch/mipsel/interrupt/mod.rs b/kernel/src/arch/mipsel/interrupt/mod.rs index 1fd94525..f60c229f 100644 --- a/kernel/src/arch/mipsel/interrupt/mod.rs +++ b/kernel/src/arch/mipsel/interrupt/mod.rs @@ -327,5 +327,6 @@ pub fn ack(_irq: usize) { } pub fn wait_for_interrupt() { - // TODO + cp0::status::enable_interrupt(); + cp0::status::disable_interrupt(); }