From 0d5f4201217272f93d608be86e644d58f181725a Mon Sep 17 00:00:00 2001 From: Alexis211 Date: Sat, 19 Sep 2009 20:37:05 +0200 Subject: Lot of changes. Log now go to /System/Logs/*.log --- Source/Kernel/Core/kmain.wtf.cpp | 31 +++++++++++++++++-------------- 1 file changed, 17 insertions(+), 14 deletions(-) (limited to 'Source/Kernel/Core/kmain.wtf.cpp') diff --git a/Source/Kernel/Core/kmain.wtf.cpp b/Source/Kernel/Core/kmain.wtf.cpp index 11fbbea..e3ef2fd 100644 --- a/Source/Kernel/Core/kmain.wtf.cpp +++ b/Source/Kernel/Core/kmain.wtf.cpp @@ -24,7 +24,8 @@ #include #include #include -#include +#include +#include #include #include @@ -95,30 +96,33 @@ void kmain(multiboot_info_t* mbd, u32int magic) { Mem::createHeap(); OK(kvt); INFO(kvt); *kvt << "Free frames : " << (s32int)PhysMem::free() << "/" << (s32int)PhysMem::total() << "\n"; - PROCESSING(kvt, "Registering textual VGA output..."); - Dev::registerDevice(vgaout); OK(kvt); - PROCESSING(kvt,"Initializing PIT..."); Dev::registerDevice(new Timer()); OK(kvt); PROCESSING(kvt, "Initializing multitasking..."); Task::initialize(String((char*)mbd->cmdline), kvt); OK(kvt); - PROCESSING(kvt, "Setting up keyboard..."); - Dev::registerDevice(new PS2Keyboard()); //Initialize keyboard driver - Kbd::setKeymap(keymapFR_normal, keymapFR_shift, keymapFR_caps, keymapFR_altgr, keymapFR_shiftaltgr); //Load keymap - Kbd::setFocus(kvt); //Set focus to virtual terminal - OK(kvt); - - PROCESSING(kvt, "Detecting floppy drives..."); - FloppyController::detect(); OK(kvt); - PROCESSING(kvt, "Mounting first module as ramfs on root directory..."); FileSystem* fs = new RamFS((u8int*)mods[0].mod_start, 1024 * 1024); DirectoryNode* cwd; cwd = fs->getRootNode(); VFS::setRootNode(cwd); OK(kvt); + PROCESSING(kvt, "Setting up logs..."); + Log::init(KL_STATUS); OK(kvt); + INFO(kvt); *kvt << "Logs are now going to files in /System/Logs/\n"; + + Dev::registerDevice(vgaout); + Log::log(KL_STATUS, "kmain : Registered textual VGA output"); + + Dev::registerDevice(new PS2Keyboard()); //Initialize keyboard driver + Kbd::setKeymap(keymapFR_normal, keymapFR_shift, keymapFR_caps, keymapFR_altgr, keymapFR_shiftaltgr); //Load keymap + Kbd::setFocus(kvt); //Set focus to virtual terminal + Log::log(KL_STATUS, "kmain : Keyboard set up"); + + FloppyController::detect(); + Log::log(KL_STATUS, "kmain : Floppy drives detected"); + asm volatile("sti"); while(1) { @@ -212,7 +216,6 @@ void kmain(multiboot_info_t* mbd, u32int magic) { *kvt << "No argument specified.\n"; } } else if (tokens[0] == "wf") { - //*kvt << "Sorry, this command isn't implemented yet.\n"; if (tokens.size() == 1) { *kvt << "No file to write !\n"; } else { -- cgit v1.2.3