feat(kernel): console cap gates DebugPutchar, no uart fast path; spawn start arg in a0; delegate returns slot

This commit is contained in:
2026-10-27 14:54:36 +01:00
parent 33e1c849d1
commit 7415bab7f5
31 changed files with 290 additions and 64 deletions

View File

@@ -80,7 +80,9 @@ impl<P: Platform> Kernel<P> {
Syscall::ExitThread => self.handle_exit_thread(tid, pid),
Syscall::RequestPages { count } => self.handle_request_pages(pid, count),
Syscall::ReleasePages { addr, count } => self.handle_release_pages(pid, addr, count),
Syscall::SpawnThread { entry, stack } => self.handle_spawn_thread(pid, entry, stack),
Syscall::SpawnThread { entry, stack, arg } => {
self.handle_spawn_thread(pid, entry, stack, arg)
}
Syscall::CreateProcess { create_cap, image } => {
self.handle_create_process(pid, create_cap, image)
}
@@ -144,7 +146,10 @@ impl<P: Platform> Kernel<P> {
}
Syscall::Halt { control } => self.handle_halt(pid, control),
Syscall::CreateEndpoint => self.handle_create_endpoint(pid),
Syscall::DebugPutchar { byte } => self.handle_debug_putchar(byte),
Syscall::DebugPutchar { console, byte } => complete(
self.debug_putchar(pid, console, byte)
.map(|()| SyscallResult::Ok),
),
Syscall::MapPage {
process,
src_va,
@@ -155,7 +160,8 @@ impl<P: Platform> Kernel<P> {
process,
entry,
stack,
} => self.handle_spawn_thread_in(pid, process, entry, stack),
arg,
} => self.handle_spawn_thread_in(pid, process, entry, stack, arg),
}
}
}