From 9444893c1d4fe0192f02203b2d151c64b5f47d4d Mon Sep 17 00:00:00 2001 From: vasilito Date: Sat, 11 Jul 2026 03:38:54 +0300 Subject: [PATCH] kernel: add INFO logging for bootstrap FD insertion and entry point --- src/syscall/process.rs | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/src/syscall/process.rs b/src/syscall/process.rs index 3d50204921..032de37ac2 100644 --- a/src/syscall/process.rs +++ b/src/syscall/process.rs @@ -201,14 +201,19 @@ pub unsafe fn usermode_bootstrap(bootstrap: &Bootstrap, token: &mut CleanLockTok inner.fd = { let cap_fd = match scheme.as_scheme().scheme_root(token) { Ok(fd) => fd, - Err(_) => usize::MAX, + Err(e) => { + info!("scheme_root failed for {:?}: {}", i, e); + usize::MAX + } }; - insert_fd( + let inserted = insert_fd( scheme.scheme_id(), cap_fd, matches!(scheme, GlobalSchemes::Proc), token, - ) + ); + info!("inserted fd {:#x} for scheme_id {} cap_fd {}", inserted, scheme.scheme_id().get(), cap_fd); + inserted }; } } @@ -290,7 +295,7 @@ pub unsafe fn usermode_bootstrap(bootstrap: &Bootstrap, token: &mut CleanLockTok .expect("failed to copy memory to bootstrap"); let bootstrap_entry = u64::from_le_bytes(bootstrap_slice[0x1a..0x22].try_into().unwrap()); - debug!("Bootstrap entry point: {:X}", bootstrap_entry); + info!("Bootstrap entry point: {:#x}, pages: {}, stack at {:#x}", bootstrap_entry, bootstrap.page_count, PAGE_SIZE + bootstrap.page_count * PAGE_SIZE + 8 * PAGE_SIZE); assert_ne!(bootstrap_entry, 0); // Map a minimal user stack for the bootstrap process. Without this,