more telemetry on xous-swapper

This commit is contained in:
bunnie 2024-03-31 17:48:54 +08:00
parent 30bdecc2a0
commit 5f1e8618f0

View file

@ -202,19 +202,26 @@ fn main() {
// correctly // correctly
let rpt = unsafe { &mut *(rpt_init as *mut RuntimePageTracker) }; let rpt = unsafe { &mut *(rpt_init as *mut RuntimePageTracker) };
writeln!(
ss.duart,
"Swap params: spt {:x}, base {:x}, bounds: {:x}, rpt: {:x}",
spt_init, smt_base_init, smt_bounds_init, rpt_init
)
.ok();
// init the log, but this is mostly unused. // init the log, but this is mostly unused.
log_server::init_wait().unwrap(); log_server::init_wait().unwrap();
log::set_max_level(log::LevelFilter::Info); log::set_max_level(log::LevelFilter::Info);
log::info!("my PID is {}", xous::process::id()); log::info!("my PID is {}", xous::process::id());
// test the debug serial port // test the debug serial port
write!(ss.duart, "Swapper started.\n\r").ok(); writeln!(ss.duart, "Swapper started.").ok();
let mut msg_opt = None; let mut msg_opt = None;
loop { loop {
xous::reply_and_receive_next(sid, &mut msg_opt).unwrap(); xous::reply_and_receive_next(sid, &mut msg_opt).unwrap();
let msg = msg_opt.as_mut().unwrap(); let msg = msg_opt.as_mut().unwrap();
let op: Option<Opcode> = FromPrimitive::from_usize(msg.body.id()); let op: Option<Opcode> = FromPrimitive::from_usize(msg.body.id());
write!(ss.duart, "Swapper got {:?}", msg).ok(); writeln!(ss.duart, "Swapper got {:?}", msg).ok();
match op { match op {
Some(Opcode::WriteToSwap) => { Some(Opcode::WriteToSwap) => {
unimplemented!(); unimplemented!();