1
0
Fork 0
forked from AbleOS/ableos

More tracing

This commit is contained in:
able 2023-09-13 02:19:37 -05:00
parent e0aa63bebf
commit 008a8eb336
6 changed files with 10 additions and 3 deletions

View file

@ -32,3 +32,5 @@ pub fn spin_loop() -> ! {
pub fn hardware_random_u64() -> u64 {
0
}
pub fn register_dump() {}

View file

@ -53,6 +53,7 @@ fn collect_cpu_info(device_tree: &mut DeviceTree) {
}
pub fn collect_device_info() {
log::trace!("Collecting devices on x86_64");
// Lock device tree
unsafe {
DEVICE_TREE.force_unlock();

View file

@ -45,7 +45,6 @@ unsafe extern "C" fn _kernel_start() -> ! {
.expect("tried to get physical memory mapping offset from Limine")
.offset,
));
allocator::init(INITIAL_KERNEL_HEAP_START, INITIAL_KERNEL_HEAP_SIZE as _);
static MMAP_REQ: MemmapRequest = MemmapRequest::new(0);
@ -115,6 +114,7 @@ unsafe extern "C" fn _kernel_start() -> ! {
// TODO: Add in rdseed and rdrand as sources for randomness
let _rand = xml::XMLElement::new("Random");
log::trace!("Getting boot modules");
let bm = MOD_REQ.get_response().get();
let mut bootmodules = alloc::vec::Vec::new();

View file

@ -33,7 +33,9 @@ pub fn kmain(cmdline: &str, boot_modules: BootModules) -> ! {
let dt = DEVICE_TREE.lock();
info!("Device Tree: {}", dt);
// TODO(Able): This line causes a deadlock
// info!("Device Tree: {}", dt);
info!("Boot complete. Moving to init_system");
// TODO: schedule the disk driver from the initramfs

View file

@ -4,7 +4,7 @@ use log::{Level, SetLoggerError};
pub fn init() -> Result<(), SetLoggerError> {
log::set_logger(&crate::logger::Logger)?;
log::set_max_level(log::LevelFilter::Debug);
log::set_max_level(log::LevelFilter::Trace);
Ok(())
}

View file

@ -106,6 +106,7 @@ struct Task {
impl Task {
pub fn new(future: impl Future<Output = ()> + Send + 'static) -> Self {
log::trace!("New task scheduled");
Self {
future: Box::pin(future),
}
@ -129,6 +130,7 @@ struct TaskWaker {
impl Wake for TaskWaker {
fn wake(self: Arc<Self>) {
log::trace!("Woke Task-{:?}", self.id);
self.wake_by_ref();
}