forked from M-Labs/artiq-zynq
improve debug messaging
This commit is contained in:
parent
b7eacaeac7
commit
44b37aba7d
|
@ -3,7 +3,7 @@ use core::fmt;
|
|||
use core::cmp::min;
|
||||
use core::cell::RefCell;
|
||||
use alloc::rc::Rc;
|
||||
use log::{warn, error};
|
||||
use log::{debug, warn, error};
|
||||
|
||||
use num_derive::{FromPrimitive, ToPrimitive};
|
||||
use num_traits::{FromPrimitive, ToPrimitive};
|
||||
|
@ -105,6 +105,7 @@ async fn write_header(stream: &TcpStream, reply: Reply) -> Result<()> {
|
|||
|
||||
async fn handle_connection(stream: &TcpStream, control: Rc<RefCell<kernel::Control>>) -> Result<()> {
|
||||
expect(&stream, b"ARTIQ coredev\n").await?;
|
||||
debug!("received connection");
|
||||
loop {
|
||||
if !expect(&stream, &[0x5a, 0x5a, 0x5a, 0x5a]).await? {
|
||||
return Err(Error::UnexpectedPattern)
|
||||
|
|
|
@ -125,6 +125,7 @@ pub fn main_core1() {
|
|||
ptr::write_bytes(__bss_start as *mut u8, 0, (_end - __bss_start) as usize);
|
||||
}
|
||||
current_modinit = Some(__modinit__);
|
||||
debug!("kernel loaded");
|
||||
core1_tx.send(Message::LoadCompleted)
|
||||
},
|
||||
Err(error) => {
|
||||
|
@ -134,13 +135,13 @@ pub fn main_core1() {
|
|||
}
|
||||
},
|
||||
Message::StartRequest => {
|
||||
debug!("starting");
|
||||
debug!("kernel starting");
|
||||
if let Some(__modinit__) = current_modinit {
|
||||
unsafe {
|
||||
(mem::transmute::<u32, fn()>(__modinit__))();
|
||||
}
|
||||
}
|
||||
debug!("stopping");
|
||||
debug!("kernel terminated");
|
||||
}
|
||||
_ => error!("Core1 received unexpected message: {:?}", message),
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue