mirror of
https://github.com/saymrwulf/xous-core.git
synced 2026-11-16 08:38:26 +00:00
kernel: disable lots of debug output
Signed-off-by: Sean Cross <sean@xobs.io>
This commit is contained in:
parent
6b729d9ebc
commit
263e57d4aa
4 changed files with 15 additions and 16 deletions
|
|
@ -106,7 +106,7 @@ pub extern "C" fn trap_handler(
|
||||||
|
|
||||||
let response = crate::syscall::handle(call).unwrap_or_else(|e| xous::Result::Error(e));
|
let response = crate::syscall::handle(call).unwrap_or_else(|e| xous::Result::Error(e));
|
||||||
|
|
||||||
println!("Result: {:?}", response);
|
// println!("Result: {:?}", response);
|
||||||
let mut process = ProcessHandle::get();
|
let mut process = ProcessHandle::get();
|
||||||
let ctx = process.current_context();
|
let ctx = process.current_context();
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -111,8 +111,6 @@ impl Process {
|
||||||
context.sepc = entrypoint;
|
context.sepc = entrypoint;
|
||||||
context.registers[1] = stack;
|
context.registers[1] = stack;
|
||||||
|
|
||||||
println!("Initialized context {} with entrypoint of {:08x}", self.current_context_nr(), entrypoint);
|
|
||||||
|
|
||||||
self.inner = Default::default();
|
self.inner = Default::default();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -455,10 +455,10 @@ impl SystemServices {
|
||||||
new.state
|
new.state
|
||||||
);
|
);
|
||||||
if new_context == 0 {
|
if new_context == 0 {
|
||||||
println!(
|
// print!(
|
||||||
"PID {}: Looking for a valid context in the mask {:08b}",
|
// "PID {}: Looking for a valid context in the mask {:08b}, curent context {} ({:08b})",
|
||||||
new_pid, x
|
// new_pid, x, new.current_context, new.current_context
|
||||||
);
|
// );
|
||||||
new_context = new.current_context as usize;
|
new_context = new.current_context as usize;
|
||||||
while x & (1 << new_context) == 0 {
|
while x & (1 << new_context) == 0 {
|
||||||
new_context += 1;
|
new_context += 1;
|
||||||
|
|
@ -471,6 +471,7 @@ impl SystemServices {
|
||||||
return Err(xous::Error::ProcessNotFound);
|
return Err(xous::Error::ProcessNotFound);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
// println!(" -- picked context {}", new_context);
|
||||||
} else if x & (1 << new_context) == 0 {
|
} else if x & (1 << new_context) == 0 {
|
||||||
println!(
|
println!(
|
||||||
"context is {:?}, which is not valid for new context {}",
|
"context is {:?}, which is not valid for new context {}",
|
||||||
|
|
|
||||||
|
|
@ -136,7 +136,7 @@ use xous::*;
|
||||||
pub fn handle(call: SysCall) -> core::result::Result<xous::Result, xous::Error> {
|
pub fn handle(call: SysCall) -> core::result::Result<xous::Result, xous::Error> {
|
||||||
let pid = arch::current_pid();
|
let pid = arch::current_pid();
|
||||||
|
|
||||||
println!("PID{} Syscall: {:?}", pid, call);
|
// println!("PID{} Syscall: {:?}", pid, call);
|
||||||
match call {
|
match call {
|
||||||
SysCall::MapMemory(phys, virt, size, req_flags) => {
|
SysCall::MapMemory(phys, virt, size, req_flags) => {
|
||||||
let mut mm = MemoryManagerHandle::get();
|
let mut mm = MemoryManagerHandle::get();
|
||||||
|
|
@ -209,7 +209,10 @@ pub fn handle(call: SysCall) -> core::result::Result<xous::Result, xous::Error>
|
||||||
SysCall::SwitchTo(pid, context) => {
|
SysCall::SwitchTo(pid, context) => {
|
||||||
let mut ss = SystemServicesHandle::get();
|
let mut ss = SystemServicesHandle::get();
|
||||||
ss.activate_process_context(pid, context, true, false)
|
ss.activate_process_context(pid, context, true, false)
|
||||||
.map(|ctx| { println!("switchto ({}, {})", pid, ctx); xous::Result::ResumeProcess })
|
.map(|ctx| {
|
||||||
|
// println!("switchto ({}, {})", pid, ctx);
|
||||||
|
xous::Result::ResumeProcess
|
||||||
|
})
|
||||||
}
|
}
|
||||||
SysCall::ClaimInterrupt(no, callback, arg) => {
|
SysCall::ClaimInterrupt(no, callback, arg) => {
|
||||||
interrupt_claim(no, pid as definitions::PID, callback, arg).map(|_| xous::Result::Ok)
|
interrupt_claim(no, pid as definitions::PID, callback, arg).map(|_| xous::Result::Ok)
|
||||||
|
|
@ -257,14 +260,11 @@ pub fn handle(call: SysCall) -> core::result::Result<xous::Result, xous::Error>
|
||||||
.map(|_| Ok(xous::Result::ResumeProcess))
|
.map(|_| Ok(xous::Result::ResumeProcess))
|
||||||
.unwrap_or(Err(xous::Error::ProcessNotFound))
|
.unwrap_or(Err(xous::Error::ProcessNotFound))
|
||||||
}
|
}
|
||||||
SysCall::SpawnThread(
|
SysCall::SpawnThread(entrypoint, stack_pointer, argument) => {
|
||||||
entrypoint,
|
|
||||||
stack_pointer,
|
|
||||||
argument ,
|
|
||||||
) => {
|
|
||||||
let mut ss = SystemServicesHandle::get();
|
let mut ss = SystemServicesHandle::get();
|
||||||
ss.spawn_thread(entrypoint, stack_pointer, argument).map(|ctx| xous::Result::ThreadID(ctx))
|
ss.spawn_thread(entrypoint, stack_pointer, argument)
|
||||||
},
|
.map(|ctx| xous::Result::ThreadID(ctx))
|
||||||
|
}
|
||||||
SysCall::CreateServer(name) => {
|
SysCall::CreateServer(name) => {
|
||||||
let mut ss = SystemServicesHandle::get();
|
let mut ss = SystemServicesHandle::get();
|
||||||
ss.create_server(name).map(|x| xous::Result::ServerID(x))
|
ss.create_server(name).map(|x| xous::Result::ServerID(x))
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue