kernel: add INFO logging for bootstrap FD insertion and entry point
This commit is contained in:
@@ -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,
|
||||
|
||||
Reference in New Issue
Block a user