parent
2daf8c188d
commit
b1bdac7d0f
@ -1,11 +1,11 @@
|
|||||||
use arch::interrupt::TrapFrame;
|
use crate::arch::interrupt::TrapFrame;
|
||||||
use super::bcm2837::timer::Timer;
|
use bcm2837::timer::Timer;
|
||||||
use super::bcm2837::interrupt::{Controller, Interrupt};
|
use bcm2837::interrupt::{Controller, Interrupt};
|
||||||
|
|
||||||
pub fn handle_irq(tf: &mut TrapFrame) {
|
pub fn handle_irq(tf: &mut TrapFrame) {
|
||||||
let controller = Timer::new();
|
let controller = Timer::new();
|
||||||
if controller.is_pending() {
|
if controller.is_pending() {
|
||||||
super::timer::set_next();
|
super::timer::set_next();
|
||||||
::trap::timer();
|
crate::trap::timer();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -0,0 +1,8 @@
|
|||||||
|
pub fn halt() {
|
||||||
|
unsafe { asm!("wfi" :::: "volatile") }
|
||||||
|
}
|
||||||
|
|
||||||
|
pub fn id() -> usize {
|
||||||
|
// TODO: cpu id
|
||||||
|
0
|
||||||
|
}
|
Loading…
Reference in new issue