mirror of
https://github.com/saymrwulf/xous-core.git
synced 2026-11-15 08:30:02 +00:00
kernel: claim uart irq before we enable irqs
In order to prevent a race at the start, claim the IRQ before we enable the IRQ. Signed-off-by: Sean Cross <sean@xobs.io>
This commit is contained in:
parent
a1b16a74cb
commit
25f976dbb6
1 changed files with 2 additions and 2 deletions
|
|
@ -63,6 +63,8 @@ pub extern "C" fn init(arg_offset: *const u32, init_offset: *const u32, rpt_offs
|
|||
#[cfg(any(feature = "debug-print", feature = "print-panics"))]
|
||||
{
|
||||
use utralib::generated::*;
|
||||
xous_kernel::claim_interrupt(utra::uart::UART_IRQ, debug::irq, 0 as *mut usize)
|
||||
.expect("Couldn't claim debug interrupt");
|
||||
// Map the serial port so println!() works as expected.
|
||||
mem::MemoryManager::with_mut(|memory_manager| {
|
||||
memory_manager
|
||||
|
|
@ -79,8 +81,6 @@ pub extern "C" fn init(arg_offset: *const u32, init_offset: *const u32, rpt_offs
|
|||
debug::Uart {}.init();
|
||||
println!("KMAIN (clean boot): Supervisor mode started...");
|
||||
println!("Claiming IRQ {} via syscall...", utra::uart::UART_IRQ);
|
||||
xous_kernel::claim_interrupt(utra::uart::UART_IRQ, debug::irq, 0 as *mut usize)
|
||||
.expect("Couldn't claim debug interrupt");
|
||||
print!("}} ");
|
||||
|
||||
// Print the processed kernel arguments
|
||||
|
|
|
|||
Loading…
Reference in a new issue