From b8284137d4e0eec11c78bc14047243fce6a51373 Mon Sep 17 00:00:00 2001 From: Benji Dial Date: Sun, 6 Sep 2020 15:47:06 -0400 Subject: minor changes, redoing makefile, meminfo program --- src/kernel/main.c | 23 +++++++++-------------- 1 file changed, 9 insertions(+), 14 deletions(-) (limited to 'src/kernel/main.c') diff --git a/src/kernel/main.c b/src/kernel/main.c index 2f63d71..d99b595 100644 --- a/src/kernel/main.c +++ b/src/kernel/main.c @@ -124,30 +124,25 @@ void main() { logch('\n'); } - if (!try_elf_run(drives, "BIN/INIT.ELF")) - panic("Failed to load init program."); - if (BOOT_INFO->support_flags & BIS_PAE) - logsz("Processor supports PAE (but Portland OS does not yet).\n\n"); + logsz("Processor supports PAE (but Portland OS does not yet).\n"); else - logsz("Processor does not support PAE.\n\n"); + logsz("Processor does not support PAE.\n"); - u32_dec(kernel_pages_left * 4, nbuf); - logsz(nbuf); - logsz("k / "); + logsz("Kernel dynamic area size: "); u32_dec(max_kernel_pages * 4, nbuf); logsz(nbuf); - logsz("k kernel heap free.\n"); - u32_dec(user_pages_left * 4, nbuf); - logsz(nbuf); - logsz("k / "); + logsz("k\nUserspace area size: "); u32_dec(max_user_pages * 4, nbuf); logsz(nbuf); - logsz("k user memory free.\n"); + logsz("k\n\n"); + + if (!try_elf_run(drives, "BIN/INIT.ELF")) + panic("Failed to load init program."); init_idt(); + logsz("Switching to init task.\n"); set_log_mode(LOG_USER); - logch('\n'); _start_user_mode(); } \ No newline at end of file -- cgit v1.2.3